• ↖ Home
  • Developer´s Guide
    • ↑ Contents
    • Code
    • Embedding
    • Tcl
    • SVG
    • SVG-Import
    • Projects
    • License
    • Index
  • Download
    • Jeszra: Source Code

    • Ruby Wrapper Classes
    • Python Wrapper Classes
    • Lisp Wrapper Classes
  • Books@Lulu.com...
    • Jeszra: Design by Gestalt
    • Jeszra Library: Design by Gestalt

    • Gestalt Items
    • Runtime Library
  • Manual
    • Jeszra Book

    • Tcl Manual
    • Ruby Manual
    • Python Manual
    • Lisp Manual

    • API
  • About
listbox
← Chapter 4. SVG- Code Generation →

Name

dumper::listbox

Synopsis

          listbox listbox \
             items
        

Description

There is no justify for a listbox. This function can be called for windows of class: listbox, rtl_mlistbox, tablelist, hugelist. Only »listbox« windows are allowed here. The composed classes are processed later –rtl_mlistbox using listboxes; or are implemented as text windows –tablelist–, or canvas –hugelist.

The Internal size is somewhat smaller: borderWidth, highlightThickness, the viewport must be adjusted for this values, or rather clipping has to be defined. state, disabledForeground and foreground, cursor are needed, too.

Items are combined into a single text paragraph and passed on as a text object; the code generation coords are identified via x1..y2

Selection: • Draw select rectangles. • Use selectforeground for the selected items.

The coords inside a listbox must be integer, otherwise the text and rectangle alignment will get out-of-sync.

Added rectangles for each item, unselected items are classed as itemodd or itemeven, while selected items are classed as itemselect. –Allows for AQUA-Style alternating backgrounds via CSS.

Example 4.21. CSS Alternate Color for Listbox

rect.itemodd {
fill: #edf3fe;
fill-opacity: 1.0;
}


Clients

listbox is being used by ::dumper::listbox, ::dumper::text, ::dumper::complexText.

listbox is being used by ::vgcode::dump-configure-Listbox, ::vgcode::dump-configure-Gistbox clients.

Example 4.22. ::vgcode::dump-configure-Listbox using listbox

...
set items \
    [$target get 0 end]
if {{} == $items} { return {} }

return \
    [dumper::listbox $ta_name $items]
   



← ↖ →
textitem ↑ getTagProperties
SourceForge Logo

Copyright © 2009–2010 Arndt Roger Schneider