dcsimg
Results 1 to 5 of 5

Thread: [RESOLVED] Label overlaps textbox?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2015
    Posts
    431

    Resolved [RESOLVED] Label overlaps textbox?

    Hi all,

    I'm quite used to VB6.
    In the last days I had to work with VS2017 in order to make a translation of an existing project.
    No problem so far, the IDE is very comfy.

    I the UI I have to work on, there are many textboxes with describing labels above them.
    The positions are ok in the IDE.
    The compiled output shows the labels partially on top of the textbox.
    Not good.

    Inspecting what I did, I can't find a difference between the places where it is ok and where it is not.
    The sizes are all the same, and the distances as well.

    From my VB6 experience, a label can't be on top of other controls.
    So I wonder what I do wrong.

    I can't compile myself to test immediately the given project, therefore I have to ask.

    In VS2017, is it necessary to zorder the textbox over a label?

    Thanks
    Karl

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    102,245

    Re: Label overlaps textbox?

    This seems rather like the sort of situation that would benefit from a screenshot or two.

    In general though, any two controls whose bounds overlap will only be able to show one of them in that area the one that is shown will be determined by the relative z-order. What type of controls they are isn't relevant. If you need to adjust the z-order then use the Document Outline window.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2015
    Posts
    431

    Re: Label overlaps textbox?

    Quote Originally Posted by jmcilhinney View Post
    This seems rather like the sort of situation that would benefit from a screenshot or two.
    You are right.
    Name:  20-05-_2019_14-58-50.jpg
Views: 23
Size:  5.1 KB

    In the IDE it looks like this:
    Name:  20-05-_2019_15-01-50.jpg
Views: 23
Size:  5.4 KB

    The properties of the labels are, except the caption, exactly the same.

  4. #4
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    22,256

    Re: Label overlaps textbox?

    Just right click the labels one at a time, and choose Send to Back in the popup menu

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2015
    Posts
    431

    Re: Label overlaps textbox?

    Just right click the labels one at a time, and choose Send to Back in the popup menu
    That would be too easy.
    I tried that, also sending the textbox to front.
    Makes no difference.

    I said I can't compile myself.
    This was true but no longer is.
    Regardless what I do, I get the evil overlaps.

    When I copy all controls of a form to a new form, all is ok, no overlaps.
    But no chance in the original form.

    But I could finally solve it.
    I manually moved all labels lower border 3 pixels away from the textbox's upper border.
    Seems to be ok now, even with different DPI settings.

    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
  •  



Featured


Click Here to Expand Forum to Full Width