GridPanel demo, bug in TGridPanelColumn.Margin?

Hello,

I have modified the "C:\Users\Public\Documents\tmssoftware\TMS WEB Core Demos\Basics\GridPanel\TMSWeb_GridPanel.dpr" demo, I have modified in the WebGridPanel1.ColumnsCollection[1]  object the properties :

Alignment : taLeftJustify
MarginLeft : 30

But when I run the demo, the WebEditxxx that is contained in the column, always is aligned to the left without taking in account the MarginLeft property.

Is this a bug?.

Thank you.

Thanks for reporting.
We traced & solved this issue. 
The next update will address this.

Hi. 

I do try to make 2 column panel. 
with the code that is commented I cant add controls to Panel. 
with code that is not commented I can add controls to Panel but they are not set by to columns 

Can you tip me how to solve it. 

I try to create something like property editor. If you have some better idea how to do it I'll appreciate it. 

//  with WebGridPanel1.ControlCollection.Add do begin
//    Column := 0;
//    Row := 0;
//    Control := WebLabel1;
//  end;
//  with WebGridPanel1.ControlCollection.Add do begin
//    Column := 0;
//    Row := 0;
//    Control := WebSpinEdit2;
//  end;

  WebGridPanel1.AddControl(WebLabel1);
  WebGridPanel1.AddControl(WebSpinEdit2);

  WebGridPanel1.ControlCollection.Items[0].Column := 1;
  WebGridPanel1.ControlCollection.Items[0].Row := 0;

  WebGridPanel1.ControlCollection.Items[1].Column := 1;
  WebGridPanel1.ControlCollection.Items[1].Row := 0;

I'm not really sure what you want to achieve as in the first commented code you are trying to set both controls to column 0, row 0.
TWebGridPanel is designed to have one control in one grid cell. If you want to put multiple controls in a cell, please add a singlle container control first (like a panel or div) and then add the multiple controls as childs of this container.

Also, to programmatically add controls to a TWebGridPanel, following code is recommended:


var
  wb: TWebButton;
  we: TWebEdit;
begin
  wb := TWebButton.Create(self);
  wb.Parent := WebGridpanel1;

  we := TWebEdit.Create(self);
  we.Parent := WebGridpanel1;
end;

which automatically places the created controls in consecutive grid cells.

Thank you very much.