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"); }
|
|
|