Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Dynamically displaying controls depending on selection from combo box / Master Details model(The ability to display different controls in a view dynamically)
Dynamically displaying controls depending on selection from combo box / Master Details model [message #638366] Thu, 11 November 2010 03:19 Go to next message
No real name is currently offline No real nameFriend
Messages: 2
Registered: November 2010
Junior Member
Hi all!

I'm a complete n00b at RCP and I'm trying to prod and poke my way through. I'm working on some geological software, part of which involves specifying a geometry (go figure) Very Happy

For example, when trying to define a line, it will have a length, and an orientation (rotation through x, y, z) as user input which will be linked through a bean to an underlying model. When defining a plane, it might have a width and breadth associated with it and an orientation. When defining a circle, it'll have a centre point, and a radius etc.

All of these would have different controls for user input that are dependent on the "geometry" being defined. I was wondering what might actually be the best way to present the controls dynamically when the user has selected either a line, circle, plane etc from a combo box, or a listbox? I.e. if the user clicks "circle", the controls pertaining to a circle are shown, if he selects "line", the controls for the line are displayed.

This isn't necessarily just RCP specific but also general UI programming. As I'm developing this as an RCP application in Eclipse, I'd appreciate any thoughts you have.

Thank you for your help.
Re: Dynamically displaying controls depending on selection from combo box / Master Details model [message #638795 is a reply to message #638366] Fri, 12 November 2010 14:55 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Here are two ways to do it, at the swt level:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet98. java
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet249 .java

HTH,
Grant

<j.lambertporter@gmail.com> wrote in message
news:ibfn5b$fqg$1@news.eclipse.org...
> Hi all!
>
> I'm a complete n00b at RCP and I'm trying to prod and poke my way through.
> I'm working on some geological software, part of which involves specifying
> a geometry (go figure) :d
> For example, when trying to define a line, it will have a length, and an
> orientation (rotation through x, y, z) as user input which will be linked
> through a bean to an underlying model. When defining a plane, it might
> have a width and breadth associated with it and an orientation. When
> defining a circle, it'll have a centre point, and a radius etc.
>
> All of these would have different controls for user input that are
> dependent on the "geometry" being defined. I was wondering what might
> actually be the best way to present the controls dynamically when the user
> has selected either a line, circle, plane etc from a combo box, or a
> listbox? I.e. if the user clicks "circle", the controls pertaining to a
> circle are shown, if he selects "line", the controls for the line are
> displayed.
> This isn't necessarily just RCP specific but also general UI programming.
> As I'm developing this as an RCP application in Eclipse, I'd appreciate
> any thoughts you have.
>
> Thank you for your help.
Re: Dynamically displaying controls depending on selection from combo box / Master Details model [message #638930 is a reply to message #638795] Sat, 13 November 2010 12:44 Go to previous message
No real name is currently offline No real nameFriend
Messages: 2
Registered: November 2010
Junior Member
Thanks Grant!

I appreciate the help - I'll give these bad boys a read. Still very much Java SE focused!

Thanks again Smile
Previous Topic:I think *IMenuService* has a bug in 3.6
Next Topic:why a translate method is used twice?
Goto Forum:
  


Current Time: Thu Apr 18 10:09:28 GMT 2024

Powered by FUDForum. Page generated in 0.02045 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top