Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

How to create a button Widget

$
0
0

Hi,

 

Can any one tell me how to create a button widget,

 

I've created one & it can be seen in my plugin, but it doesn't work,

 

in .fr file i created the 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 for InDesign 3.0              

                   



),

 

in DialogObserver.cpp

for 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 what may be the wrong...


Viewing all articles
Browse latest Browse all 78596


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>