[Gambas-user] Dealing with "enter" key

Eilert eilert-sprachen at ...221...
Mon Dec 12 13:19:40 CET 2005


Liutauras Adomaitis schrieb:

>Hello,
>
>I want to program a text box, which will help me to jump to specific row in 
>the columnview control. The idea is to make such a textbox, where after 
>entering a row number and presing "ENTER" key focus will move to columnview 
>control and jump to the specific row, which item key value equal to textbox 
>value.
>  
>

I would use TextBox_KeyPress and within it

select case Key.Code
case Key.Enter
  'set Columnview here

end select

Do not forget that Enter and Return are two different keys.

I don't know the way how to set Columnview to a specific item, but there 
is .Find which might look for the item wanted and 
.ColumnViewItem.Selected which seems to do what you intend. Maybe you 
will have to use .EnsureVisible...

Rolf





More information about the User mailing list