realbasic-nug
[Top] [All Lists]

Re: Listbox cell focus

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Listbox cell focus
From: Tom Benson <tombenson at mac dot com>
Date: Tue, 1 Mar 2005 10:26:48 +1100
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <944d31800fbae5546bbdd84fe925b9c7 at nc dot rr dot com> <p06210215be486184f077 at [129 dot 94 dot 109 dot 203]> <5ea98f26927a5bd4497443be35c86c46 at nc dot rr dot com>

On 01/03/2005, at 9:09 AM, Christian Miller wrote:

On Feb 28, 2005, at 12:52 AM, Dr Gerard Hammond wrote:
I have a listbox and which has some columns as editable cells and other columns as checkboxes. How can I programmatically set focus on a checkbox field so that the user can then press the space bar to check/uncheck a particular item? I saw no method to do this in the online help.

I use

  if key = " " then
    if me.ListIndex <> -1 then
me.cellcheck(me.ListIndex, 0) = NOT me.cellcheck(me.ListIndex, 0)
      TableCellAction(me.ListIndex)  //private method
      Return true
    end
  end

Thanks... that would work if there were only one checkbox per row. I have some listboxes that have six checkboxes per row.


The only way I can think of is to fake it, with 12 columns (alternate between editable columns and checkbox columns), then check for the " " key being pressed in the cellkeydown event of the cell adjacent to the checkbox.

I don't believe you can give focus to a checkbox cell..

Cheers,
Tom

_______________________________________________
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>

<Prev in Thread] Current Thread [Next in Thread>