Home - Forums-.NET - FlyGrid.Net (Windows Forms) - Default Stylist

FlyGrid.Net (Windows Forms)

.NET Datagrid - Fast, highly customizable, industry standards .NET data grid control for WinForms

This forum related to following products: FlyGrid.Net

Default Stylist
Link Posted: 28-Aug-2007 00:30
I saw the gradient stylist. It's quite a lot of code.
Could you provide a default stylist that makes the grid look the same as a grid without a stylist? In this way, I can override this Stylist and change the things I want, without having to implement a lot of methods.

What I want to achieve is to paint the selected/current row (node) with a bigger font and to make the row itself higher.
What would be even cooler is to make the row above and beneath it a little bit bigger than the rest but not as big as the current one.
I would like to mimic the look of the newest i Phone, scrolling through contacts.
Can you help me?
Link Posted: 28-Aug-2007 07:09
With Stylist you can override only required parts of FlyGrid drawing.
So basically, you should open the GradientStylist code, and find the
internal bool Draw(StylistDrawInfo sdi, bool test) implementation.

As you can see it contains the switch statement, which defines what parts of FlyGrid should have custom drawing implementation.

So you can just comment out not required case statements, and modify required.
Link Posted: 29-Aug-2007 10:58
I fiddled around with the stylist and got an idea about how it works.
However, I did not find an option to draw the cell contents myself and use a custom font size.
Is DrawCell the method I should be looking at? Do you have any further suggestions?
Link Posted: 29-Aug-2007 22:03
Yes, DrawCell is what you need.
Actually what you're going to implement (I mean mimic iPhone grid) and make selected row higher (like zoom effect) is not a simple task.
iPhone uses some animation to zoom in/out to selected row so it does not look to jitter when you select some row.