LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-14-2007, 03:18 PM   #1
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
Glade GUI :: Cancel Button Code


Hey guys I am making a gui in glade and using c for the code. I have made a button to open a new window which works well. On the new window I put a cancel button which just needs to close the new window but I can't figure that out. I'm very new to gtk but im trying to learn.

Thanks for you help.

nomb
 
Old 03-15-2007, 08:06 AM   #2
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Original Poster
Rep: Reputation: 58
I solved this by doing the following:
gtk_widget_destroy(gtk_widget_get_toplevel(GTK_WIDGET(button)));
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Glade producing broken code? Sava Programming 1 08-31-2006 01:48 PM
Glade 1.1.3 cannot create C++ code... Gveto Programming 3 08-30-2005 07:49 AM
Glade 1.1.3 cannot create C++ code? Gveto Linux - Software 10 03-12-2005 05:26 PM
How to make a window opens when clicking a button with Glade-2 Claus Programming 0 09-24-2003 05:41 PM
i can't write C++ code in glade amr_azima Programming 1 03-21-2002 02:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration