Resizable form: textboxes?

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 4 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
stevens
Posts: 493
Last visit: Mon Sep 19, 2022 12:23 am
Has voted: 2 times

Resizable form: textboxes?

Post by stevens »

Hi,

Please see viewtopic.php?t=10691
I have made my form reseizable with anchors, which works fine. But when a datagrid expands to bottom, it goes straight over the textboxes. How to prevent that?

S.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Resizable form: textboxes?

Post by jvierra »

You will need to anchor to one or two location. Expanding a grid in four directions will be unmanageable. In some cases you have to catch the sizing event and manually calculate the limits.
User avatar
stevens
Posts: 493
Last visit: Mon Sep 19, 2022 12:23 am
Has voted: 2 times

Re: Resizable form: textboxes?

Post by stevens »

Ok, thanks. How do I make sure a location of a button stays underneath a certain richtextbox?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Resizable form: textboxes?

Post by jvierra »

Not sure what you want. A button and a RichText control can both be anchored to the same wo sides and they will maintain their relation.
This topic is 6 years and 4 weeks old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked