Container Control?

Hi,
I have around 60 controls (mostly buttons) in my window and need more, but have run out of space.

Is there any way to add more controls, and have the window scrollable in order to see them all?

Im not sure which control (if any) are suitable?

Any help is appreciated.
Thank you all in advance.

Hi @Richard_Summers,

yeah that’s possible. Either you program this manually with a scrollbar and nested ContainerControls/Canvas or you use an add-on like StackView, which was developed exactly for this situation.

Kind regards,
Martin

I don’t think scrolling is a good way to achieve your goal. How about using a Tab control, grouping controls that belong together on a single Tab for example ?

1 Like

Can you upload a screenshot of your ui?

Hi @Richard_Summers - yes you can use a scroll bar atop of your container to vertically scroll your controls or you can also use a tab panel. Either will be a personal preference for your UX goals.

Thanks everyone.

I know lots of buttons and scrolling is not ideal for most apps, and is probably considered poor UI design, but this is just an app for my own usage, which controls other software.

For this reason, having a window twice as high as my screen height, and simply scrolling the window up and down is exactly what I want.

I can put all of my buttons in container controls on the window, but I am seriously struggling getting the actual page to scroll?

I have looked in the example projects folder, hoping there was an example of a scrolling window, but couldn’t find one?

If I drag a scrollbar onto my window, I am totally lost as to how to make it scroll the actual window, and not scroll the controls?

Somebody have pity on me - Im a graphic designer, and not a developer :slight_smile:

1 Like

i used a scroll bar

Sub ValueChanged() Handles ValueChanged
If App.IgnoreEvents = True then return 'that is a self made flag as property but a state enumeration is better

ContainerRowListPosition -Me.Value
End Sub

Private Sub ContainerRowListPosition(Optional OffsetY As Integer = 0)

dim i as integer = 0
for Each c as ContainerRow in ContainerRowList
c.Left = 9
c.Top = OffsetY + i * (c.Height+1)
i=i+1
next

End Sub

after add row i do (c as ContainerRow)
ScrollBarRows.MaximumValue = ContainerRowList.LastRowIndex * (c.Height+1)

after load i set
ScrollBarRows.Value = 0

ContainerRowList is a object array property in the window

at runtime i add ContainerControls to a other ContainerControl with .EmbedWithin method
because i have a header with columns and want scroll the list behind.

each of my row was a container control because each row had same controls.

Hi @Martin_T,

I’d like to purchase Stackview after evaluating the demo. But unfortunately I could not send a private message to you. How could I purchase the control?

best regards,

Ralf