PDA

View Full Version : Shape object fill color


Roboblue
02-22-2007, 08:12 PM
Is there a way to "get" the fill color of the shape object?

mwreyf1
02-22-2007, 10:11 PM
I am assuming that since you want to know what the color of the object is then you are allowing the end user the ability to change the color of the object during runtime.

I use the CHCOLOR.DLL (not sure who wrote it, but its great) to do this.

If I miss-understood your question then i'm not sure what you are trying to do.

See attached APZ for example.

Hope this helps.

And a special thanks to who ever wrote the dll.

Roboblue
02-22-2007, 10:22 PM
That's WORM's dll.
Actually, what I want to do is get the color value(s) from a Shape object without having to use a color picker. Even tho the Shape has a color, the app doesn't know the true value of the color.
Most objects have a Get.Properties that outputs a table that the BGColor can be pulled from, but not the Shape plugin.
The color value of a Shape is in Decimal. I can convert a decimal to HEX and RGB. So, if the user clicks on the shape, it sets a variable that I can massage later in the script.

bule
02-23-2007, 03:19 AM
Yeah funny, you can Set stuff, but you can not Get.

Dermot
02-23-2007, 03:35 AM
Just use a Paragraph object with no text instead. You can easily set and get the BG colour.

Roboblue
02-23-2007, 04:21 AM
Yeah, that's what I ended up doing.:lol
I wanted to use the shape as it has 1. rounded rectangle, and 2. the border (stroke) can be more than one pixel wide (unlike the para). I was using a four pixel stroke (one normally) on enter to simulate a button. I ended up using a shape behind a para that will stroke out four pixels on enter of the para to get the same effect.
Now i wish i had a color picker i could manually enter the client window coordinates (not screen) to pick instead of mouse movement, with a hex or rgb outputs.
I have a work around, but it's a lot of code.