How to make invisible objects visible - in Edit mode

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

How to make invisible objects visible - in Edit mode

Post by golive » Mon Aug 31, 2015 7:41 am

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

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

Post by FourthWorld » Mon Aug 31, 2015 8:11 am

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

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

Post by SparkOut » Mon Aug 31, 2015 9:42 am

Toggle them all on and off to view with the "View" menu. At the bottom of the list is "Show Invisible Objects"

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

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

Post by MaxV » Mon Aug 31, 2015 12:11 pm

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
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

zaxos
Posts: 222
Joined: Thu May 23, 2013 11:15 pm

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

Post by zaxos » Mon Aug 31, 2015 12:38 pm

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
Knowledge is meant to be shared.

golive
Posts: 98
Joined: Wed Jul 01, 2015 5:16 am

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

Post by golive » Tue Sep 01, 2015 1:50 am

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.

Post Reply