Author |
Topic |
|
Fed0r
Germany
8 Posts |
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 |
|
greg
USA
1378 Posts |
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"); }
|
|
|
Hideo Fujii
USA
1582 Posts |
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
|
|
|
Fed0r
Germany
8 Posts |
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
|
|
|
|
Topic |
|
|
|