Looking for Help on a Project
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Looking for Help on a Project
Than you Klaus.
Sorry for the mislaid original post. It's good to see you are still here after so many years
Bidge
Sorry for the mislaid original post. It's good to see you are still here after so many years
Bidge
Re: Looking for Help on a Project
"SOLVED"
Can someone point me to the correct function to load an svg from one stack into a different widget from a button? I have been searching for hours going through threads but I can't find anything. Tried the code below with no luck.
Thanks
Bidge
Can someone point me to the correct function to load an svg from one stack into a different widget from a button? I have been searching for hours going through threads but I can't find anything. Tried the code below with no luck.
Code: Select all
on mouseUp
set the iconPath of widget "SVG" to the iconPath of widget "Ribbon"
end mouseUp
Bidge
-
- Livecode Opensource Backer
- Posts: 9440
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Looking for Help on a Project
Just COPY-PASTE the widget from stack 1 to stack 2 . . . . .
Re: Looking for Help on a Project
Hi .
I am loading images into a text field. I want the images to load in order of selection rather than have them replace a specific character as per this code I am using from the dictionary:
How would I write this?
Thanks for any help once again.
Bidge
I am loading images into a text field. I want the images to load in order of selection rather than have them replace a specific character as per this code I am using from the dictionary:
Code: Select all
on mouseUp
set the imageSource of char 1 of line 1 of field "Numbers" to "Image.png"
end mouseUp
Thanks for any help once again.
Bidge
-
- Livecode Opensource Backer
- Posts: 9440
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Looking for Help on a Project
Well, I suppose you would set up a loop and number the images sequentially
as they come in and then set each one to the character of the same number.
as they come in and then set each one to the character of the same number.
Re: Looking for Help on a Project
Is it possible to have a larger group follow another smaller group on a drag command?
Thanks
Bidge
Thanks
Bidge
Re: Looking for Help on a Project
Hi Bidge,
Put this into the script of your small group:
Tested and works!
Best
Klaus
yep, but will not work if using "... grab me ..."!bidgeeman wrote:Is it possible to have a larger group follow another smaller group on a drag command?
Put this into the script of your small group:
Code: Select all
local maydrag
on mousedown
put TRUE into maydrag
end mousedown
on mouseup
put false into maydrag
end mouseup
on mouserelease
put false into maydrag
end mouserelease
on mousemove x,y
if maydrag <> TRUE then
exit mousemove
end if
set the loc of grp "the small one" to x,y
set the topleft of grp "the follower" to the topright of grp "the small one"
end mousemove
Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Looking for Help on a Project
Hi Bidge,
Here is a stack which does the job using mousemove
Best regards
Jean-Marc
Here is a stack which does the job using mousemove
Best regards
Jean-Marc
- Attachments
-
- stMoveGroupsTogether.zip
- (2.08 KiB) Downloaded 415 times
Last edited by jmburnod on Mon Jun 26, 2017 7:58 pm, edited 1 time in total.
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 154
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Looking for Help on a Project
I like Jean-Marc’s illustration… it provides quite a bit of flexibility. But, here is a super simple version that is much like Klaus’ script.
Place this script in the "leader group” -- "RedGroup" is the "follower group"
on mouseDown
grab me
end mouseDown
on mouseMove
set the loc of group "RedGroup" to the topRight of me
end mouseMove
This script also assumes that none of the controls contained in the group use mouseDown or mouseMove handlers. If you use a mouseDown in one of group controls, then make sure to pass it at the end of the handler.
randy
Place this script in the "leader group” -- "RedGroup" is the "follower group"
on mouseDown
grab me
end mouseDown
on mouseMove
set the loc of group "RedGroup" to the topRight of me
end mouseMove
This script also assumes that none of the controls contained in the group use mouseDown or mouseMove handlers. If you use a mouseDown in one of group controls, then make sure to pass it at the end of the handler.
randy
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Looking for Help on a Project
Hi Randy,
Thanks for this.
I never used a grab command with mousemove message.
I believed mousemove doesn't work during a grab command
Thanks for this.
I never used a grab command with mousemove message.
I believed mousemove doesn't work during a grab command
https://alternatic.ch
-
- VIP Livecode Opensource Backer
- Posts: 154
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Looking for Help on a Project
The scipt has the advantage or disadvantage ... depending on your view … that the mouseMove handler acts a bit like a mouseEnter handler.
Assuming the two groups are not in their leading/following positions, when you move your mourse into the leading group, it following group will jump right into place… it will work like a mouseEnter handler. If the following group is already in its place, then you’ll not see the “jump."
Assuming the two groups are not in their leading/following positions, when you move your mourse into the leading group, it following group will jump right into place… it will work like a mouseEnter handler. If the following group is already in its place, then you’ll not see the “jump."
Re: Looking for Help on a Project
Thank you all Klaus, jmburnod and Randy.
Those examples are brilliant. Can someone explain why you can't set the large group to attach to the loc of the topCenter of the small group? I tried to adjust the script and it appears this property cannot be set???
Thank you all again
Bidge
Those examples are brilliant. Can someone explain why you can't set the large group to attach to the loc of the topCenter of the small group? I tried to adjust the script and it appears this property cannot be set???
Thank you all again
Bidge
-
- VIP Livecode Opensource Backer
- Posts: 154
- Joined: Thu Jun 29, 2006 4:16 pm
Re: Looking for Help on a Project
You’re right, there is no topCenter, topMiddle etc.. to get that effect in my example you could change the mouseMove to this:
on mouseMove
lock screen
set the loc of group "RedGroup" to the loc of me
set the top of group "RedGroup" to the bottom of me
unlock screen
end mouseMove
on mouseMove
lock screen
set the loc of group "RedGroup" to the loc of me
set the top of group "RedGroup" to the bottom of me
unlock screen
end mouseMove
Re: Looking for Help on a Project
Randy that worked perfectly thank you
Regards
Bidge
Regards
Bidge
Re: Looking for Help on a Project
Hi "SOLVED" I had set the image layer to TOP
I have a problem and think it could be a bug? I have an image layer sitting over a few text fields.
Every time I load an image it jumps over to the top over the text fields? It doesn't appear to move in the project browser until I reload the project and then you can see it has elevated itself over the text fields.
Is there anyway to stop this?
Thanks again for your help
Cheers
Bidge
I have a problem and think it could be a bug? I have an image layer sitting over a few text fields.
Every time I load an image it jumps over to the top over the text fields? It doesn't appear to move in the project browser until I reload the project and then you can see it has elevated itself over the text fields.
Is there anyway to stop this?
Thanks again for your help
Cheers
Bidge