Steve,

A complete example, rather than a snippet, saves me a lot of time.

I've tried to add your stuff to an example we already had, which
wasn't too hard in this case.

It's now test/Xm-2.0/combobox/test14.c .

Your assignment of visibleItemCount is weird. I would expect
to set it after adding the items. But on the other hand it shouldn't
be a problem. The fact that only one item is shown appears to be a bug.

I don't see the other problems :
1. The list is sufficiently wide.
2. I can dismiss by clicking outside the list, e.g. on the
   combobox's arrow.

Does test14 show these problems on your system ?

        Danny

Steve Thompson wrote:
> 
> Hello boys and girls,
> 
> I could use some help on a problem with a ComboBox. This is running on a
> Redhat Linux 7.0 system on an X86 box using kernel 2.2.16, or on an RH 7.2
> system using kernel 2.4.7 (both behave the same).
> 
> I have an application that creates a drop-down Combo box, using the
> following code extract:
> 
>         Widget w, parent;
>         XmString cbstr;
>         Cardinal arg;
>         Arg arg_list[64];
> 
>         arg = 0;
>         XtSetArg (arg_list[arg], XmNvisibleItemCount, n); arg++;
> 
>         w = XmCreateDropDownComboBox (parent, "comboBox", arg_list, arg);
>         XtManageChild (w);
> 
>         cbstr = XmStringCreateLocalized ("item1");
>         XmComboBoxAddItem (w, cbstr, 0, TRUE);
>         XmStringFree (cbstr);
> 
>         cbstr = XmStringCreateLocalized ("item2");
>         XmComboBoxAddItem (w, cbstr, 0, TRUE);
>         XmStringFree (cbstr);
> 
>         ...more items...
> 
> Under both Lesstif 0.93.18 and 0.93.34, this produces a drop-down list
> that is only one item high and insufficiently wide for the list values, no
> matter how many list values there are, and the list box cannot be
> dismissed by clicking outside it. The value assigned to
> XmNvisibleItemCount is correct.
> 
> If I remove the XmComboBoxAddItem calls and instead use XmNitemValues and
> XmNitems, I get an empty drop-down list a few pixels wide and a few pixels
> deep.
> 
> Under OpenMotif 2.2, the code works as I expected.
> 
> My fault?
> 
> -Steve
> 
> _______________________________________________
> Lesstif mailing list
> [EMAIL PROTECTED]
> https://terror.hungry.com/mailman/listinfo/lesstif

-- 
Danny Backx ([EMAIL PROTECTED] [EMAIL PROTECTED])
Home page :     http://users.skynet.be/danny.backx
Projects:       LessTif (http://www.lesstif.org)
                Oleo    (http://www.gnu.org/software/oleo/oleo.html)
_______________________________________________
Lesstif mailing list
[EMAIL PROTECTED]
https://terror.hungry.com/mailman/listinfo/lesstif

Reply via email to