realbasic-nug
[Top] [All Lists]

Re: Popup Menus in Listbox Cells

To: "REALbasic NUG" <realbasic-nug@lists.realsoftware.com>
Subject: Re: Popup Menus in Listbox Cells
From: Jérémie Leroy <JeremK@live.fr>
Date: Tue, 30 Jun 2009 01:55:35 +0200
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
Importance: Normal
In-reply-to: <6163C765-F19C-4AFB-A919-D55847DE352C@verizon.net>
References: <4c8d6c440906290645r4a97bee0y2af0b236c3c5bfd8@mail.gmail.com> <6163C765-F19C-4AFB-A919-D55847DE352C@verizon.net>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
I have a custom listbox with autocomplete, were a real popup menu appears. 
Which means that each cell of the listbox is a combobox.
If you want an example, please contact me in private.

Jeremie
--
ESILV Engineering Student
REALBasic Developer
http://pagesperso-orange.fr/JeremK/


From: Karen 
Sent: Monday, June 29, 2009 6:20 PM
To: REALbasic NUG 
Subject: Re: Popup Menus in Listbox Cells



On Jun 29, 2009, at 9:45 AM, Robert Steely wrote:

> I suppose, I could put text in the cell telling the user to <click  
> here to
> add item> and then bring up a separate dialog allowing the user to  
> select a
> valid entry from a listbox, but that doesn't seem very elegant or  
> efficient
> to me.
>
> How have others solved this problem?

This is easy to do.

Draw a disclosure widget (Filled triangle) say at the left side of  
the cell (or in a column next to it with just the widget). On  
MouseDown check if the user clicked in it. If they did, show a  
contextual(popup) menu at that spot. In the language reference see  
MenuItem and MenuItem.Popup. You can even make popup menu hierarchical.

Doing it yourself will help you learn RB and the listbox better.

- Karen





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

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


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