Community discussion forum

Rich Text Box Controls

This is a comment thread discussing Rich Text Box Controls
  • 9 years ago

    This thread is for discussions of Rich Text Box Controls.

  • Advertisement

    Simply the fastest line-level profiler for .NET ever

    “The low overhead means it has minimal impact on the execution of my program”
    Mark Everest, Development Team Leader, Renault F1 Team Ltd.

    Try out the new ANTS Profiler 4 for yourself. Download your 14-day trial now

  • 6 years ago

    Can you help me out in printing the formated text in richtextbox.

  • 6 years ago

    Private Sub mnuPrintItem_Click()
       'Prints the current document using the device
       'handle of the current printer
       RichTextBox1.SelPrint (Printer.hDC)
    End Sub

  • 6 years ago

    Let me try the option u have mentioned , but will it work with vb.net need to be checked.


    There is no option of
    Richtextbox1.selprint(Printer.hdc) in vb.net that is only in VB6.


    Thanks

  • 6 years ago

    one thing you forgot - How do you toggle line wrapping on and off?!


    hee hee thanks

  • 6 years ago

    Hi!,
    Could you tell me how to display the text in Justified manner in a RT Box?
    I've tried just about everything (other than writing a new control )
    Tx and Regards

  • 6 years ago

    When printing Rich Textbox text it seems to disregard the Current X/Y command.  What gives>

  • 6 years ago

    By justify im assuming you meen Right, Left and Center. You need to use the


    Code:
    object.SelAlignment


    and one of the following;



    1. vbLeftJustify
    2. vbRightJustify
    3. vbCenter



    for example;


    RichTextBox1.SelAlignment = vbCenter


    or


    RichTextBox1.SelAlignment = vbLeftJustify


    Hope thats some help;


    Luke


  • 6 years ago

    What I want is to present the text in a justified manner.
    Not left, right or center.


    Justified as in MS Word. ie, both left and right ends are aligned.

  • 6 years ago

    VB has no bulit in functions or constants for what you want, im not gonna be much help here sorry!


  • 6 years ago

    Thanks for taking the trouble to reply, man.
    Thanks a lot!
    Now, where can I find the soln for this?

    Quote:
    [1]Posted by phracker76 on 18 May 2002 07:38 PM[/1]
    VB has no bulit in functions or constants for what you want, im not gonna be much help here sorry!





  • 6 years ago

    Hello KillerSheep,


    Is this what you're looking for:


    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    Option Explicit


    Public Const WMUSER = &H400
    Private Const EM
    SETTARGETDEVICE = (WM_USER + 72)


    Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal LParam As Long) As Long


    Public Enum ViewModes
       Default = 0
       WordWrap = 1
       WYSIWYG = 2
    End Enum


    Const EMFORMATRANGE As Long = WMUSER + 57


    '** Set View Mode
    Public Sub SetViewMode(ByVal ViewMode As ViewModes)
       Select Case ViewMode 'Set View Mode
           Case 0 'No Wrap
               SendMessageLong rtfText.hWnd, EMSETTARGETDEVICE, 0, 1
           Case 1 'Word Wrap
               SendMessageLong rtfText.hWnd, EM
    SETTARGETDEVICE, 0, 0
           Case 2 'WYSIWYG
               On Error Resume Next
               SendMessageLong rtfText.hWnd, EM_SETTARGETDEVICE, Printer.hdc, Printer.Width
      End Select
    End Sub


    '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@


    By

  • 6 years ago

    K, first off. Right away you mension:


    Object.Save (FilePath, FileType)


    WHAT FILETYPES? Can it save in RTF, Text, and what are the corresponding numbers?????????????


    Secondly, I am sure that in EVERY rich text editor I have ever used, you can set different indents for different paragraphs. Yet you do not mension how to align a paragraph... "is just like setting the alignment for a whole textbox."


    Aside from that it was pretty good, but can't you also do Horizontal Rules in Rich Text? I know no-one normally does, but if ya can . . .


    Thanks for the info though, I was always confused about the select stuff.

  • 6 years ago

    Have you tried the Multiline property?

  • 6 years ago

    Hi,


    i am working with richtextbox quite a lot of time, but i am still wondering how can i input a picture in it. Also i have the point that i ignore  some of his opportunities. So i would be glad if you could write something about them. Thank you on advance

  • 6 years ago

    how ca i possiblly pasted any copied cell from .xls

  • 6 years ago

    Actually in the subscribe fo not use * because * 0 is 0 and will not have any effect. It is better to use +200 (approximetly) to have the result you want...

  • 6 years ago

    0 = rtf
    1 = text

  • 6 years ago

    I use the rich text box and insert in it the mschart object, but i can not refer to mschart property and metods with OLEOBJECTS.
    help me pleas, help.

  • 6 years ago

    How can a Rich Text control justify completely a paragraph?

  • 6 years ago

    There are in the world some control that let me justify the text like word?


    (I know that this cannot).

  • 6 years ago

    Hi,


    I am having problems in sending selected text to a rich text box control without selecting the text at runtime e.g. at runtime the rich text box contains the text "Selection" and when a command button is pressed the following text in BOLD is appended to the current text "IS EASY"


    Selection IS EASY

  • 5 years ago

    How to make subscripts and superscripts in DHTML editor using c#?

  • 5 years ago

    Bulleted indenting is fine.
    But how to get number indentation?
    Is there any way?
    thank you

  • 5 years ago

    Try the following code as work around:


    ' flag the section with bullet mark
    rtfSectionText.SelBullet = True


    ' replace bullet with numbers
    rtfSectionText.SelRTF = Replace(rtfSectionText.SelRTF, "\pnlvlblt", "\pndec", 1, -1, vbTextCompare)


    I found som rtf documentation on the Microsoft site:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnrtfspec/html/rtfspec_16.asp


    Hope it helps

  • 3 years ago

    I am wondering if thier is a way to save and load text formatting using VB6, for example fonts, text colors etc. Does anybody know any easy ways round it???

  • 3 years ago

    how to chane the bullet intend as arrow

  • 3 years ago

    how to get arrow intendation

  • 3 years ago

    hi redstar...


    m also facing same problem.. do u got any solution?


    with regards,


    kailas

Post a reply

Enter your message below

Sign in or Join us (it's free).