Code : Tout sélectionner
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
[color=#40BF00]#Include <GuiEdit.au3>[/color]
$Form1 = GUICreate("Loockys", 615, 271, 195, 126)
$Edit1 = GUICtrlCreateEdit("", 16, 96, 521, 80)
[color=#40BF00]$hEdit = GuiCtrlGetHandle($Edit1)[/color]
GUICtrlSetData(-1, "")
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBkColor(-1, 0x000000)
$Button1 = GUICtrlCreateButton("Lucas", 24, 24, 75, 25)
$Label1 = GUICtrlCreateLabel("12", 32, 56, 16, 17)
$Button2 = GUICtrlCreateButton("Richard", 112, 24, 75, 25)
$Label2 = GUICtrlCreateLabel("16", 120, 56, 16, 17)
$Button3 = GUICtrlCreateButton("Jane", 200, 24, 75, 25)
$Label3 = GUICtrlCreateLabel("24", 208, 56, 16, 17)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
_Btn1()
case $Button2
_Btn2()
case $Button3
_Btn3()
EndSwitch
WEnd
Func _Btn1()
GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & "Clients : " & GUICtrlRead($Button1) & " ... " & GUICtrlRead($Label1)& @CRLF)
[color=#40BF00]_GUICtrlEdit_LineScroll($hEdit, 0, _GUICtrlEdit_GetLineCount($hEdit))[/color]
EndFunc
Func _Btn2()
GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & "Clients : " & GUICtrlRead($Button2) & " ... " & GUICtrlRead($Label2)& @CRLF)
[color=#40BF00]_GUICtrlEdit_LineScroll($hEdit, 0, _GUICtrlEdit_GetLineCount($hEdit))[/color]
EndFunc
Func _Btn3()
GUICtrlSetData($Edit1, GUICtrlRead($Edit1) & "Clients : " & GUICtrlRead($Button3) & " ... " & GUICtrlRead($Label3)& @CRLF)
[color=#00BF00]_GUICtrlEdit_LineScroll($hEdit, 0, _GUICtrlEdit_GetLineCount($hEdit))[/color]
EndFunc