[Gambas-user] autocomplete

ron ronstk at ...239...
Mon Apr 12 08:34:28 CEST 2004


On Monday 12 April 2004 05:45, Rizky Tahara Shita wrote:
> hi,
> i have several questions about gambas;
> 1. i have a combobox and a text property that have value "tahara".
> i want when the form loads or got focused, the "har" characters (part of
> that combobox.text value) automaticly selected.
> how do i do that in gambas ? i don't have a .selstart or sellength to
> doit.. :(
>
> 2. why label objects cannot have the underline for the shortcut key (by
> using the '&' before the word that will be used for the shortcut) ?
> for example, i have label1 and textbox1; then i have label2 and textbox2;
> and i have label3 and textbox3 on a form. if the label objects can have the
> underline, when the program runs,
> it will be easier to move the cursor to the selected textboxes with the
> shortcut.
> but, if i have a frame that have the shortcut with the '&' and a textbox in
> it, and when i run the program and press the frame shortcut, the cursor
> will move the the textbox...
>
> i always do this in VB, so without any coding, i can focus on a textboxes
> with the label's shortcut key that i already defined.
> may be vb lost focus the labels and move the focus to the next tabindex. i
> don't know now if gambas already has a tabindex or not..
> and for my problem, what's the solution? should i have code something for
> that ?
>
> 3. in gambas 0.92, i cannot use CTRL + W to show the form when i'm
> coding... :(
>
>
> Regards,
>
>
> tahara!

2b)
In VB the label is a child of the textbox control.
Ask for textbox1.controls(0).text and you get the caption of the label.

In gambas the labels are really separate of the textbox.
You hav to add them yourself.

The only exception are the Checkbox and RadioButton but be carefull
in VB the whole area of the CheckBox/RadioButton raise the click event.
Set the border to plain, you see this area.

i.e. a checkbox with 1 letter as caption but a width for 40 characters.
Clicking in the blank space raise the event in VB.

The QT/Gambas version raises it only on the Box/Option part and the caption 
text. Not the blank space after this single character.
Small margin of one character exist after this 1 character.

Maybe a textbox as TextBox1Label without border and a 
public sub TextBox1Label_Enter() event code with 
	TextBox1.SetFocus
end

Ron




More information about the User mailing list