Re: Some new to gtkmm questions



On Thursday 17 March 2005 23:11, Timothy M. Shead wrote:
> > 2) splash screen - I have a splashscreen class that runs fine by itself
> > but how do I specify it in "main.cpp"  so that after it disappears, main
> > runs the main layout dialog.  my main now looks like:
> > int main(....)
> > Gtk::Main kit(...)
> > SplashDialog *splash = new SplashDialog();
> > splash->show();
> > delete splash;
> > MainDialog mainDlg;
> > Gtk::Main::run(mainDlg);
>
> You are deleting your splash as soon as it is created, it never becomes
> visible because there is no event loop running to make it visible.  You
> probably want to call
>
>  splash->run();
>
> > with this the splashscreen never appears - do I somehow need to set it
> > modal ?

I understand what you mean about deleting immediately but run is not a method 
of splash (which is derived from Gtk::Window) - I also tried using 
Gtk::main::run()  which runs the splash okay but then doesn't seem to run 
main dialog - my guess is that I need to set splash to be a modal dialog - 
that would hold it before deleting - but not sure how to do it.
John



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