|
-
Aug 2nd, 2000, 06:09 AM
#1
Thread Starter
New Member
Hi,
In the project that I do, I have to enable the user to
move the richtextbox that he created.
So I put the event "text.move" on mouse move but it just moves a shape and the richtextbox still sticks on the form.
And about resizing it, in fact I would like that when the user adds some text in the richtextbox, the box be automatically resized with the right height and width to display all the words.
Thanks for your answer.
-
Aug 2nd, 2000, 08:02 PM
#2
Fanatic Member
Here is a very simple sample, the placement needs fine tuning, the sample does not compensate for the mousepointers position (distance of mousepointer WITHIN the textbox from top left of textbox itself)
I'm sure you'll manage
Drop a RICHTEXT control on a blank form and name it rtfText1
Set its DRAGMODE property to AUTO
Now add a LABEL control and set its VISBLE property to FALSE
Code:
Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
On Error Resume Next
rtfText1.Left = X - (rtfText1.Width / 2)
rtfText1.Top = Y - (rtfText1.Height / 2)
End Sub
DocZaf
{;->
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|