[GH-ISSUE #152] Simple StackPanel widget as in WPF(C#) ? #65

Open
opened 2026-05-05 03:37:06 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @ASHIT-AXAR on GitHub (Mar 19, 2023).
Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/152

please, i need simple sizing and positioning logic, like StackPanel widget in WPF.
current sizepos() logic is not so easy for begginers to figure out the look of the app. specially when not using layoutdesigner.
eventually i end up wasting more time on sizing and testing widgets in the window rather than actually developing the app.
you just put the widgets in the panel, simply set the width and height of the widget and it does the rest.

Originally created by @ASHIT-AXAR on GitHub (Mar 19, 2023). Original GitHub issue: https://github.com/ultimatepp/ultimatepp/issues/152 please, i need simple sizing and positioning logic, like StackPanel widget in WPF. current sizepos() logic is not so easy for begginers to figure out the look of the app. specially when not using layoutdesigner. eventually i end up wasting more time on sizing and testing widgets in the window rather than actually developing the app. you just put the widgets in the panel, simply set the width and height of the widget and it does the rest.
Author
Owner

@mirek-fidler commented on GitHub (Mar 20, 2023):

What is your desired outcome? Buttons in a column? (That is what docs for
StackPanel show as an example, but I bet it is more complicated than that).

Mirek

On Sun, Mar 19, 2023 at 10:19 PM ASHIT-AXAR @.***>
wrote:

please, i need simple sizing and positioning logic, like StackPanel widget
in WPF.
current sizepos() logic is not so easy for begginers to figure out the
look of the app. specially when not using layoutdesigner.
eventually i end up wasting more time on sizing and testing widgets in the
window rather than actually developing the app.
you just put the widgets in the panel, simply set the width and height of
the widget and it does the rest.


Reply to this email directly, view it on GitHub
https://github.com/ultimatepp/ultimatepp/issues/152, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARH232AIJKX3RIIORS73YDW45Z7XANCNFSM6AAAAAAWAK47Y4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

<!-- gh-comment-id:1475877332 --> @mirek-fidler commented on GitHub (Mar 20, 2023): What is your desired outcome? Buttons in a column? (That is what docs for StackPanel show as an example, but I bet it is more complicated than that). Mirek On Sun, Mar 19, 2023 at 10:19 PM ASHIT-AXAR ***@***.***> wrote: > please, i need simple sizing and positioning logic, like StackPanel widget > in WPF. > current sizepos() logic is not so easy for begginers to figure out the > look of the app. specially when not using layoutdesigner. > eventually i end up wasting more time on sizing and testing widgets in the > window rather than actually developing the app. > you just put the widgets in the panel, simply set the width and height of > the widget and it does the rest. > > — > Reply to this email directly, view it on GitHub > <https://github.com/ultimatepp/ultimatepp/issues/152>, or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AARH232AIJKX3RIIORS73YDW45Z7XANCNFSM6AAAAAAWAK47Y4> > . > You are receiving this because you are subscribed to this thread.Message > ID: ***@***.***> >
Author
Owner

@M0untacir commented on GitHub (Mar 22, 2023):

I made something similar to wxWidgets grid sizer out of Splitter Ctrl. You can specify the number of columns and the rows will be added depending on the number of added Ctrls. GridLayout can be nested as you wish for complex grid layouts.

GridLayout

<!-- gh-comment-id:1478745384 --> @M0untacir commented on GitHub (Mar 22, 2023): I made something similar to wxWidgets grid sizer out of Splitter Ctrl. You can specify the number of columns and the rows will be added depending on the number of added Ctrls. GridLayout can be nested as you wish for complex grid layouts. ![](https://raw.githubusercontent.com/M0untacir/GridLayout/main/LayoutGrid.gif) [GridLayout](https://github.com/M0untacir/GridLayout)
Author
Owner

@ASHIT-AXAR commented on GitHub (Mar 26, 2023):

@M0untacir Nice, thank you thank you thank you. that's what i needed.
initially i thought i can base it on ArrayCtrl, so it was SplitterCtrl. hmm
it's orientation is currently vertical, but you made it such it can be easily used as Vertical and Horizontal Panel with a little modification.
actually i didn't expect i'll see a solution this soon.
you provided a complete showcase. let me test it. i'll continue this in it's own repo
they should include this component built in U++ 👍🏼

<!-- gh-comment-id:1483987369 --> @ASHIT-AXAR commented on GitHub (Mar 26, 2023): @M0untacir Nice, thank you thank you thank you. that's what i needed. initially i thought i can base it on ArrayCtrl, so it was SplitterCtrl. hmm it's orientation is currently vertical, but you made it such it can be easily used as Vertical and Horizontal Panel with a little modification. actually i didn't expect i'll see a solution this soon. you provided a complete showcase. let me test it. i'll continue this in it's own repo they should include this component built in U++ 👍🏼
Author
Owner

@ASHIT-AXAR commented on GitHub (Mar 26, 2023):

What is your desired outcome? Buttons in a column? (That is what docs for StackPanel show as an example, but I bet it is more complicated than that). Mirek

@mirek-fidler not just buttons, a mixed of any components.
actually the StackPanel logic is simple, but there is more than that.
it's a powerful container to organize components in a easy to understand way.

<Window Title="MainWindow" Height="350" Width="604">
    <StackPanel Orientation="Horizontal">
        <Button Name="button0" Content="A Button" Margin="10" Width="120" Height="30" />
        <Button Name="button1" Content="A Button" Margin="10" Width="120" Height="30" />
        <Button Name="button2" Content="A Button" Margin="10" Width="120" Height="30" />
        <Button Name="button3" Content="A Button" Margin="10" Width="120" Height="30" />
    </StackPanel> 
</Window>

Untitled

<!-- gh-comment-id:1483992886 --> @ASHIT-AXAR commented on GitHub (Mar 26, 2023): > What is your desired outcome? Buttons in a column? (That is what docs for StackPanel show as an example, but I bet it is more complicated than that). Mirek @mirek-fidler not just buttons, a mixed of any components. actually the StackPanel logic is simple, but there is more than that. it's a powerful container to organize components in a easy to understand way. ```xml <Window Title="MainWindow" Height="350" Width="604"> <StackPanel Orientation="Horizontal"> <Button Name="button0" Content="A Button" Margin="10" Width="120" Height="30" /> <Button Name="button1" Content="A Button" Margin="10" Width="120" Height="30" /> <Button Name="button2" Content="A Button" Margin="10" Width="120" Height="30" /> <Button Name="button3" Content="A Button" Margin="10" Width="120" Height="30" /> </StackPanel> </Window> ``` ![Untitled](https://user-images.githubusercontent.com/24279964/227755762-6141a5eb-5902-440b-bddd-4eeec8bd7898.png)
Author
Owner

@M0untacir commented on GitHub (Mar 29, 2023):

@M0untacir Nice, thank you thank you thank you. that's what i needed. initially i thought i can base it on ArrayCtrl, so it was SplitterCtrl. hmm it's orientation is currently vertical, but you made it such it can be easily used as Vertical and Horizontal Panel with a little modification. actually i didn't expect i'll see a solution this soon. you provided a complete showcase. let me test it. i'll continue this in it's own repo they should include this component built in U++ 👍🏼

The SplitterCtrl was the easiest route.
Thank you, glad i could help

<!-- gh-comment-id:1487991639 --> @M0untacir commented on GitHub (Mar 29, 2023): > @M0untacir Nice, thank you thank you thank you. that's what i needed. initially i thought i can base it on ArrayCtrl, so it was SplitterCtrl. hmm it's orientation is currently vertical, but you made it such it can be easily used as Vertical and Horizontal Panel with a little modification. actually i didn't expect i'll see a solution this soon. you provided a complete showcase. let me test it. i'll continue this in it's own repo they should include this component built in U++ 👍🏼 The SplitterCtrl was the easiest route. Thank you, glad i could help
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/ultimatepp#65
No description provided.