Hi, all,
i have issue with creating grouped radio button, here i included the code which i use. can any one help me.
resource BscPnlPanelWidget(kSDKDefPanelResourceID + index_enUS)
{
__FILE__, __LINE__,
kBscPnlPanelWidgetID,
kPMRsrcID_None,
kBindNone,
0, 0, 800, 300,
kTrue, kTrue,
kBscPnlPanelTitleKey,
{
GroupPanelWidget
(
kBscGroupWidgetID,
kPMRsrcID_None,
kBindNone,
Frame(0, 60, 150, 115),
kTrue,
kTrue,
kBscTabWidgetID,
{
ClusterPanelWidget
(
kBscClusterWidgetID,
kPMRsrcID_None,
kBindNone,
Frame( 0, 0, 60, 70),
kTrue,
kTrue,
"Select Type",
{
RadioButtonWidget
(
kBscRadioButton1WidgetID,
kSysRadioButtonPMRsrcId,
kBindNone,
Frame(2, 10, 50, 30),
kTrue, kTrue,
"Type 1",
),
RadioButtonWidget
(
kBscRadioButton2WidgetID,
kSysRadioButtonPMRsrcId,
kBindNone,
Frame( 2, 32, 50, 52),
kTrue, kTrue,
"Type 2",
),
}
),
}
),
}
};
Btw, please include some indicator of the actual problem with your message.
"I have issue" and "can anyone help" just leaves too much guesswork.
It could mean anything like
- you just experience compile time errors (which?)
- you don't see the widgets in the running plugin
- you crash InDesign on your Mac (provide stack trace?)
- you crash InDesign on your Windows machine (get a Mac!)
- you see assertion failures in the debug build (again which?)
- anything else, you got the idea.
Dirk
Dirk Sorry I am not getting these points . Can you help me through elobrate it
Where is the kBscTabWidgetID referenced by the group as border widget?
Include a FittedStaticTextWidget as first item in the widget list, same level as that ClusterPanelWidget.
For my understanding ,same level as that ClusterPanelWidge. i included the following FittedStaticTextWidget defintion just before the ClusterPanelWidget definition.but it says compile error
FittedStaticTextWidget
(
10.0,
1,
kDontEllipsize,
kTrue,
kFalse,
"Sample", // Initial text.
0,
0,
),
-must me numeric,
-Array label end widget :index out of bounds.
Your quoted .fr fragment only has one occurence of kBscTabWidgetID.
For a deeper understanding of the resource language, try to follow the declarations ( e.g. starting in Widgets.fh ) and comment every line / data item.
An example of the relevant entry, formatted my way:
GroupPanelWidget (
// GroupPanelWidget : CControlView
kBscGroupWidgetID, // WidgetId
kPMRsrcID_None, // RsrcId
kBindNone, // Frame Binding
Frame( // Frame
0, 60, // left,top
150, 115 ) // right,bottom
kTrue, // Visible
kTrue, // Enabled
// GroupPanelWidget : GroupPanelAttributes
kBscTabWidgetID, // widget id of border widget
// GroupPanelWidget : CPanelControlData
{
...
}
)
Then use the interface ID of e.g. GroupPanelAttributes to locate the matching .h interface header:
class IGroupPanelAttributes : public IPMUnknown
{
public:
// ----- Query -----
enum { kDefaultIID = IID_IGROUPPANELATTRIBUTES };
/** Get the widget id of the widget to use in the top left border of the GroupPanel.
The widget can have sub-widgets. If GetBorderWidgetID returns 0,
a simple framed border will be drawn.
@return the widget id
*/
virtual WidgetID GetBorderWidgetID() const = 0;
...
This will give you more details on the meaning of the values in the resource.
Dirk
North America
Europe, Middle East and Africa
Asia Pacific