-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Align Buttons and Textbox? #934
Comments
Use |
How would I calculate the width then? I tried |
You don't, |
I want that distance to be the default, and i only want to set it for this one item. I don't want to change the width for all other items.
Does that except for when indention is used, such as in a tree node. |
Hmm it should be something like that but I'll look in details later. I agree it is an issue that this form of alignment isn't more readily obvious. |
Hi sprinkle131313, You solved it?I want to have an alignment button to the right so I tried: I gained some numbers
And trying to offset follows
or this way |
I never got it working completely. For your code though I think it's a bit different of a scenario. Maybe this will help? #196 |
yep, I saw it. English language not learned much, I look at the text and are looking for familiar words :-D. I currently use this:
but sometimes it does not work properly. Specifically, I'm the one case that still has to remodel, Align button to the right but to me and to each frame in increasing the width and push the more to the right. It looks like a slide animations to hide the buttons: D Total funny ... Ala google translate.. |
(I wasn't sure what existing Issue to put this in, or whether I should start a new one about right-alignment) I have multiple widgets on a line to the left, but I want to switch to a right-alignment on the same line, and have multiple widgets aligned right. Here is how I currently do it:
This works fine. However, I'd like an API interface like this:
Each call to Edit: If in a column or child frame, it should right-align to the side of that column/frame. So I guess always just right-align to the end of the current column width, because even child-frames have single-columns unless specified otherwise, I think? It may also be good to think of a similar syntax for vertical alignment - e.g. drawing buttons pinned to the bottom of the window. How that should or shouldn't interact with automatic window resizing, I haven't a clue (maybe each bottom-aligned new line should add to the total height, just as each top-aligned already does. Swapping back and force between vertical alignments should probably - for simplicity of coding - also just reset the (vertical) cursor position entirely). Entirely unrelated, but it'd also be nice to have:
...where we don't have to call |
@JaminGrey Thanks for that post. This is something that I've been discussing with someone recently. I think it is worthy of a new thread but fine here as the thread is open. As part of improving layout features support for basic filling from one of 4-way will be desirable. One thing to consider, is that most of the widgets or usage patterns don't take into consideration that there is a limit, so what do we do when you reach it (e.g. submit too many buttons). We can just a hard clipping line but we need to make sure the implementation doesn't make us end up with too many draw calls. We could probably do the ground work to expose this internally with at minimum backuping the position on each side, that wouldn't be too hard and probably useful as a start.
This is #97 (oldest open topic?). There is something internally where you can use I would like to introduce some sort of flow layout feature when layout can automatically go to the next line. It's not a very difficult feature per se but it will incur change to the code of every widget. Maybe will do this refactor before the end of year (I actually attempted it doing it four weeks ago, for this and for #395, and run into variety of problems and then I realized it wasn't a half-day refactor, more like a three-days one to do this right). |
Any news on that topic? Looking for a layout helper to right-align widgets. A found some workaround snippets but nothing serious yet... |
I'm trying to get 3 buttons and a textbox on the same line along with a label. I want the text on the end to be aligned with everything else.
The text was updated successfully, but these errors were encountered: