Stop Auto size column width (1 Viewer)

Tskutnik

Registered User.
Local time
Today, 16:43
Joined
Sep 15, 2012
Messages
229
All, hopefully easy one. Cant find the answer without writing lines of code. This has to be easy.

I want to stop my form from auto resizing the column widths when I make a change to the header text (or for any other reason).

Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:43
Joined
Oct 29, 2018
Messages
21,474
Can you post a screenshot to make sure we understand what you mean? Thanks.
 

Tskutnik

Registered User.
Local time
Today, 16:43
Joined
Sep 15, 2012
Messages
229
Below is part of the Form. If I change the header "> 20% Flow" to "20%" the entre column auto sizes the that new width for the 3 characters, which is narrower than the data in that column. I want to fix the column widths and not have it resize.

1606402554254.png
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:43
Joined
Oct 29, 2018
Messages
21,474
Below is part of the Form. If I change the header "> 20% Flow" to "20%" the entre column auto sizes the that new width for the 3 characters, which is narrower than the data in that column. I want to fix the column widths and not have it resize.

View attachment 87001
Looks like you're using a Layout, and I think that's the default behavior for layouts. You might try removing the layout to disassociate the header from the column.
 

Tskutnik

Registered User.
Local time
Today, 16:43
Joined
Sep 15, 2012
Messages
229
Not sure how I remove the Layout and keep my column headers and values aligned
 

Isaac

Lifelong Learner
Local time
Today, 13:43
Joined
Mar 14, 2017
Messages
8,777
Try using Alt Enter or shift enter to force a line break rather than going wider
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:43
Joined
Oct 29, 2018
Messages
21,474
Not sure how I remove the Layout and keep my column headers and values aligned
When you removed the layout and adjusted the text in the header, did the header box size change still?
 

Tskutnik

Registered User.
Local time
Today, 16:43
Joined
Sep 15, 2012
Messages
229
Header box still changed width, but it did not impact any other field since they are not linked together. Looks like tis now. Still not what I need. I dont want them to resize at all
1606404593834.png
 

Tskutnik

Registered User.
Local time
Today, 16:43
Joined
Sep 15, 2012
Messages
229
Issac - sorry I don't know what this means. I just want to freeze the column width
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:43
Joined
Oct 29, 2018
Messages
21,474
Header box still changed width, but it did not impact any other field since they are not linked together. Looks like tis now. Still not what I need. I dont want them to resize at all
View attachment 87008
I see. I am not sure if that behavior can be turned off at all. It's only obvious on your form because of the background colors. Perhaps, as a workaround, you can just set the background color of the header section to the same color that you want for your header boxes.

Just a thought...
 

Tskutnik

Registered User.
Local time
Today, 16:43
Joined
Sep 15, 2012
Messages
229
I see what you mean. I think I can "cheat" this with the background colors, but I'll still need to keep the headers aligned with the data below. Thanks
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:43
Joined
Oct 29, 2018
Messages
21,474
I see what you mean. I think I can "cheat" this with the background colors, but I'll still need to keep the headers aligned with the data below. Thanks
It seems to me, what you have now is aligned. If the original header and column widths were 2", now that they are disengaged from each other, the column width stays at 2", but the header may be 1". However, if you center align the header, it would/should stay on top of the appropriate column. At least, that's what I think will happen. Give it a try and let us know if it doesn't work that way.
 

Isaac

Lifelong Learner
Local time
Today, 13:43
Joined
Mar 14, 2017
Messages
8,777
Issac - sorry I don't know what this means. I just want to freeze the column width
I meant that when you are entering the text for that label, you can force it to go down rather than across by using alt enter or shift enter. it was kind of an alternative perspective
 

Minty

AWF VIP
Local time
Today, 21:43
Joined
Jul 26, 2013
Messages
10,371
If you set the caption in the properties of the form rather than the actual label container box it won't resize.

Unless I've got the wrong end of the stick?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 13:43
Joined
Oct 29, 2018
Messages
21,474
If you set the caption in the properties of the form rather than the actual label container box it won't resize.
Do you know of a way to turn off the auto-resizing? Just curious...
 

Minty

AWF VIP
Local time
Today, 21:43
Joined
Jul 26, 2013
Messages
10,371
Do you know of a way to turn off the auto-resizing? Just curious...
Nope - it is really annoying.
I never use layouts / or any of the other "newer" features for form presentation but it just happens. Automagically and frustratingly.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:43
Joined
Feb 19, 2002
Messages
43,281
The idea of layouts is good. The implementation is poor so I don't use them either.

You might be able to get the effect you want if you use spaces to replace the characters you want to remove. Spaces are narrower than characters in a proportional font so you may need several for each character.
 

Users who are viewing this thread

Top Bottom