简体   繁体   English

PowerPoint中的Colordialog

[英]Colordialog in PowerPoint

I am making some add-in to PowerPoint. 我正在向PowerPoint添加一些插件。

I would like to let user choose color using colordialog (or some other this kind control). 我想让用户使用colordialog(或其他此类控件)选择颜色。 But it would be the best if it would look exactly like built-in color dialog/color picker in PowerPoint, and with the same colors in sections Theme Colors, Custom Colors and Standard Colors. 但是,如果它看起来完全像PowerPoint中的内置颜色对话框/颜色选择器,并且在“主题颜色”,“自定义颜色”和“标准颜色”部分中具有相同的颜色,那将是最好的。 Is it achievable? 可以实现吗? If yes, how can I achieve it? 如果是,我该如何实现?

It really depends on what you need to use the color for. 这实际上取决于您需要使用哪种颜色。 Office has many pre-defined controls that can be easily incorporated into an addin, some of which use the standard Office color picker (which includes the theme colors, custom colors, etc. that you are looking for). Office有许多预定义的控件,可以轻松地将它们合并到外接程序中,其中一些控件使用标准的Office颜色选择器(包括您要查找的主题颜色,自定义颜色等)。 You can download a list of all Office controls from the Microsoft website (you will only need to use the PowerPointControls.xlsx file). 您可以从Microsoft网站下载所有Office控件的列表(只需使用PowerPointControls.xlsx文件)。 Any of the controls listed in the file can be added to your addin by specifying the idMso in the ribbon XML (assuming you are creating a ribbon). 通过在功能区XML中指定idMso,可以将文件中列出的任何控件添加到您的插件中(假设您正在创建功能区)。 You will need to look through all of the controls to se if there is one that matches the functionality you are looking for. 您将需要查看所有控件,以找到是否有与所需功能匹配的控件。

Note that most of the controls have some sort of additional functionality attached to them in addition to selecting a color. 请注意,除了选择颜色之外,大多数控件还具有一些附加功能。 I have not yet found one that selects and returns a color. 我还没有找到一种可以选择并返回颜色的方法。 Hopefully what ever functionality you are in need of is included in one of the controls. 希望其中一种控件包含您需要的功能。 You may be able to get a better answer if you provide more information on your specific application. 如果您提供有关特定应用程序的更多信息,则可能会得到更好的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM