gtkD GUI design
SaltySugar
Butkustomas777 at gmail.com
Thu Jan 31 05:33:05 PST 2013
On Thursday, 31 January 2013 at 12:35:44 UTC, SaltySugar wrote:
> On Thursday, 31 January 2013 at 12:21:55 UTC, FG wrote:
>> On 2013-01-31 12:38, SaltySugar wrote:
>>>
>>> HBox hBox = new HBox(false, 3);
>>> HBox hBox1 = new HBox(false, 3);
>>> VBox vBox = new VBox(false, 5);
>>>
>>> Button btnLog = new Button("LOGIN --->");
>>> Label lblNick = new Label("User: ");
>>> Entry txtNick = new Entry();
>>> Label lblPass = new Label("Password: ");
>>> Entry txtPass = new Entry();
>>>
>>> btnLog.setSizeRequest(70, 30);
>>> vBox.packStart(hBox, true, true, 3);
>>> vBox.packStart(hBox1, true, true, 3);
>>>
>>> hBox.add (lblNick);
>>> hBox.add (txtNick);
>>> hBox1.add (lblPass);
>>> hBox1.add (txtPass);
>>> vBox.add (btnLog);
>>>
>>> add(vBox);
>>> showAll();
>>
>> You'd need vBox.setBorderWidth(8) or similar to add space
>> around window borders and to keep the button from taking up
>> all available width I think you will have to put btnLog inside
>> a HBox first and then add that HBox to the vBox.
>>
>> (haven't checked any of this myself)
>
> Thanks, setBorderWidth() is working but button's size isn't
> changing.
I have two more questions;
First, how to remove an arrow on the window's bottom?
Second, when I run my program it runs together with console. I
want to run only window of application. How to do it?
More information about the Digitalmars-d-learn
mailing list