C
C#14mo ago
Sound

❔ TextBox stretching according to the window size

How do i make these textboxes autosize properly?
20 Replies
Sound
SoundOP14mo ago
this should be the end result. it should change their width according to the widget width
Sound
SoundOP14mo ago
also, the summary can be multi line, so it should modify its height to display the whole text properly if the textbox is larger than the widget canvas, the widget must resize.
Hazel 🌊💃
Hazel 🌊💃14mo ago
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?
Sound
SoundOP14mo ago
Winforms
Hazel 🌊💃
Hazel 🌊💃14mo ago
So its a custom control?
Sound
SoundOP14mo ago
Yes
Hazel 🌊💃
Hazel 🌊💃14mo ago
You'd have to use docking and panels
Sound
SoundOP14mo ago
How can i dock a panel under another panel ?
Hazel 🌊💃
Hazel 🌊💃14mo ago
Dock: top
Sound
SoundOP14mo ago
Sound
SoundOP14mo ago
the textbox wont resize
Sound
SoundOP14mo ago
Sound
SoundOP14mo ago
?
HimmDawg
HimmDawg14mo ago
I dont think Dock will work here. You have to size your textbox manually and then use Anchor You probably need to set the anchor in all four directions, but i cannot tell 100% rn
Hazel 🌊💃
Hazel 🌊💃14mo ago
Hazel 🌊💃
Hazel 🌊💃14mo ago
This is with: - 2 panels; dock = top - 1 label per panel; dock = left, padding = 4, 4, 4, 4 - 1 textbox per panel; dock = fill There are probably more efficient ways, but it is possible with dock.
Sound
SoundOP14mo ago
@tacosontitan How do i make it autoresize? If i enable autosize with GrowAndShrink, this it what is does
Sound
SoundOP14mo ago
No description
Hazel 🌊💃
Hazel 🌊💃14mo ago
Is it set to dock fill? Or Dock top?
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server