PHP-GTK2 Cookbook Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Controlling two windows (with glade) (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Controlling two windows (with glade)
#1180
coubilias (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Controlling two windows (with glade) 1 Month, 2 Weeks ago Karma: 0  
I think that this might be a very basic question but it does causes confusion

Having a glade file that has two windows (window1 and window2).On window one there is a button and on the second window there is a label. The file is as follows

test1.glade

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.1 on Wed Nov 19 01:32:40 2008 -->
<glade-interface>
<widget class="GtkWindow" id="window1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<signal name="destroy" handler="gtk_main_quit"/>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">button</property>
<property name="response_id">0</property>
<signal name="clicked" handler="on_button1_clicked"/>
</widget>
</child>
</widget>
<widget class="GtkWindow" id="window2">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
<widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="yes">window2</property>
</widget>
</child>
</widget>
</glade-interface>

the test1.php file (the basic structure)

<?php
$glade=new GladeXML('test1.glade');
$glade->signal_autoconnect();

Gtk::main();

function on_button1_clicked(){

}

function gtk_main_quit(){
GTK::main_quit();
}
?>



The problem is that is it possible by pressing the button on the first window to hide it and display window2?What should I use?

Thank you in advanced for your time.
 
  The administrator has disabled public write access.
#1198
coubilias (User)
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:Controlling two windows (with glade) 1 Month, 2 Weeks ago Karma: 0  
No bother guys problem solved :):):)
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2009. kksou.com. All Rights Reserved