Results 1 to 2 of 2

Thread: Who will help a frenchy about Richtextbox ?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    6

    Cool

    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.

  2. #2
    Fanatic Member
    Join Date
    Jan 1999
    Location
    UK
    Posts
    554
    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
  •  



Click Here to Expand Forum to Full Width