You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Hello Jing,
I ask you this question before and I have not got chance add to my project until today. I was looking at the sample code you gave me in Post #118 and the code does not work because some of the methods are not in control.
Error Message are:
'ButtonState' is not a member of 'unvell.ReoGrid.CellTypes.RadioButtonCell'.
'DrawImageUnscaled' is not a member of 'unvell.ReoGrid.Graphics.IGraphics'.
Imports unvell.ReoGrid
Imports unvell.ReoGrid.Rendering
Imports unvell.ReoGrid.CellTypes
Class ImageRadioButtonCell
Inherits RadioButtonCell
Public Overrides Sub OnPaint(dc As CellDrawingContext)
If MyBase.ButtonState = Windows.Forms.ButtonState.Checked Then
dc.Graphics.DrawImageUnscaled(My.Resources.RadioButton_NoBG_Selected, MyBase.Bounds.Location)
Else
dc.Graphics.DrawImageUnscaled(My.Resources.RadioButton_NoBG_Unselected, MyBase.Bounds.Location)
End If
End Sub
End Class
Shane
Last edited by asparatu (2016-03-16 06:05:57)
Offline
The RadioButtonCell class has been changed in latest version, try use the below code.
VB.NET:
Class ImageRadioButtonCell
Inherits unvell.ReoGrid.CellTypes.RadioButtonCell
Protected Overrides Sub OnContentPaint(dc As CellDrawingContext)
If MyBase.IsChecked Then
dc.Graphics.DrawImage(My.Resources.RadioButton_NoBG_Selected, MyBase.ContentBounds)
Else
dc.Graphics.DrawImage(My.Resources.RadioButton_NoBG_Unselected, MyBase.ContentBounds)
End If
End Sub
End Class
Last edited by Jingwood (2016-03-16 15:03:23)
Offline
Hello Jing,
Thank you, i will try that
Shane
Offline