Hi,
is it possible to limit the available color selection for a tool, e.g. rectangle tool, to the following options:
*) no fill
*) one custom color -> set with: AxCoPDFXCview1.SetProperty("Commenting.Rect.Styles[0].SColor", RGB_val, 0)
The user should not be able to set any additional custom color or 'More colors...'. (Please see attachment.)
I know it is possible to lock the fill color tool using 'Commands[0].State = Offline' using the 'SetProperty' method. But the user should still be able to set the filling color for the selected tool, e.g. rectangle tool, if necessary.
Thank you,
Martin
Restrict color selection for comment and markup tools
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 153
- Joined: Thu Apr 07, 2011 10:01 am
Restrict color selection for comment and markup tools
You do not have the required permissions to view the files attached to this post.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Restrict color selection for comment and markup tools
Hi, MartinCS
- and in your app. you may implement two buttons "Select_NoColor" and "Select_TheCustomColor"...
HTH
In current implementation you may disable for end-user the color-selector control only by:is it possible to limit the available color selection for a tool, e.g. rectangle tool, to the following options:
*) no fill
*) one custom color -> set with: AxCoPDFXCview1.SetProperty("Commenting.Rect.Styles[0].SColor", RGB_val, 0)
Code: Select all
ctrl.SetProperty("Commands[#36273].State", "offline", 0); // to disable "Fill Color" color-selector,
// and if you need:
ctrl.SetProperty("Commands[#36274].State", "offline", 0); // to disable "Stroke Color" color-selector,
HTH
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 153
- Joined: Thu Apr 07, 2011 10:01 am
Re: Restrict color selection for comment and markup tools
Hi Vasyl,
thank you for your reply. Is it possible to set these two custom buttons using the toolbar of the viewer. My idea would be to add a custom toolbar with the both buttons you suggested.
Thank you!
Regards,
Martin
thank you for your reply. Is it possible to set these two custom buttons using the toolbar of the viewer. My idea would be to add a custom toolbar with the both buttons you suggested.
Thank you!
Regards,
Martin
-
- Site Admin
- Posts: 19885
- Joined: Mon Jan 12, 2009 8:07 am
Re: Restrict color selection for comment and markup tools
Hello Martin,
You can not add custom buttons in a toolbar inside our Viewer, so they will need to be in the main body of your application.
Best,
Stefan
You can not add custom buttons in a toolbar inside our Viewer, so they will need to be in the main body of your application.
Best,
Stefan