re: [gtkmm] display a pixmap on a CList



Title: re: [gtkmm] display a pixmap on a CList

Hello,

I displayed a Pixmap in a Clist with the following code:

--code Example--

void show_xpm (string xpmfile, Gtk::CList *List, int col, int row)
{
  GdkPixmap *pix;
  GdkBitmap *bit;
  GdkCList *clist= List->gtkobj();

  /*Transparent Color is NULL which means that the backgroundcolor from the window will be used*/

  pix = gdk_pixmap_create_from_xpm(List->get_window(), &bit, NULL, "Your_XPM_File.xpm");
  gdk_clist_set_pixmap(clist, row, col, pix, bit);
}

--code Example end--

ciao Rainer



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