Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog ListBox change
#1
Hey there peeps,
I'm trying to do something that is kinda simple but I don't know how to do it.
I want to, depending on what I have selected on my list box, change the information on the fields on the right.

The fields on the right will be filled with information from an excel file, but for now they're just with text for test porpuses.

This is my code:

Function Dialog3
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

str controls = "1 8 10 12 15 17 20"
str lb1 e8Ped e10 e12 e15 e17 e20wor

lb1="SITE01[]SITE02[]SITE03[]SITE04[]SITE05[]SITE06[]SITE07[]SITE08"

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

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 307 286 "CAs Alarmados"
;1 ListBox 0x54230101 0x200 8 44 96 200 ""
;3 Static 0x54000000 0x0 30 28 40 13 "Sites"
;4 Static 0x54000000 0x0 85 0 500 40 "    Lista de sites []alarmados com CA"
;5 Button 0x54032000 0x0 10 248 48 14 "Add site"
;6 Button 0x54032000 0x0 10 266 48 14 "Delete site"
;7 Static 0x54000000 0x0 160 54 100 13 "Adicionado por:"
;8 Static 0x54800000 0x20000 154 68 96 14 "Pedro"
;9 Static 0x54000000 0x0 160 94 100 10 "Adicionado às:"
;10 Static 0x54800000 0x20000 154 108 96 14 "15:33:02"
;11 Static 0x54000000 0x0 120 192 60 10 "Hora de fim"
;12 Static 0x54800000 0x20000 112 206 80 12 "02:03:49"
;13 Static 0x54000000 0x0 216 220 48 13 "Regional"
;14 Button 0x54032000 0x0 62 248 40 32 "Activar Reminder"
;15 Static 0x54800000 0x20000 216 236 50 13 "TNO"
;16 Static 0x54000000 0x0 184 130 48 15 "C.A."
;17 Static 0x54800000 0x20000 112 168 80 12 "0112359966"
;18 Static 0x54000000 0x0 115 154 80 12 "Número da C.A."
;19 Static 0x54000000 0x0 208 174 90 12 "Tempo restante"
;20 Static 0x54800000 0x20000 206 190 90 12 "(work in progress...)"
;END DIALOG
;DIALOG EDITOR: "" 0x2030605 "" "" "" ""



/*boxes de edit: 8 10  12 15 17 20*/

ret
;messages
sel message
,case WM_INITDIALOG

/---Fontes e cores dos items---
,__Font-- f1.Create("Arial" 18 1) f2.Create("Arial" 15 1) f3.Create("Arial" 10 1) f4.Create("Arial" 12 1)
,f1.SetDialogFont(hDlg "4")
,f2.SetDialogFont(hDlg "3 16")
,f3.SetDialogFont(hDlg "8 10")
,f4.SetDialogFont(hDlg "7 9 11 13 18 19")
,DT_SetTextColor(hDlg 0x990099 "4")
,DT_SetTextColor(hDlg 0x0099FF "3 16")
,DT_SetTextColor(hDlg 0x000000 "8 10")
,DT_SetTextColor(hDlg 0x00CCCC "7 9 11 13 18 19")


,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1

Thank you very much one more time!


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)