Dear visitor, welcome to Jabaco - Community.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
SplitPane splitter move
How do you address the split pane splitter moved? There is no event associated with it.
Neil
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
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
the movement has to be trapped
give us an example of what you've found. please
regards
OlimilO
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
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
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