Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 9 of 9 total
Thread TGrid Clone
Thu, Mar 23 2017 3:44 AMPermanent Link

Uli Becker

I want to use a custom control derived from TGrid in my applications in
order to use different interfaces.
No idea how to do that. While a TButton clone e.g. is simple to create
since it uses just one interface it's completely different with TGrid.

Has anyone done that before?

Thanks Uli
Thu, Mar 23 2017 4:46 AMPermanent Link

Matthew Jones

Uli Becker wrote:

> Has anyone done that before?

I've cloned some of the more complex ones. It is just a matter of copying the file, removing things not relevant (harder than it seems), and renaming anything else that you want to keep. Some things you can keep standard (scroll bar for example).

One of the things I cloned has more in it than I really need, and could be tidied, but I don't want to break things I don't understand so I ignore that part of it...
Thu, Mar 23 2017 11:04 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< I want to use a custom control derived from TGrid in my applications in order to use different interfaces.
No idea how to do that. >>

You probably don't want to create a new control for that type of usage.  You simply want to give it a different look and not change its behavior, correct ?  If so, then just copy/customize the control interfaces for the grid (TGrid*.wbi).

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Mar 23 2017 11:06 AMPermanent Link

Uli Becker

Matthew,

> It is just a matter of copying the file, removing things not relevant (harder than it seems), and renaming ...

Thanks. That's what I was afraid of.

Uli
Thu, Mar 23 2017 11:08 AMPermanent Link

Uli Becker

Tim,

> You probably don't want to create a new control for that type of usage.  You simply want to give it a different look and not change its behavior, correct ?  If so, then just copy/customize the control interfaces for the grid (TGrid*.wbi).

I know, but I would need two different grids in the same application.

Uli
Thu, Mar 23 2017 2:06 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< I know, but I would need two different grids in the same application. >>

Yeah, that's going to be a lot tougher. EWB has serious OCD and doesn't like it when you try to use two different styles in the same application. Wink

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Mar 23 2017 5:55 PMPermanent Link

Uli Becker

Tim,

> Yeah, that's going to be a lot tougher. EWB has serious OCD and doesn't like it when you try to use two different styles in the same application. Wink

I had to google for "serious OCD" Smile

Anyway it would help a lot if a Grid's cell background and/or borders
would be editable. At the moment there are two interfaces for cells with
and without lines.

What I'm trying generally is to use a TGrid like a table in HTML. With
the new ControlType there are many new possibilities and together with a
kind of cell margins/borders many nice things could be done.

Uli
Fri, Mar 24 2017 3:08 AMPermanent Link

Uli Becker

Correction: forget about the cell's background. That's not a problem
because it can be set by using an event or generally the Grid's
background.Fill.Color.

What I mean is an editable line color/width and/or a border (a kind of
cellpadding in html).

Thanks Uli
Fri, Mar 24 2017 7:54 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< I had to google for "serious OCD" Smile>>

Sorry, your English is so good that I often forget that I'm not conversing with an American. Smile

<< Anyway it would help a lot if a Grid's cell background and/or borders would be editable. At the moment there are two interfaces for cells with and without lines. >>

Yeah, I've beent thinking about cutting that down to one and just surfacing the borders as a configurable property.  I'll have to look into why I did it that way and if it was "just because", then I'll see what I can do.

Tim Young
Elevate Software
www.elevatesoft.com
Image