Skip to main content
Known Participant
February 10, 2009
Question

About IUIFontSpec in CS2

  • February 10, 2009
  • 5 replies
  • 609 views
I add IUIFontSpec to kStaticTextWidgetBoss and kDropDownListWidgetBoss:
AddIn
{
kStaticTextWidgetBoss,
kInvalidClass,
{

IID_IUIFONTSPEC,kUIFontSpecImpl,
}
},
AddIn
{
kDropDownListWidgetBoss,
kInvalidClass,
{

IID_IUIFONTSPEC,kUIFontSpecImpl,
}
},

In CS4: it's work fine .it can change StaticTextWidget font
and DropDownListWidget font .
but In CS2, there is a problem. it can change only StaticTextWidget font, can't change DropDownListWidget font.

why? anybody could help?
This topic has been closed for replies.

5 replies

_lyj2871_Author
Known Participant
February 12, 2009
Thanks,Dirk.Becker !
Participating Frequently
February 11, 2009
I would use this approach:

Catch the opening of the dialog.
- In a startup provider, attach an observer to the kAppBoss / IID_IWINDOWLIST
- wait for kWindowAddedMessage, given (as void*) a window
Check whether you got the right dialog window
- first sub-widget is kFootnoteSettingsDialogWidgetID.
Find the dropdown widget, using IPanelControlData.
Hide the widget from its parent and insert your own.
Connect observers so that your widget feeds the hidden widget, maybe vice versa.
Remember that dialogs might be cached, so do that patch only once.

Your problem remains, if the stock implementation of the controlview ignores the specified font, you have to write your own controlview. Happy Programming!

Dirk
_lyj2871_Author
Known Participant
February 11, 2009
Anybody can help me??????

I want to change the font of a DropDownListWidget in a InDesign dialog in CS2. plugin can do this?
_lyj2871_Author
Known Participant
February 11, 2009
Thanks,Dirk.Becker, but I want to change the font of a wedget in a dialog ,and this dialog is not my plugin dialog,it is InDesign dialog.
e.g how to change the font of
"kFSNumberingStyleDropDownWidgetID" in the
"kFootnoteSettingsDialogWidgetID"?
Participating Frequently
February 10, 2009
Do not AddIn InDesign IID or InDesign Impl to InDesign boss.
Either use your private boss (e.g. using boss inheritance), or use a private IID *and* a private Impl.

This way you keep your changes to your plugin. Otherwise you'd possibly collide with other plugins, future releases, or even screw up the behaviour of the whole application wherever that boss is also used.

In case you want to reuse some implementation rather than write your own, read about the ImplementationAlias mechanism. It exists for a reason.

Regarding your finding, apparently the widget implementation ignores what it did not expect. Write your own widget.

Dirk