Results 1 to 6 of 6

Thread: How can I auto change font size on drag and drop to RTB

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    West Monroe, Louisiana
    Posts
    33
    Greetings

    I need a quick solution in correcting someone else's work.

    I have a form with two listboxes and a RTB. The font is size 8 and bold in listbox1. It's size 10 and Italic in listbox2. Unfortunatly, The RTB is auto-saved and printed as a report and there is no opportunity to make the text uniform beforehand. Needless to say, the RTB and the printed report looks like crap.

    I would like to be able to make the text automatically uniform when the drag is dropped into the RTB. At one point last night, I had it where it would correct before it saved, but even that doesn't work now.

    What I really want is to correct this when it GOES INTO the RTB so that it doesn't look so crappy on screen.

    Any help is appreciated.

    Wendy



    [Edited by Wendy Jackson on 09-12-2000 at 12:41 PM]

  2. #2
    Guest
    Your question is somewhat unclear.

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    West Monroe, Louisiana
    Posts
    33
    Sorry!

    I took another look at my post and couldn't understand it myself! I guess it has something to do with two hours sleep last night. <ha>

    I have a form with two listboxes and a RTB.

    Items from the two listboxes are dragged and dropped into the RTB to make a daily report. The file is then automatically saved and automatically printed and sent to upper management.


    The listboxes have different text attributes and both the on screen file and the printed report look like crap with one word number 8 bold and the next word number 10 italic.

    The whole process, except the drag and drop, is hard coded and there is no opportunity to make the text uniform before the file is auto-saved.

    I would like to be able to make the text automatically uniform when it is dropped into the RTB. In other words, I would like to change the text from both listboxes to size 10 regular when it is dropped.

    For security reasons, the file becomes read only once the text is dropped and you cannot change it thereafter. The text attributes therefore have to be changed WHEN the text is dropped.

    Specifically, I want to change the font size on text being dropped from listbox1 to size 10 and delete the "bold" attribute. On text being dropped from listbox2, I want to change from italic to regular type.

    This is an old and decrepit application. It should be destroyed, but management is married to it, it seems.

    Again, any help is appreciated.

    Wendy

  4. #4
    Guest
    Well, I'm not sure, there are a few options:
    • When I download source code, I only look at it, learn from it, and then write my own app.
    • You could change the font properties of the listboxes thenselves if it's not important.
    • If it is important: I'm not sure how your program works, but you can track when the item is dropped in the DragDrop event of the RTB.


    If you can supply some code it will be easier to help with this case.

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2000
    Location
    West Monroe, Louisiana
    Posts
    33
    ScOrp,

    Thanks a million!

    We've just got permission to rewrite the entire program.
    That was good news and this question is now mute.

    As far as learning from downloaded code, I normally use it to learn and not as a crutch, but sometimes I either don't have the time, or draw a blank on how to code it myself.

    I'm still very new at VB. I've learned quickly but that's gotten me in over my head several times. Actually, there's many very elementary things about VB that I don't know, simply because I haven't had the occasion to use and learn them. I appreciate you and others for being willing to help us newbies.

    When I post a question, I'm simply asking that anyone who readily knows the answer and wants to help might do so. I certainly don't expect anyone to do my work for me, or even to go to a lot of trouble to answer my post.

    I appoligize if I have taken advantage of you or this forum in any way. Please don't hesitate to tell me when I do.

    Thanks again!

    Wendy

  6. #6
    Guest
    I'm just glad the problem was solved.

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