App.cpp: fix broken resizing (label still not visible)
This commit is contained in:
parent
6750ad0a0c
commit
6d2658db25
1 changed files with 3 additions and 3 deletions
6
App.cpp
6
App.cpp
|
@ -5,13 +5,13 @@
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
|
|
||||||
App::App(void) : BApplication("application/x-vnd.dw-MyFirstApp")
|
App::App(void) : BApplication("application/x-vnd.hex-Renga")
|
||||||
{
|
{
|
||||||
BRect frame(100, 100, 500, 400);
|
BRect frame(100, 100, 500, 400);
|
||||||
BWindow *myWindow = new BWindow(frame, "Hello World!", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE);
|
BWindow *myWindow = new BWindow(frame, "Hello World!", B_TITLED_WINDOW, B_QUIT_ON_WINDOW_CLOSE);
|
||||||
frame.Set(10,10,11,11);
|
frame.Set(10,10,11,11);
|
||||||
BStringView *label = new BStringView(frame, "hello world", "idk wat dis do");
|
BStringView *label = new BStringView(frame, "melabel", "This is a label!");
|
||||||
label->SetResizingMode
|
label->ResizeToPreferred();
|
||||||
myWindow->AddChild(label);
|
myWindow->AddChild(label);
|
||||||
myWindow->Show();
|
myWindow->Show();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue