[form] onResize event

It would be wonderful if a form would have a onResize event.
This is specially needed when you need to reformat your HTML in a HTML field to match the new height (width can be taken care of in plain HTML).

Is this somewhere on the feature-list?

It’s almost a must have when you use splitpanels and rich GUI beans.
You could resize all this automaticly when someone resizes the screen!

Hi Harjo,

You can anchor all beans (including the splitpane bean) by right-clicking on it.
The reason for my request is that certain things need redrawing/recalculating (like with a custom HTML-based control).

Hope this helps.

yes, anchoring the bean is no problem, I know

but when someone resizes the screen I want to set the dividers according!

Hi All

I tried the splitpane with your help and could load a left and right pane with data (did not try top/bottom yet). Where can I find the bean documentation for this bean and for the supplied beans in general? for example - to find out how to set or what it’s for - preferedSize, minimumSize, lastDividerLocation, etc. Some seem obvious, but they don’t do what I expect … and sometimes they suddenly stick to a certain value?

I also notice every time I place a JSplitPane bean on a form, when reloading the solution, there is only the left button visible, I don’t see the right button any more, although it was originally there. The bean seems to still function as before. Anyone else noticed that?

Servoy Developer
Version R2 2.2.4-build 336
Java version 1.5.0_05-48 (Mac OS X)

Best regards, Robert

HJK:
yes, anchoring the bean is no problem, I know

but when someone resizes the screen I want to set the dividers according!

Where can I find the bean documentation for this bean and for the supplied beans in general? for example - to find out how to set or what it’s for - preferedSize, minimumSize, lastDividerLocation, etc. Some seem obvious, but they don’t do what I expect … and sometimes they suddenly stick to a certain value?

The bean comes from the java JSplitPane. There is loads of documentation floating on the web. Just google for it. Here is the first hit: [urlhttp://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JSplitPane.html[/url]

I also notice every time I place a JSplitPane bean on a form, when reloading the solution, there is only the left button visible, I don’t see the right button any more, although it was originally there. The bean seems to still function as before. Anyone else noticed that?

You can solve this by adding the initial settings you want to use (like probably your divider location) in an onload event method of your form.

IT2BE:

Where can I find the bean documentation for this bean and for the supplied beans in general? for example - to find out how to set or what it’s for - preferedSize, minimumSize, lastDividerLocation, etc. Some seem obvious, but they don’t do what I expect … and sometimes they suddenly stick to a certain value?

The bean comes from the java JSplitPane. There is loads of documentation floating on the web. Just google for it. Here is the first hit: [urlhttp://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JSplitPane.html[/url]

Ok, thanks, then I found the most up to date here: http://java.sun.com/j2se/1.5.0/docs/api/

IT2BE:
I also notice every time I place a JSplitPane bean on a form, when reloading the solution, there is only the left button visible, I don’t see the right button any more, although it was originally there. The bean seems to still function as before. Anyone else noticed that?

You can solve this by adding the initial settings you want to use (like probably your divider location) in an onload event method of your form.

I only mean the visual appearance of the JSpiltPane in design mode in Servoy developer. The first time I place the bean it has a left and right button (with the devider position as set, i. e. 200px). But after reloading the solution, the appearance of the bean is such that I see only the left button,but now on the full aera of the bean. See the screenshot. So I think it may be a bug within Servoy Developer.

Best regards, Robert

You can solve that by setting the preferred (and maybe also last) splitter position to what you prefer. That should solve it…

Hi Marcel

Thanks for the hint. The problem I encounter is, that as soon as I reload my solution and get the above JavaBean display (only left button visible), whatever value i enter into dividerLocation leds to 1024, i. e. any value I enter get’s changed on leaving the field to 1024px (which is the total width of the bean). On the other hand, I can enter values (and they stay) into preferedSize, minimumSize, maximumSize, although I am not sure what they should do (it’s always a pair of values).

Best regards and thanks so far, Robert

IT2BE:
You can solve that by setting the preferred (and maybe also last) splitter position to what you prefer. That should solve it…

Like I said, you can google for these. In short, when building a window in Java these values are used to set what they are: the minimim, preferred, maximum size (in this case) when you (re-)size a window…