beavei
asked on
Forms in SDI Application do not become active
Hi Experts,
Got a funny one... I have created an application that has a main host form that is very ms outlookish with the nav bar on the left. When I click on a button of the nav bar it shows an auto-created form with the very simple:
frmSampleForm.Show; //show my auto-created form
frmSampleForm.Parent := frmMain.pnMainStage; //make the panel pnMainStage the parent to 'hold' the newly displayed form
The problem is this, when I select a few buttons and have multiple SDI forms just floating around on the pnMainStage panel non of them are active even when they have focus. The title bar just remains the same opaque blue as when it was inactive. Even if I only have one 'child'(with respect to the main form not in MDI relationship) form this still occurs. When the 'child' windows are cascaded upon each other I have to actually select the title bar to bring it to the front/top, selecting anywhere else on the form doesn't do so.
ideas anyone?? Thanks
Ian
Got a funny one... I have created an application that has a main host form that is very ms outlookish with the nav bar on the left. When I click on a button of the nav bar it shows an auto-created form with the very simple:
frmSampleForm.Show; //show my auto-created form
frmSampleForm.Parent := frmMain.pnMainStage; //make the panel pnMainStage the parent to 'hold' the newly displayed form
The problem is this, when I select a few buttons and have multiple SDI forms just floating around on the pnMainStage panel non of them are active even when they have focus. The title bar just remains the same opaque blue as when it was inactive. Even if I only have one 'child'(with respect to the main form not in MDI relationship) form this still occurs. When the 'child' windows are cascaded upon each other I have to actually select the title bar to bring it to the front/top, selecting anywhere else on the form doesn't do so.
ideas anyone?? Thanks
Ian
Hi,
This is because only one window can be selected by default (have a highlighted caption) and it is the main form in your case.
Regards, Geo
This is because only one window can be selected by default (have a highlighted caption) and it is the main form in your case.
Regards, Geo
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Pseudo-MDI App, yep that's what it is.... :)
Thanks Guys, I will have a play with it over the next couple of days and get back to you...
Ian
Thanks Guys, I will have a play with it over the next couple of days and get back to you...
Ian
ASKER
Thanks for the info, it works. Although I have run into a couple more problems which I will ask in another question.
Cheers,
Ian
Cheers,
Ian
(just because you parented your childs)
to get an active-caption, you must call
setActiveWindow(ChildHandl
by hand
meikl ;-)