| Sorry, I don't have an example, but I'll try to answer the questions.
>1. Can he list the files without full directory path.
>
> file_to_extern_proc ? I think....
>
Right. file_to_extern_proc will let him display whatever name he
wants.
>2. Can he set the number of pixels between between lines of text?
>
> I don't think so - I think it is the font
>
Try the DwtNspacing resource (documented under list box).
>3. Can he have the file selection widget come up scrolled all the
>way to the left instead of the right?
>
No, but if he uses file_to_extern_proc to eliminate the directory
path, then this probably isn't necessary.
>4. How does the file_search_proc argument work? how to use it?
>
It's in the documentation, but I'll reproduce it here:
|A directory search procedure to replace the default file selection
|search procedure. The file selection widget's default file search
|procedure is written to fill the needs of most applications. However,
|since it is impossible to cover the requirements of all applications,
|the default search procedure can be replaced.
|
|The file_search_proc is called with two arguments: one argument is
|the file selection widget; the other argument is the file selection
|callback structure. The callback structure contains all required
|information to conduct a directory search, including the current
|file search mask. Once called, it is up to the search routine to
|generate a new list of files and update the file selection widget by
|using the instrinsic routine SET VALUES. The following attributes
|must be set:
| - items (DwtNitems)
| Sets the item attribute described in the low-level routine
| SELECTION CREATE. Set the attribute to the new list of
| files. If there are no files, set the attribute to NULL.
| - items_count (DwtNitemsCount)
| Sets the items_count attribute described in the low-level
| routine SELECTION CREATE. If there are no files, set
| items_count to zero.
| - list_updated (DwtNlistUpdated)
| Always set the list_update attribute to true when updating
| the file list through a search procedure, even if there are
| no files. The default is false.
|Setting the following field is optional, but recommended:
| - dir_spec (DwtNdirSpec)
| Set to the full file specification of the directory searched.
| The directory specification is displayed above the list box.
>5. Can he have more than one file per line?
>
> possibly with file_to_extern_proc?
Well, using file_to_extern_proc, he could display anything on the line
that he wants, but since file select uses a list box to display the
lines, he can still only select a full line. There wouldn't be any
way to select only one of the files if he had multiple files per
line.
|
| I have a customer struggling to use the new attributes made available
for the File Selection Widget. (file_to_extern_proc,
file_to_intern_proc, mask_to_extern_proc, and mask_to_intern_proc.)
As it turns out, I'm struggling as well.
The documentation for how to use these is in the VMS DECwindows
Programming Documentation Supplement (pgs 14-31, 14-32), but it doesn't
give (in my opinion) a very clear explanation of how to use it.
What I've done at this point is to define a VoidProc routine at the
beginning of my program. I then do a SetArg and SetValue on the file
selection widget, specifying DwtNfileToExternProc and the name of my
VoidProc routine. At this point in this routine I'm just typing
"Hello" to the terminal. The routine gets called once (displays okay)
and then ACC VIO's. It doesn't seem to know where to go once the
routine executes.
Two (2) questions:
1. What am I doing wrong that's causing the ACC VIO?
2. How is it possible to modify the string I want to appear in the
file selection widget? What data structures are used?
Any pointers/suggestions appreciated! Even a general conceptual
description of how you're supposed to use these things would probably
do the trick.
Thanks in advance,
- Chris Knorr
|
| Hi,
Could someone post a little example of how to filter what goes into
the list box? I don't have access to the 5.3 documentation, thus have
no documentation for this file_to_extern_proc...
Thanks,
Mark Palmer
|
| Another question...
Is there any way to get access to the Filter, OK, and Cancel widget
ids?
What I want to do is put an SText widget in a file selection widget and
do the same changing of the default button on the fly when focus is
switched from the filter SText to mine.
Is there a way to do this?...
Thanks,
Mark
|