delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/02/28/10:32:49

X-Spam-Check-By: sourceware.org
Message-ID: <d3e5fc5b0602280732i46a3acf8wf20f82c6246acaec@mail.gmail.com>
Date: Tue, 28 Feb 2006 09:32:37 -0600
From: "Sean Ross" <sean DOT p DOT ross AT gmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Widgets
In-Reply-To: <d3e5fc5b0602271553q2ca21695j7cad992fd7e2546@mail.gmail.com>
MIME-Version: 1.0
References: <d3e5fc5b0602271553q2ca21695j7cad992fd7e2546 AT mail DOT gmail DOT com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k1SFWjxi026741

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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019