Scrolling a Label

Started by Calin Leafshade, Sat 20/02/2010 20:04:46

Previous topic - Next topic

Calin Leafshade

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?


Dualnames

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
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Calin Leafshade

do list boxes automatically wrap lines though?

I wouldnt like to have to end each line with [ if it was just to wrap around

NsMn

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.

Calin Leafshade

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

GarageGothic

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.

Calin Leafshade

#6
I never thought of putting it on its own gui.. that would work.

Edit: Yup that works like a charm. Thanks kids

SMF spam blocked by CleanTalk