The Interface Kit Table of Contents | The Interface Kit Index |
Derived from: public BView
Declared in: be/interface/StringView.h
Library: libbe.so
A BStringView object draws a string that the user can neither select nor edit. BStringView object are typically used as labels for your app's UI. If you need to present text that can be selected and/or edited, wse a BTextView object.
|
Initializes the BStringView by assigning it a text string and the system plain font (be_plain_font). The frame, name, resizingMode, and flags arguments are passed unchanged to the BView constructor.
The frame rectangle needs to be large enough to display the entire string in the current font. The string is drawn at the bottom of the frame rectangle and, by default, is aligned to the left side. A different horizontal alignment can be set by calling SetAlignment().
|
Frees the text string.
|
Calls the inherited version of Archive(), then adds the string and its alignment to the BMessage archive.
|
Sets the BStringView's low color and its background view color to match the background color of its new parent view.
See also: BView::AttachedToWindow()
|
Draws the string along the bottom of the BStringView's frame rectangle in the current high color.
|
These functions align the string within the BStringView's frame rectangle and return the current alignment. The alignment flag can be:
The default is B_ALIGN_LEFT.
|
These functions set and return the text string that the BStringView draws. SetText() frees the previous string and copies string to replace it. Text() returns the null-terminated string.
The Archive() function adds the following fields to its BMessage argument:
Field | Type code | Meaning |
---|---|---|
"_text" | B_STRING_TYPE | Text displayed in the view (present only if it is not NULL). |
"_align" | B_INT32_TYPE | Alignment of text in frame. |
The Interface Kit Table of Contents | The Interface Kit Index |
Copyright © 2000 Be, Inc. All rights reserved..