EagleEye
31-01-2006 06:26:16
I am having trouble getting some combo boxes to work.
The problem is that the ListBoxTextItems are not being added to the damn combo boxes! I click the right side (the drop down arrow) of the top combo box (the only one I'm working with right now), and nothing happens. If I set the combo box to readonly=false, I can type in the combo box... hovering over the drop down arrow makes it light up... so internal events are working and reacting to keyboard and mouse stuff...
So why aren't these items being added to the list?
Posted below is the code, so feel free to take a look and tell me what I may be doing wrong.
The code has been messed around with a lot, so it's not all that optimized, so forgive me for that.
The window itself looks like this when it's created and shown:
(the font is too big, but ignore that)
The combo boxes are to the right of their labels as you can see.
That's about it... I only pasted the stuff relevant to the top combo box...
The problem is that the ListBoxTextItems are not being added to the damn combo boxes! I click the right side (the drop down arrow) of the top combo box (the only one I'm working with right now), and nothing happens. If I set the combo box to readonly=false, I can type in the combo box... hovering over the drop down arrow makes it light up... so internal events are working and reacting to keyboard and mouse stuff...
So why aren't these items being added to the list?
Posted below is the code, so feel free to take a look and tell me what I may be doing wrong.
The code has been messed around with a lot, so it's not all that optimized, so forgive me for that.
The window itself looks like this when it's created and shown:
(the font is too big, but ignore that)
The combo boxes are to the right of their labels as you can see.
Private WithEvents cmbClasses As Combobox
Private WithEvents cmbDisciplines As Combobox
Private WithEvents cmbSkills As Combobox
Private WithEvents cmbSpecializations As Combobox
Private WithEvents lblClasses As StaticText
Private WithEvents lblDisciplines As StaticText
Private WithEvents lblSkills As StaticText
Private WithEvents lblSpecializations As StaticText
Private WithEvents pbClassLevel As ProgressBar
Private WithEvents pbDisciplineLevel As ProgressBar
Private WithEvents pbSkillLevel As ProgressBar
Private WithEvents pbSpecializationLevel As ProgressBar
Private WithEvents TextWindow As StaticText
Private lbiClasses(6) As ListboxTextItem
Private lbiDisciplines(0) As ListboxTextItem
Private lbiSkills(0) As ListboxTextItem
Private lbiSpecializations(0) As ListboxTextItem
''' I will redim those zero arrays as needed
cmbClasses = WM.CreateCombobox(Combobox, Name)
cmbClasses.SetSize(cbSize)
cmbClasses.setReadOnly(True)
cmbClasses.SetPosition(rAlign, Y)
cmbClasses.SubscribeEvents()
''' Mywindow = the skills window...
MyWindow.AddChildWindow(cmbClasses)
lbiClasses(0) = New ListboxTextItem("Common", Convert.ToUInt32(VermundData.Vermund.Data.Classes.Common), IntPtr.Zero, False, False)
cmbClasses.addItem(lbiClasses(0))
lbiClasses(1) = New ListboxTextItem("Elementalist", Convert.ToUInt32(VermundData.Vermund.Data.Classes.Elementalist), IntPtr.Zero, False, False)
cmbClasses.addItem(lbiClasses(1))
lbiClasses(2) = New ListboxTextItem("Rogue", Convert.ToUInt32(VermundData.Vermund.Data.Classes.Rogue), IntPtr.Zero, False, True)
cmbClasses.addItem(lbiClasses(2))
lbiClasses(3) = New ListboxTextItem("Scholar", Convert.ToUInt32(VermundData.Vermund.Data.Classes.Scholar), IntPtr.Zero, False, True)
cmbClasses.addItem(lbiClasses(3))
lbiClasses(4) = New ListboxTextItem("Warrior", Convert.ToUInt32(VermundData.Vermund.Data.Classes.Warrior), IntPtr.Zero, False, True)
cmbClasses.addItem(lbiClasses(4))
lbiClasses(5) = New ListboxTextItem("Worker", Convert.ToUInt32(VermundData.Vermund.Data.Classes.Worker), IntPtr.Zero, False, True)
cmbClasses.addItem(lbiClasses(5))
That's about it... I only pasted the stuff relevant to the top combo box...