Link to home
Start Free TrialLog in
Avatar of sorinv
sorinv

asked on

Move statusbar from mdi child to main mdi form

I want to move the statusbar from mdi child to main mdi form when maximized and back to child when restored. But it seem like setting the parent will only hide the statusbar not show it on the other window. The status bar is alligned at bottom. Thanks.
Avatar of gemarti
gemarti
Flag of United States of America image

Try This:

 if Form2.WindowState = wsMinimized then
    form1.StatusBar1.Panels := Form2.StatusBar1.Panels;
Avatar of sorinv
sorinv

ASKER

The main window doesn't have a status bar on it.
on the Child's minimize event:

StatusBar1.Parent := MainForm; // I assume that MainForm is the variable name for the MDI parent

and on the restore:

StatusBar1.Parent := Self;
Avatar of sorinv

ASKER

Thanks, DragonSlayer, but this is just hiding the stasudbar, not moving it from one window to another...
Put a status bar on the main form, keep it in sync with the SB from the active child, hide it when the child is normal-sized, show it when the child is maximized. Hide the child SB when maximized, show it back when normal-sized (reverse of main SB behavior).

F.
ASKER CERTIFIED SOLUTION
Avatar of gemarti
gemarti
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial