How to replace resize handle image

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
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

How to replace resize handle image

Post by doobox » Mon Jan 13, 2014 9:30 am

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 :

Image

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to replace resize handle image

Post by bn » Mon Jan 13, 2014 12:31 pm

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.
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.
you could put a mouseMove handler into the card or stack script that checks the coordinates and then sets the cursor accordingly.


Kind regards
Bernd
Attachments
homeMadeStackResizeHandler.livecode.zip
(1.5 KiB) Downloaded 156 times

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: How to replace resize handle image

Post by doobox » Mon Jan 13, 2014 1:10 pm

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.
Kind Regards
Gary

https://www.doobox.co.uk

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4003
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: How to replace resize handle image

Post by bn » Mon Jan 13, 2014 1:20 pm

Hi Gary,

I might very well be wrong
but it sure does look like the one in LC, and iv never seen such a handle in an app created with Xcode
I looked at TextEdit in MacOSX 10.6.8 and it is the same as in Livecode.

Are you suggesting that TextEdit was written in Livecode? :) :)

it might be a Carbon thing.

Kind regards
Bernd

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: How to replace resize handle image

Post by doobox » Mon Jan 13, 2014 1:39 pm

I think i traced it to here :

Image

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

jacque
VIP Livecode Opensource Backer
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

Post by jacque » Mon Jan 13, 2014 4:41 pm

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

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: How to replace resize handle image

Post by doobox » Mon Jan 13, 2014 5:25 pm

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 :-)
Kind Regards
Gary

https://www.doobox.co.uk

jacque
VIP Livecode Opensource Backer
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

Post by jacque » Mon Jan 13, 2014 8:16 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”