Advertisement
AZJIO

Checkbox=Button

Sep 16th, 2011
482
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.67 KB | None | 0 0
  1. #include <GUIConstantsEx.au3>
  2. #include <ButtonConstants.au3>
  3.  
  4. GUICreate("Создание кнопок используя стили")  ; will create a dialog box that when displayed is centered
  5.  
  6. GUICtrlCreateLabel('Кнопка чекбокс имеющая два состояния', 10, 5, 250, 17)
  7.  
  8. GUICtrlCreateCheckbox("--", 10,25,40,40, $BS_PUSHLIKE+$BS_ICON)
  9. GUICtrlSetImage (-1, "shell32.dll",48, 1)
  10.  
  11. GUICtrlCreateCheckbox("--", 60,25,24,24, $BS_PUSHLIKE+$BS_ICON)
  12. GUICtrlSetImage (-1, "shell32.dll",24, 0)
  13.  
  14. GUICtrlCreateLabel('Трёхстатусный', 155, 35, 150, 17)
  15. GUICtrlCreateCheckbox("--", 110,25,40,40, $BS_PUSHLIKE+$BS_ICON+$BS_AUTO3STATE)
  16. GUICtrlSetImage (-1, "shell32.dll",7, 1)
  17.  
  18. GUICtrlCreateLabel('Радио-кнопка с переключением', 10, 75, 250, 17)
  19.  
  20. GUICtrlCreateRadio("--", 10, 95,40,40, $BS_PUSHLIKE+$BS_ICON)
  21. GUICtrlSetImage (-1, "shell32.dll", 22)
  22.  
  23. GUICtrlCreateRadio("--", 60, 95,40,40, $BS_PUSHLIKE+$BS_ICON)
  24. GUICtrlSetImage (-1, "shell32.dll", 23)
  25.  
  26. GUICtrlCreateRadio("--", 110,95,40,40, $BS_PUSHLIKE+$BS_BITMAP)
  27. GUICtrlSetImage (-1, "oemlogo.bmp")
  28.  
  29. GUICtrlCreateLabel('Кнопка чекбокс, но использующая картинку, а не иконку', 10, 150, 290, 17)
  30.  
  31. GUICtrlCreateCheckbox("--", 10, 170,150,140, $BS_PUSHLIKE+$BS_BITMAP)
  32. GUICtrlSetImage (-1, "oemlogo.bmp")
  33.  
  34. GUICtrlCreateLabel('Плоские кнопки', 110, 340, 150, 17)
  35. GUICtrlCreateButton("--", 10, 320,40,40, $BS_ICON+$BS_FLAT)
  36. GUICtrlSetImage (-1, "shell32.dll",46, 1)
  37. GUICtrlCreateButton("--", 60, 320,40,40, $BS_ICON+$BS_FLAT)
  38. GUICtrlSetImage (-1, "shell32.dll",47, 1)
  39.  
  40. GUISetState ()
  41.  
  42. Do
  43. Until GUIGetMsg()=-3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement