Combobox on tab forms event not functioning?

Rioven

Active Member
Licensed User
Hi!
I add combobox1 to multi-tab form and then I use the event...
Sub combobox1_SelectionChanged but seems not working.
Could you please check?
thanks
 

specci48

Well-Known Member
Licensed User
Hi Erel,

I took the tabcontrol example and added a combobox to the third page. What is wrong with the following code if you say that all is working properly:

B4X:
Sub Globals
End Sub

Sub App_Start
   Form1.Show
   AddButton(Form1,"Button1",0,0,80,40,"Button1")
   AddTextBox (Form1,"TextBox1",40,20,100,25,"")
   AddCombobox(Form1,"ComboBox1",40,20,100,25)
   For i = 1 to 9
      ComboBox1.add(i)
   Next
   tbc.New1 ("Form1", 10,10, 200, 200)
   tbc.AddTabPage("Page1")
   tbc.AddTabPage("Page2")
   tbc.AddTabPage("Page3")
   tbc.AddControl("Button1",0,20,20)
   tbc.AddControl("TextBox1",1,20,30)
   tbc.AddControl("ComboBox1",2,20,30)
End Sub

Sub ComboBox1_SelectionChanged
   msgbox("Selected Entry: " & ComboBox1.Item(ComboBox1.SelectedIndex))
End Sub
specci48
 

RandomCoder

Well-Known Member
Licensed User
Are you using B4PPC version 5 because as I recall there was a problem in Version 4 that meant that ComboBox's and RadioButtons didn't work??

Regards,
RandomCoder
 

Rioven

Active Member
Licensed User
I am using V5 and combobox event is working properly directly on forms but can't work on tab forms as specci48's sample codes.
 

Rioven

Active Member
Licensed User
Thanks Erel, guys...I'll should keep that in mind.
 
Top