Drag and Drop richtextbox update…

01 Jan

I almost forgot to mention a little couple details for the previous post…

First off – got an email from Jason who asked about why the code doesn’t work for him.  I took a look at his code implementation and what he’s missing is something I drop in my form load area.  By setting RichTextBox1.AllowDrop to TRUE (in the form load) when the form is loaded and the richtext box control is created, it allows drag and drop operations.  Now I know – I know – by default the richtextbox control is supposed to have the drag and drop automatically set to allow it. 

Now, oddly enough – in my research I’ve found that not all properties dialogs out there (VS2005) for the richtextbox control have the property to set for this in the properties dialog.  I have confirmed – that you can set this in the code as showen below in 2005.  I’m still trying to find out if this is with all richtextbox controls – or if a 3rd party addon or control is what is causing the issue. 

In any case – you can set it programmatically which is what I’ve always done which is why I’m at a bit of a loss as to what the cause of this problem is.  Jason’s confirmed that setting this programmatically worked for him.

Public Class Form1
    Private Sub Form1_Load(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load
        ‘This call is required by the Windows Form Designer.
RichTextBox1.AllowDrop =True
    End Sub

In my rush to send that out this morning I probably should have discussed – or commented the code a bit better.  By default

Leave a comment

Posted by on January 1, 2009 in Design, Development, Work


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: