Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Applying Fonts to Text Objects Post Reply Post New Topic
Author Message
shiresmith
Newbie
Newbie
Avatar

Joined: 20 Oct 2009
Online Status: Offline
Posts: 2
Quote shiresmith Replybullet Topic: Applying Fonts to Text Objects
    Posted: 20 Oct 2009 at 3:40am
I'm having problems applying fonts to text objects programmatically - specifically to text objects that are wrapped across more than one line.
 
The following code works fine
 
MyTextObject.ApplyFont(MyNewFont)
 
Where the text object contains a single line of text. Where it contains more than one line, the new font is applied to the first line only with the remaining lines exhibiting the font specified at design time.
 
I'm guessing I need to "select" all the text in the text object before applying the font, and indeed the Text property of the TextObject has a Select method. Sadly I can find no documentation on how to use the Select method, and the "intellisense" that Visual Studio throws up to help you means nothing to me whatsoever.
 
Here is what is displayed as "help" for the TextObject.Text.Select method
 
<extension> (Select (Of TResult) (selector as System.Func(Of Char, Integer, TResult))
 
Can anyone advise what I need to pass as parameters to the Select method to select the entire contents of the text Object, or another way to apply a font to the entire Text Object?


Edited by shiresmith - 20 Oct 2009 at 3:42am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.