Documentation | InterfaceKit | StringView
SYNOPSIS
Perl
use HaikuR1::StringView [];
my $string_view = HaikuR1::StringView->new(
    frame => $frame,
    name => $name,
    text => $text,
    resizingMode => $resizingMode,
    flags => $flags,
)
$window->AddChild($string_view);
Python
from HaikuR1.InterfaceKit import StringView, 
string_view = StringView(
    frame = frame,
    name = name,
    text = text,
    resizingMode = resizingMode,
    flags = flags,
)
window->AddChild(string_view)
DESCRIPTION
Exposes the BStringView object.
For more information on StringView, see the Be Book class description, the Be Book overview, and the Haiku Book class description.
METHODS
Constructor
Creates a StringView.
Perl
HaikuR1::StringView->new(
    frame => $frame,
    name => $name,
    text => $text,
    resizingMode => $resizingMode,
    flags => $flags,
);
HaikuR1::StringView->new(
    name => $name,
    text => $text,
    flags => $flags,
);
HaikuR1::StringView->new($archive);
Python
StringView(
    frame = frame,
    name = name,
    text = text,
    resizingMode = resizingMode,
    flags = flags,
)
StringView(
    name = name,
    text = text,
    flags = flags,
)
StringView(archive)
- frame- A Rect that indicates where on the parent Window the View should be. You should not specify a frame on a View that will be added to a parent which uses a Layout. 
- name- A string, the View's internal name. 
- text- A string, the text to be displayed. 
- resizingMode- An integer, the resizing mode. (See the resizing mode constants.) Should only be specified when there is a frame. Defaults to - B_FOLLOW_NONE.
- flags- An integer, view flags. (See the view flag constants.) 
- archive- A Message, contains an archived version of the StringView. 
Alignment
SetAlignment
Gets or sets the alignment for the StringView.
Perl
$stringview->Alignment(); $stringview->SetAlignment($flag);
Python
stringview.Alignment() stringview.SetAlignment(flag)
- flag- One of the alignment constants. 
Borders
SetBorders
Gets or sets the borders for the MenuBar; this method is used with Layout-enabled StringViews.
Perl
$menubar->Borders(); $menubar->SetBorders($borders);
Python
menubar.Borders() menubar.SetBorders(borders)
- borders- An integer combination of the ControlLook border constants. 
Text
SetText
Gets or sets the text.
Perl
$stringview->Text(); $stringview->SetText($string);
Python
stringview.Text() stringview.SetText(string)
- string- A string, the new display text. 
Truncation
SetTruncation
Gets or sets the truncation mode for the StringView.
Perl
$stringview->Truncation(); $stringview->SetTruncation($flag);
Python
stringview.Truncation() stringview.SetTruncation(flag)
- flag- One of the truncation mode constants. 
ARCHIVABLE INTERFACE
StringView inherits the methods and hooks of Archivable.
HANDLER INTERFACE
StringView inherits the methods and hooks of Handler.
VIEW INTERFACE
StringView inherits the methods and hooks of View.
SCRIPTING SUITE
The name of StringView's scripting suite is suite/vnd.Be-string-view.
- Properties - Alignment- B_GET_PROPERTY, `B_SET_PROPERTY- An integer, the alignment value 
 
- Text- B_GET_PROPERTY,- B_SET_PROPERTY- A string, the display text 
 
 
StringView also inherits the following suites: