click handler for Button in TableLayoutPanel

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • swartzbill2000@yahoo.com

    #1

    click handler for Button in TableLayoutPanel

    Hello,
    I have an array of Buttons down a column of a TableLayoutPane l. They
    all share a common click handler. In the handler, how can I determine
    the row of the TableLayoutPane l for the Button that got clicked?
    Bill

  • Chris Dunaway

    #2
    Re: click handler for Button in TableLayoutPane l


    swartzbill2000@ yahoo.com wrote:[color=blue]
    > Hello,
    > I have an array of Buttons down a column of a TableLayoutPane l. They
    > all share a common click handler. In the handler, how can I determine
    > the row of the TableLayoutPane l for the Button that got clicked?
    > Bill[/color]

    Check out the GetPositionFrom Control method of the TableLayoutPane l.

    Comment

    • swartzbill2000@yahoo.com

      #3
      Re: click handler for Button in TableLayoutPane l

      It works. Thanks.

      Chris Dunaway wrote:[color=blue]
      > swartzbill2000@ yahoo.com wrote:[color=green]
      > > Hello,
      > > I have an array of Buttons down a column of a TableLayoutPane l. They
      > > all share a common click handler. In the handler, how can I determine
      > > the row of the TableLayoutPane l for the Button that got clicked?
      > > Bill[/color]
      >
      > Check out the GetPositionFrom Control method of the TableLayoutPane l.[/color]

      Comment

      • gene kelley

        #4
        Re: click handler for Button in TableLayoutPane l

        On 15 Jun 2006 09:11:41 -0700, swartzbill2000@ yahoo.com wrote:
        [color=blue]
        >Hello,
        >I have an array of Buttons down a column of a TableLayoutPane l. They
        >all share a common click handler. In the handler, how can I determine
        >the row of the TableLayoutPane l for the Button that got clicked?
        >Bill[/color]


        In the handler, determine the Sender which exposes the control's Name,
        Text and Tag properties (among others).

        Dim WhichBtn As Button = DirectCast(send er, Button)
        WhichBtn.Name
        WhichBtn.Text
        WhichBtn.Tag


        Gene

        Comment

        Working...