Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Customize drawing of drop hints

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Feature Requests
View previous topic :: View next topic  
Author Message
rnemchev



Joined: 26 Apr 2010
Posts: 12

PostPosted: Mon Apr 26, 2010 9:36 am    Post subject: Customize drawing of drop hints Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Mon Apr 26, 2010 10:27 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
rnemchev



Joined: 26 Apr 2010
Posts: 12

PostPosted: Tue Apr 27, 2010 8:04 am    Post subject: Customize drawing of drop hints Reply with quote

Thank you! You helped me a lot!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group