[Gambas-user] Bizarre things with controls

Benoît Minisini gambas at ...1...
Sun Jan 22 14:14:18 CET 2012


Le 20/01/2012 20:16, John Rose a écrit :
> When ButtonSearch is clicked, even though the only previous event coding on
> TextAreaDetails is to clear&  refresh it, text appears in it: this is as
> though ComboBoxTitle has been clicked.
>
> To display the Text in the TextBox part of a ComboBox (i.e. ComboBoxTitle,
> again in ButtonSearch_Click), it seems to be necessary also to put that
> same text as the first item of the list in the ListBox part: that item is
> not then shown at runtime in the popup list.
>
> Fragments of code from the attached Test project:
> Public Sub ButtonSearch_Click()
> ClearTitleAndDetails 'clears TextAreaDetails
> .
> .
> .
> With ComboBoxTitle
>    .Text = "Select Title"
>    .Add("Select Title")
>    .Add("T1")
>    .Add("T2")
>    .Add("T3")
>    .Enabled = True
>    .Refresh
> End With
> End
>
> Public Sub ComboBoxTitle_Click()
> EnableMainControls '
> TextAreaDetails.Text = "Lines of text."
> End
>

There was actually a bug in gb.gtk that let you use the 
ComboBox.Insert() method whereas the combo-box is read-only.

I fixed that in revision #4415. Can you fix your code too, and try your 
project with that revision? Then tell me if the behaviour is more logical.

Regards,

-- 
Benoît Minisini




More information about the User mailing list