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 |
No real name 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)
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 |
Grant Gayed 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.
|
|
| |
Goto Forum:
Current Time: Thu Sep 19 04:02:27 GMT 2024
Powered by FUDForum. Page generated in 0.05611 seconds
|