PtUnrealizeWidget

PtUnrealizeWidget -- hides a widget.

Syntax

PtUnrealizeWidget (widget)

		

Arguments

widget

The widget to unrealize.

Returns

If successful the unrealized widget is returned, otherwise nil.

Description

This function makes a widget disappear. Actions associated with the widget are no longer available to the user. This function does not destroy the widget, it only hides it.

Example

This example, ex_PtUnrealizeWidget.g, is included in the gamma_ph_#_examples_1_QNX4.tgz file available on the Cogent Web Site.

#!/usr/cogent/bin/phgamma

/*
This example creates a small window with a button in it.  The at()
function is used to create a timer to realize and unrealize the button
every 5 seconds, as well as to change the label.
*/

require_lisp("PhotonWidgets");
PtInit(nil);
win = new(PtWindow);

b = new(PtButton);
b.text_string = "The button is visible";

label = new(PtLabel);
label.SetPos(0,25);

PtExtentWidget(win);
PtRealizeWidget(win);

at(nil,nil,nil,nil,nil,list(0,10,20,30,40,50),#PtRealizeWidget(b));
at(nil,nil,nil,nil,nil,list(0,10,20,30,40,50),#label.text_string = "Realized");
at(nil,nil,nil,nil,nil,list(5,15,25,35,45,55),#PtUnrealizeWidget(b));
at(nil,nil,nil,nil,nil,list(5,15,25,35,45,55),#label.text_string = "Unrealized");

PtMainLoop();

See Also

PtRealizeWidget, PtDestroyWidget

and in Photon documentation: PtUnrealizeWidget.

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.