This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Widgets


cygwin:

My code works fine on Linux / Unix machines.  I am trying to port it
to windows using Cygwin and it works fairly well.  I have only one
problem:

Some of the widgets will not resize on the application's control panel
when new buttons are added.

I have taken over this project and do not know the code very well, but
this is what i do know:

My application creates a control panel with two child widgets next to
each other, I will reference as Panels.

The first two Panels are set to fit four buttons, also widgets, and
are placed on the two panels by default as child widgets.

I then read in from a data file specifications for new buttons.  These
new buttons, no matter how many, are never visible.  That is, the
Panels do not expand.  In Unix / Linux, I assume the Motif lirbrary is
able to simply exapnd these Panels for new buttons.

The Panels simply display four buttons on each Panel, two on first
row, two on second row.

What I have found is, when I call the Resource arguments:

Widget createSecondPanel(Widget parent, Widget left_sibling) {

                 ...
                 XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++;
                 XtSetArg(args[n], XmNnumColumns, 2); n++;

                 ...

}

and change it to :
                 XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++;
                 XtSetArg(args[n], XmNnumColumns, 3); n++;

Suddenly both createSecondPanel and the left_sibling Panel both resize
and all buttons are visible.

The problem is, by changing this: XtSetArg(args[n], XmNnumColumns, 3);
n++; I get a third row and a third column for the secondPanel.

The first gets a third row, but all buttons expand appro[priately on
just the first two rows as desired.

Is there a way for me to specify a Panel that is 2 Rows and "the
number of buttons / 2" columns?

Thanks,
Sean Ross

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]