Re: GtkFileSelection Widget: selecting a directory
- From: John Cupitt <john cupitt ng-london org uk>
- To: "Miguel A. Figueroa-Villanueva" <miguelf msu edu>
- Cc: gtk-devel-list gnome org
- Subject: Re: GtkFileSelection Widget: selecting a directory
- Date: Wed, 01 Aug 2001 12:52:33 +0100
"Miguel A. Figueroa-Villanueva" wrote:
> In my application I happen to ask for the path (a directory) to some data. I'm
> using the GtkFileSelection Widget attached to a "Browse/Choose" button.
> However, I thought it would be nice to present the user with only the
> directory list and not the file list. I can hide the history_pulldown and the
> file_list:
>
> gtk_widget_hide(GTK_FILE_SELECTION(filew)->history_pulldown)
>
> , but since I don't have access to the scrollbar (right ?) it leaves an empty
> space with a scroll bar.
Hi Miguel, you can make an OK dir selector by hiding the file_list parent (the
scrolled window it's inside).
fsb = gtk_file_selection_new( "poot!" );
gtk_widget_hide( GTK_FILE_SELECTION( fsb )->file_list );
gtk_widget_hide( GTK_FILE_SELECTION( fsb )->file_list->parent );
gtk_widget_show( fsb );
Pretty ugly, but it does work.
This sort of horror is one of the reasons the file selector can't now be
modified much :-(
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]