GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TK::CWIDGET (3)

.ds Aq ’

NAME

Tk::CWidget - Frame-based Composite Base class.

CONTENTS

DESCRIPTION

CWidget is a base class for Frame-based Composite widgets. It contains methods that may be useful for Composites, and is used as a way of extending or overriding the Widget, Derived, or Frame modules without directly changing them. It is not intended for use as a standalone widget. Currently, it has few methods, but will likely increase as common code is moved from subclasses to this one.

OPTIONS

Name subwidgets
Class Subwidgets
Switch -subwidgets Specifies one or more configuration options for subwidgets contained within the Composite. Assuming a Composite that contains two subwidgets: LabelA and LabelB (both Label widgets), the following examples show how these might be configured.

The first example shows that for each named subwidget, one or more options can be set.



   $cwidget->configure(-subwidgets => [
      LabelA => { -background => blue, -foreground => white },
      LabelB => { -background => white, -foreground => blue }
   ]);



The second example show that more than one subwidget can be associated with a set of options.



   $cwidget->configure(-subwidgets => [
      [LabelA, LabelB] => { -bg => blue, -fg  => white},
      LabelA               => { -text => A},
      LabelB               => { -text => B}
   ]);



Why is this useful? If you have several composites that have the same option configurations, this allows the options to be defined once in a variable, and then passed to each one, eliminating some of the common code from repeatedly calling:



  $cwidget->Subwidget(LabelA)->configure(...)



METHODS

$cwidget-><B>configureSubwidgetsB>(array|arrayref) Provides an alternative to using the -subwidgets option. This method take either an array reference or an array. Either way the contents of the array reference or array are identical.



   $cwidget->configureSubwidgets(
      [LabelA, LabelB] => { -bg => blue, -fg  => white},
      LabelA               => { -text => A},
      LabelB               => { -text => B}
   );



or:



   $cwidget->configureSubwidgets([  
      [LabelA, LabelB] => { -bg => blue, -fg  => white},
      LabelA               => { -text => A},
      LabelB               => { -text => B}
   ]);



AUTHOR

Rob Seegel (RobSeegel@comcast.net)
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TK::CWIDGET (3) 2006-10-09

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.