how to change layout of a XmFileSelectionBox?

Glynn Clements glynn at gclements.plus.com
Tue Jan 10 19:34:06 PST 2006


Peter J. Bismuti wrote:

> I have an application that uses a XmFileSelectionBox. It has the nasty habit 
> of making the directory selection list very wide while making the file 
> selection list very narrow. A hack was put in that places a file called 
> "zzzzzzzzzzzzzzzzz.dat" in the current directory forcing the file list widget 
> to become wide enough to accomodate it.
> I was told to fix this problem properly, but I'm not sure how to do this.

I think that you need to subclass XmFileSelectionBox and override its
geometry management to do this.

ISTR that Netscape Navigator 3.x did this; you might try to locate the
code (you'll need an early version of the open-source release; they
switched to GTK quite early on).

> Another thing I'm noticing that I don't understand is that in the file 
> selection list, the absolute path is listed (directory plus filename, 
> i.e. /home/me/data/zzzzzzzzzzzzzzzz.dat instead of simply 
> zzzzzzzzzzzzzzzzz.dat.) How do I change this behavior?

If you set the pathMode resource to PATH_MODE_RELATIVE, the directory
and filter pattern are separate text fields, and the directory and
file lists will show relative pathnames.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list