[Gambas-user] SelectAll feature

Matti math.eber at ...221...
Thu Nov 11 20:47:41 CET 2010


If you want to do it via CTRL+A, you have to write a keypress event for the form:

Public Sub Form_KeyPress()
  If Key.Code = Key["A"] And If Key.Control Then
    TextBox1.SelectAll
  Endif
End

And if you want to have the text selected automatically when the text box gets
the focus, do:

Public Sub TextBox1_GotFocus()
  TextBox1.SelectAll
End


Am 11.11.2010 08:01, schrieb Demosthenes Koptsis:
> Good morning to all,
> 
> While setting properties or any text that is in a textbox i wanted to
> press CTRL+A to select all the word and then press BACKSPACE to delete
> it and next to write a new one.
> 
> But the CTRL+A is not working and i need to press many times the arrow
> keys to set the pointer to the end of the word and then to press many
> times BACKSPACE to delete the word.
> 
> I know this is not so a big deal but if i do it many times is annoying.
> 
> Is it possible to enable the SelectAll feature for any textbox or any
> other control that contains text so to manage more fastest the strings? 
> 




More information about the User mailing list