PtGenList

PtGenList -- A parent class for list and tree widget resources.

Synopsis

class PtGenList PtContainer
{
    balloon_color;           // color  (Pt_ARG_BALLOON_COLOR)    
    balloon_fill_color;      // color  (Pt_ARG_BALLOON_FILL_COLOR)    
    list_flags;              // flag  (Pt_ARG_LIST_FLAGS)    
    list_font;               // string  (Pt_ARG_LIST_FONT)    
    list_item_count;         // unsigned short  (Pt_ARG_LIST_ITEM_COUNT)    
    list_scroll_rate;        // short  (Pt_ARG_LIST_SCROLL_RATE)    
    list_sel_count;          // unsigned short  (Pt_ARG_LIST_SEL_COUNT)    
    list_total_height;       // unsigned short  (Pt_ARG_LIST_TOTAL_HEIGHT)    
    scrollbar_width;         // unsigned short  (Pt_ARG_SCROLLBAR_WIDTH)    
    selection_fill_color;    // color  (Pt_ARG_SELECTION_FILL_COLOR)    
    selection_mode;          // unsigned short  (Pt_ARG_SELECTION_MODE)    
    selection_text_color;    // color  (Pt_ARG_SELECTION_TEXT_COLOR)    
    top_item_pos;            // unsigned short  (Pt_ARG_TOP_ITEM_POS)    
    visible_count;           // unsigned short  (Pt_ARG_VISIBLE_COUNT)    
}
		

Base Classes

PtWidget <-- PtBasic <-- PtContainer <-- PtGenList

Derived Classes

PtGenTree, PtList

Description

This class serves as a parent class of resources for list widgets, and is not normally instantiated.

Note

For detailed information, please refer to PtGenList in the Photon documentation.

Instance Variables

balloon_color

A number specifying the balloon's text color. Default is 0xc814 (green).

balloon_fill_color

A number specifying the balloon's background fill color. Default is 0xc814 (green).

list_flags

This instance variable controls the appearance and behavior of the list, and may be a combination of zero or more of the following flags:

list_font

A string specifying the font used for list items. Default is "helv12".

list_item_count

A number specifying the number of items in the list.

list_scroll_rate

A number specifying the rate of scrolling. Default is 2. Set it to 1 to scroll faster, set it higher to scroll slower.

list_sel_count

A read-only number of list items.

list_total_height

A read-only number indicating the total height in pixels of all list items.

scrollbar_width

A number of pixels specifying the width of the scrollbar. Default is 15. When set to 0, the default is used as well.

selection_fill_color

A number specifying the fill color for selected items. Default is 0xff (blue).

selection_mode

A constant specifying the way items are chosen from the list, with mouse or keyboard. If a mouse is not used, the Up and Down arrows on the numeric keypad move the selection highlight, and pressing the Enter key makes the selection.

This instance variable may have one of the following values:

In addition to the constant above, this instance variable may also have zero or more of the following flags:

selection_text_color

A number specifying the color of text for selected items. Default is 0xffffff (white).

top_item_pos

An integer specifying the index number of the item to appear at the top of the list. (Items are numbered consecutively, starting at one.) Default is 1, the first item.

visible_count

A read-only number indicating the number of currently visible items. Default is 0.

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