So I'm coding an email program style GUI and i need a way to 'scroll' a label.
I display the text in a label using [ as line breaks but if the text is too long for the label how can I have a button which scrolls the email down or up a line?
Quote from: Calin Leafshade on Sat 20/02/2010 20:04:46
So I'm coding an email program style GUI and i need a way to 'scroll' a label.
I display the text in a label using [ as line breaks but if the text is too long for the label how can I have a button which scrolls the email down or up a line?
I'd use a listbox, and listbox items every line you end with ]. Then it's really easy to do scrolling..apparently. :D
do list boxes automatically wrap lines though?
I wouldnt like to have to end each line with [ if it was just to wrap around
You could also just move the Label around on the GUI and cover the text that's supposed to be over the border under two non-clickable buttons if needed.
That wouldnt really work due to the arrangement of the GUI.
I think this would probably require pretty extreme string manipulation functions so i'm kinda thinking it will be monkey who answers this :D
You COULD use the listbox thing but with a helper script to do the linebreaking for you. But an easier solution could be to make the text display box as a label on its own GUI overlaid the other GUI and simply move the label up and down as NsMn suggested.
I never thought of putting it on its own gui.. that would work.
Edit: Yup that works like a charm. Thanks kids