« [Article] A Global Phone Formatting Method | Main | [Challenge] Week 2/28/05: Getting form and field names (answer) »

March 02, 2005

[Article] Using bean JsplitPane in Servoy

by Harjo Kompagnie

In Servoy there is a great bean called: JsplitPane

This gives the developer the possibilty to have two tabpanels in one view with a horizontal or vertical ruler in the middle. Looks really great.

Here's how you can use it:

  • Make a new form and go to Elements and select: Place Bean
  • Scroll down and choose: JsplitPane
  • Now you see the bean on your form. Drag it a little bit wider, just about your complete form.
  • If you select the bean, you will see a lot of properties on the leftside of your screen. Set the name-property to: split
  • Set property: orientation to: 0
  • Set property: dividerlocation: 200

Jsplit1

  • Go to Elements and choose: Place tabpanel. Select a related or nonrelated tabpanel, you already have in your solution. Place the tabpanel on on top of the JsplitPane.
  • If you select the tabpanel only (not the form!) you see also all kind of properties. Set the name-property to: tabs1

Jsplit2_1

  • Go to elements and choose: Place tabpanel. Select a related or nonrelated tabpanel, you already have in your solution. Place the tabpanel on on top of the JsplitPane.
  • Set the name-property to: tabs2

Jsplit3

Does it work already? No, we first have to make a method as follows:

elements.split.orientation = 0 //0 = horizontal split, 1 = vertical split
elements.split.topComponent = elements.tabs1; //assign 1st tabpanel
elements.split.bottomComponent = elements.tabs2; //assign 2nd tabpanel
elements.split.dividerLocation = 300 //set the position of the pane divider

Attach this method to the onShow property of the form

Go from design mode to browse mode and voilah...you have made your first splitPanel, with two different forms in it.

Jsplit4

| Posted by David Workman on March 2, 2005 at 12:30 AM in Articles | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c8d8153ef00d83543832d69e2

Listed below are links to weblogs that reference [Article] Using bean JsplitPane in Servoy:

Comments

Post a comment