[haiku-development] Fancy border on ScrollView ?
- From: Philippe Saint-Pierre <stpere@xxxxxxxxx>
- To: haiku-development <haiku-development@xxxxxxxxxxxxx>
- Date: Tue, 5 May 2009 18:37:28 -0400
Hello group,
Hi have a hopefully trivial question that is bugging me.. I'm trying to do
a simple ScrollView (using a BListView child). Problem is, I get this
result :
http://www.gaspesie.net/philippe/screenshot.png
As you can see, the fancy border is simply not there. So I dig a little in
the ScrollView.cpp file and I see that kFancyBorderSize = 2; and I seem to
remember stippi saying it was changed to 3. So I changed this and even
then, the fancy border isn't shown.
Here is the code I use to create the view :
<code>
MainWindow::MainWindow()
: BWindow(BRect(0, 0, 1, 1), "Backup", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_AUTO_UPDATE_SIZE_LIMITS)
{
// Create Views
fHelpBtn = new BButton("help", "Help", new
BMessage(kMsgMainWindowHelp));
fHelpBtn->SetEnabled(false);
fScanBtn = new BButton("scan", "Search for lost sets", new
BMessage(kMsgScan));
fNewSetBtn = new BButton("new", "Create a new set", new
BMessage(kMsgNewSet));
fBackupSetsListView = new BListView("Sets List",
B_SINGLE_SELECTION_LIST);
BScrollView* scroll_view = new BScrollView("Sets ScrollView",
fBackupSetsListView,
0, false, true, B_FANCY_BORDER);
BGroupLayout* scroll_layout = new BGroupLayout(B_HORIZONTAL);
scroll_view->SetLayout(scroll_layout);
scroll_view->SetExplicitMinSize(BSize(400, 300));
// Create the layout
SetLayout(new BGroupLayout(B_VERTICAL));
AddChild(BGroupLayoutBuilder(B_VERTICAL, 5)
.Add(scroll_view)
.Add(BGroupLayoutBuilder(B_HORIZONTAL, 5)
.Add(fHelpBtn)
.AddGlue()
.Add(fNewSetBtn)
.Add(fScanBtn)
)
.SetInsets(8, 8, 8, 8)
);
BPoint position;
position.x = 100;
position.y = 100;
MoveTo(position);
}
</code>
Thanks for your help !
---
Philippe
Other related posts: