How to align all textboxes in a groupbox to the left?

141 Views Asked by At

I have created this simple address form from devexpress components in MVC view. It consists of two groupboxes - the first is with border for 4 rows. The second is inside first groupbox at last line which consists of 3 elements. The first element is 30px wide, the second 60px and the third should just fill the rest of space so he doesn't have fixed width. The whole box is 250px wide. My problem are spaces between textboxes in second groupbox which I can't get rid of. I want the second textbox to be aligned right behind the first and the third textbox right behind the second which will take all the remaining space. I tried all sort of horizontal alignment but the spaces still persist and I start to be desperate - viz picture belove:

enter image description here

Thank you for your help.

Edit: the code here:

           var group1 = settings.Items.AddGroupItem().FormLayoutGroup(1, Unit.Percentage(100), GroupBoxDecoration.Box);
           ... // other textboxes
           var group2 = group1.Items.AddGroupItem().FormLayoutGroup(3, Unit.Percentage(100), GroupBoxDecoration.None);
           group2.Items.Add(model => model.AdresaOsobyId.Adresa.Stat.ID).ToLambda(x =>
           {
               x.TextBox()
               x.Width = 30;
               x.HideCaption();
           });
           group2.Items.Add(model => model.AdresaOsobyId.Adresa.Psc).ToLambda(x =>
           {
               x.HideCaption();
               x.TextBox();
               x.Width = 60;
           });
           group2.Items.Add(model => model.AdresaOsobyId.Adresa.Posta).ToLambda(x =>
           {
               x.HideCaption();
               x.TextBox();
           });
0

There are 0 best solutions below