Skip to content
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

[Enhancement] Placeholders for Text Entries #218

Open
matyalatte opened this issue Sep 1, 2023 · 3 comments · May be fixed by #224
Open

[Enhancement] Placeholders for Text Entries #218

matyalatte opened this issue Sep 1, 2023 · 3 comments · May be fixed by #224

Comments

@matyalatte
Copy link
Contributor

Hi, I made uiEntrySetPlaceholder for my app. (You can see the commit on my branch.)
It can set text to be displayed in the entry when it's empty.
like this.

placeholder

The functions are so simple cause the native controls support placeholders.
And we can use the similar methods for most of the controls that have text entries.

The problem is winapi doesn't support placeholders for multi-line entries and read-only entries.
So, we need to implement them by ourselves if we want. (I don't want to work on it tho.)
But it's worthy to add the placeholder functions to libui even if they will ignore some controls that winapi doesn't support, I think.

If you like it, I will send PR after adding the placeholder support for some controls.

@nptr
Copy link
Contributor

nptr commented Sep 3, 2023

I like it, and hope it finds its way into the codebase! (i am not a maintainer tho).

@cody271
Copy link
Contributor

cody271 commented Sep 8, 2023

Commit (a80aae4) looks good on first glance! Please submit PR for proper review.

Seems like a straightforward addition to the API. 👍

@matyalatte matyalatte linked a pull request Sep 16, 2023 that will close this issue
@matyalatte
Copy link
Contributor Author

Sorry for the late reply.
I sent the PR! (#224)

@cody271 cody271 linked a pull request Sep 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants