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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 text label alignment
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

Fed0r

Germany
8 Posts

Posted - 10/08/2012 :  05:31:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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");
}
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 10/08/2012 :  09:57:26 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

Fed0r

Germany
8 Posts

Posted - 10/08/2012 :  10:52:54 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000