B4J Question ComboBox/ChoiceBox does not showing items added

Discussion in 'B4J Questions' started by tcpip, Oct 21, 2019.

  1. tcpip

    tcpip Member Licensed User

    Hi all,

    I added from the designer in a form a comboBox and type the following:

    Under Process Globals: Public combo2 As ComboBox

    Under Appstart:

    combo2.Initialize("")
    combo2.Items.Add("AAAA")
    combo2.Items.Add("BBBB")

    When i run the app, i click on comboBox and do nothing. Does not show the items added.

    I tried the same with choiceBox but i get the same results.

    Any ideas??


    Thanks
     
  2. DonManfred

    DonManfred Expert Licensed User

    if you added them with the designer and you are loading this layout then you should NOT initialize them.
     
  3. tcpip

    tcpip Member Licensed User

    Thank you very much for your reply.
    I tried to remove the initialize and got error.

    But after reading your message, i add the lines after showing the form and works!!!


    Thanks!!!!
     
  4. DonManfred

    DonManfred Expert Licensed User

    it is not needed to add them after the form is showing...

    You should just place them AFTER the Loadlayout line.
     
    Erel and mangojack like this.
  5. tcpip

    tcpip Member Licensed User

    You are right!!!

    Thank you for your help!!!
     
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