T O P I C R E V I E W |
illysam |
Posted - 01/04/2006 : 12:54:42 PM Origin7 SR4 Windows XP Professional
Hi,
in order to distinguish between several worksheet templates for one of my Origin add-ons, I customized the Origin color palette ('Format' menu -> 'Color Palette...') and used these custom colors as background colors for the worksheet templates. The background colors were changed from the 'Worksheet Display Control' dialog (accessible by hitting F4 when a worksheet is active), then the templates were saved.
My problem is that the worksheets do not show up with the desired colors if the color palette had been modified prior to my adding custom colors. This is because the color of a worksheet is determined by the index of that color in the Origin color palette, not the color name. And adding colors to a customized palette is not the same as adding to the default palette as far as color indices are concerned.
However, it is easy enough to determine the index of a given (custom) color in the color palette from the Origin.ini file.
Is there a way in OriginC/LabTalk to use this index to change the background color of a worksheet programmatically so that I can ensure that the worksheets show up with the 'correct' color?
Thank you, Rolf.
|
4 L A T E S T R E P L I E S (Newest First) |
easwar |
Posted - 01/04/2006 : 5:15:53 PM Hi Rolf,
If the main intent is to distinguish between different worksheets, you could try the following instead:
1> bring up Worksheet Display Control 2> change Gap From Top from 0 to say 30 3> add text label to top area that describes/distinguishes worksheet 4> save as a custom template 5> create as many such custom templates as needed
Then programmatically you can create instances of the appropriate template for different needs.
Easwar OriginLab
|
greg |
Posted - 01/04/2006 : 5:01:34 PM You cannot access these properties programmatically and you cannot use a custom color other than one you add to the Origin Color Palette.
Also, changing your Origin Color Palette will only affect your computer and will not be portable to other computers. (Unless you write code to overwrite another user's ORIGIN.INI file.)
|
illysam |
Posted - 01/04/2006 : 4:23:11 PM Hi Mike,
the 'page.basecolor' command changes the background of the whole worksheet which is a useful thing to know, but unfortunately not what I want to do.
I need a command that changes the background color of the headers (and rows), not the worksheet (sorry, I wasn't clear enough in my initial post).
You can manually change this color in the 'Worksheet Display Control'dialog (access as described above): simply change the 'Background' color in the 'Heading Options' and click 'OK' to observe the effect.
I just need a way to achieve this programmatically (OriginC or LabTalk).
Thanks, Rolf.
|
Mike Buess |
Posted - 01/04/2006 : 3:00:20 PM Hi Rolf,
I'm not sure this is exactly what you want but you might try the LabTalk property page.basecolor=index;
Mike Buess Origin WebRing Member |