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
 Origin Forum
 text label alignment

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
Fed0r Posted - 10/08/2012 : 05:31:45 AM
origin ver. and service release (select help-->about origin): 8.6.0 sr 3
operating system: win 7 64bit

hi,

i created a text label using the text tool. the label has multiple lines, aligned to the left. is it possible to change the alignment to right?

kind regards
fed0r
3   L A T E S T    R E P L I E S    (Newest First)
Fed0r Posted - 10/08/2012 : 10:52:54 AM
hi,

thanks a lot greg, it worked! :)

would have been easier to use to other work-around but i don't want a box around the text.

regards
fed0r

Hideo Fujii Posted - 10/08/2012 : 09:57:26 AM
hi,

another possible work-around may be, if you are okay to show a box around the text, to paste a table.
the alignment tool works for the text in a table cell.



--hideo fujii
originlab
greg Posted - 10/08/2012 : 09:34:49 AM
there is no gui and no labtalk for this so we have to dig deep into originc:

// justify text object in active layer of active graph
// 0=left, 1=center, 2=right
void textjustify(string strobj, uint ijustify)
{
graphlayer gl = project.activelayer();
if(gl.isvalid())
{
graphobject go = gl.graphobjects(strobj);
if(go.isvalid())
{
if(go.getobjecttype() == "text")
{
tree tr;
bool brelative = true;
tr = go.getformat(fpb_all, fob_all, true, brelative);
tr.root.alignment.horizontal.nval = ijustify;
go.applyformat(tr, true, brelative);
}
else
printf("%s is not a text object.\n", strobj);
}
else
printf("%s is not a valid object in current layer.\n",strobj);
}
else
printf("active layer is not a valid graph.\n");
}

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