andlabs / andlabs/libui

how to set width for uiEntry

オープン
#397 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
10.9k
フォーク
612
PR マージ指標
30日以内にマージされた PR はありません

説明

Hi all,

I am starting using libui and so far I am very pleased about it.

I have noticed that when you create a new uiEntry it is always quite big, on Windows it can accomodate something like 24 characters. I am therefore wondering how can I create a uiEntry but with a smaller width.

I think for Gtk you can use `gtk_entry_set_width_chars ()` and with the FOX library you can set the number of columns when creating a FXTextField object or even change the width afterward with the method `FXTextField::setNumColumns()`. Unfortunately libui does not seems to expose any function to choose the uiEntry's width.

I was going to implement the function myself but I was not able to figure out how to set the width of the edit control on windows!

​I was also wondering in general how libui handle the minimum needed size for each control during the layout. More specifically I am wondering where in libui's code the uiEntry is created with such a specific width.

Thank in advance for any help.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。