Board index » cppbuilder » hiding a cell hiding its lines....

hiding a cell hiding its lines....

Hi,

In a TStringGrid object it is possible to hide a column by seting the ColWidths property to 0, but the lines around the rectangle are still there, how can I hide them?

I tried to use
StringGrid->Canvas->Pen->Style = psClear
but does nothing, the lines are still there making a thick
line along the grid as two consecutive columns are being hidden.

Antonio.

 

Re:hiding a cell hiding its lines....


Sorry if i'm mistaken but i think that the answer lies in an article
on Damon Chandler's incredible beautifull site:
http://bcbcaq.com

Hans.

Quote
Antonio Masse wrote:

> In a TStringGrid object it is possible to hide a column by seting the ColWidths property to 0, but the lines around the rectangle are still there, how can I hide them?

> I tried to use
> StringGrid->Canvas->Pen->Style = psClear
> but does nothing, the lines are still there making a thick
> line along the grid as two consecutive columns are being hidden.

Re:hiding a cell hiding its lines....


Quote
Hans Galema <j.m.gal...@maartens.nl> wrote in message <news:3C135E11.4AC503B1@maartens.nl>...
> Sorry if i'm mistaken but i think that the answer lies in an article
> on Damon Chandler's incredible beautifull site:
> http://bcbcaq.com

> Hans.

> Antonio Masse wrote:

> > In a TStringGrid object it is possible to hide a column by seting the ColWidths property to 0, but the lines around the rectangle are still there, how can I hide them?

> > I tried to use
> > StringGrid->Canvas->Pen->Style = psClear
> > but does nothing, the lines are still there making a thick
> > line along the grid as two consecutive columns are being hidden.

Hello Antonio,

The easy way is to set the width of the column to -1 and not to 0!!
That makes sure the ugly lines do not appear!!

eg.

    StringGrid1->ColWidths[2] = -1;

Good Luck!

Sriram

Re:hiding a cell hiding its lines....


Hans, do you remember a little bit about the title, I haven't
been successfull in finding it. Thanks,

Antonio.

Quote
Hans Galema <j.m.gal...@maartens.nl> wrote:
>Sorry if i'm mistaken but i think that the answer lies in an article
>on Damon Chandler's incredible beautifull site:
>http://bcbcaq.com

>Hans.

>Antonio Masse wrote:

>> In a TStringGrid object it is possible to hide a column by seting the ColWidths property to 0, but the lines around the rectangle are still there, how can I hide them?

>> I tried to use
>> StringGrid->Canvas->Pen->Style = psClear
>> but does nothing, the lines are still there making a thick
>> line along the grid as two consecutive columns are being hidden.

Other Threads