Results 1 to 4 of 4

Thread: [RESOLVED] How to align text vetically?

  1. #1

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Resolved [RESOLVED] How to align text vetically?

    I'm using a floating textbox to edit the cells of a flexgrid, as the cells in it don't not have the SelStart and SelLength capabilities. Whenever the arrowkeys are pushed the textbox moves accordingly to place itself on the target cell.

    The textbox is adjusted to the size of the flexgrid cells -the border widths are taken into account so that it fits exactly inside. However, it turns out the vertical alignment is different, in the textbox text is always printed at the same vertical offset from the top so it becomes vertically misaligned with the text in the flexgrid cells as in the attached figure.

    It's just an ugly aesthetic effect, but if it has an easy solution I'd like to fix it.

    Name:  grid.png
Views: 173
Size:  1.4 KB
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: How to align text vetically?

    Hmm, not sure what we might be doing differently, but it doesn't seem to be an issue in a sample I wrote a little while back.

    Name:  sshot.png
Views: 111
Size:  14.5 KB

    You may have to post a small example that reproduces the problem.
    Attached Files Attached Files

  3. #3

    Thread Starter
    vbuggy krtxmrtz's Avatar
    Join Date
    May 2002
    Location
    In a probability cloud
    Posts
    5,573

    Re: How to align text vetically?

    Quote Originally Posted by dilettante View Post
    Hmm, not sure what we might be doing differently, but it doesn't seem to be an issue in a sample I wrote a little while back.

    Name:  sshot.png
Views: 111
Size:  14.5 KB

    You may have to post a small example that reproduces the problem.
    Looking at your code I realized the difference was I was using a flat bordeless textbox. As soon as I made it 3D and restored the border all was ok.

    Thanks.
    Lottery is a tax on people who are bad at maths
    If only mosquitoes sucked fat instead of blood...
    To do is to be (Descartes). To be is to do (Sartre). To be do be do (Sinatra)

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: [RESOLVED] How to align text vetically?

    Sorry, now that you point it out I can see that in your screenshot.

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