From: David on 6 Apr 2010 13:41 I'm sure someone's already aware of this but looking for a workaround. When setting the column width in MSFlexgrid, if the grid does NOT have any data for whatever reason the column width will NOT resize. Even setting a large twip values directly appears Not to affect the column. However, once the first gird row and whatever column has data the column width (.ColWidth = ) appears to work. Any solutions for an empty grid?
From: GS on 6 Apr 2010 14:01 David laid this down on his screen : > I'm sure someone's already aware of this but looking for a workaround. > > When setting the column width in MSFlexgrid, if the grid does NOT have any > data for whatever reason the column width will NOT resize. > Even setting a large twip values directly appears Not to affect the column. > However, once the first gird row and whatever column has data the column > width (.ColWidth = ) appears to work. > > Any solutions for an empty grid? Try specifying the column index. For example, ColWidth(i) = n, where i is the column index. (Note that this control uses a zero based index) HTH -- Garry
From: David on 6 Apr 2010 14:11 GS: I'm sorry didn't annotate the index in my example. VB5 does NOT work with an empty grid. ..ColWidth(1) = 5000 'no effect ..ColWidth(1) = lblHidden.Width 'no effect (here attempt to use Label twips) ..ColWidht(1) = TextWidth("This is a test") 'no effect "GS" <GS(a)discussions.microsoft.com> wrote in message news:O%23Y9nMb1KHA.2028(a)TK2MSFTNGP05.phx.gbl... > David laid this down on his screen : >> I'm sure someone's already aware of this but looking for a workaround. >> >> When setting the column width in MSFlexgrid, if the grid does NOT have >> any data for whatever reason the column width will NOT resize. >> Even setting a large twip values directly appears Not to affect the >> column. However, once the first gird row and whatever column has data the >> column width (.ColWidth = ) appears to work. >> >> Any solutions for an empty grid? > > Try specifying the column index. For example, ColWidth(i) = n, where i is > the column index. (Note that this control uses a zero based index) > > HTH > -- > > Garry > >
From: GS on 6 Apr 2010 14:37 David laid this down on his screen : > GS: > > I'm sorry didn't annotate the index in my example. > VB5 does NOT work with an empty grid. > > .ColWidth(1) = 5000 'no effect > .ColWidth(1) = lblHidden.Width 'no effect (here attempt to use > Label twips) > .ColWidht(1) = TextWidth("This is a test") 'no effect > > > "GS" <GS(a)discussions.microsoft.com> wrote in message > news:O%23Y9nMb1KHA.2028(a)TK2MSFTNGP05.phx.gbl... >> David laid this down on his screen : >>> I'm sure someone's already aware of this but looking for a workaround. >>> >>> When setting the column width in MSFlexgrid, if the grid does NOT have any >>> data for whatever reason the column width will NOT resize. >>> Even setting a large twip values directly appears Not to affect the >>> column. However, once the first gird row and whatever column has data the >>> column width (.ColWidth = ) appears to work. >>> >>> Any solutions for an empty grid? >> >> Try specifying the column index. For example, ColWidth(i) = n, where i is >> the column index. (Note that this control uses a zero based index) >> >> HTH >> -- >> >> Garry >> >> Ah.., you didn't specify version and so I assumed; my bad! I'm using VB6 and the Flexgrid6.0(SP6) control (MSFlxGrd.ocx). In your case, could you not "trick" it by using an empty string or padding with a given number of spaces which you could store in a constant solely for this purpose? -Obviously, your app will have to check for this when processing values. -- Garry
From: David on 6 Apr 2010 16:07 GS: What you propose might work Could dummy the first row when Grid is blank and then overlay those values. Seems odd no provisions made for this. "GS" <GS(a)discussions.microsoft.com> wrote in message news:%23bqU5gb1KHA.220(a)TK2MSFTNGP06.phx.gbl... > David laid this down on his screen : >> GS: >> >> I'm sorry didn't annotate the index in my example. >> VB5 does NOT work with an empty grid. >> >> .ColWidth(1) = 5000 'no effect >> .ColWidth(1) = lblHidden.Width 'no effect (here attempt to use >> Label twips) >> .ColWidht(1) = TextWidth("This is a test") 'no effect >> >> >> "GS" <GS(a)discussions.microsoft.com> wrote in message >> news:O%23Y9nMb1KHA.2028(a)TK2MSFTNGP05.phx.gbl... >>> David laid this down on his screen : >>>> I'm sure someone's already aware of this but looking for a workaround. >>>> >>>> When setting the column width in MSFlexgrid, if the grid does NOT have >>>> any data for whatever reason the column width will NOT resize. >>>> Even setting a large twip values directly appears Not to affect the >>>> column. However, once the first gird row and whatever column has data >>>> the column width (.ColWidth = ) appears to work. >>>> >>>> Any solutions for an empty grid? >>> >>> Try specifying the column index. For example, ColWidth(i) = n, where i >>> is the column index. (Note that this control uses a zero based index) >>> >>> HTH >>> -- >>> >>> Garry >>> >>> > > Ah.., you didn't specify version and so I assumed; my bad! I'm using VB6 > and the Flexgrid6.0(SP6) control (MSFlxGrd.ocx). > > In your case, could you not "trick" it by using an empty string or padding > with a given number of spaces which you could store in a constant solely > for this purpose? -Obviously, your app will have to check for this when > processing values. > -- > > Garry > >
|
Pages: 1 Prev: Old Visual studio installer Next: ADO Recordset and Connection Issues in VB6 |