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

TextBox - box is not wide enough for the string value argument #471

Closed
xemjeff opened this issue Jun 18, 2022 · 1 comment
Closed

TextBox - box is not wide enough for the string value argument #471

xemjeff opened this issue Jun 18, 2022 · 1 comment

Comments

@xemjeff
Copy link

xemjeff commented Jun 18, 2022

When I pass in the default text to the TextBox constructor, I end up with a TextBox that is too short for the text.
I did not see a way to override the width. Is there some setting I am missing, or is nanogui miscalculating the string width based on font?

        Window* window = new Window(screen, "Matrix Settings");
        window->set_layout(new BoxLayout(Orientation::Vertical, Alignment::Middle, 6, 6));
        new Label(window, "Rows", "sans");

        TextBox* editRows = new TextBox(window, "32");
        editRows->set_editable(true);

        new Label(window, "Cols", "sans");
        
        TextBox* editCols = new TextBox(window, "64");
        editCols->set_editable(true);;

        TextBox* editDisplayText = new TextBox(window, "Default text to edit");
        editDisplayText->set_editable(true);

image

Details:
Windows 10, VS2019, clang-cl
git: master branch, last commit was Feb 5,2022 : c650530

@xemjeff
Copy link
Author

xemjeff commented Jun 19, 2022

Closed - moved to the new nanogui site.
Now posted here: mitsuba-renderer/nanogui#120

@xemjeff xemjeff closed this as completed Jun 19, 2022
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

No branches or pull requests

1 participant