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
 Access to Worksheet Properties

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
ReneM Posted - 04/21/2016 : 10:13:23 AM
Hi Origin Team,

can you show me as an example how I can modify the row header width. Thank you.

Best regards
René

Origin Ver. and Service Release (Select Help-->About Origin): v9.1 SR3
Operating System: Win7, Win10
2   L A T E S T    R E P L I E S    (Newest First)
ReneM Posted - 04/25/2016 : 2:34:34 PM
Nice, it works, thank you!
jasonzhao Posted - 04/22/2016 : 02:35:12 AM
Hello,

You can modify the row header width with Origin C by editting values in tree, and then apply format stored in tree to worksheet.

Please refer to this page for apply format.
http://www.originlab.com/doc/OriginC/ref/OriginObject-ApplyFormat

and refer to this page for how to view the tree structure for worksheet
http://www.originlab.com/doc/OriginC/guide/Accessing-Metadata#Get_Tree
http://www.originlab.com/doc/OriginC/examples/Accessing-Worksheet-Format-with-Theme-Tree

Here is the example:

void rhWidth(int nWidth)   
{
	Worksheet wks = Project.ActiveLayer();
	Tree tr;
	vector<int> vec;
	vec.Add(nWidth);        // add the row header width value into the vector
	tr.Root.Grid.Dimensions.Horizontal.Size.nVals=vec;   // asign values to the tree	
	wks.UpdateThemeIDs(tr.Root);
	wks.ApplyFormat(tr, true, true);  // Apply format stored in tree to worksheet
}


Best regards!
Jason
OriginLab Technical Service

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