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, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software

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

Underline text in TypeWriter

Post by TatianaS » Wed Mar 27, 2013 12:49 am

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: 14037
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Underline text in TypeWriter

Post by Tracker Supp-Stefan » Wed Mar 27, 2013 12:27 pm

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 » Wed Mar 27, 2013 5:57 pm

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: 220
Joined: Fri May 18, 2012 8:41 pm

Re: Underline text in TypeWriter

Post by Nico - Tracker Supp » Wed Mar 27, 2013 7:51 pm

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 » Wed Mar 27, 2013 8:30 pm

Thank you, that worked!

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

Re: Underline text in TypeWriter

Post by Nico - Tracker Supp » Thu Mar 28, 2013 4:04 pm

:)

Post Reply