Re: [gtk-list] Wanted: CList with Popup menu sample code
- From: José Miguel Rodríguez <jmiguel ceselsa es>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Wanted: CList with Popup menu sample code
- Date: Thu, 07 Oct 1999 14:56:13 +0100
robert_gasch@peoplesoft.com wrote:
>
> Hi,
>
> after some putzing around, I'm still having trouble creating a clist which
> displays a popup window when an item in the CList is selected. If anybody
> knows of some sample code which does this, I'd appreciate a pointer ...
>
> Thanks a lot
> --> Robert
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
Well, for clarifying :) ...
/* */
GtkWidget *TableField(GtkWidget *parent, gchar *tit, gint ncols, gchar *cols[])
{
GtkWidget *frame, *scroll, *lista;
frame = gtk_frame_new(tit);
gtk_frame_set_label_align(GTK_FRAME(frame), 0.5, 0.5);
gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN);
if(parent)
gtk_container_add(GTK_CONTAINER(parent), frame);
scroll = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(frame), scroll);
if(cols)
lista = gtk_clist_new_with_titles(ncols, cols);
else
lista = gtk_clist_new(ncols);
gtk_container_add(GTK_CONTAINER(scroll), lista);
gtk_object_set_data(GTK_OBJECT(frame), "TFWind", scroll);
gtk_object_set_data(GTK_OBJECT(frame), "TFList", lista);
gtk_object_set_data(GTK_OBJECT(lista), "TableField", frame);
gtk_widget_show_all(frame);
return(frame);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]