Re: Some widget idea




yes, you are rigth, so with it we can do all the that I mentionned before...but there are 3 reliefs and I suppose it is not enougth some relief like:

raised, sunken, flat, groove, ridge like Tkinter's relief 


some others suggestions:

1)
it is about a view widget and a list of child widget.

the view widget has a slide show which can permit us to easily switch from a child widget
to another child widget: another cool alternative of a GtkNoteBook Widget.


  2) 
imagine that you have a  GtkTreeView element and a GtkListStore element. when showing it
it will be good to show items by page. Suppose that the liststore has 100 items in it and I want my treeview showing only 25 items at once (with scrolling bars in it) so we have to switch between 4 pages by clicking on a "next button" and a "previous button", with an "actualize button" to refresh the number of pages actually available (the pages can be added dynamically)
so if I add 13 items (113 items now) there will be 5 pages available etc...

get a look at http://chat.tchatche.com/  on the list of contact in this site when tchatching  

thanks



Le Mercredi 30 octobre 2013 18h13, narcisse doudieu siewe <wambenarcisse yahoo fr> a écrit :
yes, you are rigth, so with it we can do all the that I mentionned before...but there are 3 reliefs and I suppose it is not enougth some relief like:

raised, sunken, flat, groove, ridge like Tkinter's relief 


some others suggestions:

1)
it is about a view widget and a list of child widget.

the view widget has a slide show which can permit us to easily switch from a child widget
to another child widget: another cool alternative of a GtkNoteBook Widget.


  2) 
imagine that you have a  GtkTreeView element and a GtkListStore element. when showing it
it will be good to show items by page. Suppose that the liststore has 100 items in it and I want my treeview showing only 25 items at once (with scrolling bars in it) so we have to switch between 4 pages by clicking on a "next button" and a "previous button", with an "actualize button" to refresh the number of pages actually available (the pages can be added dynamically)
so if I add 13 items (113 items now) there will be 5 pages available etc...

get a look at http://chat.tchatche.com/  on the list of contact in this site when tchatching  

thanks









Le Mardi 29 octobre 2013 19h24, Andy Spencer <andy753421 ucla edu> a écrit :
On 2013-10-29 17:35Z, narcisse doudieu siewe wrote:

> I don't think so, Gtkbutton can only embed an image and some texte as
> a label


No, you can embed other widgets as well:


  #include <gtk/gtk.h>
 
  int main(int argc, char **argv)
  {
      gtk_init(&argc, &argv);
 
      GtkWidget *win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
      GtkWidget *btn = gtk_button_new();
      GtkWidget *box = gtk_vbox_new(TRUE, 10);
      GtkWidget *top = gtk_button_new_with_label("Top");
      GtkWidget *bot = gtk_button_new_with_label("Bottom");
 
      gtk_container_add(GTK_CONTAINER(win), btn);
      gtk_container_add(GTK_CONTAINER(btn), box);
      gtk_box_pack_start(GTK_BOX(box), top, TRUE, TRUE, 20);
      gtk_box_pack_start(GTK_BOX(box), bot, TRUE, TRUE, 20);
 
      gtk_widget_show_all(win);
 
      gtk_main();
 
      return 0;

  }






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]