[REQ] Control selection during browse mode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 101
- Joined: Mon Jan 03, 2022 7:10 pm
[REQ] Control selection during browse mode
Does anyone have any code that will allow one to select a control during browse mode? The code would have to be GPL as I am using the Community Edition of LiveCode.
Re: Control selection during browse mode
Hi Emily-Elizabeth,
you can simply do this e.g. in a card script like in my example, see screenshot
-> set the selected of the target to true
Also works in BROWSE mode.
Maybe you want to insert this into front when neccessary and remove it later,
depends on when you want to select objects.
Best
Klaus
you can simply do this e.g. in a card script like in my example, see screenshot
-> set the selected of the target to true
Also works in BROWSE mode.
Maybe you want to insert this into front when neccessary and remove it later,
depends on when you want to select objects.
Best
Klaus
-
- Posts: 101
- Joined: Mon Jan 03, 2022 7:10 pm
Re: [REQ] Control selection during browse mode
I'm building a visual database editor and the user will switch between "browse" and "edit" modes, so I just need this to work in "edit" mode. Thanks for the info.
Edit: you can see the work in progress https://github.com/emily-elizabeth/Database-Designer
Edit: you can see the work in progress https://github.com/emily-elizabeth/Database-Designer
-
- Posts: 101
- Joined: Mon Jan 03, 2022 7:10 pm
Re: [REQ] Control selection during browse mode
Can't resize or move the controls though.
-
- Posts: 101
- Joined: Mon Jan 03, 2022 7:10 pm
Re: [REQ] Control selection during browse mode
Setting the cantSelect of the tools pane means that they are "live" even when in edit mode (so the other controls can be selected, moved and resized).
Re: [REQ] Control selection during browse mode
Aha, well, you didn't mention that!
Editing is a complete different story and not so easy.
Maybe you just mean the "Pointer Tool"?
Editing is a complete different story and not so easy.
Que? Sorry, no idea what you mean? There is no "canSelect" property anywhere.Setting the cantSelect of the tools pane means that they are "live" even when in edit mode (so the other controls can be selected, moved and resized).
Maybe you just mean the "Pointer Tool"?
Re: [REQ] Control selection during browse mode
Ouch, three blind mice, me being one of them...
Re: [REQ] Control selection during browse mode
Actually, Klaus isn't blind at all. There really is no "canSelect" property.
But there is a "cantSelect" property (emphasis on the t).
However, contrary to what Emily suggested, the cantSelect property, when set to true, actually prevents the user from being able to select the control.
What Emily seems to want to do is be able to select the controls, and resize and move them, while in browse mode.
Not that easy in browse mode.
But there is a "cantSelect" property (emphasis on the t).
However, contrary to what Emily suggested, the cantSelect property, when set to true, actually prevents the user from being able to select the control.
What Emily seems to want to do is be able to select the controls, and resize and move them, while in browse mode.
Not that easy in browse mode.
Last edited by Cairoo on Sun Dec 11, 2022 9:11 pm, edited 2 times in total.
Re: [REQ] Control selection during browse mode
I AM blind, I missed the T!
-
- Livecode Opensource Backer
- Posts: 9393
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: [REQ] Control selection during browse mode
It is extremely easy to select something in Browse mode:
and the result is "all very sweet and sexy":
- -
BUT that's about all you will get, as that does NOT allow you to resize or move the object about.
You can, of course, do this:
which allows you to move the object around and shows the selected dots . . .
Code: Select all
on mouseUp
select me
end mouseUp
- -
BUT that's about all you will get, as that does NOT allow you to resize or move the object about.
You can, of course, do this:
Code: Select all
on mouseDown
select me
grab me
end mouseDown
Last edited by richmond62 on Sun Dec 11, 2022 6:28 pm, edited 1 time in total.
-
- Posts: 101
- Joined: Mon Jan 03, 2022 7:10 pm
Re: [REQ] Control selection during browse mode
Don't feel bad, it's a hard property to find as it's not listed in the Inspector palette, but some sleuthing and trying got it figured out
-
- Livecode Opensource Backer
- Posts: 9393
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: [REQ] Control selection during browse mode
I don't feel bad: but I do feel slightly angry with myself that I haven't managed
to work out how to do it.
to work out how to do it.
-
- Posts: 101
- Joined: Mon Jan 03, 2022 7:10 pm
Re: [REQ] Control selection during browse mode
Everything that you don't want to move/resize set the cantSelect to true and then you can create a new control, switch to the edit tool and then you can select/move/resize the new control.
-
- Livecode Opensource Backer
- Posts: 9393
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: [REQ] Control selection during browse mode
Wow: you are a right crafty so-and-so!
I should, perhaps, 'remind you', that the origin of the word 'crafty' in Anglo-Saxon
has NO negative connotations: 'cræftiȝ" meaning 'clever'.
Although setting "Everything that you don't want to move/resize set the cantSelect to true"
could be long-winded, and, what if you want to muck about with one of those at a later date?
I should, perhaps, 'remind you', that the origin of the word 'crafty' in Anglo-Saxon
has NO negative connotations: 'cræftiȝ" meaning 'clever'.
Although setting "Everything that you don't want to move/resize set the cantSelect to true"
could be long-winded, and, what if you want to muck about with one of those at a later date?