A text window is sufficient, the content of which can also be deleted.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to code a user interface that has some buttons on top and the bottom part will show the output with a scrollbar:
So far I can add buttons and a vertical scrollbar over the whole height of my graphics window. If I scroll down, all the buttons are affected too and move. How can place buttons on top and have a smaller window or viewport at the bottom?
A text window is sufficient, the content of which can also be deleted.
I forgot to say that the output will contain images, buttons and text. I thought about a rich text box too, but I haven't figured out how to add images and buttons inside one. Here's a simplified version of my current code:
GraphicsWindow.Width = 640
GraphicsWindow.Height = 480
topbutton = Controls.AddButton("I'm just here as an example", 8, 8)
Controls.SetSize(topbutton, 200, 24)
scrollbarheight = 20 * 32 + 40 ' total of height equals 20 buttons with space inbetween and the top button
LDScrollBars.Add(0, scrollbarheight)
y = 40 ' where the buttons below will start
for i = 1 To 20
button[i] = Controls.AddButton(i , 8, y)
Controls.SetSize(button[i], 200, 24)
y = y + 32
EndFor
KeepItPrivate,
Why not try this with LDWindows and have the 2 windows overlay each other. The top window could have the buttons that you don't want to scroll off of the screen and for the bottom window you could use LDScrollBars.
On that window you could have a vertical scroll bar. If you add buttons, text or shapes to this window they will scroll when you move the scrollbar.
JR