eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TabView':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: TabView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--NoteBookView
                  |
                  +--TabView

Package:
stx:libwidg2
Category:
Views-Interactors
Version:
rev: 1.51 date: 2021/08/12 09:57:31
user: cg
file: TabView.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


implements the tabs-view component of a noteBook.
May also be used on its own (without a surrounding noteBook).

The functionality is basically the same as provided by a
PopUpList or SelectionInListView, in that a valueHolder
gets a value assigned corresponding to the selected tab
from a list of possible tabs.

copyright

COPYRIGHT (c) 1997 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Instance protocol:

accessing
o  recomputeListHorizontal
compute layouts for all tabs

initialization
o  initStyle
setup style attributes


Examples:


tabs at top of a view
|top tab|

top := StandardSystemView new label:'tabs at top'; extent:250@100.
tab := TabView origin:(0.0 @ 0.0) corner:(1.0 @ 0.0)in:top.
tab direction:#top.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:anIndex| Transcript showCR:anIndex ].
tab bottomInset:(tab preferredExtent y negated).
top open.
tabs at bottom a view
|top tab|

top := StandardSystemView new label:'tabs at bottom'; extent:250@100.
tab := TabView origin:(0.0 @ 1.0) corner:(1.0 @ 1.0)in:top.
tab direction:#bottom.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:anIndex| Transcript showCR:anIndex ].
tab topInset:(tab preferredExtent y negated).
top open.
tabs at right of a view
|top tab|

top := StandardSystemView new label:'tabs at right'; extent:100@250.
tab := TabView origin:1.0 @ 0.0 corner:1.0 @ 1.0 in:top.

tab direction:#right.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:aName|Transcript showCR:aName].
tab leftInset:(tab preferredExtent x negated).
top open.
tabs at left of a view
|top tab view inset|

top := StandardSystemView new label:'tabs at left'; extent:100@250.
tab := TabView origin:0.0 @ 0.0 corner:0.0 @ 1.0 in:top.

tab direction:#left.
tab list:#( 'Foo' 'Bar' 'Baz' ).
tab action:[:aName|Transcript showCR:aName].
tab rightInset:(tab preferredExtent x negated).
top open.
using icons and text
|top tab view list|

top := StandardSystemView new label:'using icons, text, ..'; extent:300@100.
tab := TabView origin:0.0 @ 0.0 corner:1.0 @ 0.0 in:top.
list := OrderedCollection new.
list add:( LabelAndIcon icon:(ToolbarIconLibrary workspace24x24Icon2) string:'Workspace' ).
list add:( ToolbarIconLibrary workspace24x24Icon2 ).
list add:( 'Workspace' ).
list add:( 'Workspace' allBold ).

tab list:list.
tab hasScrollButtons:true.
tab action:[:indexOrNil| Transcript showCR:indexOrNil ].
tab bottomInset:(tab preferredExtent y negated).
top open.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 04 May 2024 11:20:54 GMT