Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Problem setting header column width

I am having an issue setting the width on an SRP EditTable. I want a smaller width than the default, but setting such a value is actually making it wider. I have attached screen shots showing the default and the results of the following code:

hCol = 15:@FM:True$:@FM:True$:@FM:True$
x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.HeaderColumn[1]", hCol)

I am doing something wrong or is this a bug? Thanks.

Comments

  • You are setting field <4> to True, which ignores the width you set and auto sizes the column to fill up available space.
  • Thanks Kevin. I should have figured that out.

    On a related note, I am also having an issue with the widths for the DataColumn properties. I have 7 columns, all but one are autosized. The total specified length is now less than the width of the OLE control. Changing the widths of the columns is not being reflected on the table. Any thoughts?
  • Hard to say without seeing code.
  • Col1 = 22:@FM:True$:@FM:False$:@FM:False$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[1]", Col1)

    Col2 = 60:@FM:True$:@FM:True$:@FM:True$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[2]", Col2)

    *Col3 = 100:@FM:True$:@FM:True$:@FM:True$:@FM:0
    Col3 = 40:@FM:True$:@FM:True$:@FM:True$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[3]", Col3)

    Col4 = 50:@FM:True$:@FM:True$:@FM:True$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[4]", Col4)

    Col5 = 40:@FM:True$:@FM:True$:@FM:True$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[5]", Col5)

    Col6 = 20:@FM:True$:@FM:True$:@FM:True$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[6]", Col6)

    Col7 = 30:@FM:True$:@FM:True$:@FM:True$:@FM:0
    x = Set_Property(@Window:".OLE_PALLET_RPT", "OLE.DataColumn[7]", Col7)
  • Looks like you are autos sizing all but the first column.
Sign In or Register to comment.