Jump to content

Recommended Posts

Posted

It's required for grid column auto-size function. So the only way is to subtract constant width ?

 

i.e. GridClientWidth := Grid.Width - 20, instead of GridClientWidth := Grid.Width - GetSystemMetrics(SM_CXVSCROLL) ?

  • 3 years later...
Posted

Hi Friends,

 

I too need to change my controls width a lot, and a automatic solution would be very nice.

We understand that sometimes we want to make better looking screens, so the controls must respond better to user commands and to run-time changes we made in the code.

I found a way that is working very well to me.

After you made any change that requires other controls to rearrange themselves, just put the code above:

Self.With := Self.With +1;
Self.With := Self.With -1;
Refresh;

After that you can check the width and it will be shown ok.

 

Example of use: we put 2 panels and a splitter between then. They move fine, but if we have other controls inside those panels, and those controls are aligned with right, left or client, they won't resize unless you use the code I just mention.

Farshad Mohajeri did a great job with his framework, but he can't understand that simple issue is real.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...