Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

D4 Docking question.

Posted on 1999-07-13
8
Medium Priority
?
185 Views
Last Modified: 2010-04-06
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.
0
Comment
Question by:_art_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1388264
Art,

  Try changing the BorderStyle property of the form to anything other than "bsSizeable" (bsDialog would work).

Good luck with your project!

Pegasus
0
 

Expert Comment

by:GabeinOZ
ID: 1388265
In fact you can only use dialog or single if you want the action you are asking for....

Gabe
0
 

Author Comment

by:_art_
ID: 1388266
Thanks! But no that wont work. My docking control inherited from TWinControl so there should be some other way...
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:GabeinOZ
ID: 1388267
Try using setbounds to your default settings  any time the object is repainted and overrride your components paint function

Gabe
0
 
LVL 6

Expert Comment

by:Stuart_Johnson
ID: 1388268
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.


0
 
LVL 2

Expert Comment

by:kotik
ID: 1388269
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.

0
 

Author Comment

by:_art_
ID: 1388270
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. :-)
0
 
LVL 2

Accepted Solution

by:
kotik earned 300 total points
ID: 1388271
Art!
Use Constraints property and set MaxHeight.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question