Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Dynamic form width
Dynamic form width [message #1404600] Mon, 04 August 2014 11:48 Go to next message
Reinhold Kern is currently offline Reinhold KernFriend
Messages: 19
Registered: August 2014
Junior Member
Hi

is there a way to set the width of a form dynamic e. g. on button click.
I hava a navigation form:

Layout:
- Display hint: view
- Display view id: west

And the main contnent:

- Display hint: view
- Display view id: center

The "width in pixel" of the MainBox (AbstractGroupBox) inside of the navigation form
is initialized with a distict value (220 px). The navigatio form has also a toggle button. With this button I want to minimize or maximize the navigation form (see attached example). Is there a way to access the "ConfiguredWidthInPixel" of the AbstractGroupBox or is there another way how the problem could be solved?

Thanks in advance.

PS: The dynamic setting of the visibility of the label inside the button "getxyButton().setLabelVisible(...)" does not work. But that issue can be solved with setting the contentof the button label (either "" or "textXY").
Re: Dynamic form width [message #1404625 is a reply to message #1404600] Mon, 04 August 2014 14:25 Go to previous messageGo to next message
Lukas Steigerwald is currently offline Lukas SteigerwaldFriend
Messages: 47
Registered: July 2014
Member
Have you checked whether setProperty() works? I have not checked it but stumbled accross it while searching for something else today. The description says that it can change any property. What I use in one case where it is not important whether the user changes the size of the field afterwards is a Splitbox. With setSplitterPosition() you can change the split ratio on the run.
Re: Dynamic form width [message #1404637 is a reply to message #1404625] Mon, 04 August 2014 15:27 Go to previous message
Reinhold Kern is currently offline Reinhold KernFriend
Messages: 19
Registered: August 2014
Junior Member
I have tried to set the width with setProperty() but I think there is only a subset of properties that are accessible in that way. I have inscpected the GroupBox. There is a property called "propertySupport" of type BasicPropertySupport. It contains a HashMap with supportet properties and "widthInPixel" or "configuredWithInPixel" is not in that HashMap...

Could you tell me on what object the method 'setSplitterPosition()' can be applied?

I have no own SplitterBox. The two views are initialized in the Desktop class:

public class Desktop extends AbstractDesktop implements IDesktop {

  protected void execOpened() throws ProcessingException {

    NavigationForm navigationForm = new NavigationForm(); //Display view id: west
    navigationForm.startModify();

    WelcomeForm welcomeForm = new WelcomeForm(); Display view id: center
    welcomeForm.startModify();
  }
...
}
Previous Topic:RAP Button - content alignment
Next Topic:ScoutTexts (Scout RT translation files)
Goto Forum:
  


Current Time: Mon Apr 20 01:04:10 GMT 2015

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

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