iOS Question Picker

Discussion in 'iOS Questions' started by ciginfo, Mar 18, 2015.

  1. ciginfo

    ciginfo Active Member Licensed User

    Where can I find a tuto for Picker ?
    Thank you
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    There isn't a full tutorial about Picker. You can see an example here: http://www.b4x.com/android/forum/threads/example-coordinates-calculator-source-code.46851/#content

    It is quite simple to use Picker.
    See this example:
    Code:
    Sub Process_Globals
       
    Public App As Application
       
    Public NavControl As NavigationController
       
    Private Page1 As Page
       
    Private Picker1 As Picker
    End Sub

    Private Sub Application_Start (Nav As NavigationController)
       NavControl = Nav
       Page1.Initialize(
    "Page1")
       NavControl.ShowPage(Page1)
       Page1.RootPanel.LoadLayout(
    "1")
       Picker1.SetItems(
    0Array(1,2,3,4,5))
       Picker1.SetItems(
    1Array("One""Two""Three""Four""Five"))
    End Sub

    Sub Picker1_ItemSelected (Column As Int, Row As Int)
       
    Log("Selected item in column: " & Column & " is: " & Picker1.GetSelectedItem(Column))
    End Sub
    Make sure to create a layout file with a picker named Picker1.

    upload_2015-3-19_8-50-42.png
     
    mare1980k1 likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice