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.
Pages: 1
Topic closed
Hello Jing,
Is there way to change the celldropdown button? I think maybe onpaint you can change it. I would have to make my own control and change the onpaint for the dropdown button. or can just change the color and make it flat?
Shane
Offline
Hi Shane, you can overwrite the OnPaintDropdownButton method to draw your custom drop-down button, here is an example:
C#:
class MyDropdownListCell : DropdownListCell
{
protected override void OnPaintDropdownButton(CellDrawingContext dc, unvell.ReoGrid.Graphics.Rectangle buttonRect)
{
dc.Graphics.DrawRectangle(Pens.Black, buttonRect);
}
}
VB.NET:
Class MyDropdownListCell
Inherits unvell.ReoGrid.CellTypes.DropdownListCell
Sub New()
MyBase.New()
End Sub
Protected Overrides Sub OnPaintDropdownButton(dc As CellDrawingContext, buttonRect As Rectangle)
dc.Graphics.DrawRectangle(Pens.Black, buttonRect)
End Sub
End Class
Last edited by Jingwood (2016-03-14 14:48:23)
Offline
Hello Jing,
Thank you.. I will try that..
Shane
Offline
Pages: 1
Topic closed