-
Notifications
You must be signed in to change notification settings - Fork 522
Inconsistent height after adding child controls to the input box #4212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You can now add Control to |
I know that, if I add a custom button to the TextField component will change the height, so I can only place the button outside the TextField component. However, I still hope that the height of the TextField component will remain consistent by default after adding a custom component. |
What causes the increase in height is the default height of the suffix/prefix control you add, in this case the verify_input = ft.TextField(
label="请输入验证码",
prefix_icon=ft.icons.KEY,
text_size=20,
suffix=ft.FilledTonalButton("发送验证码", height=24), // change height here
) If it happens that you want to change the size of the text field itself (ex: to better accommodate the size of your suffix/prefix control), do this. By the way, just for info, the Closing this issue as resolved. |
Duplicate Check
Describe the bug
When I add a button control to the suffix of the TextField control, the height of the control is inconsistent with the height of the control without adding a suffix. I don't think this is a bug, but it has some impact on the appearance.
(From machine translation, if the expression is not straightforward, please understand)
Code sample
Code
To reproduce
The height of the first input box is inconsistent with that of the third input box.
Expected behavior
I hope the default input box can maintain consistent height without manually adjusting the size of the child controls.
Screenshots / Videos
Captures
[Upload media here]

Operating System
Windows
Operating system details
Windows10
Flet version
0.24.1
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[Paste your logs here]
Additional details
No response
The text was updated successfully, but these errors were encountered: