[Gambas-user] ComboBox.Clean basic question

Hans-Martin Bundeshund bundeshund at ...467...
Sat May 29 23:43:06 CEST 2004


Am Samstag, 29. Mai 2004 22:25 schrieb Benoit Minisini:
...
> I see no problem with clearing the combobox on my machine.
>
> Can you send me the project that crashes so that I debug it ?

Oh, I see. I created a small application, only have a combobox and a button:

+++
PUBLIC SUB _new()
  combobox1.Add("Entry1")
  combobox1.Add("Entry2")
  combobox1.Add("Entry3")
END


PUBLIC SUB Button1_Click()
  combobox1.Clear
  combobox1.Add("New1")
  combobox1.Add("New2")
  combobox1.Add("New3")
END
+++

For my suprise this works for me, too. So I must make some mistake, filling my 
combobox, I guess. Here is my source:

+++
  ...
  $hConn.Open
  'sstring = "a simple sql-select"
  rData = $hConn.Exec(sstring)  
    FOR EACH rData.Field
        TRY rData.MoveTo(rDZ)
        TRY ProdukteListBox.add(rData!id & "-" & rData!name1 & " - " & 
Str(rData!datum) & " - " & rData!status1)
    INC rDZ
    NEXT
  $hConn.Close
  ME.SetFocus
  ME.Refresh
  ...
+++


Regards,
HM




More information about the User mailing list