Thread: WordWrap

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    113
    Rep Power
    11

    WordWrap


    hi all, anyone can tell me the best way using wordwrap under main menu items? should I set maximum string per line or what? I need your help.
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4247
    Don't think you can word-wrap anything on the stock TMainMenu component. You might need to write your own component to do this.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    113
    Rep Power
    11
    hi dude, thank u for your reply.

    sorry for my weak eng., I didnt mean to word-wrap main menu items, I want to use a wordwrap function just like as in ms word. It will be a menu item, but once its checked, it will wrap words in richtextbox1. Hope U got me this time.
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,643
    Rep Power
    4247
    Ok, I added a MenuItem to the main menu and called it WordWrap1. Then I added an OnClick handler to it like this:
    Code:
    procedure TForm1.WordWrap1Click(Sender: TObject);
    begin
    	if WordWrap1.Checked = false then
    	begin
    		WordWrap1.Checked := True;
    		RichEdit1.WordWrap := True;
    	end
    	else begin
    		WordWrap1.Checked := False;
    		RichEdit1.WordWrap := False;
    	end;
    end;
    Hope this helps
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    113
    Rep Power
    11
    Yeah, thanks a lot, that helped me.

IMN logo majestic logo threadwatch logo seochat tools logo