Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with a dialog box...

Status
Not open for further replies.

JianBean

Technical User
Oct 26, 2003
26
US
I'm trying to create a dialog box that will allow you to select an item from a list(all the TELNET entries from the connection directory) *OR* enter an address to connect to along with a LoginID and Password. My problem lies when the user selects something from the list, I want it to clear out the Address editbox and vice-versa. Currently it will clear the value, but that change won't be displayed in the dialogbox. Here is what I have so far:

Code:
   string sList,sChoice,sAddress,sLogin,sPass,sName
   integer iEntries,iCount

   dialogbox 1 8 20 264 75 2 "Connection"
      pushbutton 1 165 57 42 14 "Continue"
      pushbutton 2 215 57 42 14 "Cancel"
      listbox 3 5 5 80 55 sList SINGLE sChoice
      editbox 4 142 5 116 14 sAddress
      editbox 5 142 22 116 14 sLogin
      editbox 6 142 39 116 14 sPass MASKED
      text 7 90 7 48 10 "Other Address:" right
      text 8 90 24 48 10 "Login:" right
      text 9 90 41 48 10 "Password:" right
   enddialog

   dialcount TELNET iEntries
   for iCount = 0 upto (iEntries - 1)
      dialname TELNET iCount sName
      dlglist 1 3 INSERT sName
   endfor

   while 1
      dlgevent 1 iEvent
      switch iEvent
         case 1
            exitwhile
         endcase
         case -1
         case 2
            exit
         case 3
            sAddress=""
         endcase
         case 4
            sChoice=""
         endcase
      endswitch
   endwhile
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top