Re: GtkTreeView stuff !!



Fernando Alencar Maróstica wrote:

hi all !

GtkTreeView support GtkTooltips ?

I would like show Tooltip on row GtkTreeView.
How make this ??

Have you looked at this example?

  GtkWidget *load_button, *save_button, *hbox;
  GtkTooltips *button_bar_tips;
button_bar_tips = gtk_tooltips_new (); /* Create the buttons and pack them into a GtkHBox */
  hbox = gtk_hbox_new (TRUE, 2);
load_button = gtk_button_new_with_label ("Load a file");
  gtk_box_pack_start (GTK_BOX (hbox), load_button, TRUE, TRUE, 2);
  gtk_widget_show (load_button);
save_button = gtk_button_new_with_label ("Save a file");
  gtk_box_pack_start (GTK_BOX (hbox), save_button, TRUE, TRUE, 2);
  gtk_widget_show (save_button);
  gtk_widget_show (hbox);
/* Add the tips */
  gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), load_button,
                                 "Load a new document into this window",
                                 "Requests the filename of a document.
                                  This will then be loaded into the current
                                  window, replacing the contents of whatever
                                  is already loaded.");
  gtk_tooltips_set_tip (GTK_TOOLTIPS (button_bar_tips), save_button,
                                 "Saves the current document to a file",
                                 "If you have saved the document previously,
                                  then the new version will be saved over the
                                  old one. Otherwise, you will be prompted for





Found here: http://developer.gnome.org/doc/API/2.0/gtk/GtkTooltips.html

However, if you wanted it on a Cell by Cell basis, you may have to get the cell information under the mouse 
(x,y) and set the tip each time the mouse is moved so that when it hovers, the tips is up todate with the 
information you which the user to see.

Regards,
Martyn


a filename.");



Best Regards.







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