Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating Combo Box
#1
function: ini_Dialog
Code:
Copy      Help
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 238 118 ".ini Save on Desktop"
;2 Button 0x54030000 0x4 130 45 96 15 "Close"
;3 ComboBox 0x54230243 0x0 10 5 96 213 ""
;4 Edit 0x54030080 0x200 10 25 96 14 ""
;5 Edit 0x54030080 0x200 130 25 96 14 ""
;6 Button 0x54032000 0x0 10 45 96 15 "Save Changes"
;7 Edit 0x5C030080 0x200 130 5 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""


ret
;messages
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case 6
,str Selected1.getwintext(id(3 win(".ini Save on Desktop" "#32770")))
,str s4.getwintext(id(4 win(".ini Save on Desktop" "#32770")))
,if Selected1="Today"
,,str t.time("MM-dd-yyyy")
,,str a1.format("$desktop$\%s %s.ini" t s4)
,,goto skip
,else a1.format("$desktop$\%s %s.ini" Selected1 s4)
,;skip
,str e4.getwintext(id(4 win(".ini Save on Desktop" "#32770")))
,str e5.getwintext(id(5 win(".ini Save on Desktop" "#32770")))
,str e7.getwintext(id(7 win(".ini Save on Desktop" "#32770")))
,if(dir(a1))
,,if(mes("This File Already Exists.[]Would you like to save over the data?" ".ini Save on Desktop" "YN?") != 'Y') ret
,str S1="Key"
,rset e4 "e4" S1 a1
,rset e5 "e5" S1 a1
,rset e7 "e7" S1 a1
,case CBN_SELENDOK<<16|3
,_i=CB_SelectedItem(lParam)
,str Selected.getwintext(id(3 win(".ini Save on Desktop" "#32770")))
,if Selected="Today"
,,goto Today
,str a.format("$desktop$\%s.ini" Selected)
,str S ed4 ed5 ed7
,S="Key"
,rget ed4 "e4" S a
,rget ed5 "e5" S a
,rget ed7 "e7" S a
,ed4.setwintext(id(4 win(".ini Save on Desktop" "#32770")))
,ed5.setwintext(id(5 win(".ini Save on Desktop" "#32770")))
,ed7.setwintext(id(7 win(".ini Save on Desktop" "#32770")))
,goto SkipToday
,;Today
,ed7.time("MM-dd-yyy")
,ed4.setwintext(id(4 win(".ini Save on Desktop" "#32770")))
,ed5.setwintext(id(5 win(".ini Save on Desktop" "#32770")))
,ed7.setwintext(id(7 win(".ini Save on Desktop" "#32770")))
,;SkipToday
,case IDOK
,case IDCANCEL
ret 1

Then Macro: ini_Call
Code:
Copy      Help
str controls = "3 4 5 7"
str cb3 e4 e5 e7
cb3="&Today"
e7.time("MM-dd-yyyy")

Dir d
foreach(d "$desktop$\*" FE_Dir)
,cb3.addline(d.FileName)
,cb3.getfilename(cb3)

if(!ShowDialog("ini_Dialog" &ini_Dialog &controls)) ret

The question:
How would I go about getting the drop down box to refresh when it is Dropped down?
Thanks in advance for any help,
Jimmy Vig


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)