Re: Locking graphics in GUI / disable resize, rotate or translate [message #90547 is a reply to message #90503] |
Mon, 09 March 2015 12:09   |
PMan
Messages: 61 Registered: January 2011
|
Member |
|
|
On Thursday, March 5, 2015 at 11:56:13 AM UTC-5, Chris Torrence wrote:
> On Thursday, March 5, 2015 at 9:43:18 AM UTC-7, Paul Mallas wrote:
>> Hello,
>>
>> I created a fancy GUI for a project and showed my 10 year old son it. He is interesting in programming and I wanted show off the sorts of things you can make.
>>
>> Anyway, within about three seconds he can screwed up all the graphics with in the Gui. My question is, is there a way to lock graphics in a GUi? I am using window_widgets with either a map() graphic or image () graphics. I still need the user to be able to click on the map so I can get points from the user clicks, but I don't want the user to be able to zoom, rotate or translate the graphic.
>>
>>
>> Any idea how to do this?
>>
>> Best Regards,
>> Paul
>
> Hi Paul,
>
> You can use the EVENT_HANDLER keyword on the Window object, then override a bunch of the methods, and return "0" to skip the default event handling.
>
> Look in the docs under the Widget_Window.
>
> Cheers,
> Chris
Hi Chris,
I have been working creating a class for handling events. Things are moving along slowly but I think I can do all the stuff I need with this. But I have one question - I am trying to override the selectChange method. How do I change the selection of the graphic directly? I can't do graphic.select (or graphic.select, /clear) since this calls the method I am trying to override and I end up with an infinite loop. Does this make any sense?
Thanks,
Paul
|
|
|