0
Tracking CheckBox Event in a Panel
New Here
,
/t5/indesign-discussions/tracking-checkbox-event-in-a-panel/td-p/1314282
Dec 03, 2008
Dec 03, 2008
Copy link to clipboard
Copied
Hi,
I ve created a plugin with 4 checkboxes and an iconic button.
I ve called a JavaScript on clicking that button. But i need to call different scripts depending on whih checkbox is clicked.
I was able to track the checkbox event in a dialog. In a dialog, the code used for this is:
bool16 visibility = (GetTriStateControlData(kBscDlgRadioButtonWidgetID) == ITriStateControlData::kSelected);
if(visibility)
CAlert::InformationAlert("RadioButton checked");
else
CAlert::InformationAlert("RadioButton not checked");
This code will be put in:
void BscDlgDialogController::ApplyDialogFields( IActiveContext* myContext, const WidgetID& widgetId)
which in turn uses CDialogController.h....
Can i use the same for Panels.. Is it correct to use CDialogController for panels????
I m quite confused...
Or els pls provide the code to track the checkbox event in PANEL...
PLs help.
Thanks.
Someone pls help
I ve created a plugin with 4 checkboxes and an iconic button.
I ve called a JavaScript on clicking that button. But i need to call different scripts depending on whih checkbox is clicked.
I was able to track the checkbox event in a dialog. In a dialog, the code used for this is:
bool16 visibility = (GetTriStateControlData(kBscDlgRadioButtonWidgetID) == ITriStateControlData::kSelected);
if(visibility)
CAlert::InformationAlert("RadioButton checked");
else
CAlert::InformationAlert("RadioButton not checked");
This code will be put in:
void BscDlgDialogController::ApplyDialogFields( IActiveContext* myContext, const WidgetID& widgetId)
which in turn uses CDialogController.h....
Can i use the same for Panels.. Is it correct to use CDialogController for panels????
I m quite confused...
Or els pls provide the code to track the checkbox event in PANEL...
PLs help.
Thanks.
Someone pls help
TOPICS
SDK
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Engaged
,
/t5/indesign-discussions/tracking-checkbox-event-in-a-panel/m-p/1314283#M272162
Dec 03, 2008
Dec 03, 2008
Copy link to clipboard
Copied
You should use an (or several...) observers. You probably want an observer on the panel which autoattaches/detaches to the 4 checkboxes and operates on them in the update method.
Ian
Ian
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
New Here
,
/t5/indesign-discussions/tracking-checkbox-event-in-a-panel/m-p/1314284#M272163
Dec 03, 2008
Dec 03, 2008
Copy link to clipboard
Copied
Thanks for ur quick reply Ian...<br /><br />I have an observer class for catching the button event...<br />I think i can give the checkbox event code there itself... Tell me if i m wrong...<br />I don't kno to track the checkbox event in a panel. I mean the code to check if the widget is checked or not.<br /><br />I tried giving this code in the update method of the observer class:<br /><br />#include "CDialogController.h"<br />#include "ITriStateControlData.h"<br />#include "IDialogController.h"<br /><br />update()<br />{<br />InterfacePtr<IDialogController> dialogController(this, UseDefaultIID());<br /> ITriStateControlData::TriState x = dialogController->GetTriStateControlData(kPicIcoVisibleCheckBoxWidgetID); <br /> <br /><br />bool16 visibility = (x == ITriStateControlData::kSelected);<br /><br />//if(visibility)<br />//CAlert::InformationAlert("RadioButton checked");<br />//else<br />//CAlert::InformationAlert("RadioButton not checked");<br />}<br /><br />This gets build, but my appln quits wen i click the button.<br />I kno that this code can be used for dialogs..<br />Can i use the same for panels.<br />If yes, wat could b the reason that m not gettin o/p<br />If not, Pls provide me the code for knowin wether checkbox is clicked or not...<br /><br />Pls Help... I m new to InDesign...
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Engaged
,
LATEST
/t5/indesign-discussions/tracking-checkbox-event-in-a-panel/m-p/1314285#M272164
Dec 04, 2008
Dec 04, 2008
Copy link to clipboard
Copied
You are missing basic understanding of the indesign api. You probably crash because there is no dialog controller interface on a panel. There is no short-cut to learning the api, consult the documentation, sample code, etc.
Sorry, I do not work for Adobe and do not have the time to help further - my job pays me to work for them..
Ian
Sorry, I do not work for Adobe and do not have the time to help further - my job pays me to work for them..
Ian
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

