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)

Reply via email to