flet icon indicating copy to clipboard operation
flet copied to clipboard

TextField. Property height doesn't work properly

Open ClearSafety opened this issue 4 months ago • 0 comments

Duplicate Check

  • [X] I have searched the opened issues and there are no duplicates

Describe the bug

TextField has the properties height and width that do not figure in the documentation. There's an issue with the property height, that works only to decrease the height of the field. The solution of the discussion 2345 is not very good, because it suggests you one uses the min_line to increase the field hight. It works, but it's not possible to have the control of the size in pixels, for instance. Currently, as I could see, there's no way to have a single line field with its height customized in pixels by the developer.

https://github.com/flet-dev/flet/discussions/2345

Code sample

Code
import flet as ft

def main(page: ft.Page):
    
    page.add(
        ft.TextField(
            height=100,
            width=100,
        )
    )

ft.app(target=main, view=ft.AppView.WEB_BROWSER)

To reproduce

  1. Run the reprocode

Expected behavior

It was expected the field increase its height size according to the value passed to the 'height' property.

Screenshots / Videos

Captures

[Upload media here]

Operating System

Windows

Operating system details

Windows 11 Pro

Flet version

0.24.1

Regression

No, it isn't

Suggestions

Add the properties 'width' and 'height' to the documentation. Enable the 'height' property to increase the size of the field, the same as it's possible with the CupertinoTextField.

Logs

Logs
[Paste your logs here]

Additional details

No response

ClearSafety avatar Oct 05 '24 16:10 ClearSafety