Search
Setup for Free
C
C#
•
3y ago
Sound
❔ TextBox stretching according to the window size
How do i make these textboxes autosize properly
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,250
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
S
Sound
OP
•
9/14/23, 12:57 PM
this should be the end result
. it should change their width according to the widget width
S
Sound
OP
•
9/14/23, 12:58 PM
also
, the summary can be multi line
, so it should modify its height to display the whole text properly
S
Sound
OP
•
9/14/23, 12:58 PM
if the textbox is larger than the widget canvas
, the widget must resize
.
H
Hazel 🌊💃
•
9/14/23, 12:59 PM
This looks like WPF to me which is out of my wheelhouse
, but can you clarify for others if its WPF
, WinForms
, or something else
?
S
Sound
OP
•
9/14/23, 12:59 PM
Winforms
H
Hazel 🌊💃
•
9/14/23, 1:00 PM
So its a custom control
?
S
Sound
OP
•
9/14/23, 1:00 PM
Yes
H
Hazel 🌊💃
•
9/14/23, 1:00 PM
You
'd have to use docking and panels
S
Sound
OP
•
9/14/23, 1:00 PM
How can i dock a panel under another panel
?
H
Hazel 🌊💃
•
9/14/23, 1:01 PM
Dock
: top
S
Sound
OP
•
9/14/23, 1:10 PM
S
Sound
OP
•
9/14/23, 1:10 PM
the textbox wont resize
S
Sound
OP
•
9/14/23, 1:16 PM
S
Sound
OP
•
9/14/23, 1:31 PM
?
H
HimmDawg
•
9/14/23, 2:00 PM
I dont think Dock will work here
. You have to size your textbox manually and then use
Anchor
Anchor
H
HimmDawg
•
9/14/23, 2:01 PM
You probably need to set the anchor in all four directions
, but i cannot tell 100
% rn
H
Hazel 🌊💃
•
9/14/23, 3:46 PM
H
Hazel 🌊💃
•
9/14/23, 3:48 PM
This is with
:
2 panels
; dock
=
top
top
1 label per panel
; dock
=
left
left
, padding
=
4, 4, 4, 4
4, 4, 4, 4
1 textbox per panel
; dock
=
fill
fill
H
HimmDawg
I dont think Dock will work here. You have to size your textbox manually and the...
H
Hazel 🌊💃
•
9/14/23, 3:49 PM
There are probably more efficient ways
, but it is possible with dock
.
S
Sound
OP
•
9/15/23, 12:10 PM
@tacosontitan
S
Sound
OP
•
9/15/23, 12:18 PM
How do i make it autoresize
?
S
Sound
OP
•
9/15/23, 12:18 PM
If i enable autosize with GrowAndShrink
, this it what is does
S
Sound
OP
•
9/15/23, 12:19 PM
H
Hazel 🌊💃
•
9/15/23, 2:41 PM
Is it set to dock fill
?
H
Hazel 🌊💃
•
9/15/23, 2:41 PM
Or Dock top
?
A
Accord
•
9/16/23, 3:11 PM
Was this issue resolved
? If so
, run
/close
/close
otherwise I will mark this as stale and this post will be archived until there is new activity
.
Anchor
Anchor
left
left
4, 4, 4, 4
4, 4, 4, 4
Similar Threads
❔ Resize DataGrid according to the Width of the window (WPF)
C
C# / help
3y ago
❔ [WINFORMS] Make textbox scale vertically according to its content.
C
C# / help
3y ago
✅ Wierd window size
C
C# / help
2y ago
❔ TextBox
C
C# / help
3y ago