Page 1 of 1
Setting a hilitecolor
Posted: Sun Sep 23, 2007 3:46 pm
by andyh1234
I have some code than works as follows:
set the hiLiteColor of me to 180,180,180
It works on a text field, and works well, however I cannot figure out how to put the color back to the default 'empty' state.
Ive tried
set the hiLiteColor of me to empty
but that doesnt work. Any ideas?
Andy
Posted: Sun Sep 23, 2007 4:21 pm
by Klaus
Hi Andy,
that's the correct code:
set the hiLiteColor of me to 180,180,180
Maybe the inherited hilitecolor of the group/card/stack ist exactly the same (180,180,180) so you don't see a difference?
Best
Klaus
Posted: Sun Sep 23, 2007 5:36 pm
by andyh1234
The problem Im having is actually trying to get rid of the hilitecolor after ive set it.
To explain exactly what Im trying for, on the mac version of my appliction the hilitecolor works well, but when I compile for windows its looks horrible.
Id like to keep it in Mac version, and leave it 'empty' it in Windows so it just picks up the default system setting, but because I work on a mac, everytime I load the card in the development environment, the code sets the hilitecolour.
I was going to use some code like
If the platform is "MacOS" then
set the hiLiteColor of me to 180,180,180
else
set the hiLiteColor of me to empty
end if
But... The code sets the color fine, but the empty line doesnt work.
At the moment ive had to just disable the block so I dont keep having to empty the hilitecolor property in the inspector before I compile for windows, but if possible id really like to be able to do it all in code so I can develop on the mac and not worry if its setting the hilitecolor to something else, and let the code put it back which it runs on windows.
Any ideas?
Thanks
Andy
Posted: Sun Sep 23, 2007 6:27 pm
by Klaus
Hi Andy,
## ...and leave it 'empty' it in Windows so it just picks
Ah, in that case you could try this:
Code: Select all
If the platform is "MacOS" then
set the hiLiteColor of me to 180,180,180
else
set the hiLiteColor of me to the hilitecolor
end if
From the docs:
"By default, the global hiliteColor property is set to the system highlight color."
At least worth a try
Best
Klaus
Posted: Sun Sep 23, 2007 8:39 pm
by andyh1234
Thanks Klaus, ill give it go!
Andy
Posted: Sun Sep 23, 2007 8:42 pm
by andyh1234
Thanks again Klaus, that worked well, not something I would have though of.
Andy
Posted: Mon Sep 24, 2007 8:33 am
by Klaus
Hi Andy,
well, after using MetaCard/Revolution for over 8 years now I think I HAVE to know some of these more esoteric facts
Best
Klaus