Add a BScrollView around the instantiated TermView (only as a test)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34188 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
abc3e03007
commit
78f94f81ff
@ -4,6 +4,7 @@
|
||||
#include <Dragger.h>
|
||||
#include <Message.h>
|
||||
#include <Path.h>
|
||||
#include <ScrollView.h>
|
||||
#include <Shelf.h>
|
||||
#include <Window.h>
|
||||
|
||||
@ -62,14 +63,19 @@ Window::AttachTermView()
|
||||
message.AddString("class", "TermView");
|
||||
message.AddString("add_on", TERM_SIGNATURE);
|
||||
message.AddBool("use_rect", true);
|
||||
message.AddRect("_frame", Bounds().InsetByCopy(2, 2));
|
||||
|
||||
BRect viewFrame = Bounds();
|
||||
viewFrame.right -= 15;
|
||||
message.AddRect("_frame", viewFrame);
|
||||
|
||||
BView *termView = dynamic_cast<BView *>(instantiate_object(&message));
|
||||
if (termView == NULL)
|
||||
return;
|
||||
|
||||
if (termView != NULL) {
|
||||
termView->SetResizingMode(B_FOLLOW_ALL);
|
||||
AddChild(termView);
|
||||
|
||||
termView->ResizeToPreferred();
|
||||
}
|
||||
BScrollView *scrollView = new BScrollView("scrollview", termView,
|
||||
B_FOLLOW_ALL, B_WILL_DRAW, false, true);
|
||||
|
||||
AddChild(scrollView);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user