On 12/27/05 10:00 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Message: 1 > Subject: Tabbing Between Columns in ListBox > From: Chuck Pelto <[EMAIL PROTECTED]> > Date: Tue, 27 Dec 2005 09:05:45 -0700 > > Is this possible? And how can I change the text in a listbox cell > without going through the system in the examples? > > Regards, > > Chuck I'm not sure what the system in the examples is, but you must roll your own. (Search the archive for "Moving column-to-column in listbox with tab key") Michael ---------------------------- Below is a snippet that Charles Yeomans posted for a CellKeyDown event handler: <snippet> Here's some code to tab to the next/previous cell. I've written such code before, but the code below has not been tested; I'll leave that to you. Function CellKeyDown(row as Integer, column as Integer, key as String) as Boolean If key = Chr(9) then If Keyboard.ShiftKey then //move to previous cell If column > 0 then me.EditCell row, column - 1 ElseIf row > 0 then me.EditCell row - 1, me.ColumnCount - 1 Else //at first cell, so do nothing End if Else //move to next cell If column < me.ColumnCount - 1 then me.EditCell row, column + 1 ElseIf row < me.ListCount - 1 then me.EditCell row + 1, 0 Else //at last cell, so do nothing End if End if Return true Else //some other key was pressed, so we allow it through Return false End if End Function -------------- Charles Yeomans </snippet> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
