Page 1 of 1

How to make invisible objects visible - in Edit mode

Posted: Mon Aug 31, 2015 7:41 am
by golive
When I am in Edit mode, objects that are invisible are not shown.

Other tools I have used show all visible and invisible objects when in design mode (Edit mode).
The invisible objects only disappear when in Run mode.

Is there a way to replicate this behavior in LiveCode?

Re: How to make invisible objects visible - in Edit mode

Posted: Mon Aug 31, 2015 8:11 am
by FourthWorld
When an object is invisible it's invisible. Remember, unlike other IDEs which provide a layout mode completely disconnected from runtime, this is truly live code, so the IDE does a more thorough job of presenting things as you wish them to be seen, since there's very little difference between layout and runtime modes.

That said, the Project Browser lists all objects, and has an eye-shaped icon to toggle visibility.

Re: How to make invisible objects visible - in Edit mode

Posted: Mon Aug 31, 2015 9:42 am
by SparkOut
Toggle them all on and off to view with the "View" menu. At the bottom of the list is "Show Invisible Objects"

Re: How to make invisible objects visible - in Edit mode

Posted: Mon Aug 31, 2015 12:11 pm
by MaxV
golive wrote:Is there a way to replicate this behavior in LiveCode?
Yes, there is.
Just add to your control this code:

Code: Select all

on OpenCard
if the environment is "browser" than
set the visible of me to false
end if
end openCard

Re: How to make invisible objects visible - in Edit mode

Posted: Mon Aug 31, 2015 12:38 pm
by zaxos
If what you want is to see invisible objects when you use the edit tool and hide them when you use the run tool then thats what you need:
-- in your stack script

Code: Select all

local tControls
on openStack
insert the script of this stack into front
end openStack
on newTool theTool
   if theTool is "pointer" then
      repeat with x = 1 to the number of controls in stack "test"
         if the visible of control x of stack "test" is false then
            set the visible of control x of stack "test" to true
            put x&return after tControls
         end if
      end repeat
   else
      if tControls <> empty then
         repeat for each line tControl in tControls
            if there is a control tControl then
               set the visible of control tControl of stack "test" to false
            end if
         end repeat
         put empty into tControls
      end if
   end if
   pass newTool
end newTool

Re: How to make invisible objects visible - in Edit mode

Posted: Tue Sep 01, 2015 1:50 am
by golive
SparkOut wrote:Toggle them all on and off to view with the "View" menu. At the bottom of the list is "Show Invisible Objects"
Thanks for all the suggestions.

SparkOut's suggestion of "Show Invisible Objects" works nicely.