Scrolling text in a widget_label [message #78654] |
Thu, 01 December 2011 11:55  |
Russell[1]
Messages: 101 Registered: August 2011
|
Senior Member |
|
|
So I have a large GUI I've been working on, and there are several
widget_labels all over the place. The xsizes of these regions are
fixed, but the text that can populate them is to be decided by the
User. In general, the text will be much longer than the widget_label
can accommodate, so I thought it would be helpful to add some type of
scrolling to the text inside a widget_label. My hope was that when
the User places the mouse over the widget_label that the text beneath
it would scroll. I can use /tracking_events to tell when the mouse
enters or leaves the widget_label, but I don't know how to interrupt
the event loop, something like:
while event.enter eq 1 do begin
scroll_text,event.id
endwhile
because as this while loop begins, it never exits back to the main
event handler to even know if the mouse leaves or not. My gut tells
me I need widget_event, but I can't really see how to make that
happen....
Any advice?
Russell
|
|
|
Re: Scrolling text in a widget_label [message #78756 is a reply to message #78654] |
Fri, 09 December 2011 13:16  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Russell writes:
> I wonder if I can make this a compound widget? with it's own event
> handler.... hmmmmm...
An object, Russell. A compound widget object. Take
the next two steps now!! :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|