[Gambas-user] Its a Bug?...selection
Ron Onstenk
ronstk at ...239...
Thu Aug 17 17:02:32 CEST 2006
On Thursday 17 August 2006 15:04, javier romero wrote:
> Hi, in a proyect i have 2 text box and a buttom, when starts i set the focus and select (text1.selection.all) to the first, if i use the tab buttom when the focus goes to the second text the selection of the first text is clear but, if i click the buttom and in click event i use text2.setfocus() the focus goes to text2 but the selection of text1 is not cleared. The same occurs when i clicked with the mouse over the second text.
>
> I supose when a control lose the focus always the selection is cleared is that correct?
>
> I'm using ganbas 1.0.16
>
> Thanks
> Javier
And when the focus go back to text1 ?
I need the previous selected to get on clip board and past it somewhere.
The selection is part of the control text1 and text2 has also a selection.
They do not change if focus is lost.
If you want that selection is lost use the Text1_Lostfocus() event.
The transfer of selected part is done with the clipboard.
Use the right mouse button in the textbox to see a menu for it.
In any case the both textboxes has there own selection handler
and buffers for it.
Just in case you want to do in example:
public button1_click()
text3.text = text1.selection & text2.selection it should stay selected.
end
you see why it must stay selected.
Ron
More information about the User
mailing list