B4J Question ListSelectionView buttons

le_toubib

Active Member
Licensed User
Longtime User
hi all
i m trying to use the ListSelectionView , but the 4 buttons dont show those >> or > or << arrows .
when i used a css code for buttons , the >> button showed an empty square ....
how to target those buttons , through css ?
also how to disable those >> buttons ?
 

le_toubib

Active Member
Licensed User
Longtime User
i tried to add this as a stylesheet to the listselectionview.stylsheets :
.list-selection-view {
-fx-padding: 10px;
}

.list-selection-view > .grid-pane {
-fx-vgap: 10px;
-fx-hgap: 10px;
}

.list-selection-view > .grid-pane > .list-header-label {
-fx-font-family: "Arial";
-fx-font-size: 20pt;
-fx-font-weight: bold;

}
[/QUOTE
but it didnt make any difference.
 
Upvote 0

le_toubib

Active Member
Licensed User
Longtime User
This is what I get ..
 

Attachments

  • 20170208_082830.jpg
    20170208_082830.jpg
    209.8 KB · Views: 219
Upvote 0

le_toubib

Active Member
Licensed User
Longtime User
https://1drv.ms/u/s!At4qj0SiUFRH4BkmUghjSGfyuGVs

removing the CSS file will let the arrows appear on some devices but not others (really couldnt find a pattern , some w10 , some w7 )...
i wish i could :
0- actually show the buttons arrows with the global css , or dedicating a css to the slv alone that will show the arrows.
1- control their looks
2- detect their action
3 - disable / enable them as needed
 
Upvote 0

le_toubib

Active Member
Licensed User
Longtime User
No it doesn't ..
It does on some devices ...
And shows blank buttons on many other devices ... without any modification.... and many of the affected devices are Vanilla windows 7 fresh installation
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Workaround:
1. Add a label named lblFontAwesome with the visual designer. Set its font to FontAwesome and the text size to 12.
2. Call this sub after you add the ListSelectionView:

B4X:
Sub SetListSelectionButtons (ListSelection As ListSelectionView)
   Dim jo As JavaObject = ListSelection
   Dim children As List = jo.RunMethod("getChildrenUnmodifiable", Null)
   If children.Size = 0 Then
     CallSubDelayed2(Me, "SetListSelectionButtons", ListSelection)
     Return
   End If
   Dim p As Pane = children.Get(0)
   For Each n As Node In p.GetAllViewsRecursive
     If n Is Button Then
       Dim b As Button = n
       b.Font = lblFontAwesome.Font
     End If
   Next
End Sub
 
Upvote 0

le_toubib

Active Member
Licensed User
Longtime User
cant find the FontAwesome in internal designer font list nor the scene builder ... ?
Edit : .. i think i have to use 4.7 then :) ?
 
Upvote 0
Top