You are not logged in.

OlimilO

Intermediate

  • "OlimilO" is male
  • "OlimilO" started this thread

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

1

Friday, February 27th 2009, 5:42pm

Question: how to use a SplitPane?

Hello everybody,

did you see the great Splitpane-control?
just say ... this is the left control ,this is the right control
it's cool you can use it this way:

Jabaco Source

1
2
3
4
Public Sub Form_Load() 
   SplitPane1.setFrame(List1, fmComponentLeft) 
   SplitPane1.setFrame(List2, fmComponentRight) 
End Sub

but i am wondering if it is possible to use more than one control on each side?
e.g.
on the left, on the upper part we have a textbox and below a listbox.


any idea?

Thank you in advance
OlimilO
OlimilO has attached the following image:
  • splitpane.png

This post has been edited 1 times, last edit by "OlimilO" (May 12th 2010, 3:33pm)


Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

2

Friday, February 27th 2009, 6:31pm

The Jabaco-SplitPane is based on JSplitPane. Quote of the JSplitPane-documentation : "JSplitPane is used to divide two (and only two) Components."

Possible solution for that:

Jabaco Source

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Dim lstTest1 As New ListBox
   Dim lstTest2 As New ListBox
   Dim lstTest3 As New ListBox
   
   SplitPane1.setFrame lstTest1, fmComponentLeft
   
   Dim SplitPane2 As New SplitPane
   SplitPane2.Orientation = fmOrientationHorizontal
   SplitPane2.DividerLocation = 200
   
   SplitPane1.setFrame SplitPane2, fmComponentRight
   SplitPane2.setFrame lstTest2, fmComponentTop
   SplitPane2.setFrame lstTest3, fmComponentBottom
   
   lstTest1.AddItem "TEST1"
   lstTest2.AddItem "TEST2"
   lstTest3.AddItem "TEST3"

OlimilO

Intermediate

  • "OlimilO" is male
  • "OlimilO" started this thread

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

3

Sunday, March 15th 2009, 7:14pm

Hello again,

Quoted

"JSplitPane is used to divide two (and only two) Components."



this normally is enough, as long as there is a container-control like a panel, that itself throws a resize-event.

I miss something like that in Jabaco. in VB6 I used the PictureBox as a Panel-control it also throws a resize event.

now I used another solution, i used a UserControl, because it has the resize-event.

But there are only two things:

* all controls on it are private
-> solution: create public properties for them.

* the event handlers for the controls are not on the form but on the UserControl.
-> solution: bring them back to the form by implementing Listener-interfaces (MouseListener, KeyListener)

Do you think it is possible to program a Panel-container-control with a resize event, and the owner of the containing controls is still the form?

I am asking due to lack of java swing knowledge ^^

greetings

OlimilO

fallon416

Beginner

Posts: 28

Date of registration: Mar 26th 2010

  • Send private message

4

Monday, April 5th 2010, 6:57am

You can do a 3 way split by just dropping a second splitpane onto the right side of the first and add the code to the for load

SplitPane1.setFrame Tree1,fmComponentLeft
SplitPane1.setFrame SplitPane2,fmComponentRight

SplitPane2.setFrame JBGrid1,fmComponentTop
SplitPane2.setFrame RichTextBox1,fmComponentBottom

Here's a picture of it.
fallon416 has attached the following image:
  • 3_way_split.png

Rate this thread
WoltLab Burning Board