Underline text in TypeWriter

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan

Post Reply
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Underline text in TypeWriter

Post by TatianaS »

Hello,
I am getting exception when running this setting in Delphi:
SetProperty('Commenting.TypeWriter.Styles['+IntToStr(I)+'].TextFormat.Char.Underline', '1', 0);
is Underline is not supported in TypeWriter?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17824
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Underline text in TypeWriter

Post by Tracker Supp-Stefan »

Hello TatianaS,

I believe that the command should be

Code: Select all

SetProperty('Commenting.TypeWriter.Style['+IntToStr(I)+'].TextFormat.Char.Underline', '1', 0);
You had an extra s in "...Typewriter.Styles..."

Typewriter.Styles is an array of all the available styles - and you want to access a specific one and modify it's properties!

Cheers,
Stefan
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Underline text in TypeWriter

Post by TatianaS »

Hi, I have tried to run your code:
SetProperty('Commenting.TypeWriter.Style['+IntToStr(I)+'].TextFormat.Char.Underline', '1', 0);
but still got an exception. According to the documentation TypeWriter.Style doesn't exist.

Thanks.
Nico - Tracker Supp
User
Posts: 205
Joined: Fri May 18, 2012 8:41 pm

Re: Underline text in TypeWriter

Post by Nico - Tracker Supp »

Hi TatianaS,

Thank you for your post.
The correct syntax for the underline property of the first style of the array is:
Commenting.Typewriter.Styles[0].TextFormat.Char.Underline
And for enabling/disabling the style you pass 'Yes' or 'No' as the second parameter.
Therefore:
SetProperty('Commenting.Typewriter.Styles['+IntToStr(I)+'].TextFormat.Char.Underline', 'Yes', 0);

Thanks.
Sincerely,
TatianaS
User
Posts: 103
Joined: Mon Mar 18, 2013 4:26 pm

Re: Underline text in TypeWriter

Post by TatianaS »

Thank you, that worked!
Nico - Tracker Supp
User
Posts: 205
Joined: Fri May 18, 2012 8:41 pm

Re: Underline text in TypeWriter

Post by Nico - Tracker Supp »

:)
Post Reply