gettingstarted
[Top] [All Lists]

Re: Coding Button

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Coding Button
From: Aaron Ballman <aaron at realsoftware dot com>
Date: Sun, 30 Jan 2005 16:23:42 -0600
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <BAY2-F95B317B145505C7E2DA1BDA7B0 at phx dot gbl>
that was a mistake, this is what I meant,
I have two EditFields named Ht and Wt, I also have two Pushbutton named BMIPushButton and BSAPushbutton which are  disabled and not defaulted at startup. I want the BMIPushbutton to be enabled and defaulted only when data is input into both Ht and Wt editFields, I did this

Make a method like this:

Sub SetButtonProperties()
        if Ht.Text <> "" and Wt.Text <> ""
                BMIPushButton.Enabled = true
                BMIPushButton.Default = true
        else
                BMIPushButton.Enabled = false
                BMIPushButton.Default = false
        end if
End Sub

Then in the TextChange event for both Ht and Wt, call SetButtonProperties.

HTH!

~Aaron
--
REAL World 2005 - The REALbasic User Conference
March 23-25, 2005, Austin, Texas
<http://www.realsoftware.com/realworld>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>