Hi,

I have had success by subclassing listboxes and implementing the menu  
handlers in the class. This has been a very reliable solution for me.

Simply create a Listbox class that contains menu handlers for the  
desired Edit Menu items. You can then define Event Definitions that  
are called by those menu handlers, and put the desired code into the  
subclass's relevant Events.

Steve

=========================================================
==     Stephen E. Hutson, AquilaDigital Partnership    ==
==             http://www.adpartnership.net            ==
=========================================================

On Apr 10, 2007, at 1:15 p.m., GregO wrote:

> On Apr 10, 2007, at 2:12 pm, GregO wrote:
>
>> On Apr 10, 2007, at 2:10 pm, GregO wrote:
>>
>>> On Apr 7, 2007, at 6:50 pm, Dax Dasilva wrote:
>>>
>>>> Hi List,
>>>>
>>>> In some recent version of RB it looks like the Command-A behavior
>>>> on a
>>>> listbox that selects all lines is now an automatic built-in
>>>> behavior (this
>>>> may be a Mac-only).
>>>>
>>>> While this is great in most cases, i have a few listboxes where i
>>>> need to
>>>> control what gets selected, and previously i used the keyDown event
>>>> of the
>>>> listbox to trap the Command-A and do my thing.
>>>>
>>>> Unfortunately the keydown event of the listbox no longer fires
>>>> under recent
>>>> versions of RB when doing Command-A, and there isnt a new SelectAll
>>>> event
>>>> for the listbox either. Has anybody run into this that has found a
>>>> workaround or knows of a way to trap that event?
>>>>
>>>
>>> Maybe I misunderstood, but if I have a listbox and add the following
>>> code to the keydown event:
>>>
>>>    if keyboard.AsyncCommandKey and key = "A" then
>>>      me.AddRow "CMD-A"
>>>      return true
>>>    end if
>>>
>>> pressing command-A gets captured and CMD-A is added to the list for
>>> each time I press it... Is this not what you're looking for?
>>>
>>
>> Whoops. scratch that. It works that way in listboxes that are set to
>> single selection, but not multiple.
>
> You CAN, however, set the event handler EnableMenuItems to:
>
> EditSelectAll.enabled = false
>
> and then KeyDown will get the event properly.
>
> GregO
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to