Results 1 to 3 of 3

Thread: [RESOLVED] Label - AutoEllipsis

  1. #1

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Resolved [RESOLVED] Label - AutoEllipsis

    I use the following template for some labels I am creating. When I run this on XP the AutoEllipsis doesn't work, on Windows 7 it does.

    Code:
        Class DefDvc
            Public Dvc As Label
            Public Sub New()
                'set default characteristics of label
                Dvc = New Label
                Dvc.Anchor = AnchorStyles.Top Or AnchorStyles.Left
                Dvc.Size = New Drawing.Size(90, 70)
                Dvc.ImageAlign = ContentAlignment.TopCenter
                Dvc.BorderStyle = BorderStyle.FixedSingle
                Dvc.BackColor = Color.LightBlue
                Dvc.Text = String.Format("{0}", "8".PadLeft(12, "8"c))
                Dvc.TextAlign = ContentAlignment.BottomCenter
                Dvc.AutoEllipsis = True
                Dvc.AutoSize = False
                Dvc.Text = ""
                Dvc.Image = My.Resources.Def
            End Sub
        End Class
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  2. #2

    Thread Starter
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: Label - AutoEllipsis

    I just tried turning AutoEllipsis off, then on, after I set the Text to some value.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  3. #3
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    Re: Label - AutoEllipsis

    On my XP system, I do get an ellipsis only when I make the text long enough to completely fill the label and more. If I then add an image, it appears behind the text regardless of the ContentAlignment. I wonder why the behaviour changes in Win7?

    Could you deal with it by using 2 separate labels, one for the text and one for the image? If necessary, dock them both into a UserControl, one up one down.

    BB

Tags for this Thread

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