View previous topic :: View next topic |
Author |
Message |
rnemchev
Joined: 26 Apr 2010 Posts: 12
|
Posted: Mon Apr 26, 2010 9:36 am Post subject: Customize drawing of drop hints |
|
|
I like your drop hints but I have special UI design requirements in my project so it will be cool if I could draw drop hints myself. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Apr 26, 2010 10:27 pm Post subject: |
|
|
You can draw the drag and drop indicators yourself. To do this you need to create a custom RowWidget and override the PaintDropOnIndicator method (or other PaintDropXXIndicator method). Below is the default code for the PaintDropOnIndicator method:
Code: | protected virtual void PaintDropOnIndicator(Graphics graphics)
{
if (_dropOnIcon == null)
{
_dropOnIcon = Resources.DropOnIcon;
}
int y = Bounds.Y + (Bounds.Height - _dropOnIcon.Height) / 2;
Rectangle bounds = new Rectangle(DropIndicatorX, y, _dropOnIcon.Width, _dropOnIcon.Height);
bounds = DrawingUtilities.RtlTranslateRect(WidgetControl, bounds);
DrawingUtilities.DrawIcon(graphics, _dropOnIcon, bounds.X, bounds.Y, false, WidgetControl.RightToLeft == RightToLeft.Yes);
} |
See the "Using Widgets" section in the help for more detail on how to create a custom RowWidget. _________________ Infralution Support |
|
Back to top |
|
|
rnemchev
Joined: 26 Apr 2010 Posts: 12
|
Posted: Tue Apr 27, 2010 8:04 am Post subject: Customize drawing of drop hints |
|
|
Thank you! You helped me a lot! |
|
Back to top |
|
|
|