highlight and hide field from standalone

Mark Smith mark at maseurope.bulldogdsl.com
Fri Sep 16 09:48:00 EDT 2005


How about drawing a red rectangle around the field:


On mouseup whgichone
global field2delete
if the controlkey is down then
    if whichone = 3 then
      put "xyz" into field2delete
      addBorder field2delete
end if
else exit to top
end mouseup

on addBorder field2delete
   put the rect of fld field2delete into cRect
   create grc "fBorder"
   set the style of grc "fBorder" to rectangle
   set the rect of grc "fBorder" to cRect
   set the penColor of grc "fBorder" to red
end addBorder


and then

on deleteKey
global field2Delete
if intersect(fld field2delete,grc "fBorder") then
hide fld field2delete
delete grc "fBorder"
end deletekey

Cheers,

Mark


On 16 Sep 2005, at 13:39, rev at armbase.com wrote:


>>> Hi Bob,
>>>
>>>
>
> Hi Klaus
>
>
>
> Ok I thought of another thing.
> I'm playing with this one.... It seems quite nice. IMHO :-)
>
> On mouseup whgichone
> global field2delete
> if the controlkey is down then
>    if whichone = 3 then
> put "xyz" into field2delete
> set the bordercolor of fld field2delete to "red"
> --this should make the border red but it does not???
> --Q? any idea what the edge of a field is called? I tried changing  
> all the
> --colours to red without any luck
>          end if
> else exit to top
> end mouseup
>
> -- so pressing the right key when control is down puts the field  
> into the
> --variable
>
> on deletekey
> global field2delete
> if the bordercolor of fld feld2delete is "red" then
> hide fld field2delete
> end deletekey
>
> --deletes the field only if the border is red :-)
>
> on escapekey
> set the bordercolor of fld field2delete to empty
> end escapekey
>
> --escape key clears the border colour so the delete key wont work :-)
>
>
> But now the problem I cant see the edge of the field being red but  
> I can see it
> red in the object inspector. What is the boundary of a field  
> cazlled if it is
> not the border colour?
>
>
> Cheers
> Bob
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>





More information about the use-livecode mailing list