Home
REALbasic Examples [entries|archive|friends|userinfo]
Jonathan Johnson

[ website | REALbasic Coding ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| REAL Software ]

Tabbable Listbox [May. 13th, 2004|02:52 pm]
To tab between each cell in a row, this code works pretty well (put in the CellKeyDown event):

Function CellKeyDown(row as Integer, column as Integer, key as String) As Boolean
   dim nextColumn as Integer
   if key = chr(9) then
      if keyboard.ShiftKey then
         nextColumn = column - 1
         if nextColumn < 0 then
            nextColumn = ColumnCount-1
         end if
      else
         nextColumn = column + 1
         if nextColumn >= ColumnCount then
            nextColumn = 0
         end if
      end if
      EditCell(row,nextColumn)
      return true
   end if
End Function
link1 comment|post comment

navigation
[ viewing | most recent entries ]

Advertisement