Loading...
Logo
Processing Forum

G4P Listbox?

in Contributed Library Questions  •  8 months ago  
Hi,

I'm brand new to this world so I hope this newbie question isn't too silly.
I've built a GUI in G4P using the the gui builder and it works fine.
Now I want to have a listbox containing strings such that the user can:
  • select a single item (no multiple selection)
  • add/delete items
  • move items up/down
  • rename items
  • load a new set of items from a String list[]
I can't see how to do this in G4P.
Would anyone have a suggestion of what to do?
Thanks,
Bob

Replies(6)

Re: G4P Listbox?

8 months ago
The GDropList is a single selection control.

The initial list of items can be setup in GUI Builder, but if you want more dynamic control then I suggest that your sketch maintains a String array of the items and use the

  setItems(String[] list, int selected)

method to change the drop-list items, passing the updated array and selected item index position.

Re: G4P Listbox?

8 months ago
Yes, I saw the GDropList, but I want a "point and shoot" interface and the drop list requires a click to open...

In my application the user should always have the list of choices displayed.

If the drop list could always be expanded, it would be fine.  Is there a way to do that?

Thanks again,
Bob

Re: G4P Listbox?

8 months ago

If the drop list could always be expanded.
Sorry no that's not possible within G4P



Re: G4P Listbox?

8 months ago
ok, thanks...

Is there any hope for a list box being added one day to G4P ?

Re: G4P Listbox?

7 months ago
Not in the short term I just have too much to do.

Submit an issue on GoogleCode for an enhancement for a list box with the functionality mentioned in your first post. It will act as a reminder to me for when I am twiddling my thumbs.

Re: G4P Listbox?

7 months ago
Ok, done.

Cheers,
bob