How to create a button Widget
hi,
can 1 tell me how create button widget,
i've created 1 & can seen in plugin, doesn't work,
in .fr file created widget as,
buttonwidget
(
kextcodgobuttonwidgetid,
ksysbuttonpmrsrcid,
kbindnone, // binding ,kbindright | kbindbottom,
frame(50,70,140,90) // frame (l,t,r,b)
ktrue, ktrue, // visible, enabled
"run", // pngiconattributes, new indesign 3.0
| ), |
in dialogobserver.cpp
autoattach & autodetach,,
attachtowidget(kextcodgobuttonwidgetid, iid_itristatecontroldata, panelcontroldata)
| detachfromwidget(kextcodgobuttonwidgetid, iid_itristatecontroldata, panelcontroldata); |
in ::update
| widgetid theselectedwidget = controlview->getwidgetid(); |
| if (thechange == ktruestatemessage) | |||||||
| //if (theselectedwidget == kextcodgobuttonwidgetid | |||||||
| { | |||||||
| switch(theselectedwidget.get()) | |||||||
| { | |||||||
| case kextcodgobuttonwidgetid: | |||||||
| this->viewoutput(); | |||||||
| break; |
please tell me may wrong...
please take @ basicdialog , basicselectabledialog samples included in sdk.
these samples both have buttons of various kinds show how attach observers.
More discussions in InDesign SDK
adobe
Comments
Post a Comment