Home - Forums-.NET - FlyGrid.Net (Windows Forms) - display bug for button column' s image

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

display bug for button column' s image
Link Posted: 19-Feb-2006 22:42
Hi,
With the latest version of the grid the image of my button column does not look right anymore !

See screenshot:
http://graphicsxp.free.fr/flygrid.JPG

It seems to be shrunk and there's a grey background.

it used to look like that:
http://graphicsxp.free.fr/flygrid2.JPG


Either there's a bug in the grid, or there's a new way to apply image to a button and I'm not aware of it.
Can you help?
Link Posted: 19-Feb-2006 23:48

Either there's a bug in the grid, or there's a new way to apply image to a button and I'm not aware of it.


Yes, today update has some corrections in the ButtonColumn to scale displayed images, when their's size is bigger than displaying rectangle.
Gray rectangle around image means that button is disabled.
We'll try to fix this inccorrectness ASAP.
Can you provide us a sample to make fixes more quickly?
Link Posted: 19-Feb-2006 23:54
Well, I don't do anything exotic, just what I used to do before and it was working fine so far:

In PrepareColumns I add:

        
Dim but As New myButtonCol
        With but
            .ImageList = imgMore
            .ButtonImageIndex = 0
            .AllowSorting = False
            .Width = 16
            .AllowSizing = False
        End With
        dgQueries.Columns.Items.Add(but)
        dgQueries.Columns.Items(2).ShowTooltips = False
        ConnectToButtonColumn(dgQueries, 2)


And ConnectToButtonColumn is:

Private Sub ConnectToButtonColumn(ByVal flygrid As FlyGrid, ByVal indexOfButtonColumn As Integer)
        Dim bc As myButtonCol = DirectCast(FlyGrid.Columns.Items(indexOfButtonColumn), myButtonCol)
       MoreOption(dgFields, m_dsFields.Tables(0))
End Sub
Link Posted: 01-Mar-2006 00:06
I've downloaded new grid.

The image in my column is blurred. So is the image of the * in the new row header. It's ugly, how can I fix that (it used to look fine in prior versions)
Link Posted: 05-Mar-2006 22:19
please take a look at this screenshot for getting a better idea of the problem described:
http://graphicsxp.free.fr/blurgrid.JPG

this is blurred, isn't it
Link Posted: 07-Mar-2006 16:11
Yes. This problem is solved.
But... It will be better if you'll use images in the Buttoncolumn with transparent background, background is used by column to reflect Enabled/Disabled state.
To make bitmap with transparent background, try to use following code:
[c#]
private void MakeBitmapTransparent(Bitmap bmp)
{
   bmp.MakeTransparent();
}