Hello,
I have a png file like in the image below and the the circle becomes misshaping (?!) as you can see.
How can i avoid it?

Regards
Hello,
I have a png file like in the image below and the the circle becomes misshaping (?!) as you can see.
How can i avoid it?

Regards
Hi @youki,
In order to find out the cause more quickly and accurately, please provide the relevant code to reproduce the problem.
Best Regards,
Daniel Zhang
Hello,
please don't be surprised that i needed a while. I'm still working on it (a lot of things to do in the app). Or maybe it's because there is no border around the circles?
It's the default windows forms gridview and i just use the selectionChanged event.
Loading:
var list = XML.GetWhatever();
for (int i = 0; i < list.Count; i++)
{
if (list[i].Name == "Test")
{
var green = new Bitmap(Properties.Resources.led_green);
green.Tag = "green";
gvContent.Rows.Add(green, "Text1", list[i].Description);
}
else
{
var red = new Bitmap(Properties.Resources.led_red);
red.Tag = "red";
gvContent.Rows.Add(red, list[i].Name, list[i].Description);
}
}
SelectionChanged
var dgv = sender as DataGridView;
var imageCell = dgv.CurrentRow.Cells[0] as DataGridViewImageCell;
var image = imageCell.Value as Bitmap;
if (image.Tag.ToString() == "green")
{
lblStatusDescription.Text = "Aktiviert";
}
else
{
lblStatusDescription.Text = "Deaktiviert";
}
Regards
Hi @youki,
Have you tried to set the ImageLayout of your picture column to Stretch?
And please provide your "led_green" png file to made a test.
Best Regards,
Daniel Zhang
11 people are following this question.