Hi!
I've looked around a little on this form and haven't seen this problem. Here's the situation: I have a column in a grid with a style Button and a datatype bitmap. First problem is possibly more of a misunderstanding on my part, to properly display the bitmap I have to set the set both the ButtonAppearance.Image and the cell Value to the bitmap. Otherwise I only see the bitmap when I mouse over the button (without clicking on it). I have the CellActivation set to ActivateOnly.
The first problem is tolerable, since it has no effect on the user. The second problem is what's forced me to post. I set both the Value and the ButtonAppearance.Image to the desired bitmap value the the bitmap is displayed nicely. However, when I mouse over the cell/button (again without clicking on the cell) it left justifies the image. When I mouse out of the cell, it returns to center justification. Take a look at the attached image.
When I click on the button it leaves the image left justified until I move out of that cell. It's as if there's a separate Appearance object for the cell when it's activated. So far I've only found three places that could potentially control the justification:
Any ideas how I can fix this? Is there an appearance setting for an activated or highlighted (mouse-over) button/cell?
Thanks!
Craig
Hi Dave,
First thank you for the quick response. Yes, that was indeed the answer so I apologize for not finding it. However, I did my homework and searched forums and read documentation. In this vein it would have been very helpful if there was a reference from the columnStyle enumeration documentation:
http://help.infragistics.com/Help/NetAdvantage/WinForms/2012.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.ColumnStyle.html
to the ButtonDisplayStyle documentation you referenced. I understand the documentation is generated but adding an additional references in the "see also" section might have safed me two hours of grief. Perhaps your documentation system allows the doc writer to add additional references.
$0.02
Thanks again!
Hello Craig,
Thank you for contacting Infragistics.
When a column in the grid is set to display as a button, it normally only displays the button on mouse-over or when it's the active cell. You can change that by setting the ButtonDisplayStyle property of the column: http://help.infragistics.com/NetAdvantage/WinForms/2012.2/CLR4.0/?page=Infragistics4.Win.UltraWinGrid.v12.2~Infragistics.Win.UltraWinGrid.UltraGridColumn~ButtonDisplayStyle.html
If you set the ButtonDisplayStyle to Always, you should only need to adjust the cell's ButtonAppearance property, which can be done easily from the InitializeRow event.