_art_
asked on
D4 Docking question.
Hello there,
Is there a way to prevent resizing of the window when it is floated? For example when I've floated TToolBar in docking example I cant change its height. Thats what I need with my custom window... I tried to catch WM_WINDOWPOSCHANGED but that seems does not work... Thanks.
Is there a way to prevent resizing of the window when it is floated? For example when I've floated TToolBar in docking example I cant change its height. Thats what I need with my custom window... I tried to catch WM_WINDOWPOSCHANGED but that seems does not work... Thanks.
In fact you can only use dialog or single if you want the action you are asking for....
Gabe
Gabe
ASKER
Thanks! But no that wont work. My docking control inherited from TWinControl so there should be some other way...
Try using setbounds to your default settings any time the object is repainted and overrride your components paint function
Gabe
Gabe
Try this:
In your Forms' private section, add this:
procedure WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
message WM_GETMINMAXINFO;
Then, in the body of the code, do this:
procedure TForm1.WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
begin
inherited;
with Msg.MinMaxInfo^ do begin
ptMinTrackSize.x:= 799; { Set your dimensions here}
ptMaxTrackSize.x:= 799; { and here }
ptMinTrackSize.y:= 500; { and here }
ptMaxTrackSize.y:= 500; { and here <G> }
end;
end;
I hope this is what you are looking for.
Best wishes,
Stuart.
In your Forms' private section, add this:
procedure WMGetMinMaxInfo(var Msg: TWMGetMinMaxInfo);
message WM_GETMINMAXINFO;
Then, in the body of the code, do this:
procedure TForm1.WMGetMinMaxInfo(var
begin
inherited;
with Msg.MinMaxInfo^ do begin
ptMinTrackSize.x:= 799; { Set your dimensions here}
ptMaxTrackSize.x:= 799; { and here }
ptMinTrackSize.y:= 500; { and here }
ptMaxTrackSize.y:= 500; { and here <G> }
end;
end;
I hope this is what you are looking for.
Best wishes,
Stuart.
Hi, art!
if you use Delphi 4 you can use the Constrains property to set the Min and Max height of a control.
It will have the same effect as Stuart's procedure.
But I'm not sure that it will work while docking.
if you use Delphi 4 you can use the Constrains property to set the Min and Max height of a control.
It will have the same effect as Stuart's procedure.
But I'm not sure that it will work while docking.
ASKER
1. Paint procedure -> endless loop.
2. wm_getminmaxinfo -> not of help (I dont mazximize).
3. Constraints -> Bingo!!! :-)
kotik rewrite ur comment as an answer please. :-)
2. wm_getminmaxinfo -> not of help (I dont mazximize).
3. Constraints -> Bingo!!! :-)
kotik rewrite ur comment as an answer please. :-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try changing the BorderStyle property of the form to anything other than "bsSizeable" (bsDialog would work).
Good luck with your project!
Pegasus