Results 1 to 1 of 1

Thread: Label and space and textbox complex time

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2009
    Posts
    22

    Label and space and textbox complex time

    Hiiii
    I wrote a companent but I'm having trouble with space label1 can change every time i have to play with space settings how do you think you can do more effortless


    UserControl Code:
    1. ....
    2.     a = Label1.Width
    3.     b = m_bosluk
    4.     c = UserControl.Width
    5.     d = UserControl.Height
    6.     e = Shape1.Width
    7.  
    8. With Label1
    9.         If a + b + 30 > c Then c = a + b + 50
    10.             .Move 20, 20
    11.             If m_multilin = True Then   'if multiline then text2 else text1 show
    12.                 Text2.Move a + b, 20, c - (a + b) - 30, d - 40
    13.                 Shape1.Move a + b, 0, c - (a + b), d
    14.                 Text1.Visible = False
    15.                 Text2.Visible = True
    16.             Else
    17.                 Text1.Move a + b, 20, c - (a + b) - 30, d - 40
    18.                 Shape1.Move a + b, 0, c - (a + b), d
    19.                 If UserControl.Width < (e + a + b) Then
    20.                     Text1.Width = c - (a + b) - 40
    21.                     Shape1.Width = c - (a + b)
    22.                 End If
    23.                 Text1.Visible = True
    24.                 Text2.Visible = False
    25.             End If
    26. .....
    27. End With
    28. ....

    this code free of problems works but as i said label and textbox added(as attached pictures) the gap between i have to manually enter

    How do I solve the problem of this gap?
    Attached Images Attached Images   
    Last edited by fikret; May 13th, 2009 at 01:30 PM.

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