Welcome Forums General PowerShell Q&A Textbox.text

This topic contains 1 reply, has 2 voices, and was last updated by

2 years, 2 months ago.

  • Author
  • #59374

    Points: 15
    Rank: Member

    Hi, what is the easiest way to check if the text in a textbox ($textbox1) contains a word like _DOM1 and have it stop there if it contains _DOM1? I use something similar to check if the textbox is empty: Thanks for any help in advance.

    if ($textbox1.textLength -eq 0) { $statusbar1.text = " ACTIVE GROUP BOX IS EMPTY " }
  • #59416

    Points: 492
    Helping Hand
    Rank: Contributor

    When you are using a .NET GUI, your first line of defense should be form validation. Here is one implementation on StackOverflow:


    That post is doing validation on specific events being triggered, like the text changing. You can also do it on submit to validated everything is correct before calling other functions in your code.

The topic ‘Textbox.text’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort