The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Worksheet background color

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000