Skip navigation
Balancin_Jump
Currently Being Moderated

More than one widget

Jun 22, 2012 2:13 AM

Hi, I'm a newbie in Indesign SDK (CPP), and I have one problem in my code: I can't add two widgets on panel (StaticTextWidget), this following code is my problem:

 

resource BscPnlPanelWidget(kSDKDefPanelResourceID + index_enUS)

{

    __FILE__, __LINE__,                    // Localization macro       

    kBscPnlPanelWidgetID,                // WidgetID

    kPMRsrcID_None,                        // RsrcID

    kBindNone,                            // Binding (0=none)

    0, 0, 207, 295,                        // Frame: left, top, right, bottom.

    kTrue, kTrue,                        // Visible, Enabled

    kFalse,                                // Erase background

    kInterfacePaletteFill,                // Erase to color

    kFalse,                                // Draw dropshadow

    kBscPnlPanelTitleKey,                // Panel name   

    {

 

        StaticTextWidget

        (

            0,                                // WidgetId (default=0)

            kSysStaticTextPMRsrcId,        // RsrcId

            kBindNone,                        // Frame binding

            5, 10, 202, 27,                    // Frame: left, top, right, bottom.

            kTrue, kTrue,                    // Visible, Enabled

            kAlignLeft, kEllipsizeEnd, kTrue,        // Alignment, ellipsize style, convert ampersands

            "Add tool",            // Initial text.

            0                                // No associated widget

        ),

       

        StaticTextWidget

        (

            10,                                // WidgetId (default=0)

            kSysStaticTextPMRsrcId,        // RsrcId

            kBindNone,                        // Frame binding

            5, 80, 202, 27,                    // Frame: left, top, right, bottom.

            kTrue, kTrue,                    // Visible, Enabled

            kAlignLeft, kEllipsizeEnd, kTrue,        // Alignment, ellipsize style, convert ampersands

            "Properties",            // Initial text.

            0                                // No associated widget

        ),

       

    }

 

    kBscPnlInternalPopupMenuNameKey        // Popup menu name (internal)

};

 

How I can show all these widgets ?

 

Thanks

 
Replies
  • Currently Being Moderated
    Jun 22, 2012 3:17 AM   in reply to Balancin_Jump

    Hi,

    • in the second widget you set the top value to 80 but the bottom value to 27 instead of 97.
    • keep the WidgetId to the default 0, except if you need access to it from the cpp code, then you must define and use a WidgetId defined in your *ID.h file.

     

    Markus

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 10:39 PM   in reply to Balancin_Jump

    In the second widget place the values of left, top, right bottom as 5, 80, 202, 97

     

    If you still have problems you can use the "Panel Edit Mode" submenu under the "DevTools" menu of the debug version of your Indesign to allign your controls. Your problem seems to be that your controls are placed over each other. Try changing the placement and dimension of the widgets, your problem will solve out.

     

     

    Manan Joshi

     

      - Efficient InDesign Solutions -

    MetaDesign Solutions

    http://metadesignsolutions.com/services/indesign-development.php

     

     


     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points