Create multiple different PushButton in a RowColumn - Motif

This is a discussion on Create multiple different PushButton in a RowColumn - Motif ; Hi, I want create many pushbutton with different height but i can't make it. This is my code : CGScrollWindow fScrollWindow(*fCustomDialog, "ScrollWindow", cArgs, n); CGForm * MainForm = new CGForm(fScrollWindow, "form", cArgs, n); CGRowColumn * MainrowColumn1 = new CGRowColumn(*MainForm,"rowColumn",cArgs,n); MainrowColumn1->SetNumColumns(1); ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Create multiple different PushButton in a RowColumn

  1. Create multiple different PushButton in a RowColumn

    Hi,

    I want create many pushbutton with different height but i can't make
    it.

    This is my code :

    CGScrollWindow fScrollWindow(*fCustomDialog, "ScrollWindow", cArgs,
    n);
    CGForm * MainForm = new CGForm(fScrollWindow, "form", cArgs, n);

    CGRowColumn * MainrowColumn1 = new
    CGRowColumn(*MainForm,"rowColumn",cArgs,n);
    MainrowColumn1->SetNumColumns(1);
    MainrowColumn1->SetPackColumn(CGRowColumn::kPackTight);

    CGPushButton pbButtonMainIndex(*MainForm, "0", cArgs, n);
    pbButtonMainIndex.SetHeight(60);
    pbButtonMainIndex.Manage();

    CGPushButton pbButtonSecondary(*MainrowColumn1, "1", cArgs, n);
    pbButtonSecondary.SetHeight(60);
    pbButtonSecondary.Manage();

    MainrowColumn1->Manage();
    MainForm->Manage();
    fCustomDialog->Manage();

    I set 60 for height on my two pushbutton but they have always the
    height by default (21). I can change without use rowcolumn but i must
    used rowcolumn in my application.

    My question : how change this height in a rowcolumn ?

    Thanks.

    Steve.

  2. Re: Create multiple different PushButton in a RowColumn



    Steve Roulet wrote:
    >
    > Hi,
    >
    > I want create many pushbutton with different height but i can't make
    > it.
    >
    > This is my code :
    >
    > CGScrollWindow fScrollWindow(*fCustomDialog, "ScrollWindow", cArgs,
    > n);
    > CGForm * MainForm = new CGForm(fScrollWindow, "form", cArgs, n);
    >
    > CGRowColumn * MainrowColumn1 = new
    > CGRowColumn(*MainForm,"rowColumn",cArgs,n);
    > MainrowColumn1->SetNumColumns(1);
    > MainrowColumn1->SetPackColumn(CGRowColumn::kPackTight);
    >
    > CGPushButton pbButtonMainIndex(*MainForm, "0", cArgs, n);
    > pbButtonMainIndex.SetHeight(60);
    > pbButtonMainIndex.Manage();
    >
    > CGPushButton pbButtonSecondary(*MainrowColumn1, "1", cArgs, n);
    > pbButtonSecondary.SetHeight(60);
    > pbButtonSecondary.Manage();
    >
    > MainrowColumn1->Manage();
    > MainForm->Manage();
    > fCustomDialog->Manage();
    >
    > I set 60 for height on my two pushbutton but they have always the
    > height by default (21). I can change without use rowcolumn but i must
    > used rowcolumn in my application.
    >
    > My question : how change this height in a rowcolumn ?
    >
    > Thanks.
    >
    > Steve.


    RowColumn queries its children for their preferred height and sizes the
    rows and columns accordingly. If you want the child widgets to be a
    height that differs from their preferred height, you cannot use a
    RowColumn.

    I do not understand why you say you "must" use a rowcolumn. the only
    time you should ever consider a rowcolumn to be *required* is if the
    buttons are in a menu.

    Use something else, like an XmForm, or an XrtTable.

    If you really insist on using a RowColumn, place each button inside its
    own other conatiner, and place that container in the rowColumn:
    rowColumn--+--drawingArea--button
    |
    +--drawingArea--button
    |
    +--drawingArea--button

    --
    Fred L. Kleinschmidt
    Boeing Associate Technical Fellow
    Technical Architect, Common User Interface Services
    M/S 2R-94 (206)544-5225

+ Reply to Thread