Results 1 to 6 of 6

Thread: [RESOLVED] Location property settings

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    705

    Resolved [RESOLVED] Location property settings

    I am wanting to let the location properties for a container control in an event code. However, I am having a little trouble with the syntax for this. I know there is an X axis and a Y axis and I am guessing that it goes something like this (although I already know this is wrong:

    PanelContainer.Location As Point X = 25
    So could anyone explain to me the syntax for this for both axis?

  2. #2
    Hyperactive Member Mike Storm's Avatar
    Join Date
    Jun 2017
    Location
    Belgium
    Posts
    425

    Re: Location property settings

    What do you mean?
    You want to set the location of a control(panel)?

  3. #3
    Hyperactive Member Mike Storm's Avatar
    Join Date
    Jun 2017
    Location
    Belgium
    Posts
    425

    Re: Location property settings

    It should be smenting like this

    Code:
    Dim LC_POINT as point =New point(10, 15)
    PanelContainer.Location =LC_POINT
    
    'Or
    
    PanelContainer.Location = New point(10,15)
    
    'or
    
    PanelContainer.Top = 15
    PanelContainer.Left = 10

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    705

    Re: Location property settings

    Mike,

    Actually, I actually want to do exactly what I stated. I have a panel (a container. This would apply to any control on a form). This container has properties for where it is located on a form. The X and Y axis defines where the upper left corner of the container is located in the form. To there exists a syntax for placing a control in a specific location on the form. My guess is the syntax for defining the location of a control would begin something like:

    ControlName.Location
    However, I am unable to determine what would go after that. I had guess that it might be something like:

    ControlName.Location As Point X = 3, Point Y = 50
    This is obviously not the correct syntax (probably not even close). So what should we have here Mike?

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2011
    Location
    Oregon City, Oregon
    Posts
    705

    Re: Location property settings

    You are too fast Mike. First you ask a question and while I am formulating a response you already have the answer. Thanks man.

  6. #6
    Hyperactive Member Mike Storm's Avatar
    Join Date
    Jun 2017
    Location
    Belgium
    Posts
    425

    Re: Location property settings

    lol, i m just positioning a UserControl in a form and using that.

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