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