Results 1 to 4 of 4

Thread: determining the type of control

  1. #1

    Thread Starter
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112

    determining the type of control

    halu,

    i'm a new to this thing.... i have a problem dealing with the determination of the control. this is about clearing.... i have a pseudo code below...

    - foreach(control c in groupbox.controls)
    - if c is textbox, c.text=string.empty

    thanx very much...

    --ayan

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Example ,
    PHP Code:
    foreach (Control c in this.Controls)
    {
        if (
    c is TextBox)
            {
        
    c.Text="";
            }


  3. #3

    Thread Starter
    Lively Member ayan's Avatar
    Join Date
    Jan 2004
    Posts
    112
    thanx Pirate... you are the man...

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Remarkable:
    Code:
     if c is textbox
    Code:
    if (c is TextBox)
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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