January 15, 2009 at 12:18 pm
Would like to fully justify a section of text.
At present I just have a simple text box like so . . .
I've seen a "solution" thus . . . .
string testString = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor";
FormattedText formattedText = new FormattedText(
testString,
CultureInfo.GetCultureInfo("en-us"),
FlowDirection.RightToLeft,
new Typeface("Verdana"),
32,
Brushes.Black);
formattedText.TextAlignment = TextAlignment.Justify;
formattedText.MaxTextWidth = 300;
formattedText.MaxTextHeight = 240;
formattedText.SetFontSize(36 * (96.0 / 72.0), 0, 5);
formattedText.SetFontWeight(FontWeights.Bold, 6, 11);
formattedText.SetForegroundBrush(
new LinearGradientBrush(
Colors.Orange,
Colors.Teal,
90.0),
6, 11);
formattedText.SetFontStyle(FontStyles.Italic, 28, 28);
dc.DrawText(formattedText, new Point(10, 0));
------------------------
I realise there's some superfluous stuff there, butI don't have a clue how to integrate this (or even if it's permissible) with my current code.
Can anyone assist me with this please?
January 15, 2009 at 12:32 pm
george (1/15/2009)
Would like to fully justify a section of text.At present I just have a simple text box like so . . .
Forgive me for my confusion, but what does this have to do with SQL Express?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 15, 2009 at 12:36 pm
everything you posted (that showed up...some stuff got snipped out)
was related to a RTF field being justified. Are you trying to do the equivilent to raw text, or asking how to do RTF commands to a text/varchar(max) in the database?
can you explain the requirement, and do you need to do it in TSQL or in the .NET programming languange you originally pasted? If you need to manipulate RTF, you are going to have trouble i think.
I've only been able to use spOACreate, or call a separate program to work with RTF; you can't CLR RTF because it won't let you use Windows.Forms objects.
Lowell
January 15, 2009 at 12:54 pm
Your confusion is hereby forgiven 🙂
I've simply posted in the wrong forum.
Perhaps you will now forgive me, being a newbie?
January 15, 2009 at 12:59 pm
Lowell (1/15/2009)
everything you posted (that showed up...some stuff got snipped out)was related to a RTF field being justified. Are you trying to do the equivilent to raw text, or asking how to do RTF commands to a text/varchar(max) in the database?
can you explain the requirement, and do you need to do it in TSQL or in the .NET programming languange you originally pasted? If you need to manipulate RTF, you are going to have trouble i think.
I've only been able to use spOACreate, or call a separate program to work with RTF; you can't CLR RTF because it won't let you use Windows.Forms objects.
I need to do it in the .net part, which currently is thus . . .
Textbox Name="head"
rd:DefaultName>head /rd:DefaultName>
Top>0.25in /Top>
Width>7.125in /Width>
Style>
PaddingLeft>2pt /PaddingLeft>
PaddingRight>2pt PaddingRight>
PaddingTop>2pt /PaddingTop>
PaddingBottom>2pt /PaddingBottom>
/Style>
ZIndex>1 /ZIndex>
alue>=First(Fields!head.Value) /Value>
/Textbox>
January 16, 2009 at 12:27 am
george (1/15/2009)
I've simply posted in the wrong forum.
No prob.
All of these forums here are dedicated to SQL server. We have no .net forums. I'd recommend you a good .net forum, but I don't know one. Perhaps the Microsoft forums would help? http://social.msdn.microsoft.com/Forums/en-US/category/netdevelopment/
You're not very likely to get a good answer to your question here.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 16, 2009 at 2:24 am
You're not very likely to get a good answer to your question here.
You mean like from Lowell, for instance? 😀
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply