gettingstarted
[Top] [All Lists]

Re: Coding Button

To: gettingstarted at lists dot realsoftware dot com
Subject: Re: Coding Button
From: "Lennox Jacob" <lenpartico at hotmail dot com>
Date: Sun, 30 Jan 2005 22:34:09 +0000
Delivered-to: gettingstarted at lists dot realsoftware dot com
Thank you Aaron, it worked but I had to insert the keyword then at the end of the if line.
Thanks again.
Lennox.

From: Aaron Ballman <aaron at realsoftware dot com>
Reply-To: Getting Started <gettingstarted at lists dot realsoftware dot com>
To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Coding Button
Date: Sun, 30 Jan 2005 16:23:42 -0600

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>

_________________________________________________________________
Don't just search. Find. Check out the new MSN Search! http://search.msn.com/

_______________________________________________
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>