Skip to main content



      Home
Home » Newcomers » Newcomers » how to dynamically change the layout by pressing a button
how to dynamically change the layout by pressing a button [message #47288] Tue, 05 April 2005 03:50 Go to next message
Eclipse UserFriend
Originally posted by: patrick.kaegi.netcetera.ch

Hello

We like to design a search-mask with some operators (on a toggle button).
If the selected operator is one like <> or >< we like to have 2 text's
instead of only 1 text in case of = or < or >.

does anybody know if this is possible and how?

thanks a lot for any hint
patrick
Re: how to dynamically change the layout by pressing a button [message #47775 is a reply to message #47288] Wed, 06 April 2005 03:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.server.net

Patrick,

I am not exactly sure, of what you are trying to design. Is it, that the
user has to select (via e.g. Combobox) the operator and then either one
or two text boxes should appear? In this case I would catch the change
event of the Combobox with an eventlistener and evaluate the user input
to decide if one or two boxes should appear.

Again I am absolutely not sure, if this is what you are looking for. you
can find an easy example under
http://java.sun.com/docs/books/tutorial/uiswing/learn/exampl e5.html (I
know it is swing, but is does the job).

hope this helps,

Kai

Patrick Kaegi wrote:
> Hello
>
> We like to design a search-mask with some operators (on a toggle button).
> If the selected operator is one like <> or >< we like to have 2 text's
> instead of only 1 text in case of = or < or >.
>
> does anybody know if this is possible and how?
>
> thanks a lot for any hint
> patrick
>
>
>
Re: how to dynamically change the layout by pressing a button [message #52289 is a reply to message #47775] Fri, 15 April 2005 05:37 Go to previous message
Eclipse UserFriend
Originally posted by: patrick.kaegi.netcetera.ch

Hi Kai and thanks for you tip.

now i have a working solution. the way is to use GridLayout with the
exclude parameter and the horizontal span

so i have 2 text's text1 and text2 - if i click on the button i set
text2's GridData.exclude to true and the text1's GridData.horizontalspan =
2. and also text2.setVisible(false).

if i click the button the second time i do the "turned around"

hope this help others!

greetz and thanks
patrick
Previous Topic:web services / loginhandler service
Next Topic:button.setEnabled(false) - how to control the button image?
Goto Forum:
  


Current Time: Thu May 08 05:31:40 EDT 2025

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

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

Back to the top