B4A Library [B4X] [XUI] SD Selector

SD_Selector

Author:
Star-Dust
Version: 0.05
  • fourSelector
    • Events:
      • ChangeValue (nSelector As Int, Index As Int)
      • CenterClick
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • GetBase As B4XView
      • GetItemIndex (nSelector As Int) As Int
      • GetItemValue (nSelector As Int) As String
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • SetItemIndex (nSelector As Int, Index As Int) As String
      • SetItems (nSelector As Int, ListItem As List) As String
        nSelector = 0 to 3
      • SetWheelColors (UpColor As Int, RigthColor As Int, DownColor As Int, LeftColor As Int) As String
    • Properties:
      • WheelSpeed As Int
        Wheel: speed 20-200 slow
  • fourSelectorPlus
    • Events:
      • ChangeValue (Index As Int, Text As String)
      • CenterClick
    • Fields:
      • mBase As B4XView
      • Tag As Object
    • Functions:
      • Class_Globals As String
      • DesignerCreateView (Base As Object, Lbl As Label, Props As Map) As String
        Base type must be Object
      • GetBase As B4XView
      • Initialize (Callback As Object, EventName As String) As String
      • IsInitialized As Boolean
        Verifica se l'oggetto sia stato inizializzato.
      • SetItems (Item1 As String, Item2 As String, Item3 As String, Item4 As String) As String
    • Properties:
      • TextFont As B4XFont
      • WheelSpeed As Int


Video4.gif
Video 5.gif
 

Attachments

  • B4X Selector Example.zip
    15.2 KB · Views: 169
  • jSD_Selector 0.05.zip
    11.4 KB · Views: 138
  • SD_Selector 0.05.zip
    11.1 KB · Views: 146
  • iSD_Selector 0.05.zip
    195.8 KB · Views: 136
Last edited:

AnandGupta

Expert
Licensed User
Longtime User
Not a single line of description, still everyone loves it :D

The manner you can conceive something extraordinary is remarkable. šŸ‘
Thanks.

Regards,

Anand
 

Star-Dust

Expert
Licensed User
Longtime User
Not a single line of description, still everyone loves it :D

The manner you can conceive something extraordinary is remarkable. šŸ‘
Thanks.

Regards,

Anand
I've been trying to figure out an alternative to a multiple series of ComboBoxes (or spinners) for a while.

The comboBox is a very PC-related view but not always practical on mobile devices and certainly not modern. Something newer is the MiniSearchView. But I was looking for something more spectacular and that would allow a cascade of choices.

What you see is not yet what I imagined, but I have to understand how to do it. For now I am satisfied
 

Star-Dust

Expert
Licensed User
Longtime User
Something similar with a horizontal scroll.

ezgif.com-optimize.gif


But I don't want to put a horizontal ScorllView, I want to avoid creating the entries which are not visible. Create them dynamically as they are visible.

But I am looking for a fast method and with a concise code, as I like it. I will await the next lighting
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update rel. 0.03
  • Added fourSelectorPlus class.

Adds a Selector with 4 items that can be selected by clicking. It is under development there will be other new functions
Video 5.gif



Example
Example:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    Private fourSelectorPlus1 As fourSelectorPlus
End Sub

'.......
fourSelectorPlus1.SetItems("One","Two","Three","Four")
'.......

Public Sub fourSelectorPlus1_ChangeValue (Index As Int, Text As String)
    Log(Index)
    Log(Text)
End Sub
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Update rel. 0.04
  • Added CenterClick to fourSelectorPlus
  • Added iOs versione
  • Added B4XPage example
 

Star-Dust

Expert
Licensed User
Longtime User
Since it is a view that provides a choice of the user, what do you need a code setting of the choices?
 

werner_Fourie

Member
Licensed User
Since it is a view that provides a choice of the user, what do you need a code setting of the choices?
Hi Star-Dust..

I use this control so that the user highlights a certain panel in my app by clicking on Your control..

Region 1-4 or press the "+" and Your control shows region 5- 8 and so on..

There are 16 regions..

If a region was clicked on Your control it highlights a panel...There are 16 panels..

There is no problem so far..Everything works well..

What I'm looking for is..

If the user clicks on any of the 16 panels it must pass an index to Your control and highlight that area in Your control..

example fourSelectorPlus1.setindex..

I hope this is achievable since it is a very nice control..

Regards

Werner
 

Star-Dust

Expert
Licensed User
Longtime User
update to the latest version
 
Top