Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    6

    Hide/unhide edit field and button

    Hi,

    I'm having problems to manipulate an edit field's visibility, based on ctrl messages.

    This is what i would like to do:

    My form contains two edit field, each one with a (browse) button.
    As long as the first field is empty a second field must be disabled or invisible. As soon as the first edit field contains some text, the second field (and it's button) must be enabled or become visible .

    This is what I tried:
    if e_CtrlID == CTRL_EDIT_01 then
    if e_Details.Text ~= "" then
    DlgEditField.SetProperties(CTRL_EDIT_02, {Enabled = true , Visible = true});
    DlgButton.SetProperties(CTRL_BUTTON_02, {Enabled = true , Visible = true});
    end
    end

    The result is: As soon I put some text in the first edit field, the GUI is totally messed up. The edit fields disappear and I see a gray square.

    The second problem is:
    When the first edit field becomes empty, the second field must become invisible or disabled.

    This is what I tried:
    if e_CtrlID == CTRL_EDIT_01 then
    if e_Details.Text == "" then
    DlgEditField.SetProperties(CTRL_EDIT_02, {Enabled = false , Visible = false});
    DlgButton.SetProperties(CTRL_BUTTON_02, {Enabled = false , Visible = false});
    end
    end

    Te result is: When I came into this screen my application crashed.

    Can somebody please help me.
    (I have the latest updates of SF7.0.6.1)

  2. #2
    Join Date
    May 2000
    Location
    Indigo Rose Software
    Posts
    2,150
    It appears as though you have found a bug in the software REF: 16485

    Here is the code that I wrote and I came to the same conclusion:

    Code:
    if e_CtrlID == CTRL_EDIT_01 then
    	tblEdit1Props = DlgEditField.GetProperties(CTRL_EDIT_01);
    	if tblEdit1Props.Text == "" then
    		DlgEditField.SetProperties(CTRL_EDIT_02, {Visible=false});
    		DlgButton.SetProperties(CTRL_BUTTON_02, {Visible=false});
    	else
    		DlgEditField.SetProperties(CTRL_EDIT_02, {Visible=true});
    		DlgButton.SetProperties(CTRL_BUTTON_02, {Visible=true});
    	end
    end
    Adam Kapilik

  3. #3
    Join Date
    Jun 2007
    Posts
    6
    Do you have any more information yet on this bug?

    Where can I follow up this bug reference?

Similar Threads

  1. help: put a string in a edit field..?
    By Michka88 in forum Setup Factory 7.0
    Replies: 2
    Last Post: 01-18-2005, 02:26 PM
  2. Edit Field Objects
    By Trysko23 in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 09-21-2003, 07:17 PM
  3. Wanted: Overview of Multi-Language Support
    By sgspecker in forum Setup Factory 6.0
    Replies: 5
    Last Post: 07-14-2003, 11:11 AM
  4. Possible? Hitting Enter on Keyboard within a text Field performs action
    By kpsmith in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 11-08-2002, 07:53 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts