Changing commenting does not update menubar...

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

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

lidds
User
Posts: 514
Joined: Sat May 16, 2009 1:55 pm

Changing commenting does not update menubar...

Post by lidds »

Hi,

I am using the follwing code to change the properties of a line, however if I have the line properties menubar displayed when I process the following code, it does not change the properties on the menubar, how can I do this?

Code: Select all

Me.pdfView.SetProperty("Commenting.Line.Styles[0].SColor", RGB(255, 255, 0), 0)
        Me.pdfView.SetProperty("Commenting.Line.Styles[0].FColor", RGB(255, 255, 0), 0)
        Me.pdfView.SetProperty("Commenting.Line.Styles[0].Border.Width", 5, 0)
Thanks

Simon
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Changing commenting does not update menubar...

Post by Vasyl - PDF-XChange »

Hi Simon.

This bug has been reproduced and will be fixed in the next build.

Temporary, as workaround, you may use next method:

Code: Select all

// after changing of line comment style:
Me.pdfView.GetProperty("Tools.Active", val, PXCVA_GetNamed);
if (val == "line")
{
	Me.pdfView.SetProperty("Tools.Active", "hand", 0);
	Me.pdfView.SetProperty("Tools.Active", val, 0);
};
Thanks.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
lidds
User
Posts: 514
Joined: Sat May 16, 2009 1:55 pm

Re: Changing commenting does not update menubar...

Post by lidds »

Thanks Vasyl,

Is there any chance that you could provide me the code in VB.Net, I have tried converting it but it gives me errors.

Thanks

Simon
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2448
Joined: Thu Jun 30, 2005 4:11 pm

Re: Changing commenting does not update menubar...

Post by Vasyl - PDF-XChange »

I'm not a VB.NET developer, but I tried it:

Code: Select all

Dim val As Object = Nothing
Dim str As String = ""
...
Me.pdfView.GetProperty("Tools.Active", val, PDFXCviewAxLib.PXCVA_Flags.PXCVA_GetNamed)
str = val.ToString()
if (String.Compare(str, "line", True) = 0) Then
   val = "hand"
   Me.pdfView.SetProperty("Tools.Active", val, 0)
   val = str
   Me.pdfView.SetProperty("Tools.Active", val, 0)
End If
See our VB.NET examples also.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
lidds
User
Posts: 514
Joined: Sat May 16, 2009 1:55 pm

Re: Changing commenting does not update menubar...

Post by lidds »

Vasyl,

Thank you, that worked perfectly

Simon
User avatar
John - Tracker Supp
Site Admin
Posts: 5223
Joined: Tue Jun 29, 2004 10:34 am

Re: Changing commenting does not update menubar...

Post by John - Tracker Supp »

;-)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com