How to replace resize handle image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
How to replace resize handle image
Hi there,
This particular question is specific, but could aid in replacing other LC UI elements.
In this case i want to replace the resize handle image provided automatically by LC :
1: Do i need to dig into the LC application folder and find and replace the image there..?
Plus point.. easy.
Downside.. would need updating every time LC is updated.
Not sure.. if this would actually replace the image in an existing stack, or if the original image is already embedded in the stack somehow.?
2: Can i also interact with this image in some way..?
I would like to show the appropriate resize cursor when the mouse is over the image.
I currently don't know where i would write that script.
I don't see a message sent for mouse enter on that image.
This particular question is specific, but could aid in replacing other LC UI elements.
In this case i want to replace the resize handle image provided automatically by LC :
1: Do i need to dig into the LC application folder and find and replace the image there..?
Plus point.. easy.
Downside.. would need updating every time LC is updated.
Not sure.. if this would actually replace the image in an existing stack, or if the original image is already embedded in the stack somehow.?
2: Can i also interact with this image in some way..?
I would like to show the appropriate resize cursor when the mouse is over the image.
I currently don't know where i would write that script.
I don't see a message sent for mouse enter on that image.
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: How to replace resize handle image
Hi Gary,
I am afraid that the resize handle is provided by the operating system. You can turn it off by setting "resizable" to false in "size and location" of the properties. And then provide your own resize handler. But that looks ugly when increasing the stack size swiftly, a white border flashes shortly at the right and bottom before everything looks ok again (this is on MacOSX). I think this is not what you would like. See attached stack.
I might be wrong about the system providing the resize handle though.
Kind regards
Bernd
I am afraid that the resize handle is provided by the operating system. You can turn it off by setting "resizable" to false in "size and location" of the properties. And then provide your own resize handler. But that looks ugly when increasing the stack size swiftly, a white border flashes shortly at the right and bottom before everything looks ok again (this is on MacOSX). I think this is not what you would like. See attached stack.
I might be wrong about the system providing the resize handle though.
you could put a mouseMove handler into the card or stack script that checks the coordinates and then sets the cursor accordingly.2: Can i also interact with this image in some way..?
I would like to show the appropriate resize cursor when the mouse is over the image.
Kind regards
Bernd
- Attachments
-
- homeMadeStackResizeHandler.livecode.zip
- (1.5 KiB) Downloaded 156 times
Re: How to replace resize handle image
Thanks Bernd,
I do see that corner gif image in one of the LC stacks "generalIcons" i think its called, when i expose LC elements in the app browser.
However, reducing the blend level of the gif in the LC stack does not seem to have any effect, so i may be barking up the wrong tree.
You might be right about the operating system creating the handle, but it sure does look like the one in LC, and iv never seen such a handle in an app created with Xcode.
I think i will have to live with it, and maybe redesign the lower UI so its not so obvious.
I do see that corner gif image in one of the LC stacks "generalIcons" i think its called, when i expose LC elements in the app browser.
However, reducing the blend level of the gif in the LC stack does not seem to have any effect, so i may be barking up the wrong tree.
You might be right about the operating system creating the handle, but it sure does look like the one in LC, and iv never seen such a handle in an app created with Xcode.
I think i will have to live with it, and maybe redesign the lower UI so its not so obvious.
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
-
- VIP Livecode Opensource Backer
- Posts: 4003
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: How to replace resize handle image
Hi Gary,
I might very well be wrong
Are you suggesting that TextEdit was written in Livecode?
it might be a Carbon thing.
Kind regards
Bernd
I might very well be wrong
I looked at TextEdit in MacOSX 10.6.8 and it is the same as in Livecode.but it sure does look like the one in LC, and iv never seen such a handle in an app created with Xcode
Are you suggesting that TextEdit was written in Livecode?
it might be a Carbon thing.
Kind regards
Bernd
Re: How to replace resize handle image
I think i traced it to here :
But it does not seem to respond to changes from its property inspector.
Eg : if i change the visible in the inspector, it does not affect the corner button there..?
Why is this.? I would have assumed this is just an LC stack and should behave as such.?
PS : the handler you will find there for resizing the stack works really well (expected as looks like the original LC handler) if you copy it to a custom handler in a button in your own stack
and place it in the bottom right corner, then set the stack resizing to false.
PPS: I don't see any icon in bottom right corner in mavericks.
But it does not seem to respond to changes from its property inspector.
Eg : if i change the visible in the inspector, it does not affect the corner button there..?
Why is this.? I would have assumed this is just an LC stack and should behave as such.?
PS : the handler you will find there for resizing the stack works really well (expected as looks like the original LC handler) if you copy it to a custom handler in a button in your own stack
and place it in the bottom right corner, then set the stack resizing to false.
PPS: I don't see any icon in bottom right corner in mavericks.
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
-
- VIP Livecode Opensource Backer
- Posts: 7239
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to replace resize handle image
The window and it's frame components are drawn by the OS. I think Bernd is right that the resize box is a Carbon thing. The image you found is part of the image library in case you want to fake a window using a group or for some other reason, but it isn't the one being used by the stack window.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to replace resize handle image
Thanks jacque,
Good to know i can stop my futile hunt for what was creating it.
I do hope this changes when we get cocoa.
Its like having furry dice in the rear window of a Ferrari
Good to know i can stop my futile hunt for what was creating it.
I do hope this changes when we get cocoa.
Its like having furry dice in the rear window of a Ferrari
Kind Regards
Gary
https://www.doobox.co.uk
Gary
https://www.doobox.co.uk
-
- VIP Livecode Opensource Backer
- Posts: 7239
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to replace resize handle image
LOL. If the only way I can have a Ferrari is to accept some furry dice with it, I'm game. But yeah, I know what you mean.
If it helps, RR is tackling the Cocoa conversion as we speak. Since the window decorations are controlled by the OS, I'm confident they'll look right when its done.
If it helps, RR is tackling the Cocoa conversion as we speak. Since the window decorations are controlled by the OS, I'm confident they'll look right when its done.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com