Need help with FireSplitter

Started by Martin Francom, December 06, 2009, 10:24:08 PM

Previous topic - Next topic

Martin Francom

Need help with the syntax for selecting which child Form I want in the particular pane in FireSplitter control.

I want to click a button and be able to change the child form being displayed inthe FireSpliter control.   How would I do this?

Paul Squires

Check out the FireSplitter.inc source code for the control. You will see a message called %FF_SPLITTER_SETCHILD

SendMessage HWND_FORM1_SPLITTER1, %FF_SPLITTER_SETCHILD, nPanelNum, hWndChildPage

nPanelNum = 1, 2, or 3.
hWndChildPage would be the windows handle of a non-modal child form that you want to display in the panel.
Paul Squires
PlanetSquires Software

Martin Francom

Paul,
  Thanks for the help.  I give that a try.  I looked in the Functions Library, even did a search, I could not find anything about any of the Fire-Controls. Am I looking in the wrong area?

Martin Francom

Ok,
   This compiles:
    SendMessage HWND_FRMMAIN_FIRESPLITTER1, %FF_SPLITTER_SETCHILD, 1, HWND_FORMDOCINFO

But the form doesn't change when the button's clicked.  Is there something more that I need to do?

The FRMMAIN has just the FireSpliter control on it. the FireSplitter has just two panes. I assume they are 1 & 2.    The initital child forms have been set in the FireSpliter control.  They display correctly.  The Child form in the left pane has a few buttons on it.  The Child form on the right is the one I want to change when the button is clicked.  The buttons action function containss:


Function FORMCNTRLS_CMDDRSCRN_BN_CLICKED ( _
                                         ControlIndex     As Long,  _  ' index in Control Array
                                         hWndForm         As Dword, _  ' handle of Form
                                         hWndControl      As Dword, _  ' handle of Control
                                         idButtonControl  As Long   _  ' identifier of button
                                         ) As Long


     SendMessage HWND_FRMMAIN_FIRESPLITTER1, %FF_SPLITTER_SETCHILD, 1, HWND_FORMDOCINFO

End Function

   

Eddy Van Esch

Eddy

Martin Francom

Quote from: Eddy Van Esch on December 07, 2009, 05:21:33 AM
Marty,

Do you also notice the behaviour I described here?
http://www.planetsquires.com/protect/forum/index.php?topic=2159.0

Kind regards


Eddy,  No.  I just did a quick check for that problem.  My program functions correctly with reguards the buttons on the child form.

Paul Squires

The problem will happen if you put another control on the Main form that the Splitter control is on. I am examining some generated source code now to see if I can determine why that happens. Very weird.
Paul Squires
PlanetSquires Software