Trigger resizeControl?

Eric Chatonet eric.chatonet at sosmartsoftware.com
Fri Jun 22 12:19:01 EDT 2007


Hi Richard,

I love your precision sense ;-)
And you are right: I did not answered the question Scott asked.
Nevertheless knowing all these messages that can be automatically  
sent to any stack by just setting a custom property appropriately  
stays unknown and valuable for stacks running in the IDE.
Not for you who know that since decades :-) but for those who might  
be interested in, selecting "Development/Plugins/Plugin Settings"  
will show the list of all messages that can be sent:

revCloseStack
revEditScript
revIDChanged
revMouseMove
revMoveControl
revNameChanged
revNewTool
revPreOpenCard
revPreOpenStack
revResizeControl
revResizeStack
revResumeStack
revSaveStackRequest
revSelectedObjectChanged
revSelectionChanged
revShutdown

Best regards from Paris,
Eric Chatonet.

Le 22 juin 07 à 18:09, Richard Gaskin a écrit :

> Eric Chatonet wrote:
>> Assuming that this is done with the pointer tool:
>> just set the cRevLoadInfo["revResizeControl"] of your stack to true.
>> I's a trick normally reserved for plugins but it works with any  
>> stack.
>> Then the engine will send a revResizeControl to you.
>> Just change the name of your resizeControl handler :-)
>> No frontscript needed...
>
> No *additional* frontScript needed, but the revResizeControl  
> message is sent my Rev's own frontScript, and is not natively part  
> of the engine.
>
> When a control is resized via script, neither the resizeControl nor  
> revResizeControl messages are sent; they're only sent when resizing  
> the control interactively with the pointer tool.
>
> (In fact, given how revResizeControl mirrors the already-built-in  
> resizeControl message, I wonder why RunRev just doesn't rely on the  
> engine for that.  But I digress.)
>
> If you need to trigger behaviors when a control is resized, it may  
> be best to use a custom property for that, with setProp and getProp  
> handlers to trigger any other behaviors needed:
>
> setProp MyRect pRect
>    set the rect of the target to pRect
>    -- add other behaviors here:
>
> end MyRect
>
>
> getPop MyRect
>   return the rect of the target
> end MyRect
>
>
> -- 
>  Richard Gaskin
>  Managing Editor, revJournal
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------





More information about the use-livecode mailing list