| View previous topic :: View next topic |
| Author |
Message |
kolbezenb
Joined: 20 Jul 2010 Posts: 2
|
Posted: Fri Jul 23, 2010 5:32 am Post subject: RTX.NET 7.0 Layout and GX |
|
|
How can I change the position and text attributes of text object with knowing tag name?
After I read the layout (layout.filename = "myfilename.SCRIBE"), I want to read the position and text attributes of text object with tag name (rtx.cg.tag("tagname")). After that I want to change the position, font style and color of that text object? How can I do it? |
|
| Back to top |
|
 |
Paul
Joined: 26 Jul 2010 Posts: 2
|
Posted: Mon Jul 26, 2010 4:07 pm Post subject: |
|
|
From your layout you can use CG.Editor to do something like...
using( Rtx.CG.Editor editor = new CG.Editor(layout))
{
editor.Root.Actions.TagManipulation.SelectionByTag.Name = "SomeTagName";
editor.Root.Actions.TagManipulation.SelectionByTag.SelectAllWithName.Fire();
editor.Root.TextAndGraphicsAttributes.Placement.Position.X = 100;
editor.Root.TextAndGraphicsAttributes.StyleData.Face.Shader.Colouring.SolidColour.All.Red = 0.5;
}
There might be some earlier posts on using CG.Editor.
Does this help, Paul |
|
| Back to top |
|
 |
kolbezenb
Joined: 20 Jul 2010 Posts: 2
|
Posted: Tue Jul 27, 2010 8:28 am Post subject: |
|
|
Hi!
Thanks a lot! |
|
| Back to top |
|
 |
|