CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2008
    Posts
    20

    Changing the position of underline

    Is there any way through which I can change the position of underline? I want to move it below the default position where it appears by using .SelUnderline.

  2. #2
    Join Date
    Feb 2002
    Location
    Makati City, Philippines
    Posts
    1,054

    Re: Changing the position of underline

    Quote Originally Posted by mawan24 View Post
    Is there any way through which I can change the position of underline? I want to move it below the default position where it appears by using .SelUnderline.
    I believe you need to explain further (Underline of what particular control? position relative to what?). A screen shot may help a lot.
    Marketing our skills - please participate in the survey and share your insights
    -

  3. #3
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,901

    Re: Changing the position of underline

    The difficulty of doing this will depend on which control you want to do it with

    Is it a Text Box ? A RTF Document file ?

    Best explain in detail, as suggested what you are REALLY trying to do

    I would approach the problem simply by forgetting about the ACTUAL underline facility, and simply use the LINE DRAWING capability in VB

    The actual width you want to underline (say its a couple of words) can be easily calculated by moving the words to an invisible label (of the same font) and checking the Label.Width property to give you the width of the words you want to DRAW under
    Last edited by George1111; January 3rd, 2009 at 09:09 AM.

  4. #4
    Join Date
    Dec 2008
    Posts
    20

    Re: Changing the position of underline

    I am using rtf control for regional language. When i underline, the underline passes through some of the letters. I want to move it a little bit downward so that it does not pass through words.

  5. #5
    Join Date
    Aug 2003
    Location
    Sydney, Australia
    Posts
    1,901

    Re: Changing the position of underline

    Post some screen shots - the answer may be simply to use a different font

    These days, I almost never see the underline character anywhere except when an Internet link is specified

    If you look above you will see the links above the words "REPLY to THREAD"

    notice how the underline cuts through the letters in "Changing the position of underline"

    Becomes "Changing the position of underline" so the "g" and the 'p' are chopped off - is this what you mean ??

  6. #6
    Join Date
    Dec 2008
    Posts
    20

    Re: Changing the position of underline

    Yeah, thats what i meant. i want to position underline below so that it do not cut through g and y

  7. #7
    Join Date
    Aug 2005
    Location
    Imperial College London, England
    Posts
    490

    Re: Changing the position of underline

    Then you're going against couple of hundred years of tradition. Underlines are always flush with the base line, so by definition, the underline goes through descenders. [Some notes on typography]
    Help from me is always guaranteed!*
    VB.NET code is made up on the spot with VS2008 Professional with .NET 3.5. Everything else is just made up on the spot.
    Please Remember to rate posts, use code tags, send me money and all the other things listed in the "Before you post" posts.

    *Guarantee may not be honoured.

  8. #8
    Join Date
    Dec 2008
    Posts
    20

    Re: Changing the position of underline

    I want this for urdu editor. and in urdu underline comes below all the letters

  9. #9
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Changing the position of underline

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

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

Featured