You are not logged in.

fallon416

Beginner

  • "fallon416" started this thread

Posts: 28

Date of registration: Mar 26th 2010

  • Send private message

1

Saturday, April 17th 2010, 6:57pm

SplitPane splitter move

How do you address the split pane splitter moved? There is no event associated with it.

Neil

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

2

Thursday, April 22nd 2010, 12:01pm

Hi,

combined with a splitpane you could use one or more Usercontrols. Usercontrols have a Resize event. Just have a look at the this tiny little project here.
List all superclasses interfaces and methodsIn VB6 also a PictureBox has a Resize event, but unfortunately not in Jabaco. (although it could have one)

regards
OlimilO

fallon416

Beginner

  • "fallon416" started this thread

Posts: 28

Date of registration: Mar 26th 2010

  • Send private message

3

Thursday, April 22nd 2010, 12:47pm

Hi,

About 12 years ago I used the picture box method as a splitter in VB5 when there was no splitter. I was wondering if there was an underlying Java method to splitpane that was similar to VB.Net. After doing some research I found that even in Java the movement has to be trapped.

Neil

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

4

Thursday, April 22nd 2010, 12:58pm

Quoted

the movement has to be trapped

give us an example of what you've found. please

regards

OlimilO

fallon416

Beginner

  • "fallon416" started this thread

Posts: 28

Date of registration: Mar 26th 2010

  • Send private message

5

Thursday, April 22nd 2010, 1:14pm

I'll have to go find the web page. I tried adding a picture box and a button inside the picture box. To control the width of the button I coded as follows: Button1.Width = Picture1.Width and I get the following. I have also tried using me.button1 and frmMain.button1 and get a compiler error.

java.lang.Exception: CallByName 'Width' failed!
at VBA.Interaction.CallByName(Interaction.java:186)
at VBA.Interaction.CallByName(Interaction.java:184)
at VBA.Interaction.CallByName(Interaction.java:175)
at frmMain.Form_Load(frmMain.jsrc:17)
at VB.AbstractForm.fireLoaded(AbstractForm.jsrc)
at VB.LoadAdapter.run(LoadAdapter.jsrc)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:1

I shouldn't get an error with this very basic code for resizing a button.

Neil

fallon416

Beginner

  • "fallon416" started this thread

Posts: 28

Date of registration: Mar 26th 2010

  • Send private message

6

Thursday, April 22nd 2010, 1:16pm

Here is the link for the Java splitpane example.

http://www.devdaily.com/java/jwarehouse/…tter.java.shtml

Neil

OlimilO

Intermediate

  • "OlimilO" is male

Posts: 277

Date of registration: Jan 18th 2009

Location: Germany

Occupation: software engineer

  • Send private message

7

Thursday, April 22nd 2010, 1:32pm

please one step after the other, regarding the errors you posted:

put two Controls onto the Form:

CommandButton Command1

PictureBox Picture1



the following Code works fine on my computer

Jabaco Source

1
2
3
4
5
6
Public Sub Form_Load()
   Picture1.Width = 2 * Command1.Width
End Sub
Public Sub Command1_Click()
   Command1.Width = Picture1.Width
End Sub


what about yours?



regards

OlimilO

fallon416

Beginner

  • "fallon416" started this thread

Posts: 28

Date of registration: Mar 26th 2010

  • Send private message

8

Thursday, April 22nd 2010, 5:03pm

Hi OlimilO,

Your code worked when I tried it. After looking through my project I found that I ended up with some button arrays that I didn't realize were there. I had button1(0), button2, button3, button3(0).

Neil

Rate this thread
WoltLab Burning Board