focusable

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
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

focusable

Post by dunbarx » Thu Aug 21, 2014 11:37 pm

Beginners section, because that is how I feel sometimes.

Is there any property that determines selectability? (Not focusability, that is the "traversalOn").

I want to lock out the ability to select an object when using the pointer tool. So I made a little test stack. Pulled two grc rectangles and a button. In one grc I set the "lockLoc" property to "true" (default is "false"), just to see if this held a clue.

In the button script:

Code: Select all

on mouseUp
   put the properties of grc 1 into f1
   put the properties of grc 2 into f2
   
   combine f1 with  return  and comma
   combine f2 with  return  and comma
   
   repeat with y = 1 to the number of lines of f1
      if line y of f1 <> line y of f2 then put line y of f1 & return after temp
   end repeat
   answer temp
end mouseUp
This comes back:
id,1009
layer,2
lockLoc,true
rect,22,26,142,146
No surprise I get changes in such things as the rect, and the "lockLoc" change is just what I deserved. So is there no property that locks out selectability? This is useful to me, say, when a number of controls may be framed by a graphic rectangle. If I want to select several controls by dragging a selection rectangle with the pointer tool, I invariably get the grc as well. I do not want to have to drop the grc manually all the time.

???

Craig Newman

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: focusable

Post by dunbarx » Thu Aug 21, 2014 11:40 pm

Nerver mind.

"cantSelect"

This works with the pointer tool. I was in the right section after all.

Craig

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: focusable

Post by Simon » Fri Aug 22, 2014 12:11 am

hmmm... 3 minutes to get the answer?
We're not that slow around here :)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10333
Joined: Wed May 06, 2009 2:28 pm

Re: focusable

Post by dunbarx » Fri Aug 22, 2014 3:50 am

Simon.

I had checked "select" in the dictionary. Nothing useful, so I wrote my post. But I have been around this stuff for a while, and the keyword fragment "can't" just popped into my head. What do you know?

The moral? Think just a little bit longer... :oops:

Craig

Post Reply