Firesplit resizement behaviour.

Started by Elias Montoya, April 19, 2010, 04:51:31 PM

Previous topic - Next topic

Elias Montoya

 I have a slightly hard to explain behaviour in my form, but i will try to explain:

I have a Main Form with a firesplitter control in it. Each section has a child form assigned. Up to this part everything works fine, the forms display ok, and it works correctly in all senses, except one. When I resize the main form, i catch the resizement notification (MAIN_WM_SIZE) and i have this code in there:

Call FF_Control_SetSize(HWND_MAIN_FIRESPLITTER1, nWidth-2, nHeight-2)

Then i catch the firesplitter resizement notification (FS03_WM_SIZE) and i have this code in there:

Call FF_Control_SetSize(HWND_FS03_TEXT1, nWidth, nHeight)

The problem is that my textbox is not resized correctly, it seems like... if it was resized to the previous size of the form, for example, if i manually resize the main dialog, the textbox in the section of the firesplitter leaves a space or goes beyond boundaries of the firesplitter section (NOW), then, if i maximize the form it displays the size that should be displayed when i typed (NOW)... then if i restore the form (Unmaximize), the textbox displays that should be when it was maximized... Etc... i hope i explained correctly.

Am i doing something wrong or is this a known behaviour?
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Paul Squires


You should resize your TextBox when the parent form that the TextBox is on resizes, not when the the FireSplitter resizes. The FireSplitter resizes the child forms automatically. If you resize your textbox in the FireSplitter's WM_SIZE handler then the child forms may not have resized yet.

Basically, put your TextBox resize call in the WM_SIZE handler of the parent form that your TextBox is on. Maybe that is what you are doing already? If it is, then there is something else weird happening. I created a small test program and it seems to work perfectly.

Paul Squires
PlanetSquires Software

Elias Montoya

#2
 Im sorry about the mistake on the explanation, you are right, i should trap the textbox parent's resizement notification to resize the textbox, and that is what i am doing. The explanation was wrongwhen i said i was trapping the firesplitter resizement notification.

Can you post the example here to see how to do it? maybe i can also post the example i have here, once i remove sensitive code.

So far, not even the form attached to the firesplitter section is resized correctly. I added just for test purposes scrollbars to the dialog, and they are displayed in the wrong position when i resize the main form.
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Elias Montoya

#3
 The problem only happens in one section of the firesplitter. See image attached.

Added a second picture, please check.

In short, the resizement problem ocurs only in the bigger section,
and it seems to happen only horizontally!

The problem that the lower section has is that the dialog is automatically resized
to a size bigger that the section, which causes the horizontal scrollbar to be
displayed in an area out of sight. The only way i have to fix this is to add an offset like this:

Call FF_Control_SetSize(HWND_FS03_TEXT1, nWidth, nHeight-SomeOffset)

Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Elias Montoya


With no toolbar the lower section textbox's is displayed a little.
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Cho Sing Kum

#5
There are 3 issues:

1) Pane 2 has a delay in rezing when the Main form is resized wider. Drag the mouse to the right fast enough and let go and you can see the problem in Elias's screen shoot. Try it a few times to get it. Pane 3 does not have this problem.

2) The FireSplitter looses its "correct" vertical height when there is a toolbar or a statusbar or both. I do understand this since Windows does not adjust the form clientarea for toolbar and statubar.

The resizing should check for and then adjust for any toolbar and statusbar. Some programs do need 2 or more toolbars.

3) When the toolbar is vertical, the FireSplitter drops down very low and out of position.


I attached a simple project without toolbar and statusbar. Except for issue (1), everything looks okay. You can experiment by adding toolbar and statusbar.

Edit to add: Do note that Text3 has a horizontal scrollbar. Otherwise you may not notice any problem with a toolbar or a statusbar added.

Edit: To mark out my comments that is incorrect.

Cho Sing Kum

#6
I have to correct myself.

Actually, I was already manually resizing the FireSplitter in FRMMAIN_WM_SIZE. So I try adding the Toolbar and Statusbar and consider them in the manual resize. It works.

Attached is new Project1a that resolve issue 2.

Elias Montoya


Not trying to be pushy (I can work like this for now and get a fix later.),
i just need to know if this was added to the "to fix" list or i should try
another method for my app. :)



Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Cho Sing Kum

#8
I sort of have the same feeling.

The tabbing direction of controls is going the reverse way, reported here:

http://www.planetsquires.com/protect/forum/index.php?topic=2325.msg18247#msg18247


Paul Squires

I have added it to the "to be fixed list" but it is hard for me to even investigate the problem until after April 30th (end of the tax filing season here in Canada).
Paul Squires
PlanetSquires Software

Elias Montoya

 No rush paul, it will be about 3 or 4 months until my projects is finished.

Thanx! :)
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.

Paul Squires

Hi Guys,

i have attached below a new FireSplitter.inc source file. Simply unzip it and copy it into your \CustomControls\PlanetSquires\FireSplitter folder. Ensure that it overwrites the existing one.

Recompile and run your project. In my tests, that irritating resize problem with the second pane should now be gone.

Please verify and let me know so that I can close the bug ticket on this one.

Thanks!
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Jim Dunn on April 29, 2010, 04:33:04 PM
I know of *no where else* where you can get this level of customer service/support.

BRAVO ZULU!  : )

Thanks! That's very nice to hear. I have been low key the last couple of weeks because of real life work. Things should slow down for me very soon and I'll be able to devote even more time to FF3.

Paul Squires
PlanetSquires Software

Elias Montoya

Thats great Paul, thanx!

I can confirm the problem with the horizontal resizing of the second pane is gone,
but the problem of the vertical resizing in the 3rd pane is still there. I have a workaround,
but i am posting it JFYI! :)

THANK YOU!
Win7, iMac x64 Retina display 5K, i7-5820K 4.4 ghz, 32GB RAM, All updates applied. - Firefly 3.70.