Odd behavior of the Rich Text Box

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Les (vb4_at_prodigy.net)
Date: 11/22/04

  • Next message: Filip Wtterwulghe: "send windows message from Application to VB6 ActiveX UserControls that are a IE webPage ."
    Date: Mon, 22 Nov 2004 01:16:56 -0500
    
    

    Hi Mike,

    How do you like that!! Nice work, never thought about it. Hey BTW do you or
    anyone out here familiar with a problem I am having with tis Rich Text Box.
    Let me try to describe my problem using several scenarios to clarify things.
    This app has a Rich Text Box (multiline= true, scrollbars=both) with rows of
    info in it. Also on the form is a regular text1 box with
    scrollbars=horizontal, multiline=true and then one other text2 box with
    scrollbars=horizontal, multiline=false.

    SCENARIO 1:

    RTB multiline=true and scrollbars=both
    text1 scrollbars=horizontal, multiline=true
    text2 scrollbars=horizontal, multiline=false

    The above scenario works fine.

    SCENARIO 2:

    RTB multiline=true and scrollbars=both
    text1 scrollbars=horizontal, multiline=true
    text2 scrollbars=horizontal, multiline=true

    When I right click the mouse and copy a line of selected text from RTB and
    try to right click the mouse to paste it in text2 the text does not appear
    but if I right click the mouse and copy a line of selected text from text1
    and try to right click the mouse to paste it in text2 it works great.

    For some reason grabbing text from the rich text box and trying to paste it
    in the text2 box while multiline=true doesnt work (you can see it get pasted
    in the box for a microsecond but then disappears) where as given the same
    conditions but setting multiline to false does what it is suppose to do.
    There seems to be a problem when going from a Rich text box and pasting to a
    text box if the text box has scroll=horizontal. Also in order for the
    Horizontal scroll bar to show you must have multiline=true.

    Any thoughts please help???

    Thanks
    The above scenario works fine.

    If I right click my mouse on a selected row in my RTB and copy it and right
    click my mouse to paste it in the regular text box is where my problem
    starts.
    2 scenarios:

    If my regular text box has horizontal scroll bar on and multiline on the
    text is unable to be pasted in the box, but if I take off the horizontal
    scroll bar and set multiline to false then it appears in the box!!!! I dont
    recall seeing this ever before but let me turn it to the experts for their
    thoughts. Or maybe it is just late and my brain is not functioning <S>

    Good Luck,

    Les

    "MikeD" <nobody@nowhere.edu> wrote in message
    news:uUM5RyB0EHA.3688@TK2MSFTNGP10.phx.gbl...
    >
    > "Les" <vb4@prodigy.net> wrote in message
    > news:O6KFOWB0EHA.3244@TK2MSFTNGP10.phx.gbl...
    > > I have just added a rich text box to my application and to my surprise
    > when
    > > I have information in the box I am not able to select the text I want
    and
    > > right click the mouse button to have the copy command come up?? Any
    > thoughts
    > > as to what I am doing wrong? It works fine with a text box!
    >
    >
    > Is the RTB's AutoVerbMenu property set to True? The default for this
    > property is False, which means there's no context menu.
    >
    > Mike
    >
    >
    >


  • Next message: Filip Wtterwulghe: "send windows message from Application to VB6 ActiveX UserControls that are a IE webPage ."
  • Quantcast