Re: [gtkmm] scrolledwindow floating point exception



Attached is an example.

Thanks.

On Mon, 2004-01-26 at 09:38, Peter Gasper wrote:
> I want to say this is a bug, but I'm probably just doing something
> wrong. 
> 
> I'm adding a scrolledwindow to one or both panes in an HPaned widget. If
> one then takes the mouse and drags the handle all the way to the left or
> right the program errors out with a floating point exception.
> 
> What am I doing wrong? If this is a bug, let me know and I'll add it to
> bugzilla.
> 
> Thanks.
-- 
Peter Gasper <pgasper designadvantage com>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include <gtkmm/paned.h>
#include <gtkmm/label.h>
#include <gtkmm/scrolledwindow.h>


class Test : public Gtk::Window
{

public:
  Test()
    :label1("test"), label2("test2")
  {
    add(hpaned);
    
    hpaned.add1(win1);
    win1.add(label1);
    
    hpaned.add2(win2);
    win2.add(label2);
    
    show_all();
  };

  virtual ~Test()
  {};

protected:
  Gtk::Label label1, label2;
  Gtk::ScrolledWindow win1, win2;
  Gtk::HPaned hpaned;
};


int main(int argc, char *argv[])
{
	Gtk::Main kit(argc, argv); 
	Test test;			
	Gtk::Main::run(test);
    	
	return (0);
}


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