From bb50d59a7ef9237a676c71116c9a9e03b5fb9b53 Mon Sep 17 00:00:00 2001 From: eXcript <excriptbrasil@gmail.com.br> Date: Tue, 26 Mar 2024 08:34:22 -0300 Subject: [PATCH] added complete stub file --- delphivcl/stub-delphivcl.pyi | 72572 +++++++++++++++++++++++++++++++++ 1 file changed, 72572 insertions(+) create mode 100644 delphivcl/stub-delphivcl.pyi diff --git a/delphivcl/stub-delphivcl.pyi b/delphivcl/stub-delphivcl.pyi new file mode 100644 index 0000000..f9dfd96 --- /dev/null +++ b/delphivcl/stub-delphivcl.pyi @@ -0,0 +1,72572 @@ + +from delphivcl import * +from typing import Optional, overload, ClassVar, Callable + +nil: None +HResult: int + +MB_OK: int = 0x00000000 +MB_OKCANCEL: int = 0x00000001 +MB_ABORTRETRYIGNORE: int = 0x00000002 +MB_YESNOCANCEL: int = 0x00000003 +MB_YESNO: int = 0x00000004 +MB_RETRYCANCEL: int = 0x00000005 + +MB_ICONHAND: int = 0x00000010 +MB_ICONQUESTION: int = 0x00000020 +MB_ICONEXCLAMATION: int = 0x00000030 +MB_ICONASTERISK: int = 0x00000040 +MB_USERICON: int = 0x00000080 +MB_ICONWARNING: int = MB_ICONEXCLAMATION +MB_ICONERROR: int = MB_ICONHAND +MB_ICONINFORMATION: int = MB_ICONASTERISK +MB_ICONSTOP: int = MB_ICONHAND + +MB_DEFBUTTON1: int = 0x00000000 +MB_DEFBUTTON2: int = 0x00000100 +MB_DEFBUTTON3: int = 0x00000200 +MB_DEFBUTTON4: int = 0x00000300 + +MB_APPLMODAL: int = 0x00000000 +MB_SYSTEMMODAL: int = 0x00001000 +MB_TASKMODAL: int = 0x00002000 +MB_HELP: int = 0x00004000 + +MB_NOFOCUS: int = 0x00008000 +MB_SETFOREGROUND: int = 0x00010000 +MB_DEFAULT_DESKTOP_ONLY: int = 0x00020000 + +MB_TOPMOST: int = 0x00040000 +MB_RIGHT: int = 0x00080000 +MB_RTLREADING: int = 0x00100000 + +MB_SERVICE_NOTIFICATION: int = 0x00200000 +MB_SERVICE_NOTIFICATION_NT3X: int = 0x00040000 + +MB_TYPEMASK: int = 0x0000000F +MB_ICONMASK: int = 0x000000F0 +MB_DEFMASK: int = 0x00000F00 +MB_MODEMASK: int = 0x00003000 +MB_MISCMASK: int = 0x0000C000 + +cBalloonStemHeight: int = 0xA +cEdgeRadius: int = 4 +cgiFirst: int = 0xFFFFFE00 +cgiLast: int = 0xFFFFFFFF +cImageMargin: int = 4 + +CM_ACTIONEXECUTE: int = 0xB040 +CM_ACTIONUPDATE: int = 0xB03F +CM_ACTIVATE: int = 0xB000 +CM_ALLCHILDRENFLIPPED: int = 0xB03E +CM_APPKEYDOWN: int = 0xB016 +CM_APPSYSCOMMAND: int = 0xB017 +CM_BASE: int = 0xB000 +CM_BIDIMODECHANGED: int = 0xB03C +CM_BORDERCHANGED: int = 0xB03B +CM_BUFFEREDPRINTCLIENT: int = 0xB04D +CM_BUTTONPRESSED: int = 0xB018 +CM_CANCELMODE: int = 0xB004 +CM_CHANGED: int = 0xB037 +CM_CHILDKEY: int = 0xB02E +CM_CLROFFSET: int = 0 +CM_COLORCHANGED: int = 0xB00D +CM_CONTROLCHANGE: int = 0xB036 +CM_CONTROLLISTCHANGE: int = 0xB02C +CM_CONTROLLISTCHANGING: int = 0xB04C +CM_CREATEPOPUP: int = 0xB049 +CM_CTL3DCHANGED: int = 0xB010 +CM_CURSORCHANGED: int = 0xB00F +CM_CUSTOMGESTURESCHANGED: int = 0xB053 +CM_CUSTOMSTYLECHANGED: int = 0xB059 +CM_DEACTIVATE: int = 0xB001 +CM_DESIGNHITTEST: int = 0xB01C +CM_DESTROYHANDLE: int = 0xB04A +CM_DIALOGCHAR: int = 0xB006 +CM_DIALOGHANDLE: int = 0xB031 +CM_DIALOGKEY: int = 0xB005 +CM_DOCKCLIENT: int = 0xB038 +CM_DOCKNOTIFICATION: int = 0xB042 +CM_DOCWINDOWACTIVATE: int = 0xB02B +CM_DOUBLEBUFFEREDCHANGED: int = 0xB04F +CM_DRAG: int = 0xB02F +CM_ENABLEDCHANGED: int = 0xB00C +CM_ENTER: int = 0xB01A +CM_EXIT: int = 0xB01B +CM_FLOAT: int = 0xB03A +CM_FOCUSCHANGED: int = 0xB007 +CM_FONTCHANGE: int = 0xB026 +CM_FONTCHANGED: int = 0xB00E +CM_GESTURE: int = 0xB052 +CM_GESTUREMANAGERCHANGED: int = 0xB054 +CM_GETDATALINK: int = 0xB02D +CM_GOTFOCUS: int = 0xB002 +CM_HINTSHOW: int = 0xB030 +CM_HINTSHOWPAUSE: int = 0xB041 +CM_HITTEST: int = 0xB00A +CM_ICONCHANGED: int = 0xB01D +CM_INPUTLANGCHANGE: int = 0xB056 +CM_INVALIDATE: int = 0xB034 +CM_INVALIDATEDOCKHOST: int = 0xB046 +CM_INVOKEHELP: int = 0xB01F +CM_ISSHORTCUT: int = 0xB044 +CM_ISTOOLCONTROL: int = 0xB032 +CM_LOSTFOCUS: int = 0xB003 +CM_MENUCHANGED: int = 0xB015 +CM_MOUSEACTIVATE: int = 0xB04B +CM_MOUSEENTER: int = 0xB013 +CM_MOUSELEAVE: int = 0xB014 +CM_MOUSEWHEEL: int = 0xB043 +CM_PARENTBIDIMODECHANGED: int = 0xB03D +CM_PARENTCOLORCHANGED: int = 0xB009 +CM_PARENTCTL3DCHANGED: int = 0xB011 +CM_PARENTDOUBLEBUFFEREDCHANGED: int = 0xB050 +CM_PARENTFONTCHANGED: int = 0xB008 +CM_PARENTSHOWHINTCHANGED: int = 0xB023 +CM_PARENTTABLETOPTIONSCHANGED: int = 0xB058 +CM_PARENTVISIBLECHANGED: int = 0xB05B +CM_POPUPHWNDDESTROY: int = 0xB048 +CM_RECREATEWND: int = 0xB033 +CM_RELEASE: int = 0xB021 +CM_REMOTESESSIONSTATUSCHANGED: int = 0xB05D +CM_SETACTIVECONTROL: int = 0xB047 +CM_SHOWHINTCHANGED: int = 0xB022 +CM_SHOWINGCHANGED: int = 0xB019 +CM_STANDARDGESTURESCHANGED: int = 0xB055 +CM_STYLECHANGED: int = 0xB051 +CM_SYSCOLORCHANGE: int = 0xB024 +CM_SYSCOMMAND: int = 0xB05C +CM_SYSFONTCHANGED: int = 0xB035 +CM_SYSFONTSALLCHANGED: int = 0xB05A +CM_TABLETOPTIONSCHANGED: int = 0xB057 +CM_TABSTOPCHANGED: int = 0xB028 +CM_TEXTCHANGED: int = 0xB012 +CM_THEMECHANGED: int = 0xB051 +CM_TIMECHANGE: int = 0xB027 +CM_UIACTIVATE: int = 0xB029 +CM_UIDEACTIVATE: int = 0xB02A +CM_UNDOCKCLIENT: int = 0xB039 +CM_UNTHEMECONTROL: int = 0xB04E +CM_UPDATEACTIONS: int = 0xB045 +CM_VISIBLECHANGED: int = 0xB00B +CM_WANTSPECIALKEY: int = 0xB01E +CM_WINDOWHOOK: int = 0xB020 +CM_WININICHANGE: int = 0xB025 +CN_BASE: int = 0xBC00 +CN_CHAR: int = 0xBD02 +CN_CHARTOITEM: int = 0xBC2F +CN_COMMAND: int = 0xBD11 +CN_COMPAREITEM: int = 0xBC39 +CN_CTLCOLORBTN: int = 0xBD35 +CN_CTLCOLORDLG: int = 0xBD36 +CN_CTLCOLOREDIT: int = 0xBD33 +CN_CTLCOLORLISTBOX: int = 0xBD34 +CN_CTLCOLORMSGBOX: int = 0xBD32 +CN_CTLCOLORSCROLLBAR: int = 0xBD37 +CN_CTLCOLORSTATIC: int = 0xBD38 +CN_DELETEITEM: int = 0xBC2D +CN_DRAWITEM: int = 0xBC2B +CN_HSCROLL: int = 0xBD14 +CN_KEYDOWN: int = 0xBD00 +CN_KEYUP: int = 0xBD01 +CN_MEASUREITEM: int = 0xBC2C +CN_NOTIFY: int = 0xBC4E +CN_PARENTNOTIFY: int = 0xBE10 +CN_SYSCHAR: int = 0xBD06 +CN_SYSKEYDOWN: int = 0xBD04 +CN_VKEYTOITEM: int = 0xBC2E +CN_VSCROLL: int = 0xBD15 + +crAppStart: int = 0xFFFFFFED +crArrow: int = 0xFFFFFFFE +crCross: int = 0xFFFFFFFD +crDefault: int = 0 +crDrag: int = 0xFFFFFFF4 +crHandPoint: int = 0xFFFFFFEB +crHelp: int = 0xFFFFFFEC +crHourGlass: int = 0xFFFFFFF5 +crHSplit: int = 0xFFFFFFF2 +crIBeam: int = 0xFFFFFFFC +crMultiDrag: int = 0xFFFFFFF0 +crNo: int = 0xFFFFFFEE +crNoDrop: int = 0xFFFFFFF3 +crNone: int = 0xFFFFFFFF +crSize: int = 0xFFFFFFEA +crSizeAll: int = 0xFFFFFFEA +crSizeNESW: int = 0xFFFFFFFA +crSizeNS: int = 0xFFFFFFF9 +crSizeNWSE: int = 0xFFFFFFF8 +crSizeWE: int = 0xFFFFFFF7 +crSQLWait: int = 0xFFFFFFEF +crUpArrow: int = 0xFFFFFFF6 +crVSplit: int = 0xFFFFFFF1 +cTextHorizontalMargin: int = 4 +cTextVerticalMargin: int = 4 + +CTL3D_ALL: int = 0xFFFF + +gcnAdded: int = 1 +gcnModified: int = 3 +gcnRefreshAll: int = 0 +gcnRemoved: int = 2 + +igiBegin: int = 0x101 +igiEnd: int = 0x102 +igiFirst: int = 0x100 +igiLast: int = 0x1FF +igiPan: int = 0x104 +igiPressAndTap: int = 0x107 +igiRotate: int = 0x105 +igiTwoFingerTap: int = 0x106 +igiZoom: int = 0x103 + +NullDockSite: int = 0xFFFFFFFF + +rgiFirst: int = 0xFFFFFC00 +rgiLast: int = 0xFFFFFDFF + +# Standard gesture id's +sgiCheck: int = 0x18 +sgiChevronDown: int = 0x20 +sgiChevronLeft: int = 0x21 +sgiChevronRight: int = 0x22 +sgiChevronUp: int = 0x1F +sgiCircle: int = 0x1B +sgiCurlicue: int = 0x19 +sgiDoubleCircle: int = 0x1C +sgiDoubleCurlicue: int = 0x1A +sgiDown: int = 4 +sgiDownLeft: int = 7 +sgiDownLeftLong: int = 0x13 +sgiDownRight: int = 8 +sgiDownRightLong: int = 0x14 +sgiDownUp: int = 0xE +sgiFirst: int = 1 +sgiLast: int = 0x22 +sgiLeft: int = 1 +sgiLeftDown: int = 0xA +sgiLeftRight: int = 0xF +sgiLeftUp: int = 9 +sgiNoGesture: int = 0 +sgiRight: int = 2 +sgiRightDown: int = 0xC +sgiRightLeft: int = 0x10 +sgiRightUp: int = 0xB +sgiScratchout: int = 0x15 +sgiSemiCircleLeft: int = 0x1D +sgiSemiCircleRight: int = 0x1E +sgiSquare: int = 0x17 +sgiTriangle: int = 0x16 +sgiUp: int = 3 +sgiUpDown: int = 0xD +sgiUpLeft: int = 5 +sgiUpLeftLong: int = 0x11 +sgiUpRight: int = 6 +sgiUpRightLong: int = 0x12 + + +'''O ``delphivcl`` define as constantes em maiúsculas, enquanto +a documentação define em minúsculas. Na dúvida e aproveitando +que o Python é case-sensitive, declarei as mesmmas constantes duas +vezes, a primeira, seguindo a documentação oficial e a segunda, +no formato do ``delphivcl``. + +Na prática não haverá problemas, o Delphi é case-insensitive e por isso, +quaisquer dos formatos utilizados será aceito. + +A documentação do `TModalResult <https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Controls.TModalResult>`__ +utiliza o formato lower-case, enquanto `MessageBox <https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.Forms.TApplication.MessageBox>`__ +define as constante em upper-case. +''' +idOK: int = 1 +idCancel: int = 2 +idAbort: int = 3 +idRetry: int = 4 +idIgnore: int = 5 +idYes: int = 6 +idNo: int = 7 +idClose: int = 8 +idHelp: int = 9 +idTryAgain: int = 10 +idContinue: int = 11 + +IDOK: int = 1 +IDCANCEL: int = 2 +IDABORT: int = 3 +IDRETRY: int = 4 +IDIGNORE: int = 5 +IDYES: int = 6 +IDNO: int = 7 +IDCLOSE: int = 8 +IDHELP: int = 9 +IDTRYAGAIN: int = 10 +IDCONTINUE: int = 11 + +mrNone: int = 0 +mrOk: int = idOK +mrCancel: int = idCancel +mrAbort: int = idAbort +mrRetry: int = idRetry +mrIgnore: int = idIgnore +mrYes: int = idYes +mrNo: int = idNo +mrClose: int = idClose +mrHelp: int = idHelp +mrTryAgain: int = idTryAgain +mrContinue: int = idContinue +mrAll: int = mrContinue + 1 +mrNoToAll: int = mrAll + 1 +mrYesToAll: int = mrNoToAll + 1 + + +# Virtual Keys, Standard Set +vkLButton: int = 0x01 # 1 +vkRButton: int = 0x02 # 2 +vkCancel: int = 0x03 # 3 +vkMButton: int = 0x04 # 4 +vkXButton1: int = 0x05 # 5 +vkXButton2: int = 0x06 # 6 +vkBack: int = 0x08 # 8 +vkTab: int = 0x09 # 9 +vkLineFeed: int = 0x0A # 10 +vkClear: int = 0x0C # 12 +vkReturn: int = 0x0D # 13 +vkShift: int = 0x10 # 16 +vkControl: int = 0x11 # 17 +vkMenu: int = 0x12 # 18 +vkPause: int = 0x13 # 19 +vkCapital: int = 0x14 # 20 +vkKana: int = 0x15 # 21 +vkHangul: int = 0x15 # 21 +vkJunja: int = 0x17 # 23 +vkFinal: int = 0x18 # 24 +vkHanja: int = 0x19 # 25 +vkKanji: int = 0x19 # 25 +vkConvert: int = 0x1C # 28 +vkNonConvert: int = 0x1D # 29 +vkAccept: int = 0x1E # 30 +vkModeChange: int = 0x1F # 31 +vkEscape: int = 0x1B # 27 +vkSpace: int = 0x20 # 32 +vkPrior: int = 0x21 # 33 +vkNext: int = 0x22 # 34 +vkEnd: int = 0x23 # 35 +vkHome: int = 0x24 # 36 +vkLeft: int = 0x25 # 37 +vkUp: int = 0x26 # 38 +vkRight: int = 0x27 # 39 +vkDown: int = 0x28 # 40 +vkSelect: int = 0x29 # 41 +vkPrint: int = 0x2A # 42 +vkExecute: int = 0x2B # 43 +vkSnapshot: int = 0x2C # 44 +vkInsert: int = 0x2D # 45 +vkDelete: int = 0x2E # 46 +vkHelp: int = 0x2F # 47 + +# vk0 thru vk9 are the same as ASCII '0' thru '9' (self, $30 - $39) +vk0: int = 0x30 # 48 +vk1: int = 0x31 # 49 +vk2: int = 0x32 # 50 +vk3: int = 0x33 # 51 +vk4: int = 0x34 # 52 +vk5: int = 0x35 # 53 +vk6: int = 0x36 # 54 +vk7: int = 0x37 # 55 +vk8: int = 0x38 # 56 +vk9: int = 0x39 # 57 + +# vkA thru vkZ are the same as ASCII 'A' thru 'Z' (self, $41 - $5A) +vkA: int = 0x41 # 65 +vkB: int = 0x42 # 66 +vkC: int = 0x43 # 67 +vkD: int = 0x44 # 68 +vkE: int = 0x45 # 69 +vkF: int = 0x46 # 70 +vkG: int = 0x47 # 71 +vkH: int = 0x48 # 72 +vkI: int = 0x49 # 73 +vkJ: int = 0x4A # 74 +vkK: int = 0x4B # 75 +vkL: int = 0x4C # 76 +vkM: int = 0x4D # 77 +vkN: int = 0x4E # 78 +vkO: int = 0x4F # 79 +vkP: int = 0x50 # 80 +vkQ: int = 0x51 # 81 +vkR: int = 0x52 # 82 +vkS: int = 0x53 # 83 +vkT: int = 0x54 # 84 +vkU: int = 0x55 # 85 +vkV: int = 0x56 # 86 +vkW: int = 0x57 # 87 +vkX: int = 0x58 # 88 +vkY: int = 0x59 # 89 +vkZ: int = 0x5A # 90 +vkLWin: int = 0x5B # 91 +vkRWin: int = 0x5C # 92 +vkApps: int = 0x5D # 93 +vkSleep: int = 0x5F # 95 +vkNumpad0: int = 0x60 # 96 +vkNumpad1: int = 0x61 # 97 +vkNumpad2: int = 0x62 # 98 +vkNumpad3: int = 0x63 # 99 +vkNumpad4: int = 0x64 # 100 +vkNumpad5: int = 0x65 # 101 +vkNumpad6: int = 0x66 # 102 +vkNumpad7: int = 0x67 # 103 +vkNumpad8: int = 0x68 # 104 +vkNumpad9: int = 0x69 # 105 +vkMultiply: int = 0x6A # 106 +vkAdd: int = 0x6B # 107 +vkSeparator: int = 0x6C # 108 +vkSubtract: int = 0x6D # 109 +vkDecimal: int = 0x6E # 110 +vkDivide: int = 0x6F # 111 +vkF1: int = 0x70 # 112 +vkF2: int = 0x71 # 113 +vkF3: int = 0x72 # 114 +vkF4: int = 0x73 # 115 +vkF5: int = 0x74 # 116 +vkF6: int = 0x75 # 117 +vkF7: int = 0x76 # 118 +vkF8: int = 0x77 # 119 +vkF9: int = 0x78 # 120 +vkF10: int = 0x79 # 121 +vkF11: int = 0x7A # 122 +vkF12: int = 0x7B # 123 +vkF13: int = 0x7C # 124 +vkF14: int = 0x7D # 125 +vkF15: int = 0x7E # 126 +vkF16: int = 0x7F # 127 +vkF17: int = 0x80 # 128 +vkF18: int = 0x81 # 129 +vkF19: int = 0x82 # 130 +vkF20: int = 0x83 # 131 +vkF21: int = 0x84 # 132 +vkF22: int = 0x85 # 133 +vkF23: int = 0x86 # 134 +vkF24: int = 0x87 # 135 + +vkCamera: int = 0x88 # 136 +vkHardwareBack: int = 0x89 # 137 + +vkNumLock: int = 0x90 # 144 +vkScroll: int = 0x91 # 145 +vkLShift: int = 0xA0 # 160 +vkRShift: int = 0xA1 # 161 +vkLControl: int = 0xA2 # 162 +vkRControl: int = 0xA3 # 163 +vkLMenu: int = 0xA4 # 164 +vkRMenu: int = 0xA5 # 165 + +vkBrowserBack: int = 0xA6 # 166 +vkBrowserForward: int = 0xA7 # 167 +vkBrowserRefresh: int = 0xA8 # 168 +vkBrowserStop: int = 0xA9 # 169 +vkBrowserSearch: int = 0xAA # 170 +vkBrowserFavorites: int = 0xAB # 171 +vkBrowserHome: int = 0xAC # 172 +vkVolumeMute: int = 0xAD # 173 +vkVolumeDown: int = 0xAE # 174 +vkVolumeUp: int = 0xAF # 175 +vkMediaNextTrack: int = 0xB0 # 176 +vkMediaPrevTrack: int = 0xB1 # 177 +vkMediaStop: int = 0xB2 # 178 +vkMediaPlayPause: int = 0xB3 # 179 +vkLaunchMail: int = 0xB4 # 180 +vkLaunchMediaSelect: int = 0xB5 # 181 +vkLaunchApp1: int = 0xB6 # 182 +vkLaunchApp2: int = 0xB7 # 183 + +vkSemicolon: int = 0xBA # 186 +vkEqual: int = 0xBB # 187 +vkComma: int = 0xBC # 188 +vkMinus: int = 0xBD # 189 +vkPeriod: int = 0xBE # 190 +vkSlash: int = 0xBF # 191 +vkTilde: int = 0xC0 # 192 +vkLeftBracket: int = 0xDB # 219 +vkBackslash: int = 0xDC # 220 +vkRightBracket: int = 0xDD # 221 +vkQuote: int = 0xDE # 222 +vkPara: int = 0xDF # 223 + +vkOem102: int = 0xE2 # 226 +vkIcoHelp: int = 0xE3 # 227 +vkIco00: int = 0xE4 # 228 +vkProcessKey: int = 0xE5 # 229 +vkIcoClear: int = 0xE6 # 230 +vkPacket: int = 0xE7 # 231 +vkAttn: int = 0xF6 # 246 +vkCrsel: int = 0xF7 # 247 +vkExsel: int = 0xF8 # 248 +vkErEof: int = 0xF9 # 249 +vkPlay: int = 0xFA # 250 +vkZoom: int = 0xFB # 251 +vkNoname: int = 0xFC # 252 +vkPA1: int = 0xFD # 253 +vkOemClear: int = 0xFE # 254 +vkNone: int = 0xFF # 255 + +# Recorded custom gestures ID range +cgiFirst: ... #= -512 +cgiLast: ... #= -1 + +# Registered custom gestures ID range +rgiFirst: ... #= -1024 +rgiLast: ... #= -513 + +igiFirst: ... #= 256 +igiLast: ... #= 511 + +# Interactive gesture id's (self, maps to Windows 7's WM_GESTURE) +igiBegin: ... #1 + igiFirst +igiEnd: ... #2 + igiFirst +igiZoom: ... #3 + igiFirst +igiPan: ... #4 + igiFirst +igiRotate: ... #5 + igiFirst +igiTwoFingerTap: ... #6 + igiFirst +igiPressAndTap: ... #7 + igiFirst +# Extra interactive gestures +igiLongTap: ... #8 + igiFirst +igiDoubleTap: ... #9 + igiFirst + + + +tdiNone: ... # 0 +tdiWarning: ... # 1 +tdiError: ... # 2 +tdiInformation: ... # 3 +tdiShield: ... # 4 + + +bkAbort: int +bkAll: int +bkCancel: int +bkClose: int +bkCustom: int +bkHelp: int +bkIgnore: int +bkNo: int +bkOK: int +bkRetry: int +bkYes: int + +caFree: int +caHide: int +caMinimize: int +caNone: int + +#COLORS +cl3DDkShadow: int = 0xFF000015 +cl3DLight: int = 0xFF000016 +clActiveBorder: int = 0xFF00000A +clActiveCaption: int = 0xFF000002 +clAppWorkSpace: int = 0xFF00000C +clAqua: int = 0xFFFF00 +clBackground: int = 0xFF000001 +clBlack: int = 0 +clBlue: int = 0xFF0000 +clBtnFace: int = 0xFF00000F +clBtnHighlight: int = 0xFF000014 +clBtnShadow: int = 0xFF000010 +clBtnText: int = 0xFF000012 +clCaptionText: int = 0xFF000009 +clCream: int = 0xF0FBFF +clDefault: int = 0x20000000 +clDkGray: int = 0x808080 +clFuchsia: int = 0xFF00FF +clGradientActiveCaption: int = 0xFF00001B +clGradientInactiveCaption: int = 0xFF00001C +clGray: int = 0x808080 +clGrayText: int = 0xFF000011 +clGreen: int = 0x8000 +clHighlight: int = 0xFF00000D +clHighlightText: int = 0xFF00000E +clHotLight: int = 0xFF00001A +clInactiveBorder: int = 0xFF00000B +clInactiveCaption: int = 0xFF000003 +clInactiveCaptionText: int = 0xFF000013 +clInfoBk: int = 0xFF000018 +clInfoText: int = 0xFF000017 +clLime: int = 0xFF00 +clLtGray: int = 0xC0C0C0 +clMaroon: int = 0x80 +clMedGray: int = 0xA4A0A0 +clMenu: int = 0xFF000004 +clMenuBar: int = 0xFF00001E +clMenuHighlight: int = 0xFF00001D +clMenuText: int = 0xFF000007 +clMoneyGreen: int = 0xC0DCC0 +clNavy: int = 0x800000 +clNone: int = 0x1FFFFFFF +clOlive: int = 0x8080 +clPurple: int = 0x800080 +clRed: int = 0xFF +clScrollBar: int = 0xFF000000 +clSilver: int = 0xC0C0C0 +clSkyBlue: int = 0xF0CAA6 +clSystemColor: int = 0xFF000000 +clTeal: int = 0x808000 +clWebAliceBlue: int = 0xFFF8F0 +clWebAntiqueWhite: int = 0xD7EBFA +clWebAqua: int = 0xFFFF00 +clWebAquamarine: int = 0xD4FF7F +clWebAzure: int = 0xFFFFF0 +clWebBeige: int = 0xDCF5F5 +clWebBisque: int = 0xC4E4FF +clWebBlack: int = 0 +clWebBlanchedAlmond: int = 0xCDEBFF +clWebBlue: int = 0xFF0000 +clWebBlueViolet: int = 0xE22B8A +clWebBrown: int = 0x2A2AA5 +clWebBurlywood: int = 0x87B8DE +clWebCadetBlue: int = 0xA09E5F +clWebChartreuse: int = 0xFF7F +clWebChocolate: int = 0x1E69D2 +clWebCoral: int = 0x507FFF +clWebCornFlowerBlue: int = 0xED9564 +clWebCornSilk: int = 0xDCF8FF +clWebCrimson: int = 0x3C14DC +clWebCyan: int = 0xFFFF00 +clWebDarkBlue: int = 0x8B0000 +clWebDarkCyan: int = 0x8B8B00 +clWebDarkGoldenRod: int = 0xB86B8 +clWebDarkGray: int = 0xA9A9A9 +clWebDarkgreen: int = 0x6400 +clWebDarkKhaki: int = 0x6BB7BD +clWebDarkMagenta: int = 0x8B008B +clWebDarkOliveGreen: int = 0x2F6B55 +clWebDarkOrange: int = 0x8CFF +clWebDarkOrchid: int = 0xCC3299 +clWebDarkRed: int = 0x8B +clWebDarkSalmon: int = 0x7A96E9 +clWebDarkSeaGreen: int = 0x8FBC8F +clWebDarkSlateBlue: int = 0x8B3D48 +clWebDarkSlategray: int = 0x4F4F2F +clWebDarkTurquoise: int = 0xD1CE00 +clWebDarkViolet: int = 0xD30094 +clWebDeepPink: int = 0x9314FF +clWebDeepskyBlue: int = 0xFFBF00 +clWebDimGray: int = 0x696969 +clWebDodgerBlue: int = 0xFF901E +clWebFirebrick: int = 0x2222B2 +clWebFloralWhite: int = 0xF0FAFF +clWebForestGreen: int = 0x228B22 +clWebFuchsia: int = 0xFF00FF +clWebGainsboro: int = 0xDCDCDC +clWebGhostWhite: int = 0xFFF8F8 +clWebGold: int = 0xD7FF +clWebGoldenRod: int = 0x20A5DA +clWebGray: int = 0x808080 +clWebGreen: int = 0x8000 +clWebGreenYellow: int = 0x2FFFAD +clWebHoneydew: int = 0xF0FFF0 +clWebHotPink: int = 0xB469FF +clWebIndianRed: int = 0x5C5CCD +clWebIndigo: int = 0x82004B +clWebIvory: int = 0xF0FFFF +clWebKhaki: int = 0x8CE6F0 +clWebLavender: int = 0xFAE6E6 +clWebLavenderBlush: int = 0xF5F0FF +clWebLawnGreen: int = 0xFC7C +clWebLemonChiffon: int = 0xCDFAFF +clWebLightBlue: int = 0xE6D8AD +clWebLightCoral: int = 0x8080F0 +clWebLightCyan: int = 0xFFFFE0 +clWebLightGoldenrodYellow: int = 0xD2FAFA +clWebLightGreen: int = 0x90EE90 +clWebLightgrey: int = 0xD3D3D3 +clWebLightPink: int = 0xC1B6FF +clWebLightSalmon: int = 0x7AA0FF +clWebLightSeaGreen: int = 0xAAB220 +clWebLightSkyBlue: int = 0xFACE87 +clWebLightSlateGray: int = 0x998877 +clWebLightSteelBlue: int = 0xDEC4B0 +clWebLightYellow: int = 0xE0FFFF +clWebLime: int = 0xFF00 +clWebLimeGreen: int = 0x32CD32 +clWebLinen: int = 0xE6F0FA +clWebMagenta: int = 0xFF00FF +clWebMaroon: int = 0x80 +clWebMediumAquamarine: int = 0xAACD66 +clWebMediumBlue: int = 0xCD0000 +clWebMediumOrchid: int = 0xD355BA +clWebMediumPurple: int = 0xDB7093 +clWebMediumSeaGreen: int = 0x71B33C +clWebMediumSlateBlue: int = 0xEE687B +clWebMediumSpringGreen: int = 0x9AFA00 +clWebMediumTurquoise: int = 0xCCD148 +clWebMediumVioletRed: int = 0x8515C7 +clWebMidnightBlue: int = 0x701919 +clWebMintcream: int = 0xFAFFF5 +clWebMistyRose: int = 0xE1E4FF +clWebMoccasin: int = 0xB5E4FF +clWebNavajoWhite: int = 0xADDEFF +clWebNavy: int = 0x800000 +clWebOldLace: int = 0xE6F5FD +clWebOlive: int = 0x8080 +clWebOliveDrab: int = 0x238E6B +clWebOrange: int = 0xA5FF +clWebOrangeRed: int = 0x45FF +clWebOrchid: int = 0xD670DA +clWebPaleGoldenrod: int = 0xAAE8EE +clWebPaleGreen: int = 0x98FB98 +clWebPaleTurquoise: int = 0xEEEEAF +clWebPaleVioletRed: int = 0x9370DB +clWebPapayaWhip: int = 0xD5EFFF +clWebPeachPuff: int = 0xB9DAFF +clWebPeru: int = 0x3F85CD +clWebPink: int = 0xCBC0FF +clWebPlum: int = 0xDDA0DD +clWebPowderBlue: int = 0xE6E0B0 +clWebPurple: int = 0x800080 +clWebRed: int = 0xFF +clWebRosyBrown: int = 0x8F8FBC +clWebRoyalBlue: int = 0xE16941 +clWebSaddleBrown: int = 0x13458B +clWebSalmon: int = 0x7280FA +clWebSandyBrown: int = 0x60A4F4 +clWebSeaGreen: int = 0x578B2E +clWebSeashell: int = 0xEEF5FF +clWebSienna: int = 0x2D52A0 +clWebSilver: int = 0xC0C0C0 +clWebSkyBlue: int = 0xEBCE87 +clWebSlateBlue: int = 0xCD5A6A +clWebSlateGray: int = 0x908070 +clWebSnow: int = 0xFAFAFF +clWebSpringGreen: int = 0x7FFF00 +clWebSteelBlue: int = 0xB48246 +clWebTan: int = 0x8CB4D2 +clWebTeal: int = 0x808000 +clWebThistle: int = 0xD8BFD8 +clWebTomato: int = 0x4763FF +clWebTurquoise: int = 0xD0E040 +clWebViolet: int = 0xEE82EE +clWebWheat: int = 0xB3DEF5 +clWebWhite: int = 0xFFFFFF +clWebWhiteSmoke: int = 0xF5F5F5 +clWebYellow: int = 0xFFFF +clWebYellowGreen: int = 0x32CD9A +clWhite: int = 0xFFFFFF +clWindow: int = 0xFF000005 +clWindowFrame: int = 0xFF000006 +clWindowText: int = 0xFF000008 +clYellow: int = 0xFFFF +cmBlackness: int = 0x42 +cmDstInvert: int = 0x550009 +cmMergeCopy: int = 0xC000CA +cmMergePaint: int = 0xBB0226 +cmNotSrcCopy: int = 0x330008 +cmNotSrcErase: int = 0x1100A6 +cmPatCopy: int = 0xF00021 +cmPatInvert: int = 0x5A0049 +cmPatPaint: int = 0xFB0A09 +cmSrcAnd: int = 0x8800C6 +cmSrcCopy: int = 0xCC0020 +cmSrcErase: int = 0x440328 +cmSrcInvert: int = 0x660046 +cmSrcPaint: int = 0xEE0086 +cmWhiteness: int = 0xFF0062 +ExtendedColorsCount: int = 4 +MASK_TF_COMPOSITED: int = 0x800000 +rc3_Cursor: int = 2 +rc3_Icon: int = 1 +rc3_StockIcon: int = 0 +StandardColorsCount: int = 0x10 +WebColorsCount: int = 0x8C + + +fmCreate: int +fmOpenRead: int +fmOpenReadWrite: int +fmOpenWrite: int +fmShareCompat: int +fmShareDenyNone: int +fmShareDenyRead: int +fmShareDenyWrite: int +fmShareExclusive: int + +fsBorder: str +fsSurface: str +gdFixed: str +gdFocused: str +gdSelected: str +mdNearest: int +mdNull: int +mdPrimary: int + +ssAlt: str +ssCtrl: str +ssDouble: str +ssLeft: str +ssMiddle: str +ssRight: str +ssShift: str + + +class _PTR: ... +class AbstractStyleServices: ... +class ActionListEnumerator: ... +class ActionListState: ... +class ActivityIndicator: ... +class ActivityIndicatorColor: ... +class ActivityIndicatorSize: ... +class ActivityIndicatorType: ... +class AlignInfo: ... +class Alignment: ... +class AlphaFormat: ... +class Anchors: ... +class Any: ... +class Application: ... +class Array: ... +class Assembly: ... +class AsyncConstArrayFunctionEvent: ... +class AsyncConstArrayProc: ... +class AsyncConstArrayProcedureEvent: ... +class AsyncFunctionEvent: ... +class ASyncProcedureEvent: ... +class BAdvancedCustomDrawBtnEvent: ... +class BandPaintOptions: ... +class BaseAsyncResult: ... +class BaseLinkingBindSource: ... +class BaseObjectBindSource: ... +class BasicActionLink: ... +class BCustomDrawEvent: ... +class BDrawingStyle: ... +class BevelCut: ... +class BevelEdges: ... +class BevelInner: ... +class BevelKind: ... +class BevelWidth: ... +class BGradientDrawingOptions: ... +class BiDiMode: ... +class BindCompAssignedValueEvent: ... +class BindCompAssigningValueEvent: ... +class BindCompEvalErrorEvent: ... +class BindCompExpressionType: ... +class BindingAssignValueRec: ... +class BindingExpression: ... +class BindingLocationUpdatedEvent: ... +class BindingsListEnumerator: ... +class BindSourceAdapter: ... +class BindSourceAdapterField: ... +class BitmapHandleType: ... +class BitmapImage: ... +class BNewButtonEvent: ... +class BorderIcons: ... +class BorderStyle: ... +class BorderWidth: ... +class Brush: ... +class ButtonControl: ... +class ButtonLayout: ... +class ButtonSet: ... +class Byte: ... +class Bytes: ... +class CanvasOrientation: ... +class CanvasState: ... +class Caption: ... +class Cardinal: ... +class CategoryPanelClass: ... +class CategoryPanelSurface: ... +class CategoryPanelSurfaceClass: ... +class CellSpan: ... +class ChangeLink: ... +class CheckStyles: ... +class Class: ... +class CMExit: ... +class CMObjectMsg: ... +class ColAlignments: ... +class CollectionEnumerator: ... +class CollectionItem: ... +class CollectionItemClass: ... +class CollectionNotification: ... +class Color: ... +class ColorBoxStyle: ... +class ColorNames: ... +class ColorRef: ... +class Colors: ... +class Cols: ... +class ColWidths: ... +class ComboChildren: ... +class CommonAVI: ... +class CommonDialog: ... +class ComponentClass: ... +class ComponentEnumerator: ... +class ComponentName: ... +class ComponentState: ... +class ComponentStyle: ... +class ControlActionLink: ... +class ControlActionLinkClass: ... +class ControlListItem: ... +class ControlScrollBar: ... +class ControlState: ... +class ControlStyle: ... +class CopyMode: ... +class CreateAdapterEvent: ... +class CreateParams: ... +class CultureInfo: ... +class Currency: ... +class Cursor: ... +class CustomBindGridListLink: ... +class CustomBindLink: ... +class CustomButtonedEdit: ... +class CustomCategoryPanelGroup: ... +class CustomComboBoxstrClass: ... +class CustomDataGeneratorAdapter: ... +class CustomDrawStage: ... +class CustomDrawState: ... +class CustomDrawTarget: ... +class CustomFileDialog: ... +class CustomHint: ... +class CustomShortCutList: ... +class CustomStyleEngine: ... +class CustomStyleEngineClass: ... +class CustomStyleServicesClass: ... +class Date: ... +class DateTime: ... +class DateTimeKind: ... +class DCalAlignment: ... +class DDateFormat: ... +class DDateMode: ... +class DefaultMonitor: ... +class DesignInfo: ... +class DisplayCode: ... +class DockClients: ... +class DockOrientation: ... +class DragDockObject: ... +class DragObject: ... +class DrawItemEvent: ... +class Duplicates: ... +class DWORD: ... +class ECommonCalExceptClass: ... +class EdgeBorders: ... +class EdgeStyle: ... +class EditButtonClass: ... +class EditCharCase: ... +class EditStyle: ... +class ElementColor: ... +class ElementEdgeFlags: ... +class ElementEdges: ... +class ElementMargin: ... +class ElementMargins: ... +class ElementSize: ... +class Encoding: ... +class EnumActionListEvent: ... +class EnumActionListRef: ... +class ExpandStyle: ... +class ExpressionsBindComponent: ... +class Extended80Rec: ... +class Extended: ... +class FavoriteLinkItems: ... +class FileDialogOptions: ... +class FileDialogOverwriteResponse: ... +class FileDialogShareViolationResponse: ... +class FileEditStyle: ... +class FileName: ... +class Filer: ... +class FileTypeIndex: ... +class FileTypeItems: ... +class FillBreakGroups: ... +class FillStyle: ... +class FindGraphicClassContext: ... +class FindGraphicClassEvent: ... +class FindItemKind: ... +class Font: ... +class FontCharset: ... +class FontName: ... +class FontStyles: ... +class FormatExpressions: ... +class FormBorderStyle: ... +class FormState: ... +class FormStyle: ... +class GeneratorFieldDefs: ... +class GestureEvent: ... +class GestureEventInfo: ... +class GetChildProc: ... +class GetDeltaStreamsEvent: ... +class GetStreamProc: ... +class GlassFrame: ... +class GradientDirection: ... +class GraphicClass: ... +class GraphicsObject: ... +class GridCoord: ... +class GridDrawInfo: ... +class GridDrawingStyle: ... +class GridDrawState: ... +class GridOptions: ... +class GridRect: ... +class GridScrollDirection: ... +class GridState: ... +class GUID: ... +class HAccel: ... +class Handle: ... +class HashTable: ... +class HBITMAP: ... +class HDC: ... +class HelpContext: ... +class HelpType: ... +class HENHMETAFILE: ... +class HFont: ... +class HICON: ... +class HIMAGELIST: ... +class HINST: ... +class HintEvent: ... +class HintInfo: ... +class HitTests: ... +class HKL: ... +class HMENU: ... +class HMenu: ... +class HMONITOR: ... +class HotTrackCellInfo: ... +class HPALETE: ... +class HPALETTE: ... +class HREEITEM: ... +class HResult: ... +class HRGN: ... +class HWND: ... +class HWnd: ... +class HWndWrapper: ... +class IAsyncResult: ... +class IBindListEditorItem: ... +class IChangeNotifier: ... +class IComparer: ... +class IControlEditorName: ... +class IDependencyList: ... +class IDesignerHook: ... +class IDesignerNotify: ... +class IDockManager: ... +class IEditFormatLink: ... +class IFileDialog: ... +class IHelpSystem: ... +class ILocation: ... +class ImageFormat: ... +class ImageIndex: ... +class ImageName: ... +class ImeMode: ... +class ImeName: ... +class InplaceEdit: ... +class InteractiveGestureOptions: ... +class InteractiveGestures: ... +class IntPtr: ... +class IObserver: ... +class IOleForm: ... +class IScope: ... +class IScopeActive: ... +class IScopeCurrentRecord: ... +class IScopeEditLink: ... +class IScopeEditor: ... +class IScopeGetRecord: ... +class IScopeLocate: ... +class IScopeLookup: ... +class IScopeMemberNames: ... +class IScopeMemberScripting: ... +class IScopeNavigator: ... +class IScopeNavigatorUpdates: ... +class IScopeRecordEnumerable: ... +class IScopeRecordEnumerator: ... +class IScopeState: ... +class IShellItem: ... +class IShellItemArray: ... +class IStringAdapter: ... +class ItemChange: ... +class ItemFind: ... +class ItemHeight: ... +class ItemIndex: ... +class ItemStates: ... +class IUnknown: ... +class IValue: ... +class IValueRefConverter: ... +class LBGetColorsEvent: ... +class LeftRight: ... +class LinkAlignment: ... +class LinkControlToFieldDirection: ... +class List: ... +class ListArrangement: ... +class ListBoxItemData: ... +class ListColumn: ... +class ListColumns: ... +class ListGroups: ... +class ListHotTrackStyles: ... +class ListHotTrackStyles: ... +class ListItemClass: ... +class ListItems: ... +class LoadResources: ... +class LONG_PR: ... +class LPARAM: ... +class LRESULT: ... +class MarginSize: ... +class MDIChildren: ... +class MeasureItemEvent: ... +class MenuActionLink: ... +class MenuActionLinkClass: ... +class MenuAnimation: ... +class MenuAutoFlag: ... +class MenuBreak: ... +class MenuChangeEvent: ... +class MenuItemAutoFlag: ... +class MenuItemEnumerator: ... +class Message: ... +class Methods: ... +class ModalResult: ... +class MonthCalColors: ... +class MPBtnType: ... +class MPDevCapsSet: ... +class MPDeviceTypes: ... +class MPModes: ... +class MPNotifyValues: ... +class MPTimeFormats: ... +class Msg: ... +class MultiSelectStyle: ... +class NativeInt: ... +class nil: ... +class NodeAttachMode: ... +class NodeCheckState: ... +class NotifyDistanceEvent: ... +class NotifyEvent: ... +class NotifyIconData: ... +class NumberBoxButtonType: ... +class NumberBoxMode: ... +class NumberBoxSpinButtonOptions: ... +class NumGlyphs: ... +class Observers: ... +class OFNotifyEx: ... +class OpenFileName: ... +class OpenOptions: ... +class OpenOptionsEx: ... +class Operation: ... +class OriginalParentCalcType: ... +class OutputConverters: ... +class OwnedCollection: ... +class OwnerDrawState: ... +class PanelBevel: ... +class PChar: ... +class Pen: ... +class PInterfaceEntry: ... +class PInterfaceTable: ... +class PixelFormat: ... +class Pointer: ... +class PopupAlignment: ... +class PopupMode: ... +class PopupWndArray: ... +class Position: ... +class PositionToolTip: ... +class PRect: ... +class PResStringRec: ... +class PrintScale: ... +class Proc: ... +class ProgressEvent: ... +class ProgressStage: ... +class PRTLCriticalSection: ... +class PStyleInfo: ... +class PSystemTime: ... +class PThemedElementDetails: ... +class PWideChar: ... +class Reader: ... +class Rectint: ... +class ReservedControlData: ... +class ResType: ... +class RowCollection: ... +class RowSize: ... +class ScaledGraphicDrawerClass: ... +class ScalingFlags: ... +class ScopeMappings: ... +class ScopeMemberType: ... +class Screen: ... +class ScrollBarInc: ... +class ScrollBarKind: ... +class ScrollStyle: ... +class SearchDirection: ... +class SeekOrigin: ... +class ShiftState: ... +class ShortCut: ... +class SizeConstraints: ... +class SortType: ... +class SplitRectType: ... +class StatusAction: ... +class StatusPanel: ... +class StatusPanelClass: ... +class StatusPanels: ... +class StringListSortCompare: ... +class StringOptions: ... +class StringsEnumerator: ... +class StyleClassDescriptor: ... +class StyleColor: ... +class StyleElements: ... +class StyleEngineNotification: ... +class StyleFlags: ... +class StyleFont: ... +class StyleServicesHandle: ... +class StyleTextOptions: ... +class SysCharSet: ... +class System: ... +class SystemHooks: ... +class SystemTime: ... +class SystemTimeRangeArray: ... +class TabOrder: ... +class TabPosition: ... +class TabSh: ... +class TabStyle: ... +class Tag: ... +class tagMSG: ... +class TaskbarHandler: ... +class TaskDialogButtonItem: ... +class TaskDialogButtons: ... +class TaskDialogCommonButtons: ... +class TaskDialogFlags: ... +class TaskDialogIcon: ... +class TaskDialogProgressBar: ... +class TaskDialogRadioButtonItem: ... +class TBCustomDrawFlags: ... +class TextFormat: ... +class Theme: ... +class ThemedButton: ... +class ThemedCategoryButtons: ... +class ThemedCategoryPanelGroup: ... +class ThemedCheckListBox: ... +class ThemedClock: ... +class ThemedComboBox: ... +class ThemedControlBar: ... +class ThemedDataNavButtons: ... +class ThemedDatePicker: ... +class ThemedEdit: ... +class ThemedElement: ... +class ThemedElementDetails: ... +class ThemedExplorerBar: ... +class ThemedFlyOut: ... +class ThemedGrid: ... +class ThemedHeader: ... +class ThemedHint: ... +class ThemedLink: ... +class ThemedListView: ... +class ThemedMenu: ... +class ThemedMenuBand: ... +class ThemedMonthCal: ... +class ThemedMPlayerButtons: ... +class ThemedNavigation: ... +class ThemedPage: ... +class ThemedPanel: ... +class ThemedProgress: ... +class ThemedRebar: ... +class ThemedScrollBar: ... +class ThemedSearchIndicators: ... +class ThemedSpin: ... +class ThemedStartPanel: ... +class ThemedStatus: ... +class ThemedTab: ... +class ThemedTabSet: ... +class ThemedTaskBand: ... +class ThemedTaskBar: ... +class ThemedTaskDialog: ... +class ThemedTextLabel: ... +class ThemedTextStyle: ... +class ThemedToggleSwitch: ... +class ThemedToolBar: ... +class ThemedToolTip: ... +class ThemedTrackBar: ... +class ThemedTrayNotify: ... +class ThemedTreeview: ... +class ThemedWindow: ... +class TickMark: ... +class TickStyle: ... +class TileMode: ... +class Time: ... +class TipMode: ... +class TitleBar: ... +class ToggleSwitchState: ... +class ToggleSwitchStateCaptions: ... +class ToolBarEnumerator: ... +class ToolButtonStyle: ... +class TouchManager: ... +class TouchProperty: ... +class TrackBarOrientation: ... +class TrackButton: ... +class TransparentMode: ... +class TreeNodeClass: ... +class TreeNodes: ... +class TVCompare: ... +class TVCompareProc: ... +class TVItem: ... +class TWMPaint: ... +class TWMSetCursor: ... +class TWMTimer: ... +class Type: ... +class UINT: ... +class Value: ... +class VarRec: ... +class VerticalAlignment: ... +class WICImage: ... +class WinControlClass: ... +class WindowHook: ... +class WindowProcPtr: ... +class WMChar: ... +class WmEraseBkgnd: ... +class WMKey: ... +class WMLButtonUp: ... +class WMMenuChar: ... +class WMMouse: ... +class WMMouseActivate: ... +class WMMouseMove: ... +class WMMouseWheel: ... +class WMNCCalcSize: ... +class WMNCHitTest: ... +class WMNCPaint: ... +class WMPaint: ... +class WMSize: ... +class WndMethod: ... +class Word: ... +class WPARAM: ... +class Writer: ... + + +################################################################################################################################################################################################ +################################################################################################################################################################################################ +################################################################################################################################################################################################ + + +class Align: + alNone: ... + alTop: ... + alBottom: ... + alLeft: ... + alRight: ... + alClient: ... + alCustom: ... + +class AnchorKind: + akLeft: ... + akTop: ... + akRight: ... + akBottom: ... + +class BalloonFlags: + ''' + ========================== + Vcl.ExtCtrls.TBalloonFlags + ========================== + + A type specified when showing a ``BalloonHint`` that puts one of the default icons on the balloon message. + + You can set ``BalloonFlags`` to one of the following values: + + - ``bfNone`` + - ``bfInfo`` + - ``bfWarning`` + - ``bfError`` + ''' + + bfNone: ... #NIIF_NONE + bfInfo: ... #NIIF_INFO + bfWarning: ... #NIIF_WARNING + bfError: ... #NIIF_ERROR + +class BandDrawingStyle: + self: ... + dsNormal: ... + dsGradient: ... + +class BandPaintOption: + self: ... + bpoGrabber: ... + bpoFrame: ... + bpoGradient: ... + bpoRoundRect: ... + +class BitBtnKind: + bkCustom: ... + bkOK: ... + bkCancel: ... + bkHelp: ... + bkYes: ... + bkNo: ... + bkClose: ... + bkAbort: ... + bkRetry: ... + bkIgnore: ... + bkAll: ... + +class BevelShape: + bsBox: ... + bsFrame: ... + bsTopLine: ... + bsBottomLine: ... + bsLeftLine: ... + bsRightLine: ... + bsSpacer: ... + +class BevelStyle: + bsLowered: ... + bsRaised: ... + +class BorderIcon: + biSystemMenu: ... + biMinimize: ... + biMaximize: ... + biHelp: ... + +class ButtonPosition: + bpLeft = "bpLeft" + bpRight = "bpRight" + +class ButtonState: + bsNormal = "bsNormal" + bsHot = "bsHot" + bsPushed = "bsPushed" + +class ButtonStyle: + bsPushButton: ... + bsCommandLink: ... + bsSplitButton: ... + +class CalDayOfWeek: + dowMonday: ... + dowTuesday: ... + dowWednesday: ... + dowThursday: ... + dowFriday: ... + dowSaturday: ... + dowSunday: ... + dowLocaleDefault: ... + +class CheckBoxState: + cbUnchecked: ... + cbChecked: ... + cbGrayed: ... + +class CloseAction: + caNone: ... + caHide: ... + caFree: ... + caMinimize: ... + +class ColorBoxStyles: + cbStandardColors: ... # first sixteen RGBI colors + cbExtendedColors: ... # four additional reserved colors + cbSystemColors: ... # system managed/defined colors + cbIncludeNone: ... # include clNone color, must be used with cbSystemColors + cbIncludeDefault: ... # include clDefault color, must be used with cbSystemColors + cbCustomColor: ... # first color is customizable + cbPrettyNames: ... + cbCustomColors: ... # All colors are custom colors + +class ComboBoxStyle: + csDropDown: ... + csSimple: ... + csDropDownList: ... + csOwnerDrawFixed: ... + csOwnerDrawVariable: ... + +class CornerEdge: + self: ... + ceNone: ... + ceSmall: ... + ceMedium: ... + ceLarge: ... + +class CustomGridPanel: pass + +class DialogType: + Standard: ... + Directory: ... + +class DockPos: + Control: Control + Insets: Rect + Visible: bool + Break: bool + Pos: Point + Width: int + + Height: int + RowCount: int + TempRow: int + Parent: DockPos + SubItem: DockPos + + # TempBreak(self) -> bool: ... + TempPos: Point + TempWidth: int + +class DragKind: + dkDrag: ... + dkDock: ... + +class DragMode: + ''' + ======================== + System.UITypes.TDragMode + ======================== + + ``DragMode`` indicates how a control initiates drag operations. + + ``DragMode`` can have one of the following values: + + =============== ============================================================================================================================================================= + **Value** **Meaning** + =============== ============================================================================================================================================================= + ``dmAutomatic`` The control begins a drag operation automatically when the user clicks and drags it. + ``dmManual`` The control cannot be dragged until the application calls the `BeginDragDrop <FMX.Platform.IFMXDragDropService.BeginDragDrop.htm>`__ method. + =============== ============================================================================================================================================================= + ''' + dmManual: ... + dmAutomatic: ... + +class DragState: + dsDragEnter: ... + dsDragLeave: ... + dsDragMove: ... + +class EllipsisPosition: + epNone: ... + epPathEllipsis: ... + epEndEllipsis: ... + +class FlowStyle: + fsLeftRightTopBottom: ... + fsRightLeftTopBottom: ... + fsLeftRightBottomTop: ... + fsRightLeftBottomTop: ... + fsTopBottomLeftRight: ... + fsBottomTopLeftRight: ... + fsTopBottomRightLeft: ... + fsBottomTopRightLeft: ... + +class FontPitch: + fpDefault: ... + fpVariable: ... + fpFixed: ... + +class FontQuality: + fqDefault: ... + fqDraft: ... + fqProof: ... + fqNonAntialiased: ... + fqAntialiased: ... + fqClearType: ... + fqClearTypeNatural: ... + +class FontStyle: + fsBold: ... + fsItalic: ... + fsUnderline: ... + fsStrikeOut: ... + +class HeaderState: + hsNormal: ... + hsHot: ... + hsPressed: ... + +class HeaderStyle: + hsGradient: ... + hsImage: ... + hsThemed: ... + +class ImageAlignment: + iaLeft: ... + iaRight: ... + iaTop: ... + iaBottom: ... + iaCenter: ... + +class LabelPosition: + lpAbove: ... + lpBelow: ... + lpLeft: ... + lpRight: ... + +class ListBoxStyle: + lbStandard: ... + lbOwnerDrawFixed: ... + lbOwnerDrawVariable: ... + lbVirtual: ... + lbVirtualOwnerDraw: ... + +class Margins(Persistent): + ''' + ===================== + Vcl.Controls.TMargins + ===================== + + Contains margins for the control. + + ``Margins`` is used in the `Margins <Vcl.Controls.TControl.Margins.htm>`__ property of `Control <Vcl.Controls.TControl.htm>`__ and its descendants. ``Margins`` help define the relative position between components on a form, and between the edges of the ``Form`` and the component. For example, when you set a left margin for a component to 10 pixels, the component will not come closer than 10 pixels to the edge of the container, or to another component on the left edge. The number of pixels by which two components are separated is the sum of the pixels of both components. + + For example, if you place a component on the ``Form`` with a left margin of 10 pixels, then add another component to its left with a right margin of 20 pixels, the closest the two components can come together on those edges is 30 pixels. + + You can define the amount of margin that should surround the component on the *top*, *left*, *bottom*, or *right* by changing the pixel value for the ``Margins`` property in the *Object Inspector*. + + .. note:: For the ``Margins`` settings to take effect on a component, you must also set its ``AlignWithMargins`` property to ``True``. + ''' + + Control: Control + ''' + Specifies the control for which the margins apply. + + Use ``Control`` to determine the control for which the margins apply. + ''' + ControlLeft: int + ''' + Sets the starting point for the left side of the control. + + Use the ``ControlLeft`` property to set the starting point of the left side of the control. This value includes the margins. + ''' + ControlTop: int + ''' + Sets the starting point of the ``Top`` of the control. + + Use the ``ControlTop`` property to set the starting point of the ``Top`` of the control. This value includes the margins. + ''' + ControlWidth: int + ''' + Sets the width of the control. + + Use the ``ControlWidth`` property to set the width of the control. This value includes the width of the margins. + ''' + ControlHeight: int + ''' + Sets the height of the control. + + Use the ``ControlHeight`` property to set the height of the control. This height includes the height of the margins. + ''' + ExplicitLeft: int + ''' + Specifies the horizontal coordinate of the left edge of a control, relative to its parent. + + ``ExplicitLeft`` specifies the horizontal coordinate of the left edge of a control, relative to its parent. + ''' + ExplicitTop: int + ''' + Specifies the vertical coordinate of the top left corner of a control relative to its parent. + + ``ExplicitTop`` specifies the vertical coordinate of the top left corner of a control relative to its parent. + ''' + ExplicitWidth: int + ''' + Specifies the width for the control. + + ``ExplicitWidth`` specifies the width for the control. + ''' + ExplicitHeight: int + ''' + Specifies the height for the control. + + ``ExplicitHeight`` specifies the height for the control. + ''' + Left: MarginSize + ''' + Specifies the left edge of the margin. + + Use the ``Left`` property to specify the left edge of the margin. + ''' + Top: MarginSize + ''' + Specifies the top edge of the margin. + + Use the ``Top`` property to specify the top edge of the margin. + ''' + Right: MarginSize + ''' + Specifies the right edge of the margin. + + Use the ``Right`` property to specify the right edge of the margin. + ''' + Bottom: MarginSize + ''' + Specifies the bottom edge of the margin. + + Use the ``Bottom`` property to specify the bottom edge of the margin. + ''' + def Change(self) -> None: + ''' + Generates an `OnChange <Vcl.Controls.TMargins.OnChange.htm>`__ event. + + ``Change()`` is called automatically when the margins change. This method calls the `OnChange <Vcl.Controls.TMargins.OnChange.htm>`__ event handler, if one is assigned. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of an object to a destination object. + + Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method to extend the functionality of the `Assign <System.Classes.TPersistent.Assign.htm>`__ method of destination objects so that they handle newly created object classes. When defining a new object class, override the `Assign <System.Classes.TPersistent.Assign.htm>`__ method for every existing object class that should be able to copy its properties to the new class. Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method for every existing class to which the new class can copy. + + The `Assign <System.Classes.TPersistent.Assign.htm>`__ method of `Persistent <System.Classes.TPersistent.htm>`__ calls `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ if the descendant object does not succeed in copying the properties of a source object. The `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method defined by `Persistent <System.Classes.TPersistent.htm>`__ raises an ``EConvertError`` exception. + + For example, given the following code in which ``'A'`` and ``'B'`` are instance variables: + + .. code-block:: python + :caption: Delphi + + A.Assign(B); {Delphi} + + .. code-block:: python + :caption: C++ + + A->Assign(B); // C++ + + if ``'A'`` knows how to handle ``'B'``, then it does so and returns. If ``'A'`` doesn't know how to handle ``'B'``\ stype, execution will trickle to the `Persistent <System.Classes.TPersistent.htm>`__ version of `Assign <System.Classes.TPersistent.Assign.htm>`__, which calls: + + .. code-block:: python + :caption: Delphi + + B.AssignTo(A); {Delphi} + + .. code-block:: python + :caption: C++ + + B->AssignTo(A); // C++ + + If ``'B'`` knows how to copy to ``'A'``, the assignment succeeds. Otherwise, `Persistent <System.Classes.TPersistent.htm>`__ raises an exception. + ''' + def GetControlBound(self, Index: int) -> int: + ''' + Sets the coordinates and the limits for the margins of a control. + + ``GetControlBound()`` is called to set the control's margins, coordinates, and sizes. + ''' + def InitDefaults(self, Margins: Margins) -> None: + ''' + Initializes the coordinates of a control. + + ``InitDefaults()`` is called to set the initial values for the `Left <Vcl.Controls.TMargins.Left.htm>`__, `Right <Vcl.Controls.TMargins.Right.htm>`__, `Top <Vcl.Controls.TMargins.Top.htm>`__, and `Bottom <Vcl.Controls.TMargins.Bottom.htm>`__ properties. + ''' + def Create(self, Control: Control) -> None: + ''' + Creates a `Margins <Vcl.Controls.TMargins.htm>`__ instance. + + ``Create()`` is a virtual method that creates and initializes a `Margins <Vcl.Controls.TMargins.htm>`__ object. + ''' + @overload + def SetControlBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int, Aligning: bool) -> None: + ''' + No have docs. + ''' + @overload + def SetControlBounds(self, ARect: Rect, Aligning: bool) -> None: + ''' + No have docs. + ''' + def SetBounds(self, ALeft: int, ATop: int, ARight: int, ABottom: int) -> None: + ''' + Sets the properties for the left, top, right, and bottom margins all at once. + + Use the ``SetBounds()`` method to specify the values for the `Left <Vcl.Controls.TMargins.Left.htm>`__, `Top <Vcl.Controls.TMargins.Top.htm>`__, `Right <Vcl.Controls.TMargins.Right.htm>`__, and `Bottom <Vcl.Controls.TMargins.Bottom.htm>`__ properties as the value of the ``ALeft``, ``ATop``, ``ARight``, and ``ABottom`` parameters, respectively. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when margins change. + + Use ``OnChange`` to write a handler to perform an action then the margin changes. + + ``OnChange`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + +class MonitorDefaultTo: + mdNearest: ... + mdNull: ... + mdPrimary: ... + +class MouseActivate: + maDefault: ... + maActivate: ... + maActivateAndEat: ... + maNoActivate: ... + maNoActivateAndEat: ... + +class MouseButton: + mbLeft: ... + mbRight: ... + mbMiddle: ... + +class MsgDlgBtn: + mbYes: ... + mbNo: ... + mbOK: ... + mbCancel: ... + mbAbort: ... + mbRetry: ... + mbIgnore: ... + mbAll: ... + mbNoToAll: ... + mbYesToAll: ... + mbHelp: ... + mbClose: ... + +class MsgDlgType: + mtWarning: ... + mtError: ... + mtInformation: ... + mtConfirmation: ... + mtCustom: ... + +class OpenOption: + ofReadOnly: ... + ofOverwritePrompt: ... + ofHideReadOnly: ... + ofNoChangeDir: ... + ofShowHelp: ... + ofNoValidate: ... + ofAllowMultiSelect: ... + ofExtensionDifferent: ... + ofPathMustExist: ... + ofFileMustExist: ... + ofCreatePrompt: ... + ofShareAware: ... + ofNoReadOnlyReturn: ... + ofNoTestFileCreate: ... + ofNoNetworkButton: ... + ofNoLongNames: ... + ofOldStyleDialog: ... + ofNoDereferenceLinks: ... + ofEnableIncludeNotify: ... + ofEnableSizing: ... + ofDontAddToRecent: ... + ofForceShowHidden: ... + +class OpenOptionEx: + ofExNoPlacesBar: ... + +class Padding(Margins): + ''' + ===================== + Vcl.Controls.TPadding + ===================== + + Contains the padding for the control. + + ``Padding`` is used in the ``Padding`` property of ``Control`` and its descendants. It specifies the padding of a control. + + ``Padding`` adds space along the edge the control. Child controls that are aligned to the parent are positioned inside the control according to this spacing. ``Padding`` does not affect child controls which are not aligned to the parent control, nor does it affect the size of the ``ClientArea``. + + ``Padding`` is the opposite of ``Margins``. Margins affects the positioning of the control itself inside the parent control, but ``Padding`` affects how all aligned child controls are positioned with respect to the parent control. + ''' + + Left: int + ''' + Specifies the left edge of the margin. + + Use the `Left <Vcl.Controls.TMargins.Left.htm>`__ property to specify the left edge of the margin. + ''' + Top: int + ''' + Specifies the top edge of the margin. + + Use the `Top <Vcl.Controls.TMargins.Top.htm>`__ property to specify the top edge of the margin. + ''' + Right: int + ''' + Specifies the right edge of the margin. + + Use the `Right <Vcl.Controls.TMargins.Right.htm>`__ property to specify the right edge of the margin. + ''' + Bottom: int + ''' + Specifies the bottom edge of the margin. + + Use the `Bottom <Vcl.Controls.TMargins.Bottom.htm>`__ property to specify the bottom edge of the margin. + ''' + def InitDefaults(self, Margins: Margins) -> None: + ''' + Initializes the edges of the padding. + + ``InitDefaults()`` is called to set the initial values for the `Left <Vcl.Controls.TMargins.Left.htm>`__, `Right <Vcl.Controls.TMargins.Right.htm>`__, `Top <Vcl.Controls.TMargins.Top.htm>`__, and `Bottom <Vcl.Controls.TMargins.Bottom.htm>`__ properties. + ''' + +class PageMeasureUnits: + pmDefault: ... + pmMillimeters: ... + pmInches: ... + +class PageSetupDialogOption: + psoDefaultMinMargins: ... + psoDisableMargins: ... + psoDisableOrientation: ... + psoDisablePagePainting: ... + psoDisablePaper: ... + psoDisablePrinter: ... + psoMargins: ... + psoMinMargins: ... + psoShowHelp: ... + psoWarning: ... + psoNoNetworkButton: ... + +class PageType: + ptEnvelope: ... + ptPaper: ... + +class PrintDialogOption: + poPrintToFile: ... + poPageNums: ... + poSelection: ... + poWarning: ... + poHelp: ... + poDisablePrintToFile: ... + +class PrinterCapability: + pcCopies: ... + pcOrientation: ... + pcCollation: ... + +class PrinterKind: + pkDotMatrix: ... + pkHPPCL: ... + +class PrinterOrientation: + poPortrait: ... + poLandscape: ... + +class PrinterState: + psNoHandle: ... + psHandleIC: ... + psHandleDC: ... + +class PrintRange: + prAllPages: ... + prSelection: ... + prPageNums: ... + +class ResizeStyle: + rsNone: ... + rsLine: ... + rsUpdate: ... + rsPattern: ... + +class ScrollCode: + scLineUp: ... + scLineDown: ... + scPageUp: ... + scPageDown: ... + scPosition: ... + scTrack: ... + scTop: ... + scBottom: ... + scEndScroll: ... + +class Selection: + StartPos: int + EndPos: int + +class ShapeType: + stRectangle: ... + stSquare: ... + stRoundRect: ... + stRoundSquare: ... + stEllipse: ... + stCircle: ... + +class SizeStyle: + ssAbsolute: ... + ssPercent: ... + ssAuto: ... + +class StaticBorderStyle: + sbsNone: ... + sbsSingle: ... + sbsSunken: ... + +class StringDefined: + sdDelimiter: ... + sdQuoteChar: ... + sdNameValueSeparator: ... + sdLineBreak: ... + sdStrictDelimiter: ... + +class StringsOption: + ''' + ============================= + System.Classes.TStringsOption + ============================= + + Represents a set of `Strings <System.Classes.TStrings.htm>`__ boolean properties. + + ``StringsOption`` represents the following options: + + - ``soStrictDelimiter`` -- Determines the enabled characters that can be used as `delimiters <System.Classes.TStrings.Delimiter.htm>`__ to separate strings. + - ``soWriteBOM`` -- Determines whether to write a *BOM* to the stream and to the file or not. + - ``soTrailingLineBreak`` -- Determines whether or not the `Text <System.Classes.TStrings.Text.htm>`__ property must contain a line break after the last line. + - ``soUseLocale`` -- Determines the implementation that the list of strings must use for string comparison. + ''' + + soStrictDelimiter: ... + soWriteBOM: ... + soTrailingLineBreak: ... + soUseLocale: ... + +class SysLinkType: + sltURL = "sltURL" + sltID = "sltID" + +class TaskDialogCommonButton: + tcbOk: ... + tcbYes: ... + tcbNo: ... + tcbCancel: ... + tcbRetry: ... + tcbClose: ... + +class TaskDialogFlag: + tfEnableHyperlinks: ... + tfUseHiconMain: ... + tfUseHiconFooter: ... + tfAllowDialogCancellation: ... + tfUseCommandLinks: ... + tfUseCommandLinksNoIcon: ... + tfExpandFooterArea: ... + tfExpandedByDefault: ... + tfVerificationFlagChecked: ... + tfShowProgressBar: ... + tfShowMarqueeProgressBar: ... + tfCallbackTimer: ... + tfPositionRelativeToWindow: ... + tfRtlLayout: ... + tfNoDefaultRadioButton: ... + tfCanBeMinimized: ... + tfSizeToContent: ... + +class TextLayout: + tlTop: ... + tlCenter: ... + tlBottom: ... + +class WindowState: + wsNormal: ... + wsMinimized: ... + wsMaximized: ... + +class CustomCheckBox(ButtonControl): + ''' + ============================ + Vcl.StdCtrls.TCustomCheckBox + ============================ + + ``CustomCheckBox`` is the ancestor of all check-box components. + + ``CustomCheckBox`` is an abstract class from which check-box components, including `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ and ``DBCheckBox``, descend. Check boxes present the user with options that can be selected (checked) or deselected (unchecked). + ''' + + Alignment: LeftRight + ''' + Controls the position of the ``CheckBox``\ s. caption. + + If ``Alignment`` is set to ``taRightJustify``, the caption appears to the right of the ``CheckBox``. If ``Alignment`` is set to ``taLeftJustify``, the caption appears to the left of the ``CheckBox``. + ''' + AllowGrayed: bool + ''' + Determines whether a ``CheckBox`` can be in a dimmed state. + + If ``AllowGrayed`` is set to ``True``, the ``CheckBox`` has three possible states: selected, cleared, and dimmed. If ``AllowGrayed`` is set to ``False``, the ``CheckBox`` has only two possible states: selected and cleared. + ''' + State: CheckBoxState + ''' + Indicates whether the ``CheckBox`` is selected, cleared, or dimmed. + + Use ``State`` to determine whether the ``CheckBox`` is selected (``cbChecked``), cleared (``cbUnchecked``), or dimmed (``cbGrayed``). + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def ObserverAdded(self, ID: int, Observer: IObserver) -> None: + ''' + No have docs. + ''' + def ObserverToggle(self, AObserver: IObserver, Value: bool) -> None: + ''' + No have docs. + ''' + def Toggle(self) -> None: + ''' + Changes the state of the ``CheckBox``. + + Use the ``Toggle()`` method to select or deselect the ``CheckBox`` programmatically. ``Toggle()`` switches among the valid check-box states--from checked to unchecked to grayed, or from checked to unchecked. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds to keyboard input. + + When a windowed control receives a key-press message (``WM_CHAR``) from *Windows* , its message handler calls the `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ method. If `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ determines that the control should, in fact, process the character, it calls `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__, passing the key code in the ``Key`` parameter. + + `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ calls any event handler attached to the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Override `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ to provide other responses in addition to the event handler call. + + Either `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ or the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler it calls can suppress further processing of a character by setting the ``Key`` parameter to zero. + + .. note:: The ``Key`` parameter is the character represented by the key that is pressed, not a *Windows* virtual key code. + ''' + def Click(self) -> None: + ''' + ``Click()`` generates an ``Click()`` event. + + The protected ``Click()`` method is called automatically when the ``CheckBox`` is clicked with the mouse. In addition to generating an ``Click()`` event, it sends a message to the parent control's window to indicate that the state of the ``CheckBox`` has changed. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter record. + + The `CreateWnd <Vcl.StdCtrls.TCustomCheckBox.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to ``CreateWindowHandle()``. ``CreateParams()`` fills in the parameter record that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a ``CreateParams()`` record become the parameters to a call to the ``CreateWindowEx`` API function. + + In `CustomCheckBox <Vcl.StdCtrls.TCustomCheckBox.htm>`__, ``CreateParams()`` calls the inherited method, then makes specific adjustments for ``CheckBox``\ es. + ''' + def CreateWnd(self) -> None: + ''' + Creates a *Windows* control corresponding to the ``CheckBox``. + + ``CreateWnd()`` is called automatically when the ``CheckBox`` is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. In `CustomCheckBox <Vcl.StdCtrls.TCustomCheckBox.htm>`__, this method calls the inherited method to generate the underlying windows control, then sends a BM_SETCHECK message to set the check state of the control. + ''' + def GetChecked(self) -> bool: + ''' + Returns the value of the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + + ``GetChecked()`` is the protected implementation of the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. Override this method and the `SetChecked <Vcl.StdCtrls.TCustomCheckBox.SetChecked.htm>`__ method to change the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property in descendant classes. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + Sets the value of the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + + ``SetChecked()`` is the protected implementation of the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. Override this method and the `GetChecked <Vcl.StdCtrls.TCustomCheckBox.GetChecked.htm>`__ method to change the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property in descendant classes. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomCheckBox <Vcl.StdCtrls.TCustomCheckBox.htm>`__ instance. + + Call ``Create()`` to generate a ``CheckBox`` at runtime. Check boxes placed on forms at design time, ``Create()`` is called automatically. + + ``AOwner`` is a component, typically the ``Form``, that is responsible for freeing the ``CheckBox`` instance. + ''' + def GetControlsAlignment(self) -> Alignment: + ''' + Returns the alignment of the ``CheckBox`` caption. + + ``GetControlsAlignment()`` indicates the alignment of the ``CheckBox`` caption. Usually, the caption is right-justified, but if the `UseRightToLeftAlignment <Vcl.StdCtrls.TCustomButton.UseRightToLeftAlignment.htm>`__ method returns ``True`` and the check mark is on the left, then ``GetControlsAlignment()`` indicates that the caption should be left-justified. + ''' + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomColorBox(CustomComboBox): + ''' + ============================ + Vcl.ExtCtrls.TCustomColorBox + ============================ + + ``CustomColorBox`` represents a ``ComboBox`` that lets users select a color. + + ``CustomColorBox`` is the base class for drop-down ``ComboBox``\ es that display a list of colors. The ``ComboBox`` displays a list of all the colors for which the ``Graphics`` unit defines a constant. For a list of these colors, see ``Color``. Each color is displayed next to a small square that is drawn in the corresponding color. + + Do not use ``CustomColorBox`` in applications. It is intended to act as a base class for color selection controls. Rather, to add a drop-down ``ComboBox`` that lets users select a color, use the `ColorBox <Vcl.ExtCtrls.TColorBox.htm>`__ component, which appears on the Additional page of the component palette. + ''' + + Colors: list[Color] + ''' + Lists the colors in the ``ColorBox``. + + Use ``Colors()`` to obtain the value of a color in the ``ColorBox``. + + ``Index`` is the index of the color, where 0 is the index of the first color in the box, 1 is the index of the second color, and so on. + + .. note:: The `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property controls which colors are included in the list. + ''' + ColorNames: list[str] + ''' + Lists the names of the colors in the ``ColorBox``. + + Use ``ColorNames()`` to obtain the name of one of the colors listed in the ``ColorBox``. + + ``Index`` is the index of the name, where 0 is the index of the first color in the box, 1 is the index of the second color, and so on. + + The value of each name is either the name of a color constant defined in the ``Graphics`` unit (such as clBlack), or it is the name of the color with the "cl" stripped off (Black). The `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property determines which name is used for each color. + + The `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property also controls which colors are included in the list. + ''' + Style: ColorBoxStyle + ''' + Controls what colors are listed and how their names are formatted. + + Use ``Style`` to configure what colors appear in the list and how the names appear. ``Style`` is a set that includes 0 or more of the `ColorBoxStyles <Vcl.ExtCtrls.TColorBoxStyles.htm>`__ flags. + ''' + Selected: Color + ''' + Specifies the currently selected color. + + Use ``Selected`` to ``get`` or ``set`` the selected color as a ``Color`` value. + ''' + DefaultColorColor: Color + ''' + Specifies the color displayed in the ``ColorBox`` for ``clDefault``. + + Set ``DefaultColorColor`` to indicate what color the ``ColorBox`` should use when drawing the icon for ``clDefault``. This property only affects the ``ColorBox`` if the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property includes ``cbSystemColors`` and ``cbIncludeDefault``. + + .. note:: ``DefaultColorColor`` only affects the way ``clDefault`` appears in the ``ColorBox``. When you assign ``clDefault`` to a control, the control determines its own default color. + ''' + NoneColorColor: Color + ''' + Specifies the color displayed in the ``ColorBox`` for ``clNone``. + + Set ``NoneColorColor`` to indicate what color the ``ColorBox`` should use when drawing the icon for ``clNone``. This property only affects the ``ColorBox`` if the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property includes ``cbSystemColors`` and ``cbIncludeNone``. + + .. note:: ``NoneColorColor`` only affects the way ``clNone`` appears in the ``ColorBox``. When you assign ``clNone`` to a control, the control determines how to interpret ``clNone``. + ''' + Style: ColorBoxStyle + ''' + Controls what colors are listed and how their names are formatted. + + Use ``Style`` to configure what colors appear in the list and how the names appear. ``Style`` is a set that includes 0 or more of the `ColorBoxStyles <Vcl.ExtCtrls.TColorBoxStyles.htm>`__ flags. + ''' + Selected: Color + ''' + Specifies the currently selected color. + + Use ``Selected`` to ``get`` or ``set`` the selected color as a ``Color`` value. + ''' + DefaulColorColor: Color + ''' + No have docs. + ''' + NoneColorColor: Color + ''' + Specifies the color displayed in the ``ColorBox`` for ``clNone``. + + Set ``NoneColorColor`` to indicate what color the ``ColorBox`` should use when drawing the icon for ``clNone``. This property only affects the ``ColorBox`` if the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property includes ``cbSystemColors`` and ``cbIncludeNone``. + + .. note:: ``NoneColorColor`` only affects the way ``clNone`` appears in the ``ColorBox``. When you assign ``clNone`` to a control, the control determines how to interpret ``clNone``. + ''' + def CloseUp(self) -> None: + ''' + Generates an `OnCloseUp <Vcl.StdCtrls.TCustomCombo.OnCloseUp.htm>`__ event. + + Applications can't call this protected method. It is called automatically when the drop-down list of the ``ComboBox`` closes. + + ``CloseUp()`` generates an `OnCloseUp <Vcl.StdCtrls.TCustomCombo.OnCloseUp.htm>`__ event so that applications can respond when the list closes. + ''' + def CreateWnd(self) -> None: + ''' + Creates the window used to implement the ``ColorBox``. + + Applications can't call this protected method. It is called automatically when the ``ColorBox`` is first created or when the window must be destroyed and recreated to reflect property changes. + + `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ overrides the inherited ``CreateWnd()`` method to populate the ``ComboBox`` with the colors specified by the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property. + ''' + def DrawItem(self, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + Renders an individual item in the ``ColorBox``. + + Applications can't call this protected method. It is called automatically when the ``ColorBox`` needs to paint one of the items in the list. ``DrawItem()`` draws a small box that displays the color that the item represents, followed by the name of the color. + + ``Index`` is the index of the item to draw, where 0 specifies the first item, 1 specifies the second item, and so on. + + ``Rect`` indicates the boundaries of the item on the ``ColorBox``\ s. ``Canvas``, in client coordinates. + + ``State`` indicates state information that can affect the way the item is drawn. In `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__, ``DrawItem()`` uses ``State`` to determine whether an item is selected, but ignores all other state information. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Generates an `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + Applications can't call this protected method. It is called automatically when the user first presses a key while the ``ColorBox`` has focus. + + ``Key`` is the key code of the key that was pressed. + + ``Shift`` indicates the state of the *Ctrl*, *Shift*, and *Alt* keys when ``Key`` was pressed. + + `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ overrides the inherited ``KeyDown()`` method to prepare for the selection of a new color. It then calls the inherited method, which generates an `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Generates an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. + + ``Application``\ s can't call this protected method. It is called automatically when the user presses a key while the ``ColorBox`` has focus. + + ``Key`` is the key code of the key that was pressed. + + `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ overrides the inherited ``KeyPress()`` method to display a color selection dialog if the user presses the *Enter* key while the custom color item has focus. Otherwise, ``KeyPress()`` calls the inherited method, which generates an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. + ''' + def Loaded(self) -> None: + ''' + Initializes the ``ComboBox`` after its form is loaded into memory. + + Do not call the protected `Loaded <Vcl.StdCtrls.TCustomCombo.Loaded.htm>`__ method. The component streaming system calls this method after it loads the ``ComboBox``\ s. form from a *Stream*. + + `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ overrides the inherited method to select the item specified by the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property once the ``Form`` is fully loaded. + ''' + def PickCustomColor(self) -> bool: + ''' + Displays the color selection dialog so that the user can select a custom color. + + ``Application``\ s can't call this protected method. It is called automatically when the user selects the custom color item. ``PickCustomColor`` displays the color selection dialog, with the selected color initialized to the last-selected custom color. If the user selects a color in this dialog, ``PickCustomColor`` updates the image of the item to display the selected color and returns ``True``. If the user cancels from the color selection dialog, ``PickCustomColor()`` returns ``False``. + + Override ``PickCustomColor`` to provide a different response when the user selects the custom color item. + ''' + def PopulateList(self) -> None: + ''' + Fills the ``ColorBox`` with items that reflect the colors specified by the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property. + + Applications can't call this protected method. It is called automatically when the ``ColorBox`` needs to fill itself with items. (For example, when the ``ColorBox`` is first created or when the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property changes) + + ``PopulateList`` fills the ``ColorBox`` with the items indicated by the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property. + ''' + def Select(self) -> None: + ''' + Generates an `OnSelect <Vcl.StdCtrls.TCustomCombo.OnSelect.htm>`__ event. + + Applications can't call this protected method. It is called automatically when the user selects a color. + + `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ overrides the inherited method to display a color selection dialog if the user selects the custom color item. After checking for a custom color, `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ calls the inherited method, which generates an `OnSelect <Vcl.StdCtrls.TCustomCombo.OnSelect.htm>`__ event. + ''' + def SetStyle(self, AStyle: ColorBoxStyle) -> None: + ''' + Sets the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property. + + ``SetStyle`` is the protected write implementation of the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property. It repopulates the list to reflect the new value of `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__, and disables the ``ColorBox`` if the new value for `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ results in an empty ``ColorBox``. + ''' + def Create(self, AOwner: Component) -> None: + ''' + + ``Creates`` a new `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ object. + + Call ``Create()`` to instantiate a ``ColorBox`` at runtime. `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ objects placed on a form at design time are created automatically. + + ``AOwner`` specifies the owner of the ``ColorBox``. This component (typically the ``Form``) is responsible for freeing the ``ColorBox``. + ''' + def OnGetColors(self, Sender: CustomColorBox, Items: list) -> None: + ''' + # OnGetColors: GetColorsEvent + Occurs when the control is populated with a customized list of colors. + + Use ``OnGetColors`` to populate a customized list of colors to be placed in the ``CustomColorBox`` colors list. + + The ``OnGetColors`` event is only called when `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ includes the ``cbCustomColors`` property. + + - ``Sender`` is the instance of the `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__. + - ``Items`` is a ``String``\ s containing a list of colors displayed in the `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__. + + - ``Items.Strings`` contains the list of display strings for the ``ColorBox``. + - ``Items.Objects`` contains the list of ``Color`` values corresponding to each display name (``Items.Strings``), cast as a ``Object``. + + .. note:: When this event is raised, ``Items`` contains all of the colors that are specified in the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property, such as ``cbStandard``. Colors are added, moved, or removed from the `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ by manipulating this ``Items`` list. + + Code Snippets + ============= + + To clarify, the following code snippet adds three custom colors to the drop-down list of colors. Consider the following scenario: an application has a `ColorBox <Vcl.ExtCtrls.TColorBox.htm>`__ and the ``cbCustomColors`` is set to ``True`` (in the `Style <Vcl.ExtCtrls.TColorBoxStyle.htm>`__ property). + + In this scenario, you can implement the following ``OnGetColors`` event handler: + + .. code-block:: python + :caption: Delphi + + procedure TForm1.ColorBox1GetColors(self, Sender: CustomColorBox; Items: Strings); + begin + Items.AddObject('Custom Black', TObject(clBlack)); + Items.AddObject('Custom White', TObject(clWhite)); + Items.AddObject('Custom Red', TObject(clRed)); + end; + + + .. code-block:: python + :caption: C++ + + void __fastcall TForm1::ColorBox1GetColors(TCustomColorBox *Sender, TStrings *Items) + + { + Items->Clear(); + Items->AddObject("Custom Black", (TObject*) (clBlack)); + Items->AddObject("Custom White", (TObject*) (clWhite)); + Items->AddObject("Custom Red", (TObject*) (clRed)); + } + ''' + +class CustomLabel(GraphicControl): + ''' + ========================= + Vcl.StdCtrls.TCustomLabel + ========================= + + ``CustomLabel`` is the base class for non-windowed controls that display text on a form. + + Use ``CustomLabel`` as a base class when defining objects that display text that users can't edit. ``CustomLabel`` introduces several new properties and methods to control the appearance of the text. + + ``CustomLabel`` is not a descendant of ``WinControl``, so it does not have its own window and can't receive direct input from the keyboard. To define an object that responds to direct keyboard input in addition to displaying text, use `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ as a base class. + + Do not create instances of ``CustomLabel``. To put a ``Label`` on a form, use a `Label <Vcl.StdCtrls.TLabel.htm>`__ object. + ''' + + __hash__: ClassVar[None] = ... + Alignment: Alignment + ''' + Controls the horizontal placement of the text within the ``Label``. + + Set ``Alignment`` to specify how the text of the ``Label`` is justified within the ``ClientRect`` of the ``Label`` control. + + The effect of the ``Alignment`` property is more obvious if the `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ property is ``True`` and the ``Label`` includes more than one line of text. + ''' + AutoSize: bool + ''' + Determines whether the size of the ``Label`` automatically resizes to accommodate the text. + + Use ``AutoSize`` to make the ``Label`` adjust its size automatically so the client area accommodates the height and width of the text. When ``AutoSize`` is ``False``, the ``Label`` is fixed in size. When ``AutoSize`` is ``True``, the size of the ``Label`` readjusts whenever the text changes. The size of the ``Label`` is also readjusts when the `Font <Vcl.Controls.TControl.Font.htm>`__ property changes. + + When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, the width of the ``Label`` is fixed. If ``AutoSize`` is also ``True``, changes to the text cause the ``Label`` to change in height. When ``AutoSize`` is ``True`` and `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, the font determines the height of the ``Label``, and changes to the text cause the ``Label`` to change in width. + ''' + EllipsisPosition: EllipsisPosition + ''' + Specifies how ellipsis is placed in text not fitting in allocated rectangle. + + Set ``EllipsisPosition`` to determine how an ellipsis is placed in text that does not fit in its allocated rectangle. This is a `EllipsisPosition <Vcl.StdCtrls.TEllipsisPosition.htm>`__ constant and its value corresponds to constants specifying ellipsis placement in the ``dwDTFormat`` parameter of the *Windows* ``DrawText`` and ``DrawTextEx()`` functions. + + The following table lists values for `EllipsisPosition <Vcl.StdCtrls.TEllipsisPosition.htm>`__: + + +--------------------+----------------------------------------------------------------------------------------------------------+ + | **Value** | **Meaning** | + +====================+==========================================================================================================+ + | ``epNone`` | An ellipsis is not inserted. | + +--------------------+----------------------------------------------------------------------------------------------------------+ + | ``epPathEllipsis`` | Replaces text in the middle with an ellipsis so that the resulting text fits in the rectangle specified. | + | | text as possible after the last backslash. Corresponds to a value of | + | | text as possible after the last backslash. Corresponds to a value of | + | | ``DT_PATH_ELLIPSIS`` in the ``dwDTFormat`` parameter. | + +--------------------+----------------------------------------------------------------------------------------------------------+ + | ``epEndEllipsis`` | Replaces text at the end with an ellipsis so that the resulting text fits in the rectangle specified. | + | | Any word not fitting in the rectangle is truncated without adding an ellipsis. | + | | Corresponds to a value of ``DT_END_ELLIPSIS`` in the ``dwDTFormat`` parameter. | + +--------------------+----------------------------------------------------------------------------------------------------------+ + | ``epWordEllipsis`` | Truncates any word that doesn't fit in the rectangle and adds ellipses. | + | | Corresponds to a value of ``DT_WORD_ELLIPSIS`` in the ``dwDTFormat`` parameter. | + +--------------------+----------------------------------------------------------------------------------------------------------+ + ''' + FocusControl: WinControl + ''' + Designates a windowed control associated with the ``Label``. + + Set ``FocusControl()`` to the windowed control that should receive focus when the user presses the accelerator key specified by the ``Label``. Specify an accelerator key by preceding a character in the ``Label`` text with an ampersand (``'&'``) and setting the `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ property to ``True``. + ''' + ShowAccelChar: bool + ''' + Determines how an ampersand in the ``Label`` text is displayed. + + Set ``ShowAccelChar`` to ``True`` to allow the ``Label`` to display an underlined accelerator key value. When ``ShowAccelChar`` is ``True``, any character preceded by an ampersand (``'&'``) appears underlined. If the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is set, the windowed control specified by the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property receives input focus when the user types that underlined character. To display an ampersand when ``ShowAccelChar`` is ``True``, use two ampersands (``'&&'``) to stand for the single ampersand that is displayed. + + Set ``ShowAccelChar`` to ``False`` to display the ``Label`` ``Text`` with all ampersands appearing as ampersands. When ``ShowAccelChar`` is ``False``, the value of the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is not used. + ''' + Transparent: bool + ''' + Specifies whether controls that sit below the ``Label`` on a form can be seen through the ``Label``. + + Set ``Transparent`` to ``True`` to prevent the ``Label`` from obscuring other controls on the ``Form``. For example, if the ``Label`` is used to add text to a graphic, set ``Transparent`` to ``True`` so that the ``Label`` does not stand out as a separate object. + + When ``Transparent`` is ``True``, the ``Label`` always displays in the background color, and any `Color <Vcl.Controls.TControl-Color.htm>`__ setting is ignored. Also, when ``Transparent`` is ``True``, writing text is slower than writing text when ``Transparent`` is ``False``. If the ``Label`` is not obscuring a complicated image, you might choose to optimize performance by doing both of the following things: + + - Set ``Transparent`` to ``False``, and + - Set the `background color <Vcl.Controls.TControl-Color.htm>`__ of the ``Label`` to match the object beneath it. + ''' + Layout: TextLayout + ''' + Specifies the vertical placement of the text within the ``Label``. + + Set ``Layout`` to specify how the text of the ``Label`` is placed within the ``ClientRect`` of the ``Label`` control. ``Layout`` is the vertical analog to the `Alignment <Vcl.StdCtrls.TCustomLabel.Alignment.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the ``Label`` text wraps when it is too long for the width of the ``Label``. + + Set ``WordWrap`` to ``True`` to allow the ``Label`` to display multiple line of text. When ``WordWrap`` is ``True``, text that is too wide for the ``Label`` control wraps at the right margin and continues in additional lines. + + Set ``WordWrap`` to ``False`` to limit the ``Label`` to a single line. When ``WordWrap`` is ``False``, text that is too wide for the ``Label`` appears truncated. + ''' + GlowSize: int + ''' + Specifies the radius of the glow around the ``Label``. + + Set the value of ``GlowSize`` to specify the radius of the glow around the ``Label``. + + .. note:: This is available only for *Windows Vista* or later, with the Aero theme enabled. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Canvas: Canvas + ''' + Provides the drawing surface used by the graphic control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. + + Since a `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ instance does not have its own *Windows* *Screen* object, it obtains its device context from its parent control. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def AdjustBounds(self) -> None: + ''' + Resizes the ``Label`` when the text changes. + + When the text in the ``Label`` or the font changes, ``AdjustBounds`` is implicitly called. It redraws the text in the client area, and then resizes the ``Label`` if the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property is ``True``. + + When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, the width of the ``Label`` is fixed. If `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is also ``True``, changes to the text cause the ``Label`` to change in height. When `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is ``True`` and `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, the height of the ``Label`` is determined by the font, and changes to the text cause the ``Label`` to change in width. + + Override ``AdjustBounds`` to make additional adjustments when the text changes. + ''' + def DoDrawText(self, Rect: Rect, Flags: int) -> None: + ''' + Renders the text in the client area. + + When the ``Label`` needs to draw itself, ``DoDrawText()`` is implicitly called. ``DoDrawText()`` uses the *Windows API* function, ``DrawText``, to render the caption in the client area. + + The first parameter, ``Rect``, specifies the boundaries of the text within the client area. The second parameter, ``Flags``, specifies how the text is aligned within those boundaries, how tab characters are handled, etc. See the *Microsoft Windows API DrawText Function* for all the possible values of Flags. + + Override ``DoDrawText()`` to render text differently. + ''' + def GetLabelText(self) -> str: + ''' + Returns the value of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property. + + Call ``GetLabelText()`` to obtain the string that appears as the text of the ``Label``. + ''' + def Loaded(self) -> None: + ''' + Adjusts the size of the ``Label`` when it is first loaded. . + + The protected ``Loaded()`` method is called immediately after a saved version of the ``Form`` that contains the ``Label`` is loaded into memory. `CustomLabel <Vcl.StdCtrls.TCustomLabel.htm>`__ uses this method to adjust the size of the ``Label`` to the text it contains if the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property is ``True``. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications when objects are about to be created or destroyed. + + ``Notification()`` is called automatically when components are created or destroyed. After calling the inherited method, ``Notification()`` checks whether the windowed control specified by the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is about to be destroyed. If the windowed control is going away, ``Notification()`` sets the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property to ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def Paint(self) -> None: + ''' + Draws the image of the ``Label``. + + ``Paint()`` is called automatically when the ``Label`` receives a ``WM_PAINT`` message from its Parent. ``Paint()`` writes the text returned by the `GetLabelText <Vcl.StdCtrls.TCustomLabel.GetLabelText.htm>`__ method. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Sets the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property. + + ``SetAutoSize()`` is the protected access method for the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property. It is exposed as a protected method so descendants can override it to change the implementation of the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `CustomLabel <Vcl.StdCtrls.TCustomLabel.htm>`__. + + Call ``Create()`` to create an instance of `CustomLabel <Vcl.StdCtrls.TCustomLabel.htm>`__ at runtime. Labels placed on forms at design time are created automatically. + + ``AOwner`` is a component, typically the ``Form``, that is responsible for freeing the ``Label``. + ''' + +class CustomPanel(CustomControl): + ''' + ========================= + Vcl.ExtCtrls.TCustomPanel + ========================= + + ``CustomPanel`` is the base class for all panel components. + + Use ``CustomPanel`` as a base class when defining objects that include other controls as constituent parts. Panel components are controls can contain other controls, grouping them together. + + When a ``Panel`` is aligned with the ``Form`` using the ``Align`` property, it maintains the same relative position to the ``Form`` even when the ``Form`` is resized. For example, a ``Panel`` can be aligned so that it always remains on the top of the ``Form``, even when the user changes the shape and size of the ``Form``. This makes panels useful for implementing components that act like ``ToolBars`` or ``StatusBar``\ s. For example, construct a tool bar or *Tool Palette* by adding ``SpeedButton``\ s that execute commands or set modes to a ``Panel`` . + ''' + + __hash__: ClassVar[None] = ... + Alignment: Alignment + ''' + Determines how the caption is aligned within the panel. + + Use the ``Alignment`` property to specify if the caption of a panel appears on the left, right, or center of the panel. For example, to use a panel as a ``StatusBar`` that displays the ``Application``. ::``Hint`` property as the panel's ``Caption`` property, set ``Alignment`` to ``taLeftJustify`` to place the hint text on the left side of the panel. + + .. note:: Use the `VerticalAlignment <Vcl.ExtCtrls.TCustomPanel.VerticalAlignment.htm>`__ property to control the vertical position of the caption. + ''' + BevelInner: PanelBevel + ''' + Determines the style of the inner bevel of a panel. + + Use ``BevelInner`` to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the bevels, if they are drawn, is the ``BevelWidth`` property. + ''' + BevelOuter: PanelBevel + ''' + Determines the style of the outer bevel of a panel. + + Use ``BevelOuter`` to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the outer bevel is specified in the ``BevelWidth`` property in pixels. + ''' + BevelWidth: BevelWidth + ''' + Determines the width, in pixels, of both the inner and outer bevels of a panel. + + Use ``BevelWidth`` to specify how wide the inner or outer bevel should be. Do not confuse ``BevelWidth``, which is the width of the bevels, with BorderWidth, which is the space between the bevels. + + If both the ``BevelInner`` and ``BevelOuter`` properties are ``bvNone``, ``BevelWidth`` has no effect. To remove both bevels, set the ``BevelInner`` and ``BevelOuter`` properties to ``bvNone``, rather than setting the ``BevelWidth`` to 0, as this involves less overhead when painting. + ''' + BorderWidth: BorderWidth + ''' + Specifies the distance, in pixels, between the outer and inner bevels. + + Use ``BorderWidth`` to specify how wide the border around the panel should be. A value of 0 (zero) means no border should appear. + + The border of a panel is the area between the outer and inner bevels. It is visible only if the inner bevel is raised or lowered, but affects the inset of the caption within the panel even if ``BevelInner`` is ``bvNone``. If the ``Alignment`` property is not ``taCenter``, the ``Caption`` will be aligned to the inner edge of the border. This edge is ``BorderWidth`` pixels in from the outer bevel if ``BevelInner`` is ``bvNone``. It is the inner edge of the inner bevel otherwise. + + Do not confuse the border of the panel with line drawn around the panel itself. The line around the panel is specified by the Border``Style`` property. + ''' + BorderStyle: BorderStyle + ''' + Determines the style of the line drawn around the perimeter of the panel control. + + Use ``BorderStyle`` to specify whether the panel has a single line drawn around it. These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + + Do not confuse the line drawn around the panel with the ``BorderWidth`` of the panel. The ``BorderWidth`` of the panel is the distance between the outer and inner bevels. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + FullRepaint: bool + ''' + Determines how the panel repaints itself when it is resized. + + ``FullRepaint`` controls how the panel responds when it is resized. When ``FullRepaint`` is ``True``, the entire panel, including the beveled border repaints when the size changes. When ``FullRepaint`` is ``False``, only the area inside the beveled border repaints. + ''' + Locked: bool + ''' + Determines whether a panel that is used as a ``ToolBar`` is replaced by a ``ToolBar`` supplied by an *OLE* server. + + Set the ``Locked`` property to ``False`` when the panel is used as a ``ToolBar`` by a ``OleContainer`` component. Any panels aligned to a ``OleContainer`` are assumed to be replaceable ``ToolBar``\ s unless the ``Locked`` property is ``True``. Prevent the panel from being replaced by an *OLE* server's ``ToolBar`` by setting the panel's ``Locked`` property to ``True``. + + .. note:: An OLE application's ``ToolBar``\ s must be in panels aligned to a side of the ``Form`` (that is, their ``Align`` properties must be set to ``alTop``, ``alBottom``, ``alLeft``, or ``alRight``). + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ShowCaption: bool + ''' + Specifies whether to display the caption of the panel control. + + ``ShowCaption`` is a ``Boolean`` property that you can use to specify whether to display the caption of the panel control. + ''' + VerticalAlignment: VerticalAlignment + ''' + Sets the vertical position of the ``Caption``. + + Use the ``VerticalAlignment`` property to control the position of the ``Caption`` within the panel. Choose one of the following values. + + ========================= ======================================================== + **Value** *``Description``* + ========================= ======================================================== + ``taAlignBottom`` The ``Caption`` displays at the bottom of the panel. + ``taAlignTop`` The ``Caption`` displays at the top of the panel. + ``taVerticalCenter`` The ``Caption`` displays at the center of the panel. + ========================= ======================================================== + + .. note:: Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to control the horizontal position of the ``Caption``. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter record passed in the ``Params`` parameter. + + ``CreateParams()`` is called automatically to initialize the window-creation parameters whenever the window for the panel needs to be created. ``CreateParams()`` overrides the inherited method to implement the `BorderStyle <Vcl.ExtCtrls.TCustomPanel.BorderStyle.htm>`__ property. + ''' + def AdjustClientRect(self, Rect: Rect) -> None: + ''' + Adjusts the ``ClientRect`` property for the idiosyncrasies of the window. + + ``AdjustClientRect()`` is called internally when the panel needs accurate information on where to place child controls within the client area. ``AdjustClientRect()`` reduces ``ClientRect`` by the width of the inner and outer bevels so that child objects are not placed on the beveled region. + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Adjusts the way the panel responds to resize attempts. + + ``CanAutoSize()`` is called automatically when the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True`` and an attempt is made to resize the panel. It allows the panel to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property before the resize sequence that begins with the `OnCanResize <Vcl.ExtCtrls.TSplitter.OnCanResize.htm>`__ and ``OnConstrainedResize`` events and ends with the ``OnResize`` event. + + When ``CanAutoSize()`` is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the panel. ``CanAutoSize()`` adjusts these values so that the panel's size adjusts to its contents. If the adjustment results in values of ``NewWidth`` and ``NewHeight`` that differ from the panel's current ``Width`` and ``Height``, ``CanAutoSize()`` returns ``True``, indicating that the resize sequence should proceed. If, after adjustment, ``NewWidth`` and ``NewHeight`` equal ``Width`` and ``Height``, ``CanAutoSize()`` returns ``False``, and the resize sequence is aborted. + ''' + def Paint(self) -> None: + ''' + Renders the image of the panel. + + Override the ``Paint()`` method to change the way the panel is drawn. The ``Paint()`` method for `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__ draws the bevels of the panel, sets the brush and font for the panel, and fills in the interior of the panel. Finally, ``Paint()`` writes the value of ``Caption`` on the panel. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def SetParentBackground(self, Value: bool) -> None: + ''' + Sets the `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ property. + + `SetParentBackground <Vcl.Controls.TWinControl.SetParentBackground.htm>`__ is a protected method that sets the value of `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__. + + Call ``Create()`` to instantiate a panel at runtime. Panels placed in forms at design time do not need to be explicitly created because they are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the panel. + ''' + def GetControlsAlignment(self) -> Alignment: + ''' + Returns the alignment of text in the panel. + + ``GetControlsAlignment()`` returns the value of the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property. + ''' + +class CustomSpeedButton(GraphicControl): + ''' + ============================== + Vcl.Buttons.TCustomSpeedButton + ============================== + + `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ is the base class for all lightweight controls. + + `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ is the base class for all lightweight controls. + + `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls. Since lightweight controls do not wrap *Windows* *Screen* objects, they are faster and user fewer resources than controls based on `WinControl <Vcl.Controls.TWinControl.htm>`__. + + `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ provides a `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property for access to the control's drawing surface and a virtual `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method called in response to paint requests received by the parent control. + ''' + + __hash__: ClassVar[None] = ... + FState: ButtonState + ''' + No have docs. + ''' + AllowAllUp: bool + ''' + No have docs. + ''' + GroupIndex: int + ''' + No have docs. + ''' + Down: bool + ''' + No have docs. + ''' + DisabledImageIndex: ImageIndex + ''' + No have docs. + ''' + DisabledImageName: ImageName + ''' + No have docs. + ''' + ImageIndex: ImageIndex + ''' + No have docs. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + Images: CustomImageList + ''' + No have docs. + ''' + LocalDragging: bool + ''' + No have docs. + ''' + MouseInControl: bool + ''' + No have docs. + ''' + HotImageIndex: ImageIndex + ''' + No have docs. + ''' + HotImageName: ImageName + ''' + The name of the image is used when the cursor hovers over the UI. + ''' + Flat: bool + ''' + No have docs. + ''' + Glyph: Bitmap + ''' + No have docs. + ''' + Layout: ButtonLayout + ''' + No have docs. + ''' + Margin: int + ''' + No have docs. + ''' + NumGlyphs: NumGlyphs + ''' + No have docs. + ''' + PressedImageIndex: ImageIndex + ''' + No have docs. + ''' + PressedImageName: ImageName + ''' + The name of the image is used when pressing the UI. + ''' + SelectedImageIndex: ImageIndex + ''' + No have docs. + ''' + SelectedImageName: ImageName + ''' + The name of the image is used when selecting the UI. + ''' + Spacing: int + ''' + No have docs. + ''' + Transparent: bool + ''' + No have docs. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Responds when the action associated with the control changes. + + ``ActionChange()`` is called automatically when the ``Action`` object specified by the ``Action`` property, or any of its properties, changes. By default, the control ``ActionLink``\ s. ``OnChange`` event handler calls `ActionChange <Vcl.Controls.TControl.ActionChange.htm>`__. + + ``ActionChange()`` updates the control properties that correspond to properties of the associated action. These properties include the ``Caption``, ``Enabled``, ``Hint``, and ``Visible`` properties and the ``OnClick`` event handler. + + The ``Sender`` parameter is the ``Action`` object that changed. + + The ``CheckDefaults`` parameter indicates whether the control's properties should all be updated or only those that have not been explicitly changed from their default values. When ``CheckDefaults`` is ``True``, only those properties and event handlers that have not been changed from the default values are updated. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def CopyImage(self, ImageList: CustomImageList, Index: int) -> None: + ''' + No have docs. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the appropriate ``ActionLink`` class that is associated with the control class. + + `GetActionLinkClass <Vcl.Controls.TControl.GetActionLinkClass.htm>`__ returns the appropriate class type for the ``ActionLink`` used with a control. This class is used internally to create an ``ActionLink`` object for the control when it has an associated action. The ``ActionLink`` links the action to the control client. Each ``Action`` link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `GetActionLinkClass <Vcl.Controls.TControl.GetActionLinkClass.htm>`__ returns the `Control <Vcl.Controls.TControl.htm>`__ ``ActionLink`` class type, which associates the ShowHint, ``Caption``, ``Enabled``, and ``Visible`` properties with the ``OnClick`` event handler. Descendants of `Control <Vcl.Controls.TControl.htm>`__ override this method to specify a descendant of `Control <Vcl.Controls.TControl.htm>`__ ``ActionLink`` that handles their configuration of properties and events. + ''' + def GetPalette(self) -> HPALETE: + ''' + Returns the handle to a palette for use by the control. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ returns a null handle, indicating that the control does not have a palette. Override `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ to implement derived objects that use a palette. Create a palette handle for the control by a call to the *Windows API* function ``CreatePalette``. `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ should return the palette handle for the control. + + Specifying the palette for a control tells the application that the control's palette needs to be realized and designates the palette to use for realization. + + `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ is called only if the run-time video mode requires color palette support, for example, in 256-color mode. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event dispatcher. + + Override the protected `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ method to provide other responses in addition to calling the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler when the user presses the mouse button down while the cursor's hotspot is over the control. + + The ``Button`` parameter determines which mouse button the user pressed. ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) were down when the user pressed the mouse button. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + A control calls `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ in response to any of the *Windows* mouse-down messages (``WM_LBUTTONDOWN``, ``WM_MBUTTONDOWN``, ``WM_RBUTTONDOWN``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was pressed down: left, right, or middle. + ''' + def MouseMove(self, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Responds to mouse moving over control area. + + Override the protected `MouseMove <Vcl.Controls.TControl.MouseMove.htm>`__ method to provide other responses in addition to calling the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler when the user moves the mouse. + + A control calls `MouseMove <Vcl.Controls.TControl.MouseMove.htm>`__ in response to any of the Windows mouse-move messages (WM_MOUSEMOVE), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. + + As the mouse cursor moves across a control, this method is called repeatedly. Each time it is called, it is with the new coordinates that reflect the continuous path of the mouse cursor across the *Screen* real estate covered by the control's visual representation. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Is an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event dispatcher. + + Override the protected `MouseUp <Vcl.Controls.TControl.MouseUp.htm>`__ method to provide other responses in addition to calling the `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler when the user releases a previously pressed mouse button while the cursor's hot spot is over the control. + + A control calls `MouseUp <Vcl.Controls.TControl.MouseUp.htm>`__ in response to any of the *Windows* mouse-up messages (``WM_LBUTTONUP``, ``WM_MBUTTONUP``, ``WM_RBUTTONUP``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was released: left, right, or middle. + ''' + def Paint(self) -> None: + ''' + Renders the control's surface. + + The `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method is called automatically when a lightweight control needs to update its display area. Code in the `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method uses the `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property to render the control surface. + + As implemented in `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__, `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ does nothing. Specific rendering logic is provided by `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ methods in descendent control classes. + ''' + def CheckImageIndexes(self) -> None: + ''' + No have docs. + ''' + def UpdateImageName(self, Index: ImageIndex, Name: ImageName) -> None: + ''' + No have docs. + ''' + def UpdateImageIndex(self, Name: ImageName, Index: ImageIndex) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.Controls.TGraphicControl.Create.htm>`__ an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. + + Calling `Create <Vcl.Controls.TGraphicControl.Create.htm>`__ constructs and initializes an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. However, you should never attempt to instantiate a `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. This class is intended solely as a base class from which other control classes descend and you should only call `Create <Vcl.Controls.TGraphicControl.Create.htm>`__ to instantiate one of these descendants. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the graphic control. It becomes the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. If you do not explicitly provide an ``Owner()`` to the constructor (that is, if ``AOwner`` is ``nil`` (Delphi) or ``NULL`` (C++)), your application is responsible for explicitly freeing the graphic control. + + .. note:: If a component's constructor allocates resources or memory, also override the destructor to free those resources. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TGraphicControl.Destroy.htm>`__ an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. + + `Destroys <Vcl.Controls.TGraphicControl.Destroy.htm>`__ an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TGraphicControl.Destroy.htm>`__ directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the graphic control reference is not ``nil``, and only then calls `Destroy <Vcl.Controls.TGraphicControl.Destroy.htm>`__. + + ``Application``\ s should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it frees the ``Canvas`` object in its `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TGraphicControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TGraphicControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TGraphicControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TGraphicControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def Click(self) -> None: + ''' + Respond to user click. + + `Click <Vcl.Controls.TControl.Click.htm>`__ is called automatically when the user left-clicks the control. ``Component`` or application code can call `Click <Vcl.Controls.TControl.Click.htm>`__ to simulate a user mouse click. This is often done in menu actions and hotkey handlers. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `Click <Vcl.Controls.TControl.Click.htm>`__ queries whether the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler exists and is different from the ``OnExecute`` handler for the control's ``Action``. If this is ``True``, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler is called. If this is ``False``, and the ``Action`` ``OnExecute`` event handler exists, the Action's ``Execute()`` method is called. Override `Click <Vcl.Controls.TControl.Click.htm>`__ to provide additional behavior. + ''' + +class CustomStaticText(WinControl): + ''' + ============================== + Vcl.StdCtrls.TCustomStaticText + ============================== + + ``CustomStaticText`` is the base class for `StaticText <Vcl.StdCtrls.TStaticText.htm>`__, a windowed control that displays text on a form. This component functions like `Label <Vcl.StdCtrls.TLabel.htm>`__, except that it has a window handle. + + ``CustomStaticText`` cannot receive focus or contain other controls. + ''' + + __hash__: ClassVar[None] = ... + Alignment: Alignment + ''' + Determines how text is aligned within the component. + + The possible values of ``Alignment`` are + + =================== =========================================================== + **Value** **Meaning** + =================== =========================================================== + ``taLeftJustify`` Text is aligned at the ``Left`` of the control. + ``taCenter`` Text is centered in the control. + ``taRightJustify`` Text is aligned at the right of the control. + =================== =========================================================== + ''' + AutoSize: bool + ''' + Determines whether the component is automatically resized to accommodate its text. + + If ``AutoSize`` is ``True``, the component is automatically resized-- at runtime and design time-- whenever the font size or `Caption <Vcl.Controls.TControl.Caption.htm>`__ text changes. + ''' + BorderStyle: StaticBorderStyle + ''' + Determines the appearance of the control's border. + + Use ``BorderStyle`` to specify the appearance of the border, if any, that appears around the text. + ''' + FocusControl: WinControl + ''' + Links the component with another windowed control. + + Use the ``FocusControl()`` property to link the `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ instance with another windowed control. If the text of `Caption <Vcl.Controls.TControl.Caption.htm>`__ includes an accelerator key, the component specified by ``FocusControl()`` receives focus when the accelerator is pressed. + ''' + ShowAccelChar: bool + ''' + Enables accelerator characters. + + If ``ShowAccelChar`` is ``True``, an ampersand in the component's `Caption <Vcl.Controls.TControl.Caption.htm>`__ text appears as an underline and makes the character after it into an accelerator key. If ``ShowAccelChar`` is ``False``, ampersands appear as ampersands. + ''' + Transparent: bool + ''' + Specifies whether the background of the image obscures objects below the image object. + + Set ``Transparent`` to ``True`` to allow objects behind the `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ object to show through the background of the image. Set ``Transparent`` to ``False`` to make the background of the image opaque. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Sets the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + + `SetAutoSize <Vcl.Controls.TControl.SetAutoSize.htm>`__ is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to set the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ instance. + + ``Create()`` calls the inherited constructor, then initializes the `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ instance. + ''' + +class IBindMemberChange: + ''' + ====================================== + Data.Bind.Components.IBindMemberChange + ====================================== + + Is an interface used by ``DataSource``\ s to inform binding components that a member has been renamed or deleted. + ''' + + __hash__: ClassVar[None] = ... + + def MemberRemoved(self, AComponent: Component, AMemberName: str) -> None: + ''' + No have docs. + ''' + def MemberRenamed(self, AComponent: Component, ACurMemberName: str, APrevMemberName: str) -> None: + ''' + No have docs. + ''' + def MemberRenaming(self, AComponent: Component, ACurMemberName: str, ANewMemberName: str) -> None: + ''' + No have docs. + ''' + +class IBindActivate: + ''' + ================================== + Data.Bind.Components.IBindActivate + ================================== + + This interface is implemented by binding components. Data sources use this interface to activate binding components when the ``DataSource`` becomes active. + ''' + + __hash__: ClassVar[None] = ... + + def SetActive(self, AValue: bool) -> None: + ''' + No have docs. + ''' + +class SharedImage: + ''' + ========================= + Vcl.Graphics.TSharedImage + ========================= + + ``SharedImage`` is the base class for classes that contain images used for graphics objects. + + ``SharedImage`` is used as a base class for classes that hold the internal representation of graphical images such as bitmaps and icons. ``SharedImage`` is an abstract class. Its descendant classes are used internally by graphics objects, and are automatically created by their associated graphics objects. + ''' + + __hash__: ClassVar[None] = ... + RefCount: int + ''' + No have docs. + ''' + def Reference(self) -> None: + ''' + No have docs. + ''' + def Release(self) -> None: + ''' + No have docs. + ''' + def FreeHandle(self) -> None: + ''' + No have docs. + ''' + def Destroy(self) -> None: + ''' + Disposes of an object instance. + + Do not call `Destroy <System.TObject.Destroy.htm>`__ directly. Call `Free <System.TObject.Free.htm>`__ instead. ``Free()`` verifies that the object reference is not ``nil`` before calling `Destroy <System.TObject.Destroy.htm>`__. + + The `Destroy <System.TObject.Destroy.htm>`__ method defined by `Object <System.TObject.htm>`__ deallocates memory. Descendent objects usually define a destructor that is customized for that particular kind of object. + + When declaring a `Destroy <System.TObject.Destroy.htm>`__ method in a descendant, always add the override directive to the declaration and call the inherited `Destroy <System.TObject.Destroy.htm>`__ as the last statement in the overriding method. Because `Destroy <System.TObject.Destroy.htm>`__ is a virtual method, overriding it ensures that the proper inherited behavior occurs. + + .. note:: If an exception escapes from the constructor, the destructor is called to destroy the partially constructed object instance that failed to initialize completely. Therefore, destructors should check that allocated resources such as handles were actually allocated before trying to release them, since their value might be zero. + + `Destroy <System.TObject.Destroy.htm>`__ should be implemented so that it calls `Free <System.TObject.Free.htm>`__ on all subobjects created within the object's constructor (that is, allocated by the constructor). Unlike `Destroy <System.TObject.Destroy.htm>`__, `Free <System.TObject.Free.htm>`__ provides a safeguard when destroying objects that are nil. + ''' + +class IconImage(SharedImage): + ''' + ======================= + Vcl.Graphics.TIconImage + ======================= + + ``IconImage`` is the internal representation of the bitmap image for a ``Icon`` object. + + ``IconImage`` is used for internal implementation only. It represents the internal image of the bitmap encapsulated by the ``Icon`` object. All of the data and methods introduced in ``IconImage`` are private. They contain information about the specific icon resource, including pointers to the standard ``HICON`` structures defined by *Windows*. ``IconImage`` is referenced in the constructor of the ``Icon`` object when the ``IconImage`` is created. + ''' + + __hash__: ClassVar[None] = ... + + def FreeHandle(self) -> None: + ''' + No have docs. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `IconImage <Vcl.Graphics.TIconImage.htm>`__ instance and frees its memory. + + You do not need to destroy the ``IconImage``. The `IconImage <Vcl.Graphics.TIconImage.htm>`__ object is automatically destroyed by the ``Icon`` object. + ''' + +class IScopeComponent: + ''' + ==================================== + Data.Bind.Components.IScopeComponent + ==================================== + Is an interface implemented by data sources to provide a component as the evaluation context for expressions. + ''' + + __hash__: ClassVar[None] = ... + + def GetScope(self) -> IScope: + ''' + No have docs. + ''' + def GetMemberScope(self, AMemberName: str) -> IScope: + ''' + No have docs. + ''' + def GetScopeObject(self) -> Object: + ''' + No have docs. + ''' + +class CommonBindComponent(ContainedBindComponent, IBindMemberChange): + ''' + ========================================= + Data.Bind.Components.TCommonBindComponent + ========================================= + + Base class for all binding components descending from it, such as `BindExpression <Data.Bind.Components.TBindExpression.htm>`__, `BindExprItems <Data.Bind.Components.TBindExprItems.htm>`__, and so on. + ''' + + __hash__: ClassVar[None] = ... + SourceComponent: Component + ''' + Specifies the source of data for the control component. + ''' + SourceMemberName: str + ''' + Specifies the scope member to use in binding expressions. + + For example, when using `BindScopeDB <Data.Bind.DBScope.TBindScopeDB.htm>`__, set ``SourceMemberName`` to the name of a field. + + However, note that not all scopes support member names. + ''' + ControlComponent: Component + ''' + Specifies the controlled component that will be bound to the source component, by means of LiveBindings. + ''' + def MemberRenamed(self, AComponent: Component, ACurMemberName: str, APrevMemberName: str) -> None: + ''' + May be called by the source component to notify binding components that a member of the source component is about to be renamed, giving the binding components an opportunity to update their expressions. + + The ``AComponent`` parameter specifies the source component. + + The ``ACurMemberName`` parameter specifies the current name of the member, while the ``APrevMemberName`` parameter specifies the old name of the member. + + ``MemberRenamed`` is part of the implementation of the `IBindMemberChange <Data.Bind.Components.IBindMemberChange.htm>`__ interface. + ''' + def MemberRenaming(self, AComponent: Component, ACurMemberName: str, ANewMemberName: str) -> None: + ''' + May be called by the source component to notify binding components that a member of the source component has been renamed, giving the binding components an opportunity to update their expressions. + + The ``AComponent`` parameter specifies the source component. + + The ``ACurMemberName`` parameter specifies the current name of the member, while the ``ANewMemberName`` parameter specifies the new name of the member. + + ``MemberRenaming`` is part of the implementation of the `IBindMemberChange <Data.Bind.Components.IBindMemberChange.htm>`__ interface. + ''' + def MemberRemoved(self, AComponent: Component, AMemberName: str) -> None: + ''' + May be called by the source component to notify binding components that a member of the source component has been removed, giving the binding components an opportunity to update their expressions. + + The ``AComponent`` parameter specifies the source component, while the ``AMemberName`` parameter specifies the name of the member. + + ``MemberRemoved`` is part of the implementation of the `IBindMemberChange <Data.Bind.Components.IBindMemberChange.htm>`__ interface. + ''' + def GetSourceComponent(self) -> Component: + ''' + Protected getter implementation for the `SourceComponent <Data.Bind.Components.TCommonBindComponent.SourceComponent.htm>`__ property. + ''' + def SetSourceComponent(self, Value: Component) -> None: + ''' + Protected setter implementation for the `SourceComponent <Data.Bind.Components.TCommonBindComponent.SourceComponent.htm>`__ property. + ''' + def SetSourceMemberName(self, Value: str) -> None: + ''' + Protected setter implementation for the `SourceMemberName <Data.Bind.Components.TCommonBindComponent.SourceMemberName.htm>`__ property. + ''' + def GetSourceMemberName(self) -> str: + ''' + Protected getter implementation for the `SourceMemberName <Data.Bind.Components.TCommonBindComponent.SourceMemberName.htm>`__ property. + ''' + def DoOnAssigningValue(self, AssignValueRec: BindingAssignValueRec, Value: Value, Handled: bool) -> None: + ''' + Protected method called internally to fire an `OnAssigningValue <Data.Bind.Components.TCommonBindComponent.OnAssigningValue.htm>`__ event. + ''' + def DoOnLocationUpdated(self, AOldLocation: ILocation, ANewLocation: ILocation) -> None: + ''' + No have docs. + ''' + def DoOnAssignedValue(self, AssignValueRec: BindingAssignValueRec, Value: Value) -> None: + ''' + Protected method called internally to fire an `OnAssignedValue <Data.Bind.Components.TCommonBindComponent.OnAssignedValue.htm>`__ event. + ''' + def DoOnEvalError(self, AException: Exception) -> None: + ''' + Protected method called internally to fire an `OnEvalError <Data.Bind.Components.TCommonBindComponent.OnEvalError.htm>`__ event. + ''' + def DoOnActivating(self) -> None: + ''' + Protected method called internally to fire an `OnActivating <Data.Bind.Components.TCommonBindComponent.OnActivating.htm>`__ event. + ''' + def DoOnActivated(self) -> None: + ''' + Protected method called internally to fire an `OnActivated <Data.Bind.Components.TCommonBindComponent.OnActivated.htm>`__ event. + ''' + def DoOnDeactivating(self) -> None: + ''' + Protected method for internal use only. + ''' + def DoOnDeactivated(self) -> None: + ''' + Protected method for internal use only. + ''' + def GetControlScopes(self) -> list[IScope]: + ''' + Returns an array of scopes for the control component. + ''' + def GetSourceScopes(self) -> list[IScope]: + ''' + Returns an array of scopes for the source component. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + Do not call the ``Notification()`` method in an application. ``Notification()`` is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + ''' + def SetControlComponent(self, Value: Component) -> None: + ''' + Protected setter implementation for the `ControlComponent <Data.Bind.Components.TCommonBindComponent.ControlComponent.htm>`__ property. + ''' + def GetControlComponent(self) -> Component: + ''' + Protected getter implementation for the `ControlComponent <Data.Bind.Components.TCommonBindComponent.ControlComponent.htm>`__ property. + ''' + def FreeExpressionsObjects(self) -> None: + ''' + To be implemented in subclasses to allow freeing of the expressions objects. + + The ``FreeExpressionsObjects()`` method is to be implemented in subclasses to allow freeing of the expressions objects. ``FreeExpressionsObjects`` is a virtual method without implementation in the `CommonBindComponent <Data.Bind.Components.TCommonBindComponent.htm>`__ class. + ''' + def UpdateExpressions(self) -> None: + ''' + Called when the binding component should create managed or unmanaged bindings using the expression engine. + + The ``UpdateExpressions`` virtual method is to be implemented in subclasses to create the particular bindings required, depending on the value of component properties and the purpose of the component. + ''' + def FreeExpressionObjects(self, AList: List[BindingExpression]) -> None: + ''' + Frees all the expressions in the given list. The binding expressions list is given through the ``AList`` formal parameter. + ''' + def GetComponentScope(self, AComponent: Component, AMemberName: str) -> IScope: + ''' + Returns the scope of the given component or member. + + If the member name given through ``AMemberName`` is empty, then ``GetComponentScope()`` returns the scope of the component given through the ``AComponent`` parameter. + ''' + @overload + def GetComponentScopes(self, AComponent: Component, AMemberName: str) -> list[IScope]: + ''' + Returns all the scopes of a specific component, member, or both. + + ``GetComponentScopes()`` returns an array of `scopes <System.Bindings.EvalProtocol.IScope.htm>`__, taking in, as parameters, a component and a member name (for the first overloaded method), or a component scope (for the second overloaded method). + ''' + @overload + def GetComponentScopes(self, AComponentScope: IScope) -> list[IScope]: ... + + def GetMethodsScope(self) -> IScope: + ''' + Returns the scope of the available `LiveBinding methods <LiveBindings_Methods.htm>`__. + ''' + def GetOutputConverter(self) -> IValueRefConverter: + ''' + Returns the available `LiveBindings output converters <LiveBindings_Output_Converters.htm>`__. + ''' + def GetUseEvalShortcuts(self) -> bool: + ''' + returns ``True`` if this binding component supports `evaluation shortcuts <LiveBindings_in_RAD_Studio.htm#Using_Evaluation_Shortcuts>`__ or ``False`` otherwise. + + Subclasses of `CommonBindComponent <Data.Bind.Components.TCommonBindComponent.htm>`__ that support evaluation shortcuts must reimplement ``GetUseEvalShortcuts()`` to return ``True``. + ''' + def UpdateSourceChanging(self) -> None: + ''' + Virtual method to be implemented in subclasses to provide extra functionality when the source expression is internally about to change. + ''' + def UpdateSourceChanged(self) -> None: + ''' + Returns all the scopes of a specific component, member, or both. + + ``GetComponentScopes()`` returns an array of `scopes <System.Bindings.EvalProtocol.IScope.htm>`__, taking in, as parameters, a component and a member name (for the first overloaded method), or a component scope (for the second overloaded method). + ''' + def UpdateControlChanging(self) -> None: + ''' + Virtual method to be implemented in subclasses to provide extra functionality when the control expression is internally about to change. + ''' + def UpdateControlChanged(self) -> None: + ''' + Virtual method to be implemented in subclasses to provide extra functionality when the control expression has internally changed. + ''' + def UpdateSourceMemberChanging(self) -> None: + ''' + Virtual method to be implemented in subclasses to provide extra functionality when the source member is internally about to change. ``UpdateSourceMemberChanging`` can be overridden in order to take specific action ``before`` the property changes. + ''' + def UpdateSourceMemberChanged(self) -> None: + ''' + Virtual method to be implemented in subclasses to provide extra functionality when the source member has internally changed. ``UpdateSourceMemberChanged`` can be overridden in order to take specific action after the property changes. + ''' + def EvaluateControlExpression(self, AEditorScope: IScope, AEditorExpression: str, ACallback: list) -> None: + ''' + Evaluates the control expression. + ''' + def EvaluateSourceExpression(self, ASourceScope: IScope, AEnumExpression: str, ACallback: list) -> None: + ''' + Evaluates the source expression. + ''' + def SetOnActivated(self, Value: NotifyEvent) -> None: + ''' + No have docs. + ''' + def SetOnActivating(self, Value: NotifyEvent) -> None: + ''' + No have docs. + ''' + def SetOnAssignedValue(self, Value: BindCompAssignedValueEvent) -> None: + ''' + No have docs. + ''' + def SetOnAssigningValue(self, Value: BindCompAssigningValueEvent) -> None: + ''' + No have docs. + ''' + def SetOnEvalError(self, Value: BindCompEvalErrorEvent) -> None: + ''' + No have docs. + ''' + def SetOnLocationUpdated(self, Value: BindingLocationUpdatedEvent) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates a new `CommonBindComponent <Data.Bind.Components.TCommonBindComponent.htm>`__ instance. + ''' + def Destroy(self) -> None: + ''' + Destroys a `CommonBindComponent <Data.Bind.Components.TCommonBindComponent.htm>`__ instance. + ''' + + @overload + def EvaluateControlExpression(self, AExpression: str, ACallback: list, AType: BindCompExpressionType) -> None: + ''' + Evaluates the control expression. + ''' + + @overload + def EvaluateSourceExpression(self, AExpression: str, ACallback: list, AType: BindCompExpressionType) -> None: ... + + def ExecuteAssignToControlExpression(self, AControlExpression, ASourceExpression: str, ACallback: list, AType: BindCompExpressionType) -> None: + ''' + Executes the assignment of a source scope and expression to a given component's scope and expression. This method is called by the expression editor to evaluate expressions at design time. + ''' + def ExecuteAssignToSourceExpression(self, AControlExpression, ASourceExpression: str, ACallback: list, AType: BindCompExpressionType) -> None: + ''' + Executes the assignment of a control's scope and expression to a given source's scope and expression. This method is called by the expression editor to evaluate expressions at design time. + ''' + def OnAssigningValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value, Handled: bool) -> None: + ''' + # OnAssigningValue: BindCompAssigningValueEvent + Event that occurs before assigning a value to one of the binding expressions. + ''' + def OnAssignedValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value) -> None: + ''' + # OnAssignedValue: BindCompAssignedValueEvent + Event that occurs after a value has been assigned to one of the binding expressions. + ''' + def OnEvalError(self, Sender: Object, AException: Exception) -> None: + ''' + # OnEvalError: BindCompEvalErrorEvent + Event that occurs when there are errors while evaluating the binding expressions. + ''' + def OnLocationUpdated(self, AOldLocation: ILocation, ANewLocation: ILocation) -> None: + ''' + # OnLocationUpdated: BindingLocationUpdatedEvent + No have docs. + ''' + def OnActivating(self, Sender: Object) -> None: + ''' + # OnActivating: NotifyEvent + Event that occurs when activating the binding expressions. + ''' + def OnActivated(self, Sender: Object) -> None: + ''' + # OnActivated: NotifyEvent + Event that occurs when the binding expressions have been activated. + ''' + +class IScopeExpressions: + ''' + ====================================== + Data.Bind.Components.IScopeExpressions + ====================================== + + Is an interface implemented by data sources so that they keep track of the binding components that are referencing the data source. + ''' + + __hash__: ClassVar[None] = ... + + def AddExpression(self, AExpression: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def RemoveExpression(self, AExpression: BasicBindComponent) -> None: + ''' + No have docs. + ''' + +class IScopeLocks: + ''' + ================================ + Data.Bind.Components.IScopeLocks + ================================ + + No have docs. + ''' + + __hash__: ClassVar[None] = ... + PosLock: bool + ''' + No have docs. + ''' + + def PosLockEnter(self) -> None: + ''' + No have docs. + ''' + def PosLockLeave(self) -> None: + ''' + No have docs. + ''' + def GetPosLock(self) -> bool: + ''' + No have docs. + ''' + +class IScopeEditLink: + ''' + =================================== + Data.Bind.Components.IScopeEditLink + =================================== + + Is an interface implemented by ``DataSource``\ s that can support linking a field in the ``DataSource`` to a control, such as a ``Edit`` control. This interface is used by binding components to manage the interaction between a particular control and a ``DataSource``. + ''' + + __hash__: ClassVar[None] = ... + + def SetField(self, ABindComp: BasicBindComponent, FieldName: str) -> None: + ''' + No have docs. + ''' + def Edit(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def GetIsEditing(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def SetModified(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def GetIsModified(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def GetCanModify(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def UpdateRecord(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def Reset(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def SetReadOnly(self, ABindComp: BasicBindComponent, Value: bool) -> None: + ''' + No have docs. + ''' + def ClearModified(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def PosChanging(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + +class IInterface: + ''' + ================= + System.IInterface + ================= + + ``IInterface`` is the base class for all interfaces defined in Delphi code. + + ``IInterface`` is the base interface for interfaces defined in Delphi code. When used in C++ code, ``IInterface`` is considered a child interface of `IUnknown <System.IUnknown.htm>`__ and `IUnknown <System.IUnknown.htm>`__ is considered the base interface for all interfaces. + + .. note:: ``IInterface`` introduces the `QueryInterface <System.IInterface.QueryInterface.htm>`__ method, which is useful for discovering and using other interfaces implemented by the same object. ``IInterface`` also introduces the reference counting methods, _AddRef and _Release. The Delphi compiler automatically provides calls to these methods when interfaces are used. The `InterfacedObject <System.TInterfacedObject.htm>`__ class is provided as a base class for objects that implement interfaces. Use of `InterfacedObject <System.TInterfacedObject.htm>`__ is not mandatory, but will often be easier than designing an implementer class from scratch. + + .. note:: C++ method declarations that use ``IInterface`` refer to the `_di_IInterface <Index.php'3Ftitle=System._di_IInterface&action=edit&redlink=1.htm>`__ type instead. This is a `DelphiInterface <System.DelphiInterface.htm>`__ wrapper around the ``IInterface`` interface: + + .. code-block:: python + + typedef System::DelphiInterface< IInterface > _di_IInterface; + ''' + + __hash__: ClassVar[None] = ... + + def QueryInterface(self, IID: GUID, Obj) -> HResult: + ''' + Returns a reference to a specified interface if the object supports that interface. + + ``QueryInterface()`` checks whether the object that implements the `IInterface <System.IInterface.htm>`__ interface supports the interface specified by *``IID``*. If so, ``QueryInterface()``: + + - Increments the reference count. + - Sets the ``Obj`` parameter so that it points to an instance of the specified interface. + - Returns `S_OK <System.HResult.htm>`__ (``'0'``) to indicate success. + + If the object does not support the interface, ``QueryInterface()`` returns a nonzero error code, such as `E_NoInterface <System.HResult.htm>`__. + ''' + def _AddRef(self) -> int: + ''' + Increments the reference count for this interface. + + The Delphi compiler automatically generates a call to ``_AddRef()`` for every reference to this interface. For most implementations, ``_AddRef()`` increments the reference count for the interface and returns the new reference count. When the caller is through with the interface, the compiler generates a call to the _Release method, which decrements the reference count. When the reference count drops to zero, the object is automatically freed. + + .. note:: Implementation objects can implement ``_AddRef()`` and `_Release <System.IInterface._Release.htm>`__ so that they do not perform any reference counting. For such objects, the reference count never drops to zero and the object is not automatically freed. In these cases, it is the application's responsibility to free the object. + ''' + def _Release(self) -> int: + ''' + Decrements the reference count for this interface. + + The Delphi compiler automatically generates a call to ``_Release()`` whenever a reference to this interface goes out of scope. For most implementations, ``_Release()`` decrements the reference count for the interface and returns the new reference count. When the reference count drops to zero, the object is automatically freed. + + .. note:: Implementation objects can implement ``_Release()`` so that it does not perform any reference counting. For such objects, the reference count never drops to zero and the object is not automatically freed. In these cases, it is the application's responsibility to free the object. + ''' + +class IInterfaceComponentReference: + ''' + =========================================== + System.Classes.IInterfaceComponentReference + =========================================== + + ``IInterfaceComponentReference`` is the interface for responding to requests for retrieving components. + + ``IInterfaceComponentReference`` introduces one method, `GetComponent <System.Classes.IInterfaceComponentReference.GetComponent.htm>`__, that allows the designer to respond a request to retrieve a reference to the component associated with a class. + + For example, the `Component <System.Classes.TComponent.htm>`__ class itself implements the ``IInterfaceComponentReference``. + ''' + + __hash__: ClassVar[None] = ... + + def GetComponent(self) -> Component: + ''' + .. code-block:: python + :caption: Delphi + + function GetComponent: Component; + + + Returns a reference to the component associated by the implementing class. + + ``GetComponent()`` returns a `Component <System.Classes.TComponent.htm>`__ value that is associated with the implementing class. For example, the `Component <System.Classes.TComponent.htm>`__ class itself implements the ``GetComponent()`` to return a pointer to itself. + ''' + +class GraphicControl(Control): + ''' + ============================ + Vcl.Controls.TGraphicControl + ============================ + + ``GraphicControl`` is the base class for all lightweight controls. + + ``GraphicControl`` supports simple lightweight controls that do not need the ability to accept keyboard input or contain other controls. Since lightweight controls do not wrap *Windows* *Screen* objects, they are faster and user fewer resources than controls based on `WinControl <Vcl.Controls.TWinControl.htm>`__. + + ``GraphicControl`` provides a `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property for access to the control's drawing surface and a virtual `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method called in response to paint requests received by the parent control. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Provides the drawing surface used by the graphic control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. + + Since a `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ instance does not have its own *Windows* *Screen* object, it obtains its device context from its parent control. + ''' + def Paint(self) -> None: + ''' + Renders the control's surface. + + The ``Paint()`` method is called automatically when a lightweight control needs to update its display area. Code in the ``Paint()`` method uses the `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property to render the control surface. + + As implemented in `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__, ``Paint()`` does nothing. Specific rendering logic is provided by ``Paint()`` methods in descendent control classes. + ''' + def get_Canvas(self) -> Canvas: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. + + Calling ``Create()`` constructs and initializes an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. However, you should never attempt to instantiate a `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. This class is intended solely as a base class from which other control classes descend and you should only call ``Create()`` to instantiate one of these descendants. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the graphic control. It becomes the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. If you do not explicitly provide an ``Owner()`` to the constructor (that is, if ``AOwner`` is ``nil`` (Delphi) or ``NULL`` (C++)), your application is responsible for explicitly freeing the graphic control. + + .. note:: If a component's constructor allocates resources or memory, also override the destructor to free those resources. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the graphic control reference is not ``nil``, and only then calls ``Destroy()``. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it frees the ``Canvas`` object in its `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property. + + Override ``Destroy()`` to free any memory or resources allocated in the `Create <Vcl.Controls.TGraphicControl.Create.htm>`__ method. When declaring a ``Destroy()`` method in a descendent control type, always add the override directive to the declaration and call the inherited ``Destroy()`` as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + +class ScrollingWinControl(WinControl): + ''' + ============================== + Vcl.Forms.TScrollingWinControl + ============================== + + ``ScrollingWinControl`` is the base class for controls that support scrolling. + + Use ``ScrollingWinControl`` as a base class when defining a custom windowed control that supports scrolling. + + Typically, a scrolling windowed control has horizontal and vertical ``ScrollBar``\ s and scrolls a child control into view when the child control receives focus. + + Examples of scrolling windowed controls include `Form <Vcl.Forms.TForm.htm>`__ and TScrollBox objects. + + The scrolling window's `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ determines whether the left or right side of the window's contents are displayed by default. The `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ does not affect the window's coordinate system. The ``ScrollBar``\ s must be adjusted programmatically according to the system locale. + ''' + + __hash__: ClassVar[None] = ... + AutoScroll: bool + ''' + Indicates whether ``ScrollBar``\ s appear automatically on the scrolling windowed control if it is not large enough to display all of its controls. + + If ``AutoScroll`` is true, the ``ScrollBar``\ s appear automatically when necessary. For example, if the user resizes the control so that some of its controls are partially obscured, ``ScrollBar``\ s appear. + + If ``AutoScroll`` is false, ``ScrollBar``\ s don't appear automatically. In this case, use the `HorzScrollBar <Vcl.Forms.TScrollingWinControl.HorzScrollBar.htm>`__ and `VertScrollBar <Vcl.Forms.TScrollingWinControl.VertScrollBar.htm>`__ properties to make ``ScrollBar``\ s appear. + ''' + HorzScrollBar: ControlScrollBar + ''' + Represents the horizontal ``ScrollBar`` for the scrolling windowed control. + + Use ``HorzScrollBar`` to hide, show, or manipulate the horizontal ``ScrollBar`` for the scrolling windowed control. + ''' + VertScrollBar: ControlScrollBar + ''' + Represents the vertical ``ScrollBar`` for the scrolling windowed control. + + Use ``VertScrollBar`` to hide, show, or manipulate the vertical ``ScrollBar`` for the scrolling windowed control. + ''' + def AdjustClientRect(self, Rect: Rect) -> None: + ''' + Adjusts the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property to exclude the ``ScrollBar``\ s. + + ``AdjustClientRect()`` is called internally when the control needs accurate information on where to place child controls within the client area. It indents ``Rect`` to exclude the area taken by the ``ScrollBar``s, then calls the inherited ``AdjustClientRect()`` method. + ''' + def AlignControls(self, AControl: Control, ARect: Rect) -> None: + ''' + Aligns the controls in the scrolling windowed control. + + Use ``AlignControls()`` to align the controls in the scrolling control according to the values of their ``Align`` properties. + + ``AControl`` specifies the control that takes precedence in alignment when other controls have the same ``Align`` value. ``AControl`` can be ``nil`` (Delphi) or ``NULL`` (C++). + + ``ARect`` indicates the area in the scrolling control that contains the controls to align. ``ARect`` is automatically set to the entire area of the scrolling control. + + If `AutoScroll <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is true and the scrolling control is not being resized, the ranges of the ``ScrollBar``\ s on the scrolling control are automatically recalculated. + + After recalculating the ranges of the ``ScrollBar``\ s and setting the value of ``ARect``, ``AlignControls()`` calls the inherited ``AlignControls()`` method, passing the ``AControl`` and ``ARect`` objects. + ''' + def AutoScrollEnabled(self) -> bool: + ''' + Indicates whether automatic scrolling is enabled. + + Call ``AutoScrollEnabled`` to determine whether automatic scrolling is enabled. + + ``AutoScrollEnabled()`` returns ``True`` if the control is not a dock site using the dock manager and the ``AutoSize`` property is false. + ''' + def AutoScrollInView(self, AControl: Control) -> None: + ''' + Scrolls a control into the visible area of the scrolling windowed control. + + Use ``AutoScrollInView`` to scroll the control specified by the ``AControl`` parameter into the visible area of the scrolling windowed control. + + Unlike `ScrollInView <Vcl.Forms.TScrollingWinControl.ScrollInView.htm>`__, ``AutoScrollInView`` does not perform scrolling when the scrolling windowed control or the specified control are being loaded from a stream. + + ``AutoScrollInView`` calls `ScrollInView <Vcl.Forms.TScrollingWinControl.ScrollInView.htm>`__ to perform any needed scrolling. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resizes the scrolling windowed control by a specific ratio. + + Use ``ChangeScale()`` to resize the scrolling windowed control by a specific ratio. + + ``'M'`` is the multiplier of the ratio; D is the divisor of the ratio. For example, to resize the scrolling windowed control to four-fifths of its current size, set M to four and D to five. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Resizes the scrolling windowed control by a specific ratio. + + Use ``ChangeScale()`` to resize the scrolling windowed control by a specific ratio. + + ``'M'`` is the multiplier of the ratio; D is the divisor of the ratio. For example, to resize the scrolling windowed control to four-fifths of its current size, set M to four and D to five. + ''' + def CreateWnd(self) -> None: + ''' + Creates a Windows control corresponding to the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + ``CreateWnd()`` is called automatically when the control is first created or when the window must be destroyed and recreated to reflect property changes. + ''' + def DoFlipChildren(self) -> None: + ''' + Flips the control's children. + + The ``FlipChildren()`` method calls ``DoFlipChildren()`` to reverse the positions of child controls. ``DoFlipChildren()()`` moves the control's children to opposite positions on the control; that is, children on the left side of the control are moved to the right side of the control and vice versa. In addition, ``DoFlipChildren()()`` moves the vertical ``ScrollBar``\ s to the other side of the control. + + .. note:: ``DoFlipChildren()`` is a protected helper method for the public FlipChildren method. Unlike FlipChildren, ``DoFlipChildren()`` does not adjust the alignment of controls that are aligned to one of the edges of the windowed control. + ''' + def DoGesture(self, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Processes the unhandled gesturing events. + + `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ is run automatically for all gesturing events that were not handled by the user. `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ is run only if `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is not set or if it did not handle the gesture event. + + Override `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ in descending classes to support default behavior for gesture events that were not handled by the user. In `Control <Vcl.Controls.TControl.htm>`__, the `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method simply returns and does no special processing. + ''' + def DoGetGestureOptions(self, Gestures: InteractiveGestures, Options: InteractiveGestureOptions) -> None: + ''' + Returns the interactive gestures and their options. + + `DoGetGestureOptions <Vcl.Controls.TControl.DoGetGestureOptions.htm>`__ is used internally to access the interactive gestures and their options associated with a `Control <Vcl.Controls.TControl.htm>`__. + ''' + def IsTouchPropertyStored(self, AProperty: TouchProperty) -> bool: + ''' + Checks whether the associated touch manager stored any of the given options. + + ``Vcl.Forms.TScrollingWinControl.IsTouchPropertyStored`` inherits from `Vcl.Controls.TControl.IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__. All content below this line refers to `Vcl.Controls.TControl.IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__. + + Checks whether the associated touch manager stored any of the given options. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used internally by the *VCL Framework* to check whether the associated touch manager component has stored the given options. Do not call `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ directly. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used primarily to ensure that controls that do not require gesturing are not storing useless data in the DFMs or executables. + ''' + def Resizing(self, State: WindowState) -> None: + ''' + Makes any required adjustments when the window changes size. + + This protected method is called automatically when the control's window is resized. As implemented in `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__, ``Resizing()`` does nothing. Descendants override this method to adjust to the change in window size. + + The ``State`` parameter indicates the state of the scrolling windowed control after the resize operation. + ''' + def SendChangeScaleMessage(self, M: int, D: int) -> None: + ''' + Not have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates and initializes a new `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + Use ``Create()`` to create and initialize a new `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + ``AOwner`` is a TComponent object that owns the scrolling windowed control. + ''' + def Destroy(self) -> None: + ''' + Removes the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object from memory. + + Do not call ``Destroy()``. Instead, call Free, which calls `WinControl.Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ if the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object is not nil. + ''' + def DisableAutoRange(self) -> None: + ''' + Disables automatic scrolling. + + Use ``DisableAutoRange`` to temporarily disable scrolling when rearranging controls in a scrolling windowed control. Use the `EnableAutoRange <Vcl.Forms.TScrollingWinControl.EnableAutoRange.htm>`__ method to turn scrolling on again when finished rearranging the controls. + ''' + def EnableAutoRange(self) -> None: + ''' + Reenables automatic scrolling. + + Use ``EnableAutoRange`` to reenable scrolling after turning it off. This method can be used with the `DisableAutoRange <Vcl.Forms.TScrollingWinControl.DisableAutoRange.htm>`__ method to turn scrolling on and off. + ''' + def ScrollInView(self, AControl: Control) -> None: + ''' + Scrolls a control into the visible area of the scrolling windowed control. + + Use ``ScrollInView`` to ensure that a specified control is in the visible area of the scrolling windowed control. ``AControl`` specifies the ``Control`` object to scroll into view. + + .. note:: If the `ComponentState System.Classes.TComponent.ComponentState.htm>`__ property for ``AControl`` or the scrolling windowed control might be ``csLoading``, use `AutoScrollInView <Vcl.Forms.TScrollingWinControl.AutoScrollInView.htm>`__ instead. + ''' + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + Occurs when an object with custom alignment is aligned. + + ``VCL.Forms.TScrollingWinControl.OnAlignInsertBefore`` inherits from `Vcl.Controls.TWinControl.OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and ``False`` otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +==================================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + +class CustomGroupBox(CustomControl): + ''' + ============================ + Vcl.StdCtrls.TCustomGroupBox + ============================ + + ``CustomGroupBox`` is the base class for all group-box components. + + ``GroupBox``\ es are visual components that act as containers for sets of related controls, such as ``RadioButton``\ s.. ``GroupBox``\ es may also contain other ``GroupBox``\ es. ``CustomGroupBox`` is the class from which all group-box components--including `GroupBox <Vcl.StdCtrls.TGroupBox.htm>`__, ``RadioGroup``, and ``DBRadioGroup``--descend. + ''' + + __hash__: ClassVar[None] = ... + + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def AdjustClientRect(self, Rect: Rect) -> None: + ''' + Adjusts the ``ClientRect`` property for idiosyncrasies of the window. + + ``AdjustClientRect()`` is called internally when the ``GroupBox`` needs accurate information on where to place child controls within the client area. It indents the client rectangle slightly so that child controls are not placed on the frame (or caption) of the ``GroupBox``. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter record passed in the ``Params`` parameter. + + The ``CreateWnd()`` method calls ``CreateParams()`` to initialize the parameters it passes to ``CreateWindowHandle()``. Override ``CreateParams()`` to customize the way a ``GroupBox`` creates its *Windows* representation. When overriding ``CreateParams()``, always call the inherited method first to set the default values, then make any desired adjustments. + + Specify the parameter record as the value of the ``Params`` parameter. The ``CreateParams()`` type is a data structure holding information needed when telling *Windows* to create a window handle. The fields of a ``CreateParams()`` record become the parameters to a call to the ``CreateWindowEx`` API function. + + `CustomGroupBox <Vcl.StdCtrls.TCustomGroupBox.htm>`__ adjusts the window style by turning off the ``CS_HREDRAW`` and ``CS_VREDRAW`` flags. + ''' + def Paint(self) -> None: + ''' + Renders the onscreen image of the ``GroupBox``. + + ``Paint()`` draws a border around the ``GroupBox`` and fills in the caption. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomGroupBox <Vcl.StdCtrls.TCustomGroupBox.htm>`__ instance. + + Call ``Create()`` to instantiate a ``GroupBox`` at runtime. ``GroupBox``\ es placed on forms at design time are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the ``GroupBox``. It becomes the value of the ``Owner()`` property. + ''' + +class CustomComboBoxStrings(Strings): + ''' + =================================== + Vcl.StdCtrls.TCustomComboBoxStrings + =================================== + + ``CustomComboBoxStrings`` represents the strings in the drop-down list of a ``ComboBox``. + + ``CustomComboBoxStrings`` is the base class for objects that represent the items in the drop-down list of a ``ComboBox``. Each type of ``ComboBox`` (``TComboBox`` or ``ComboBoxEx``) uses its own ``CustomComboBoxStrings`` descendant to manage the list of items. + + Do not create instances of ``CustomComboBoxStrings``. This class is designed to work only with a ``ComboBox``. ``CustomCombo`` creates the ``CustomComboBoxStrings`` descendant it uses to implement its `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + ''' + + __hash__: ClassVar[None] = ... + ComboBox: CustomCombo + ''' + Identifies the ``ComboBox`` whose items this object represents. + + ``CustomComboBoxStrings`` uses ``ComboBox`` internally so that the strings in the list and the items in the drop-down list of the ``ComboBox`` remain synchronized. + ''' + def GetCount(self) -> int: + ''' + Returns the number of strings in the list + + ``GetCount()`` is the protected read implementation of the `Count <System.Classes.TStrings.Count.htm>`__ property. It fetches the number of items from the ``ComboBox`` identified by the `ComboBox <Vcl.StdCtrls.TCustomComboBoxStrings.ComboBox.htm>`__ property. + ''' + def Get(self, Index: int) -> str: + ''' + Returns a string given its index. + + ``Get()`` is the protected read implementation of the `Strings <System.Classes.TStrings.Strings.htm>`__ property. It fetches the specified string from the ``ComboBox`` identified by the `ComboBox <Vcl.StdCtrls.TCustomComboBoxStrings.ComboBox.htm>`__ property. + + ``Index`` identifies the string to return, where 0 is the index of the first string, 1 is the index of the second string, and so on. + ''' + def GetObject(self, Index: int) -> Object: + ''' + Returns the object associated with the item at a specified index. + + ``GetObject()`` is the protected read implementation of the `Objects <System.Classes.TStrings.Objects.htm>`__ property. It fetches the associated object for the identified item from the ``ComboBox`` identified by the `ComboBox <Vcl.StdCtrls.TCustomComboBoxStrings.ComboBox.htm>`__ property. + + ``Index`` is the index of the item with which the object is associated. + ''' + def PutObject(self, Index: int, AObject: Object) -> None: + ''' + Changes the object associated with the string at a specified index. + + ``PutObject()`` is the protected write implementation of the `Objects <System.Classes.TStrings.Objects.htm>`__ property. It associates the object specified by ``AObject`` with the item identified by ``Index``. + + ``Index`` identifies an item in the drop-down list of the ``ComboBox``, where 0 is the index of the first item, 1 is the index of the second item, and so on. + + ``AObject`` is the object to associated with the specified item. + ''' + def SetUpdateState(self, Updating: bool) -> None: + ''' + Performs internal adjustments before or after a series of updates. + + ``SetUpdateState()`` is called at the beginning or end of a series of updates. When the ``BeginUpdate()`` method is first called and the `CustomComboBoxStrings <Vcl.StdCtrls.TCustomComboBoxStrings.htm>`__ object is not already in the middle of an update, ``SetUpdateState()`` is called with ``Updating()`` set to ``True``. When the End``Update()`` method is called and it cancels out the last unmatched call to ``BeginUpdate()``, ``SetUpdateState()`` is called with ``Updating()`` set to ``False``. + + ``SetUpdateState()`` refreshes the ``ComboBox`` when ``Updating()`` is ``False``, so that the ``ComboBox`` reflects the new set of strings. + ''' + def Create(self) -> None: + ''' + `Creates <System.Classes.TStrings.Create.htm>`__ an instance of a `Strings <System.Classes.TStrings.htm>`__ object. + + Do not call the `Create <System.Classes.TStrings.Create.htm>`__ method for `Strings <System.Classes.TStrings.htm>`__ directly. `Strings <System.Classes.TStrings.htm>`__ is an abstract class and its constructor should only be called as an inherited method from the constructor of a derived class. + ''' + def Destroy(self) -> None: + ''' + `Destroys <System.Classes.TStrings.Destroy.htm>`__ the `Strings <System.Classes.TStrings.htm>`__ instance and frees its memory. + + Do not call `Destroy <System.Classes.TStrings.Destroy.htm>`__ directly. Call ``Free()`` instead. ``Free()`` checks that the object reference is not ``nil`` before calling `Destroy <System.Classes.TStrings.Destroy.htm>`__. + ''' + def Clear(self) -> None: + ''' + Deletes all the strings from the list. + + Call clear to empty the drop-down list of the ``ComboBox``. All references to associated objects are also removed. However, the objects themselves are not freed. + ''' + def Delete(self, Index: int) -> None: + ''' + Removes the item specified by the ``Index`` parameter. + + Call ``Delete()`` to remove a single item from the list. If an object is associated with the string, the reference to the object is removed as well. ``Index`` gives the position of the string in the drop-down list, where 0 is the first string, 1 is the second string, and so on. + ''' + def IndexOf(self, S: str) -> int: + ''' + Returns the position of a string in the list. + + Call ``IndexOf()`` to obtain the position of the first occurrence of a string that matches S. The string must be an exact match (S can't be the prefix of a string in the ``ComboBox``). + + ``IndexOf()`` returns the 0-based index of the string. Thus, if S matches the first string in the list, ``IndexOf()`` returns 0, if S is the second string, ``IndexOf()`` returns 1, and so on. If the string does not have a match in the string list, ``IndexOf()`` returns -1. + ''' + +class CustomCombo(CustomListControl): + ''' + ========================= + Vcl.StdCtrls.TCustomCombo + ========================= + + ``CustomComboBox`` is the base class for ``ComboBox`` components. + + Use ``CustomComboBox`` as a base class when defining a control that represents a specialized *Windows* ``ComboBox``. A ``ComboBox`` is an edit box with a scrollable list attached to it; users can select an item from the list or type directly into the edit box. ``ComboBox``\ es can present the list as a drop-down list or as a ``ListBox`` that is always visible. + + .. note:: To create a ``ComboBox`` class that uses the extended ``ComboBox`` features such as images associated with entries, do not use ``CustomComboBox``. Instead, use the ``CustomComboBoxEx`` class instead. + + Do not create instances of ``CustomComboBox``. To put a ``ComboBox`` in a form, use a descendant of ``CustomComboBox``, such as `ComboBox <Vcl.StdCtrls.TComboBox.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + FEditHandle: HWnd + ''' + Represents the window handle for the edit portion of the ``ComboBox``. + + ``FEditHandle`` is the window handle for the edit control portion of the ``ComboBox``. + ''' + FListHandle: HWnd + ''' + Represents the window handle for the list of items in the ``ComboBox``. + + ``FListHandle`` is the window handle for the drop-down list. + ''' + FDropHandle: HWnd + ''' + Represents the window handle for the entire ``ComboBox``. + + ``FDropHandle`` is the window handle for the ``ComboBox``. + ''' + FDefEditProc: WindowProcPtr + ''' + Represents the address of the edit box procedure assigned by *Windows*. + + The ``FDefEditProc`` field is used to handle *Windows Messages* sent to the edit box control inside the ``ComboBox``, that cannot be handled directly by Delphi. + ''' + FDefListProc: WindowProcPtr + ''' + Represents the address of the ``ListBox`` procedure assigned by *Windows*. + + The ``FDefListProc`` field is used to handle *Windows Messages* sent to the ``ListBox`` control inside the ``ComboBox``, that cannot be handled directly by Delphi. + ''' + FDroppingDown: bool + ''' + Specifies whether the ``ListBox`` is dropping down. + + ``FDroppingDown`` field is used when adjusting the drop-down ``ListBox`` size. + ''' + FFocusChanged: bool + ''' + Specifies whether the ``ComboBox`` changed its focus state. + + ``FFocusChanged`` field specifies whether the control changed its focus state. + ''' + FIsFocused: bool + ''' + Specifies whether the ``ComboBox`` is focused. + + ``FIsFocused`` field is set to ``True`` if the ``ComboBox`` is focused and to ``False`` otherwise. + ''' + FSaveIndex: int + ''' + Represents the index of an item from the ``ComboBox``. + + ``FSaveIndex`` field is used to store the index of an item from the ``ComboBox``. + ''' + FChildInstances: ComboChildren + ''' + No have docs. + ''' + FEditInstance: Pointer + ''' + Represents the address of an internal routine associated with the edit control. + + ``FEditInstance`` represents the address of a *Windows Message* handling procedure associated with the edit control inside the ``ComboBox``. + ''' + FListInstance: Pointer + ''' + Represents the address of an internal routine associated with the ``ListBox``. + + ``FListInstance`` represents the address of a *Windows Message* handling procedure associated with the ``ListBox`` inside the ``ComboBox``. + ''' + DropDownCount: int + ''' + Specifies the maximum number of items displayed in the drop-down list. + + By default, the drop-down list is long enough to contain eight items without requiring the user to scroll to see them all. To make the drop-down list smaller or larger, specify a number larger or smaller than eight as the ``DropDownCount`` value. + + If the ``DropDownCount`` ``Value`` is larger than the number of items in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property, the drop-down list will be just large enough to hold all the possible choices and no more. If the ``DropDownCount`` ``Value`` is smaller then the number of item in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property, the drop down list will display a ``ScrollBar``. + ''' + EditHandle: HWnd + ''' + Returns the window handle for the edit portion of the ``ComboBox``. + + A ``ComboBox`` is composed of several windows: the ``ComboBox`` itself, the edit control, and the drop-down list. ``EditHandle`` is the window handle of the edit control portion. (The ``Handle`` property and the `ListHandle <Vcl.StdCtrls.TCustomCombo.ListHandle.htm>`__ property give the handles for the ``ComboBox`` itself and the drop-down list, respectively.) + + Use ``EditHandle`` when making *Windows API* calls addressed to the edit portion of the ``ComboBox``. + ''' + ItemCount: int + ''' + Specifies the number of items in the drop-down list. + + Read ``ItemCount`` to get the number of items in the drop-down list. ``ItemCount`` is the number of all items, not just those that are visible at one time. + ''' + ItemHeight: int + ''' + Specifies the height, in pixels, of the items in the drop-down list. + + Read ``ItemHeight`` to determine the height of the items in the drop-down list. + + The effect of setting ``ItemHeight`` varies, depending on the type of ``ComboBox`` and the style. For example, `ComboBox <Vcl.StdCtrls.TComboBox.htm>`__ lets you set the item height only when `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``. If `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawVariable``, ``ItemHeight`` is the default height for drawing list items, but this value can be overridden by an `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event handler. + + ``ComboBoxEx`` does not let you change the value of ``ItemHeight``. + + .. note:: ``ComboBox``\ es that do not support changes to ``ItemHeight`` do not raise an exception when you attempt to change ``ItemHeight``; they simply ignore the attempt. + ''' + ListHandle: HWnd + ''' + Provides access to the window handle of the list of items in the ``ComboBox``. + + A ``ComboBox`` is composed of several windows: the ``ComboBox`` itself, the ``Edit`` control, and the drop-down list. ``ListHandle`` is the window handle of the drop-down list. (The ``Handle`` property and the `EditHandle <Vcl.StdCtrls.TCustomCombo.EditHandle.htm>`__ property give the handles for the ``ComboBox`` itself and the edit portion, respectively.) + + Use ``ListHandle`` when making *Windows API* calls addressed to the list portion of the ``ComboBox``. + + .. note:: ``ListHandle`` is only available when the ``ComboBox`` has a "simple" style (an ``Edit`` box with a fixed list below rather than a drop-down list). + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can type into the edit portion of the ``ComboBox``. + + Use ``MaxLength`` to limit the number of characters that the user can enter into the edit portion of the ``ComboBox``. A value of 0 indicates that there is no application-defined limit on the length. + + .. note:: Setting ``MaxLength`` will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of ``MaxLength`` characters. + + .. note:: Even when ``MaxLength`` is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + Canvas: Canvas + ''' + Provides access to the drawing surface of the ``ComboBox``. + + Use ``Canvas`` as the drawing surface when customizing the way the ``ComboBox`` paints itself. For example, when using a `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ descendant that allows applications to draw ``ComboBox`` items in an `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ even, the `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ event handler uses ``Canvas`` for painting the customized items. + ''' + DroppedDown: bool + ''' + Indicates whether the drop-down list is currently displayed. + + Read ``DroppedDown`` to determine whether the drop-down list is visible. Set `DropDown <Vcl.StdCtrls.TCustomCombo.DropDown.htm>`__ to drop the list down or close it up. ``DroppedDown`` is ``True`` when the drop-down list is open, and false when it is closed. + ''' + Items: str + ''' + Provides access to the list of items (strings) in the list portion of the ``ComboBox``. + + Read ``Items`` to access the list of items that appears in the ``ComboBox``. Use the methods of ``Items`` to add, insert, delete and move items. Set the value of ``Items`` to copy the items from another string list. + + For example, for `Vcl.DBCtrls.TDBComboBox <Vcl.DBCtrls.TDBComboBox.htm>`__, use ``Items`` to supply the values in the list from which the user can choose. Because ``Items`` is an object of type ``Strings``, you can add, delete, insert, and move items using the ``Add()``, ``Delete()``, ``Insert()``, ``Exchange()``, and ``Move()`` methods of the ``Strings`` object. For example, to add each string to the ``ComboBox`` list, write code such as the following: + + .. code-block:: python + + while not CountryTbl.Eof do begin + DBComboBox1.Items.Add(CountryTbl.FieldByName('Country').AsString); + CountryTbl.Next; + end; + + .. code-block:: python + + while (!CountryTbl->Eof) + { + DBComboBox1->Items->Add(CountryTbl->FieldByName("Country")->AsString); + CountryTbl->Next(); + } + + The `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property determines which item is selected, if any. + ''' + SelLength: int + ''' + Specifies the length, in characters, of the selected text in the edit portion of the ``ComboBox``. + + The selected portion of the text in the edit region of the ``ComboBox`` is the string of ``SelLength`` characters that starts at the character specified by the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ property. The selected text appears highlighted in the edit region of the ``ComboBox``. To select a section of text in the edit region, first set the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ property to position the cursor, and then set ``SelLength`` to the number of characters that should be selected. The ``SelText`` property is the substring that is selected. + + .. note:: The ``SelLength`` property is only valid when the ``ComboBox`` has focus. When the ``ComboBox`` does not have focus, reading ``SelLength`` always yields a value of 0, and setting it has no effect. + ''' + SelStart: int + ''' + Specifies the position of the first selected character in the edit portion of the ``ComboBox``. + + Read ``SelStart`` to determine where the selection starts in the ``Text`` property. The first character is designated with 0, the second with 1, and so on. When `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ is 0, ``SelStart`` is the position of the cursor. + + Set ``SelStart`` to position the cursor in the edit region of the ``ComboBox``. Setting ``SelStart`` to 0 positions the cursor before the first character, setting ``SelStart`` to 1 positions the cursor before the second character, and so on. + + .. note:: Setting ``SelStart`` changes the `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ property to 0. When using ``SelStart`` and `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ to programmatically select a portion of the text in the edit region, set ``SelStart`` before setting `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__. + + .. note:: The ``SelStart`` property is only valid when the ``ComboBox`` has focus. When the ``ComboBox`` does not have focus, reading ``SelStart`` always yields a value of 0, and setting it has no effect. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + def AdjustDropDown(self) -> None: + ''' + Adjusts the size and position of the drop down list. + + `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ calls ``AdjustDropDown`` when it drops down the drop-down list. This method adjusts the size and position of the drop-down list to reflect the values of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ and `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ properties. + ''' + def ComboWndProc(self, Message: Message, ComboWnd: HWnd, ComboProc: WindowProcPtr) -> None: + ''' + Responds to *Windows Messages* sent to the edit control or drop-down list. + + ``ComboWndProc`` handles the common processing of *Windows Messages* sent to the edit region or list portion of the ``ComboBox``. It is called by the `EditWndProc <Vcl.StdCtrls.TCustomCombo.EditWndProc.htm>`__ and `ListWndProc <Vcl.StdCtrls.TCustomCombo.ListWndProc.htm>`__ methods to take care of all processing that is not specific to the edit region or drop-down list. + + The ``Message`` parameter describes the *Windows Message*. The ``ComboWnd`` parameter is the windows handle for the edit region or list. The ``ComboProc`` parameter is a pointer to the default window procedure for the window that received the message. ``ComboWndProc`` provides default responses to focus events, mouse events, and key strokes. + + Override ``ComboWndProc`` to change the way the ``ComboBox`` responds to *Windows Messages*. When overriding ``ComboWndProc``, be sure to call the parent class's method to process all unhandled messages. + + .. note:: Do not confuse ``ComboWndProc`` with the `WndProc <Vcl.StdCtrls.TCustomCombo.WndProc.htm>`__ method. ``ComboWndProc`` responds to messages that are sent to the edit region or drop-down list. WndProc responds to messages sent to the ``ComboBox`` itself. + ''' + def CreateWnd(self) -> None: + ''' + Creates the *Windows* control that represents the ``ComboBox``. + + The ``CreateHandle()`` method calls ``CreateWnd()`` to handle the particulars of creating the ``ComboBox`` window. `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ overrides the inherited method to ensure that the newly-created window and the `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ properties correctly reflect each other. + + The *Windows* control for the ``ComboBox`` can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. Thus, ``CreateWnd()`` may be called more than once during the lifetime of the `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ instance. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition *children* and *self*. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def EditWndProc(self, Message: Message) -> None: + ''' + Responds to *Windows Messages* that are sent to the edit control portion of the ``ComboBox``. + + A ``ComboBox`` is composed of several windows: the ``ComboBox`` itself, the edit control, and the drop-down list. ``EditWndProc`` is the window procedure for the edit control portion of the ``ComboBox``. + ''' + def GetItemsClass(self) -> CustomComboBoxstrClass: + ''' + Indicates the class that implements the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + + `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ uses ``GetItemsClass`` internally to determine what class to instantiate when it implements the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + + In `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__, ``GetItemsClass`` is abstract pure virtual, meaning it has no implementation. `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ descendants override this method to indicate a `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ BoxStrings descendant that implements the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Processes messages received by the ``ComboBox``. + + ``WndProc()`` is the first method to received *Windows Messages* that are sent to the ``ComboBox``. Messages sent to the child windows of the ``ComboBox`` (for the edit region and the list portion) go to the ``EditWndProc`` or ``ListWndProc()`` method instead. ``WndProc()`` handles messages about changes to the system colors defined in the *Windows* control panel, and closes up the drop-down list when the *Enter* key or the *Escape* key is pressed. All other messages are passed to ``Dispatch()`` for default processing. + ''' + def GetItemHt(self) -> int: + ''' + Returns the value of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. + + ``GetItemHt`` is the protected read access method for the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. In `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__, this method is abstract (pure virtual), meaning it has no implementation. Descendant classes override this method to return the height of items in the drop-down list. + ''' + def SetItemHeight(self, Value: int) -> None: + ''' + Sets the value of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. + + ``SetItemHeight`` is the protected write implementation of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. Although ``SetItemHeight`` never raises an exception, in some cases it does not change the value of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. ItemHeight can only be changed for some `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ descendants, and then only under specific circumstances. + + For example, ``ComboBoxEx`` never allows the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property to change. + ''' + def GetItemCount(self) -> int: + ''' + Returns the value of the `ItemCount <Vcl.StdCtrls.TCustomCombo.ItemCount.htm>`__ property. + + ``GetItemCount`` is the protected read access method for the `ItemCount <Vcl.StdCtrls.TCustomCombo.ItemCount.htm>`__ property. In `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__, this method is abstract (pure virtual), meaning it has no implementation. Descendant classes override this method to return the number of items in the drop-down list. + ''' + def GetItemIndex(self) -> int: + ''' + Returns the value of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + ``GetItemIndex()`` is the read implementation of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. It returns the index of the selected item in the drop-down list. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ is -1. + ''' + def GetDroppedDown(self) -> bool: + ''' + Returns the value of the `DroppedDown <Vcl.StdCtrls.TCustomCombo.DroppedDown.htm>`__ property. + + ``GetDroppedDown`` is the read implementation of the `DroppedDown <Vcl.StdCtrls.TCustomCombo.DroppedDown.htm>`__ property. It returns ``True`` if the drop-down list is showing. + ''' + def GetSelLength(self) -> int: + ''' + Returns the value of the `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ property. + + ``GetSelLength()`` is the read implementation of the `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ property. It returns the number of selected characters. + ''' + def GetSelStart(self) -> int: + ''' + Returns the value of the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ property. + + ``GetSelStart()`` is the read implementation of the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ property. It returns the position of the first selected character, or the position of the cursor if no characters are selected. + ''' + def ListWndProc(self, Message: Message) -> None: + ''' + Responds to *Windows Messages* that are sent to the drop-down list portion of the ``ComboBox``. + + A ``ComboBox`` is composed of several windows: the ``ComboBox`` itself, the edit control, and the drop-down list. ``ListWndProc`` is the window procedure for the drop-down list. + ''' + def Loaded(self) -> None: + ''' + Initializes the ``ComboBox`` after its form is loaded into memory. + + Do not call the protected ``Loaded()`` method. The component streaming system calls this method after it loads the ``ComboBox``\ s. form from a stream. + + `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ overrides the inherited method to select the item specified by the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property once the ``Form`` is fully loaded. + ''' + def Change(self) -> None: + ''' + Generates an ``Change()`` event. + + ``Change()`` is called automatically in response to notifications that the text has changed. It responds by generating an ``Change()`` event. Override this method to add additional processing when the text changes, or to block the ``Change()`` event. + ''' + def Select(self) -> None: + ''' + Generates an ``Select()`` event. + + ``Select()`` is called automatically when the selected item in the drop-down list changes. It responds by generating an ``Select()`` event. To perform additional processing or block the ``Select()`` event, override ``Select()``. + ''' + def DropDown(self) -> None: + ''' + Generates an ``DropDown()`` event. + + ``DropDown()`` is called automatically when the `DroppedDown <Vcl.StdCtrls.TCustomCombo.DroppedDown.htm>`__ property changes to ``True``. It responds by generating an ``DropDown()`` event. To perform additional processing or block the ``DropDown()`` event, override ``DropDown()``. + ''' + def CloseUp(self) -> None: + ''' + Generates an ``CloseUp()`` event. + + ``CloseUp()`` is called automatically when the `DroppedDown <Vcl.StdCtrls.TCustomCombo.DroppedDown.htm>`__ property changes to ``False``. It generates an ``CloseUp()`` event. + + Override ``CloseUp()`` to implement additional class-specific responses when the drop-down list closes up or to suppress the event. + ''' + def DestroyWindowHandle(self) -> None: + ''' + Destroys all of the windows controls that implement the ``ComboBox``. + + The ``DestroyWnd()`` method calls ``DestroyWindowHandle()`` to release the underlying *Windows* control. `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ overrides the inherited method to reset the `EditHandle <Vcl.StdCtrls.TCustomCombo.EditHandle.htm>`__ and `ListHandle <Vcl.StdCtrls.TCustomCombo.ListHandle.htm>`__ properties once the underlying *Windows* controls are gone. + ''' + def SetDroppedDown(self, Value: bool) -> None: + ''' + Sets the value of the `DroppedDown <Vcl.StdCtrls.TCustomCombo.DroppedDown.htm>`__ property. + + ``SetDroppedDown`` is the protected write implementation of the `DroppedDown <Vcl.StdCtrls.TCustomCombo.DroppedDown.htm>`__ property. + ''' + def SetSelLength(self, Value: int) -> None: + ''' + Sets the value of the `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ property. + + ``SetSelLength()`` is the protected write implementation of the `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ property. + ''' + def SetSelStart(self, Value: int) -> None: + ''' + Sets the value of the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ property. + + ``SetSelStart()`` is the protected write implementation of the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ property. + ''' + def SetMaxLength(self, Value: int) -> None: + ''' + Sets the value of the `MaxLength <Vcl.StdCtrls.TCustomCombo.MaxLength.htm>`__ property. + + ``SetMaxLength`` is the protected write implementation of the `MaxLength <Vcl.StdCtrls.TCustomCombo.MaxLength.htm>`__ property. + ''' + def SetDropDownCount(self, Value: int) -> None: + ''' + Sets the value of the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ property. + + ``SetDropDownCount`` is the protected write implementation of the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ property. + ''' + def SetItemIndex(self, Value: int) -> None: + ''' + Sets the value of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + ``SetItemIndex()`` is the protected write implementation of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. It selects an item in the drop-down list. + + ``Value`` is the item to select, where 0 indicates the first item, 1 indicates the second item, and so on. A negative ``Value`` causes all items to be unselected. + ''' + def SetItems(self, Value: str) -> None: + ''' + Sets the value of the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + + ``SetItems`` is the protected write implementation for the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. It copies the strings (and possibly their associated objects) from ``Value`` to the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + ''' + def IsItemHeightStored(self) -> bool: + ''' + Verifies the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ value. + + ``IsItemHeightStored`` is internally used to verify whether the value of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property is stored. `CustomCombo <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ descendants override the method to validate the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ instance. + + Call ``Create()`` to generate a ``ComboBox`` at runtime. ``ComboBox``\ es placed on forms at design time are created automatically. + + ``AOwner`` is a component (typically a form) that is responsible for freeing the ``ComboBox`` instance. + ''' + def Destroy(self) -> None: + ''' + Destroys all of the windows controls that implement the ``ComboBox``. + + The ``DestroyWnd()`` method calls ``DestroyWindowHandle()`` to release the underlying *Windows* control. `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ overrides the inherited method to reset the `EditHandle <Vcl.StdCtrls.TCustomCombo.EditHandle.htm>`__ and `ListHandle <Vcl.StdCtrls.TCustomCombo.ListHandle.htm>`__ properties once the underlying *Windows* controls are gone. + ''' + def AddItem(self, Item: str, AObject: Object) -> None: + ''' + Adds an item to the drop-down list of items. + + Call ``AddItem()`` to add a string, with an associated object, to the drop-down list. + + ``Item`` is the string to add to the drop-down list. + + ``AObject`` is an object associated with that string. It can be accessed using the `Objects <System.Classes.TStrings.Objects.htm>`__ property of the ``Strings`` object that implements the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + ''' + def Clear(self) -> None: + ''' + Deletes all text from the edit box and all items from the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ list. + + Call ``Clear()`` to empty the ``ComboBox`` at runtime. + ''' + def ClearSelection(self) -> None: + ''' + Deselects any selected items in the drop-down list. + + ``ClearSelection()`` checks whether an item in the drop-down list is currently selected. If so, it deselects the item (sets `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ to -1), and changes the ``Text`` property to an empty string. + ''' + def CopySelection(self, Destination: CustomListControl) -> None: + ''' + Copies the selected item in the drop-down list to another ``ListControl``. + + ``CopySelection()`` checks whether an item is selected in the drop-down list, and if so, adds it to the control specified by ``Destination``, along with its associated object. + ''' + def DeleteSelected(self) -> None: + ''' + Deletes the selected item from the drop-down list. + + ``DeleteSelected()`` deletes the item specified by the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property from the drop-down list. + ''' + def Focused(self) -> bool: + ''' + Indicates whether the ``ComboBox`` has input focus. + + Call ``Focused()`` to determine whether the ``ComboBox`` is currently the recipient of keyboard input. When ``Focused()`` returns ``True``, the ``ComboBox`` is the active control and keystroke messages are sent to it. When ``Focused()`` is ``False``, the ``ComboBox`` is not active (although it may be selected). + ''' + def GetCount(self) -> int: + ''' + Returns the value of the `ItemCount <Vcl.StdCtrls.TCustomCombo.ItemCount.htm>`__ property. + + ``GetCount()`` returns the number of items in the drop-down list. + ''' + def SelectAll(self) -> None: + ''' + Selects the entire block of text in the edit box. + + Use ``SelectAll()`` to select the entire block of text in the edit box. To select only part of the text, use the `SelStart <Vcl.StdCtrls.TCustomCombo.SelStart.htm>`__ and `SelLength <Vcl.StdCtrls.TCustomCombo.SelLength.htm>`__ properties. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + Occurs when the user changes the ``Text`` displayed in the edit region. + + Write an ``OnChange`` event handler to take specific action immediately after the user edits the text in the edit region or selects an item from the list. The ``Text`` property gives the new value in the edit region. + + .. note:: ``OnChange`` only occurs in response to user actions. Changing the ``Text`` property programmatically does not trigger an ``OnChange`` event. + ''' + def OnDropDown(self, Sender: Object) -> None: + ''' + Occurs when the user opens the drop-down list. + + Write an ``OnDropDown`` event handler to implement special processing that needs to occur only when the drop-down list is activated. + ''' + def OnSelect(self, Sender: Object) -> None: + ''' + Occurs when the user selects a string in the drop-down list. + + Write an ``OnSelect`` event handler to respond when the user changes the selected item in the drop-down list. ``OnSelect`` occurs after the selection has changed and the ``Text`` property reflects the new item. + ''' + def OnCloseUp(self, Sender: Object) -> None: + ''' + Occurs when the drop-down list closes up due to some user action. + + The ``OnCloseUp`` event occurs when the drop-down list is closed. This happens when a user selects a value from the drop-down list or when a mouse click occurs outside of the list. Write an ``OnCloseUp`` event handler to implement special processing that needs to occur when the drop-down list closes up. + + .. note:: An item is selected after the drop-down list is closed. + ''' + +class CustomComboBox(CustomCombo): + ''' + ============================ + Vcl.StdCtrls.TCustomComboBox + ============================ + + ``CustomComboBox`` is the base class for ``ComboBox`` components. + + Use ``CustomComboBox`` as a base class when defining a control that represents a specialized *Windows* ``ComboBox``. A ``ComboBox`` is an edit box with a scrollable list attached to it; users can select an item from the list or type directly into the edit box. ``ComboBox``\ es can present the list as a drop-down list or as a ``ListBox`` that is always visible. + + .. note:: To create a ``ComboBox`` class that uses the extended ``ComboBox`` features such as images associated with entries, do not use ``CustomComboBox``. Instead, use the ``CustomComboBoxEx`` class instead. + + Do not create instances of ``CustomComboBox``. To put a ``ComboBox`` in a form, use a descendant of ``CustomComboBox``, such as `ComboBox <Vcl.StdCtrls.TComboBox.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + Sorted: bool + ''' + Determines whether the list portion of the ``ComboBox`` is alphabetized. + + Set ``Sorted`` to ``True`` to sort the items in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ list alphabetically. New items added to the list while ``Sorted`` is ``True`` are inserted in the correct alphabetical position. + + When ``Sorted`` is changed from ``False`` to ``True``, the original order of the items is lost. Setting ``Sorted`` back to ``False`` does not restore the original order. + ''' + Style: ComboBoxStyle + ''' + Determines the display style of the ``ComboBox``. + + Set ``Style`` to specify how the list and edit region of the ``ComboBox`` should appear. + + When ``Style`` is ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``, the `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ event occurs when the list items need to be drawn. If ``Style`` is ``csOwnerDrawVariable``, an `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event occurs as well. + + The possible values of `ComboBoxStyle <Vcl.StdCtrls.TComboBoxStyle.htm>`__ are: + + ======================= ==================================================================================================================================================== + **Value** **Meaning** + ======================= ==================================================================================================================================================== + ``csDropDown`` Defines a drop-down list with an edit box for manually entered text. All items are strings of the same height. + ``csSimple`` Defines an edit box with a fixed list (``ListBox``) below it. The length of the list is determined by the ``Height`` of the ``ComboBox``. + ``csDropDownList`` Defines a drop-down list with no edit box; the user cannot enter text manually. All items are strings of the same height. + ``csOwnerDrawFixed`` Defines an owner-drawn drop-down list with no edit box. Each item in the list has the height specified by the ``ItemHeight`` property. + ``csOwnerDrawVariable`` Defines an owner-draw drop-down list with no edit box. List items can have varying heights. + ======================= ==================================================================================================================================================== + ''' + AutoCompleteDelay: int + ''' + Specifies the delay between a key press and an attempt to autocomplete the field. + + Specifies the delay, in milliseconds, between a key press and an attempt to autocomplete the field. Autocomplete will position to matching list values as you type, sometimes saving you keystrokes. + + ``AutoCompleteDelay`` is only in effect when `AutoComplete <Vcl.StdCtrls.TCustomComboBox.AutoComplete.htm>`__ is ``True``. + ''' + AutoComplete: bool + ''' + Positions to matching list items as you type. + + ``AutoComplete`` will position to matching list values as you type, saving you keystrokes. + + As you type, the ``ItemIndex`` property is updated with the list entry that matches the characters you have entered. As you type, different list entries may match, and ``ItemIndex`` changes accordingly. + + There is a delay of `AutoCompleteDelay <Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay.htm>`__ milliseconds between the characters typed and the autocomplete operation. + ''' + AutoCloseUp: bool + ''' + Specifies whether the drop-down closes up automatically when the user selects an item. + + When ``AutoCloseUp`` is ``True``, the drop-down closes up automatically when the user selects an item. + ''' + AutoDropDown: bool + ''' + Specifies whether the drop-down list drops down automatically in response to user keystrokes. + + When ``AutoDropDown`` is ``True``, the ``ComboBox`` automatically drops down its list when the user starts typing a string while the ``ComboBox`` has focus. + + When ``AutoDropDown`` is ``False``, the user must explicitly use the drop-down button to drop down the ``ComboBox`` list. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text in the ``ComboBox``. + + Use ``CharCase`` to force the contents of the ``ComboBox`` into upper or lower case. + + When ``CharCase`` is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types into the ``ComboBox``. Changing the ``CharCase`` property changes the actual text, not just its appearance; case information is lost and cannot be recaptured by changing ``CharCase`` back to ``ecNormal``. + ''' + ExtendedUI: bool + ''' + No have docs. + ''' + SelText: str + ''' + Represents the selected text in the edit region. + + Read ``SelText()`` to obtain the text that is selected in the edit region of the ``ComboBox``. When the ``ComboBox`` is the active control, ``SelText`` appears highlighted. Set ``SelText`` to replace the current selection with a different substring. If no text is selected when a ``Value`` is assigned to ``SelText``, the ``SelText`` string is inserted in the text at the cursor. + + .. note:: The ``SelText`` property is only valid when the ``ComboBox`` has focus. When the ``ComboBox`` does not have focus, reading ``SelText`` always yields an empty string and setting it inserts the text at the cursor rather than replacing the selected text. + ''' + TextHint: str + ''' + Specifies the text that is displayed as a text watermark in the edit box of the ``ComboBox`` control. + + Use ``TextHint`` to ``get`` or ``set`` the watermark text that is shown in the edit box of the ``ComboBox`` control. + + The disabled watermark is displayed as long as you do not modify the `Text <Vcl.Controls.TControl.Text.htm>`__ property of the ``ComboBox``. + + .. note:: This feature is only available for *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + def ComboWndProc(self, Message: Message, ComboWnd: HWnd, ComboProc: WindowProcPtr) -> None: + ''' + Responds to *Windows Messages* sent to the edit control or drop-down list. + + `ComboWndProc <Vcl.StdCtrls.TCustomCombo.ComboWndProc.htm>`__ handles the common processing of *Windows Messages* sent to the edit region or list portion of the ``ComboBox``. It is called by the `EditWndProc <Vcl.StdCtrls.TCustomCombo.EditWndProc.htm>`__ and `ListWndProc <Vcl.StdCtrls.TCustomCombo.ListWndProc.htm>`__ methods to take care of all processing that is not specific to the edit region or drop-down list. + + The ``Message`` parameter describes the *Windows Message*. The ``ComboWnd`` parameter is the windows handle for the edit region or list. The ``ComboProc`` parameter is a pointer to the default window procedure for the window that received the message. `ComboWndProc <Vcl.StdCtrls.TCustomCombo.ComboWndProc.htm>`__ provides default responses to focus events, mouse events, and key strokes. + + Override `ComboWndProc <Vcl.StdCtrls.TCustomCombo.ComboWndProc.htm>`__ to change the way the ``ComboBox`` responds to *Windows Messages*. When overriding `ComboWndProc <Vcl.StdCtrls.TCustomCombo.ComboWndProc.htm>`__, be sure to call the parent class's method to process all unhandled messages. + + .. note:: Do not confuse `ComboWndProc <Vcl.StdCtrls.TCustomCombo.ComboWndProc.htm>`__ with the `WndProc <Vcl.StdCtrls.TCustomCombo.WndProc.htm>`__ method. `ComboWndProc <Vcl.StdCtrls.TCustomCombo.ComboWndProc.htm>`__ responds to messages that are sent to the edit region or drop-down list. ``WndProc()`` responds to messages sent to the ``ComboBox`` itself. + ''' + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def Change(self) -> None: + ''' + Generates an `Change <Vcl.StdCtrls.TCustomCombo.Change.htm>`__ event. + + `Change <Vcl.StdCtrls.TCustomCombo.Change.htm>`__ is called automatically in response to notifications that the text has changed. It responds by generating an `Change <Vcl.StdCtrls.TCustomCombo.Change.htm>`__ event. Override this method to add additional processing when the text changes, or to block the `Change <Vcl.StdCtrls.TCustomCombo.Change.htm>`__ event. + ''' + def Click(self) -> None: + ''' + Respond to user click. + + `Click <Vcl.Controls.TControl.Click.htm>`__ is called automatically when the user left-clicks the control. ``Component`` or application code can call `Click <Vcl.Controls.TControl.Click.htm>`__ to simulate a user mouse click. This is often done in menu actions and hotkey handlers. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `Click <Vcl.Controls.TControl.Click.htm>`__ queries whether the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler exists and is different from the ``OnExecute`` handler for the control's ``Action``. If this is ``True``, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler is called. If this is ``False``, and the ``Action`` ``OnExecute`` event handler exists, the Action's ``Execute()`` method is called. Override `Click <Vcl.Controls.TControl.Click.htm>`__ to provide additional behavior. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes the window-creation parameter record. + + The `CreateWnd <Vcl.ComCtrls.TCustomComboBoxEx.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it uses to create the window for the ``ComboBox``. ``CreateParams()`` overrides the inherited method to implement the `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ property. + ''' + def CreateWnd(self) -> None: + ''' + Creates the *Windows* control that represents the ``ComboBox``. + + The ``CreateHandle()`` method calls `CreateWnd <Vcl.StdCtrls.TCustomCombo.CreateWnd.htm>`__ to handle the particulars of creating the ``ComboBox`` window. `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ overrides the inherited method to ensure that the newly-created window and the `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ properties correctly reflect each other. + + The *Windows* control for the ``ComboBox`` can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. Thus, `CreateWnd <Vcl.StdCtrls.TCustomCombo.CreateWnd.htm>`__ may be called more than once during the lifetime of the `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ instance. + ''' + def DestroyWnd(self) -> None: + ''' + Destroys the *Windows* control that represents the ``ComboBox``. + + The *Windows* control for the ``ComboBox`` can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. `CustomComboBox <Vcl.StdCtrls.TCustomComboBox.htm>`__ calls ``DestroyWnd()`` to destroy this *Windows* control when necessary. + + ``DestroyWnd()`` saves the contents of `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ list before calling the inherited ``DestroyWnd()`` method. The saved list is used if the window is recreated. + ''' + def DoSetTextHint(self) -> None: + ''' + Sets the value of the `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ property. + + ``DoSetTextHint()`` is a protected method used to set the value of the `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ property. + ''' + def DrawItem(self, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + Generates an ``OnDrawItem`` event. + + When `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``, ``DrawItem()`` is called whenever an item in the list needs to be drawn. If an ``OnDrawItem`` event handler is assigned, ``DrawItem()`` generates an ``OnDrawItem`` event, passing the ``Index``, Rect, and `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ parameters to the event handler. Otherwise, ``OnDrawItem`` fills the rectangle passed in ``Rect`` and draws any text associated with the indexed item, ignoring the `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ parameter. + + Override ``DrawItem()`` to provide class-specific drawing code for the items in the list. + ''' + def GetItemHt(self) -> int: + ''' + Returns the value of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. + + ``GetItemHt`` is the protected read implementation of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. + ''' + def IsItemHeightStored(self) -> bool: + ''' + ``Vcl.StdCtrls.TCustomComboBox.IsItemHeightStored`` inherits from `Vcl.StdCtrls.TCustomCombo.IsItemHeightStored <Vcl.StdCtrls.TCustomCombo.IsItemHeightStored.htm>`__. All content below this line refers to `Vcl.StdCtrls.TCustomCombo.IsItemHeightStored <Vcl.StdCtrls.TCustomCombo.IsItemHeightStored.htm>`__. + + Verifies the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ value. + + `IsItemHeightStored <Vcl.StdCtrls.TCustomCombo.IsItemHeightStored.htm>`__ is internally used to verify whether the value of the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property is stored. `CustomCombo <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ descendants override the method to validate the `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ property. + ''' + def GetItemsClass(self) -> CustomComboBoxstrClass: + ''' + Returns the class used to implement the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. + + ``ComboBox`` controls use ``GetItemsClass`` internally to determine what class to use when implementing the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property. This allows the `CustomCombo <Vcl.StdCtrls.TCustomCombo.htm>`__ base class to implement the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property for both `CustomComboBox <Vcl.StdCtrls.TCustomComboBox.htm>`__ descendants and `CustomComboBox <Vcl.StdCtrls.TCustomComboBox.htm>`__ Ex descendants. + ''' + def GetSelText(self) -> str: + ''' + Returns the value of the `SelText <Vcl.StdCtrls.TCustomComboBox.SelText.htm>`__ property. + + ``GetSelText()`` is the protected read implementation of the `SelText <Vcl.StdCtrls.TCustomComboBox.SelText.htm>`__ property. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + When a windowed control receives a key-down message (``WM_KEYDOWN``) from *Windows* , its message handler calls the `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ method. If `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ determines that the control should, in fact, process the character, it calls `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__, passing the key code and shift-key state in the ``Key`` and ``Shift`` parameters, respectively. + + `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ calls any event handler attached to the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Override `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ to provide other responses in addition to the event handler call. + + The ``Key`` parameter is the key on the keyboard. For nonalphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the *Shift*, *Alt*, or *Ctrl* keys are combined with the keystroke. + + Either `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ or the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds to ``WM_CHAR`` messages sent to the ``ComboBox``. + + ``KeyPress()`` processes standard keystroke messages for the ``ComboBox`` control. If the ``KeyPress()`` method does not handle the keystroke, it calls the inherited method, which generates an ``KeyPress()`` event. + + ``Key`` is the character represented by the key that was pressed. If the ``KeyPress()`` method changes ``Key`` to 0, no further processing occurs for the keystroke. + ''' + def MeasureItem(self, Index: int, Height: int) -> None: + ''' + Generates an ``OnMeasureItem`` event. + + ``OnMeasureItem`` is the protected implementation method for the ``OnMeasureItem`` event. Override ``OnMeasureItem`` to provide class-specific code to specify the size of list items when `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawVariable``. + ''' + def PerformAutoActions(self, Key: str) -> None: + ''' + No have docs. + ''' + def SelectItem(self, AnItem: str) -> bool: + ''' + Selects a specified item from the drop-down list. + + ``SelectItem`` selects the first item in the drop-down list that matches the string specified by ``AnItem``. If the list does not contain a string that matches ``AnItem``, ``SelectItem`` does nothing. + ''' + def SetStyle(self, Value: ComboBoxStyle) -> None: + ''' + Sets the `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ property. + + ``SetStyle`` is the protected implementation method for the `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ property. Override ``SetStyle`` to change the implementation of the `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ property. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Processes messages received by the ``ComboBox``. + + ``WndProc()`` is the first method to received *Windows Messages* that are sent to the ``ComboBox``. Messages sent to the child windows of the ``ComboBox`` (for the edit region and the list portion) go to the ``EditWndProc`` or ``ListWndProc()`` method instead. ``WndProc()`` handles messages about changes to the system colors defined in the *Windows* control panel, and closes up the drop-down list when the *Enter* key or the *Escape* key is pressed. All other messages are passed to ``Dispatch()`` for default processing. + ''' + def GetItemCount(self) -> int: + ''' + Returns the number of items in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property list. + + ``GetItemCount`` is used internally to quickly determine the number of items in the drop-down list of the ``ComboBox``. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomComboBox <Vcl.StdCtrls.TCustomComboBox.htm>`__ instance. + + Call ``Create()`` to generate a ``ComboBox`` at runtime. ``ComboBox``\ es placed on forms at design time are created automatically. + + ``AOwner`` is a component, typically the ``Form``, that is responsible for freeing the ``ComboBox`` instance. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the ``ComboBox`` and frees its memory. + + Do not call ``Destroy()`` directly in an application. Call ``Free()`` instead. ``Free()`` verifies that the ``ComboBox`` is not ``nil``, and only then calls ``Destroy()``. + ''' + def OnDrawItem(self, Control: WinControl, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + # OnDrawItem: DrawItemEvent + Occurs when an item in an owner-draw ``ComboBox`` needs to be displayed. + + Write an ``OnDrawItem`` event handler to draw the items in the drop-down list of an owner-draw ``ComboBox``. An ``OnDrawItem`` event handler can add graphic elements to the list items, or replace the list item text by graphics. + + Draw the items on the `Canvas <Vcl.StdCtrls.TCustomCombo.Canvas.htm>`__ using the coordinates provided by the ``Rect`` parameter. ``OnDrawItem`` occurs only if `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``. + + If an ``OnDrawItem`` event handler is not provided, the ``ComboBox`` fills the ``Rect`` parameter with the current brush and writes the text value of the item specified by the ``Index`` parameter. + + ``OnDrawItem`` is an event handler of type `Vcl.StdCtrls.TDrawItemEvent <Vcl.StdCtrls.TDrawItemEvent.htm>`__. + ''' + def OnMeasureItem(self, Control: WinControl, Index: int, Height: int) -> None: + ''' + # OnMeasureItem: MeasureItemEvent + Occurs when an item in a ``csOwnerDrawVariable`` ``ComboBox`` needs to be redisplayed. + + When `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawVariable``, the ``OnMeasureItem`` event precedes `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__. Write an ``OnMeasureItem`` event handler to specify the height, in pixels, needed to draw an item in the drop-down list. + + ``OnMeasureItem`` is of type `Vcl.StdCtrls.TMeasureItemEvent <Vcl.StdCtrls.TMeasureItemEvent.htm>`__ which contains three parameters describing the item to measure. + ''' + +class BasicActionLink(Object): + ''' + =============================== + System.Classes.TBasicActionLink + =============================== + + ``BasicActionLink`` is the base class for ``ActionLink`` classes that handle the communication between actions and clients. + + ``BasicActionLink`` is the base class from which all other ``ActionLink`` classes ultimately descend. ``BasicActionLink`` lays the foundation for a connection between an action and a client. The client is the parameter to the ``BasicActionLink`` constructor, and the ``Action`` object is indicated by the `BasicActionLink.Action <System.Classes.TBasicActionLink.Action.htm>`__ property. ``BasicActionLink`` sets up the links between the action and client's execution and updating events. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Indicates which action the ``ActionLink`` connects to its client. + + ``Action`` is the ``Action`` object that the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ ``ActionLink`` associates to its client. + ''' + def AssignClient(self, AClient: Object) -> None: + ''' + Introduces an interface for assigning a client that is linked to the associated action. + + ``AssignClient()`` does nothing in the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ class. + + ``AssignClient()`` is introduced in `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ so that descendants can override it to assign a client of the proper type and to save the assigned client in the appropriate property. + + `Create <System.Classes.TBasicActionLink.Create.htm>`__ calls ``AssignClient()``. + ''' + def Change(self) -> None: + ''' + Generates an `OnChange <System.Classes.TBasicActionLink.OnChange.htm>`__ event. + + Override the ``Change()`` method in a derived class to perform actions when a change occurs in the ``ActionLink``. + + By default, ``Change()`` calls the `OnChange <System.Classes.TBasicActionLink.OnChange.htm>`__ event handler. + ''' + def IsOnExecuteLinked(self) -> bool: + ''' + Introduces an interface for checking whether the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler of the action is linked to the execution event handler of the client. + + - ``IsOnExecuteLinked()`` of the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ class returns ``True`` and does not check anything. + + - Descendant classes can override ``IsOnExecuteLinked()`` to determine whether changing of the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler of the action should be distributed to the event handler of the appropriate execution event of the client. Usually, an execution event of a client is the ``OnClick`` event and namely the ``OnClick`` event handler should be changed. + + If a client (like `FMX.Forms.TForm <FMX.Forms.TForm.htm>`__) linked by a descendant class object does not support an appropriate execution event, then ``IsOnExecuteLinked()`` always returns ``False``. + + As implemented in `ActionLink <FMX.ActnList.TActionLink.htm>`__: + + - `IsOnExecuteLinked <FMX.ActnList.TActionLink.IsOnExecuteLinked.htm>`__ returns ``False`` in one of the following cases: + - If the `action <System.Classes.TBasicActionLink.Action.htm>`__, assigned to the ``ActionLink``, belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ and the `component <FMX.ActnList.TCustomViewAction.Component.htm>`__ of this `action <System.Classes.TBasicActionLink.Action.htm>`__ equals the `client <FMX.ActnList.TActionLink.Client.htm>`__ of the ``ActionLink``. + - If the `client <FMX.ActnList.TActionLink.Client.htm>`__ does not support the appropriate execution event. + - Otherwise, `IsOnExecuteLinked <FMX.ActnList.TActionLink.IsOnExecuteLinked.htm>`__ returns ``True``. + ''' + def SetAction(self, Value: BasicAction) -> None: + ''' + Associates the specified action with the ``ActionLink``\ s. client. + + ``SetAction()`` is the setter method for the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property. ``SetAction()`` associates the action specified by the ``Value`` parameter with the client of the ``ActionLink``. + ''' + def SetOnExecute(self, Value: NotifyEvent) -> None: + ''' + Introduces an interface for setting the execution event handler for a client if the ``ActionLink`` associates execution event handlers of the client and action. + + In the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ class, ``SetOnExecute()`` does nothing. + + Override ``SetOnExecute()`` to set the execution event handler to the client. ``SetOnExecute()`` can call `IsOnExecuteLinked <System.Classes.TBasicActionLink.IsOnExecuteLinked.htm>`__ to check whether the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ ``ActionLink`` associates execution event handlers of the client and action and sets the event handler specified by the ``Value`` parameter. Usually, an execution event of a client is the ``OnClick`` event. + ''' + def Create(self, AClient: Object) -> None: + ''' + Instantiates and initializes a `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ object. + + Applications do not need to call the constructor directly. Instances of `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ are created automatically when you connect an action with a client in the `Action List editor <Action_List_editor.htm>`__. The ``AClient`` parameter is the client for the link. The link connects this client to its action. + + ``Create()`` calls `AssignClient <System.Classes.TBasicActionLink.AssignClient.htm>`__. + + ``Create()`` ensures that the client is of the appropriate type for the particular type of link. Descendent classes can progressively specify more customized client types. For example, there are ``ActionLink`` classes for controls, for windowed controls, and for button controls. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of an ``ActionLink`` object. + + You do not need to destroy the ``ActionLink``; it is automatically destroyed by the client that was passed to its constructor when it was created. + + If you want to destroy the ``ActionLink`` manually, do not call the destructor directly. Call ``Free()`` instead. ``Free()`` checks that the link is not ``nil``, and only then invokes the destructor. + ''' + def Execute(self, AComponent: Component) -> bool: + ''' + Invokes the action's ``Execute()`` method and specifies to the action that the ``AComponent`` client has caused this action to execute. + + ``Execute()`` calls the action's `Execute <System.Classes.TBasicAction.Execute.htm>`__ method and returns its result. In the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ class, ``Execute()`` calls the action's `System.Classes.TBasicAction.Execute <System.Classes.TBasicAction.Execute.htm>`__ method and returns ``True`` if the action has an assigned `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler, ``False`` otherwise. + + ``Execute()`` specifies to the action that ``AComponent`` is the client component that has caused this action to execute. (The user has clicked this component to execute the action.) In the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ class, ``Execute()`` assigns ``AComponent`` to the `System.Classes.TBasicAction.ActionComponent <System.Classes.TBasicAction.ActionComponent.htm>`__ property of the action. + ''' + def Update(self) -> bool: + ''' + Invokes the action's ``Update()`` method. + + ``Update()`` calls the action's `Update <System.Classes.TBasicAction.Update.htm>`__ method and returns its result. In the `BasicActionLink <System.Classes.TBasicActionLink.htm>`__ class, ``Update()`` calls the action's `System.Classes.TBasicAction.Update <System.Classes.TBasicAction.Update.htm>`__ method and returns ``True`` if the action has an assigned `System.Classes.TBasicAction.OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event handler, ``False`` otherwise. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Is called from the `Change <System.Classes.TBasicActionLink.Change.htm>`__ method of the ``ActionLink``. + + Write an ``OnChange`` event handler when you want to respond to a change that occurs in the ``ActionLink``. + + ``OnChange`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + +class ContainedActionLink(BasicActionLink): + ''' + =================================== + System.Actions.TContainedActionLink + =================================== + + ``ContainedActionLink`` is a base class for ``ActionLink``\ s that connects actions to action clients and sets commonly used properties to client objects. + + Applications do not work directly with ``ContainedActionLink`` objects. GUI application frameworks provide `FMX.ActnList.TActionLink <FMX.ActnList.TActionLink.htm>`__ and `Vcl.ActnList.TActionLink <Vcl.ActnList.TActionLink.htm>`__ descendant classes of ``ContainedActionLink``. + + These descendant classes provide methods to manage linking between properties of an action and corresponding properties of client objects of the ``ActionLink``. The following properties of actions and clients of ``ActionLink``\ s can be linked: `Caption <System.Actions.TContainedAction.Caption.htm>`__, `Checked <System.Actions.TContainedAction.Checked.htm>`__, `Enabled <System.Actions.TContainedAction.Enabled.htm>`__, `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__, `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__, `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__, `HelpType <System.Actions.TContainedAction.HelpType.htm>`__, `Hint <System.Actions.TContainedAction.Hint.htm>`__, `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__, `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__, `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__, and `Visible <System.Actions.TContainedAction.Visible.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + + def DefaultIsLinked(self, Result: bool) -> None: + ''' + Introduces an interface for retrieving whether a property of the ``ActionLink``\ s. client is linked with the corresponding property of the action. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``DefaultIsLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action having all standard properties of the `ContainedAction <System.Actions.TContainedAction.htm>`__ class), and if so, returns ``True``. + ''' + def IsCaptionLinked(self) -> bool: + ''' + Indicates whether or not the `Caption <System.Actions.TContainedAction.Caption.htm>`__ property of the action and the ``Caption`` property of the `client of the `ActionLink <System.Classes.TBasicAction.ActionComponent.htm>`__ are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsCaptionLinked()`` to determine whether they need to propagate changes made to the action's `Caption <System.Actions.TContainedAction.Caption.htm>`__ property to the corresponding ``Caption`` property of the client object: + + - When ``IsCaptionLinked()`` returns ``True``, the ``ActionLink`` controls the ``Caption`` property; changes to the action's `Caption <System.Actions.TContainedAction.Caption.htm>`__ property are reflected in the client object. + - When ``IsCaptionLinked()`` returns ``False``, the client object is not influenced by the `Caption <System.Actions.TContainedAction.Caption.htm>`__ property of its action, either because it does not have the ``Caption`` property, or because it manages the value of its ``Caption`` property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsCaptionLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action having a ``Caption`` property), and if so, returns ``True``. Descendant classes can override ``IsCaptionLinked()`` to determine whether the ``Caption`` property of the action is linked with the appropriate client property. + ''' + def IsCheckedLinked(self) -> bool: + ''' + Retrieves whether the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + Descendants of `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ call ``IsCheckedLinked()`` to determine whether they need to distribute changes made to the action's `Checked <System.Actions.TContainedAction.Checked.htm>`__ property to the corresponding ``Checked`` property of the client object: + + - When ``IsCheckedLinked()`` returns ``True``, the ``ActionLink`` controls the ``Checked`` property; changes to the action's `Checked <System.Actions.TContainedAction.Checked.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When ``IsCheckedLinked()`` returns ``False``, the client object is not influenced by the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of its action for one of the following reasons: + + - It does not have a corresponding property. + - It manages the value of its corresponding property independently (more common). + + Descendant classes can override ``IsCheckedLinked()`` to determine whether the ``Checked`` property is linked with the appropriate client property. If a client (like `FMX.Forms.TForm <FMX.Forms.TForm.htm>`__) linked by a descendant class object does not support the ``Checked`` property, then ``IsCheckedLinked()`` always returns ``False``. + + As implemented in `ActionLink <FMX.ActnList.TActionLink.htm>`__: + + - `IsCheckedLinked <FMX.ActnList.TActionLink.IsCheckedLinked.htm>`__ returns ``False`` if the `action <System.Classes.TBasicActionLink.Action.htm>`__, assigned to the ``ActionLink``, belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ and the `component <FMX.ActnList.TCustomViewAction.Component.htm>`__ of this `action <System.Classes.TBasicActionLink.Action.htm>`__ equals the `client <FMX.ActnList.TActionLink.Client.htm>`__ of the ``ActionLink``. + + Also `IsCheckedLinked <FMX.ActnList.TActionLink.IsCheckedLinked.htm>`__ returns ``False`` if the `client <FMX.ActnList.TActionLink.Client.htm>`__ does not support the ``Checked`` property. + + - Otherwise, `IsCheckedLinked <FMX.ActnList.TActionLink.IsCheckedLinked.htm>`__ returns ``True``. + ''' + def IsEnabledLinked(self) -> bool: + ''' + Retrieves whether the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + Descendants of `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ call ``IsEnabledLinked()`` to determine whether they need to distribute changes made to the action's `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property to the corresponding ``Enabled`` property of the client object: + + - When ``IsEnabledLinked()`` returns ``True``: + + - The action controls the ``Enabled`` property. + - Changes to the action's `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property are reflected by changes to the corresponding property of the client object. + + - When ``IsEnabledLinked()`` returns ``False``, the client object is not influenced by the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property of its action for one of the following reasons: + + - It does not have a corresponding property. + - It manages the value of its corresponding property independently (more common). + + Descendant classes can override ``IsEnabledLinked()`` to determine whether the ``Enabled`` property is linked with the appropriate client property. If a client linked by a descendant class object does not support the ``Enabled`` property, then ``IsEnabledLinked()`` always returns ``False``. + + The implementation of `ActionLink <FMX.ActnList.TActionLink.htm>`__ is the following: + + - If the `action <System.Classes.TBasicActionLink.Action.htm>`__, assigned to the ``ActionLink``, belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ and the `component <FMX.ActnList.TCustomViewAction.Component.htm>`__ of this `action <System.Classes.TBasicActionLink.Action.htm>`__ equals the `client <FMX.ActnList.TActionLink.Client.htm>`__ of the ``ActionLink``, `IsEnabledLinked <FMX.ActnList.TActionLink.IsEnabledLinked.htm>`__ returns ``False``. + - Otherwise, `IsEnabledLinked <FMX.ActnList.TActionLink.IsEnabledLinked.htm>`__ returns ``True``. + ''' + def IsGroupIndexLinked(self) -> bool: + ''' + Retrieves whether the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + Descendants of `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ can call ``IsGroupIndexLinked()`` to determine whether they need to distribute changes made to the action's `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property to the corresponding ``GroupIndex`` property of the client object: + + - When ``IsGroupIndexLinked()`` returns ``True``, the ``ActionLink`` controls the ``GroupIndex`` property; changes made to the action's `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When ``IsGroupIndexLinked()`` returns ``False``, the client object is not influenced by the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property of its action for one of the following reasons: + + - It does not have a corresponding property. + - It manages the value of its corresponding property independently (more common). + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsGroupIndexLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action that has an ``GroupIndex`` property), and if so, returns ``True``. + + Descendant classes can override ``IsGroupIndexLinked()`` to determine whether the ``GroupIndex`` property is linked with the appropriate client property. If a client linked by a descendant class object (like `FMX.Forms.TForm <FMX.Forms.TForm.htm>`__) does not support the ``GroupIndex`` property, then ``IsGroupIndexLinked()`` always returns ``False``. + + The implementation of `ActionLink <FMX.ActnList.TActionLink.htm>`__ is the following: + + - `IsGroupIndexLinked <FMX.ActnList.TActionLink.IsGroupIndexLinked.htm>`__ returns ``False``: + + - If the `action <System.Classes.TBasicActionLink.Action.htm>`__, assigned to the ``ActionLink``, belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ and the `component <FMX.ActnList.TCustomViewAction.Component.htm>`__ of this + `action <System.Classes.TBasicActionLink.Action.htm>`__ equals the `client <FMX.ActnList.TActionLink.Client.htm>`__ of the ``ActionLink``. + - If the `client <FMX.ActnList.TActionLink.Client.htm>`__ does not support the ``GroupIndex`` property. + + - Otherwise, `IsGroupIndexLinked <FMX.ActnList.TActionLink.IsGroupIndexLinked.htm>`__ returns ``True``. + ''' + def IsHelpContextLinked(self) -> bool: + ''' + Retrieves whether the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ properties for the action and for the client of the ``ActionLink`` are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsHelpContextLinked()`` to determine whether they need to propagate changes made to the action's `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property to the corresponding ``HelpContext()`` property of the client object: + + - When ``IsHelpContextLinked()`` returns ``True``, the ``ActionLink`` controls the ``HelpContext()`` property; changes to the action's `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property are reflected in the client object. + - When ``IsHelpContextLinked()`` returns ``False``, the client object is not influenced by the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property of its action. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsHelpContextLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action having a ``HelpContext()`` property), and if so, returns ``True``. Descendant classes can override ``IsHelpContextLinked()`` to determine whether this property is linked with the appropriate client property. + ''' + def IsHelpLinked(self) -> bool: + ''' + Retrieves whether the ``Help`` properties for the action and for the client of the ``ActionLink`` are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsHelpLinked()`` to determine whether they need to propagate changes made to the action's `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__, `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__, and `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ properties to the corresponding ``Help`` properties of the client object: + + - When ``IsHelpLinked()`` returns ``True``, the ``ActionLink`` controls these properties; changes to any of the action's ``Help`` properties are reflected by changes to the corresponding property of the client object. + - When ``IsHelpLinked()`` returns ``False``, the client object is not influenced by the ``Help`` properties of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of this property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsHelpLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action having ``HelpContext()``, ``HelpKeyword()``, and ``HelpType`` properties), and if so, returns ``True``. + + Descendant classes can override ``IsHelpLinked()`` to determine whether the help properties are linked with the appropriate client properties. If a client linked by a descendant class object does not support the help properties, then ``IsHelpLinked()`` always returns ``False``. + ''' + def IsHintLinked(self) -> bool: + ''' + Retrieves whether the ``Hint`` property for the action and for the client of the ``ActionLink`` are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsHintLinked()`` to determine whether they need to propagate the action's `Hint <System.Actions.TContainedAction.Hint.htm>`__ property to the corresponding ``Hint`` property of the client object: + + - When ``IsHintLinked()`` returns ``True``, the action controls the ``Hint`` property; changes made to the action's `Hint <System.Actions.TContainedAction.Hint.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When ``IsHintLinked()`` returns ``False``, the client object is not influenced by the `Hint <System.Actions.TContainedAction.Hint.htm>`__ property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsHintLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action that has a ``Hint`` property), and if so, returns ``True``. + + Descendant classes can override ``IsHintLinked()`` to determine whether the `Hint <System.Actions.TContainedAction.Hint.htm>`__ property is linked with the appropriate client property. If a client linked by a descendant class object does not support the ``Hint`` property, then ``IsHintLinked()`` always returns ``False``. + ''' + def IsImageIndexLinked(self) -> bool: + ''' + Retrieves whether the `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsImageIndexLinked()`` to determine whether they need to propagate changes to the action's `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property to the corresponding ``ImageIndex`` property of the client object: + + - When ``IsImageIndexLinked()`` returns ``True``, the action controls the ``ImageIndex`` property; changes made to the action's `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When ``IsImageIndexLinked()`` returns ``False``, the client object is not influenced by the `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsImageIndexLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action that has an ``ImageIndex`` property), and if so, returns ``True``. Descendant classes can override ``IsImageIndexLinked()`` to determine whether the `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property is linked with the appropriate client property. + ''' + def IsShortCutLinked(self) -> bool: + ''' + Retrieves whether the `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsShortCutLinked()`` to determine whether they need to propagate changes to the action's `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property to the corresponding ``ShortCut`` property of the client object: + + - When ``IsShortCutLinked()`` returns ``True``, the action controls the ``ShortCut`` property; changes made to the action's `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When ``IsShortCutLinked()`` returns ``False``, the client object is not influenced by the `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsShortCutLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action that has a ``ShortCut`` property), and if so, returns ``True``. + + Descendant classes can override ``IsShortCutLinked()`` to determine whether the `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property is linked with the appropriate client property. + + As implemented in `ActionLink <FMX.ActnList.TActionLink.htm>`__: + + - `IsShortCutLinked <FMX.ActnList.TActionLink.IsShortCutLinked.htm>`__ returns ``False`` if the `action <System.Classes.TBasicActionLink.Action.htm>`__, assigned to the ``ActionLink``, belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ and the `component <FMX.ActnList.TCustomViewAction.Component.htm>`__ of this `action <System.Classes.TBasicActionLink.Action.htm>`__ equals the `client <FMX.ActnList.TActionLink.Client.htm>`__ of the ``ActionLink``. + - Otherwise, `IsShortCutLinked <FMX.ActnList.TActionLink.IsShortCutLinked.htm>`__ returns ``True``. + ''' + def IsVisibleLinked(self) -> bool: + ''' + Defines the method to retrieve whether the ``Visible`` property of the action assigned to the ``ActionLink``, and the ``Visible`` property of the client of the ``ActionLink`` are linked. + + Descendants of `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ call ``IsVisibleLinked()`` to determine whether they need to distribute changes in the `Visible <System.Actions.TContainedAction.Visible.htm>`__ property of the `action <System.Classes.TBasicActionLink.Action.htm>`__ to the ``Visible`` property of the `client <FMX.ActnList.TActionLink.Client.htm>`__: + + - When `ActionLink.IsVisibleLinked <FMX.ActnList.TActionLink.IsVisibleLinked.htm>`__ returns ``True``: + + - The action controls the ``Visible`` property. + - The changes made to the action's `Visible <System.Actions.TContainedAction.Visible.htm>`__ property are reflected by changes to the corresponding ``Visible`` property of the client object. + + It means that if the ``Visible`` property of the action is ``False``, then the ``Visible`` property of the client is also ``False``, and the client becomes invisible. For example, if a client is a ``MenuItem`` or a control, then this ``MenuItem`` or control is invisible. + + - When ``IsVisibleLinked()`` returns ``False``, the client object does not reflect the `Visible <System.Actions.TContainedAction.Visible.htm>`__ property of its action for one of the following reasons: + + - It does not have a corresponding property. + - It manages the value of its corresponding ``Visible`` property independently (more common). + + Descendant classes can override ``IsVisibleLinked()`` to determine whether the `Visible <System.Actions.TContainedAction.Visible.htm>`__ property of the action is linked with the appropriate client property. + + As implemented in `ActionLink <FMX.ActnList.TActionLink.htm>`__: + + - If the `action <System.Classes.TBasicActionLink.Action.htm>`__, assigned to the ``ActionLink``, belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ and the `component <FMX.ActnList.TCustomViewAction.Component.htm>`__ of this `action <System.Classes.TBasicActionLink.Action.htm>`__ equals the `client <FMX.ActnList.TActionLink.Client.htm>`__ of the ``ActionLink``, `IsVisibleLinked <FMX.ActnList.TActionLink.IsVisibleLinked.htm>`__ returns ``False``. + - Otherwise, `IsVisibleLinked <FMX.ActnList.TActionLink.IsVisibleLinked.htm>`__ returns ``True``. + ''' + def IsStatusActionLinked(self) -> bool: + ''' + Retrieves whether the `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call ``IsStatusActionLinked()`` to determine whether they need to propagate changes to the action's `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property to the corresponding ``StatusAction`` property of the client object: + + - When ``IsStatusActionLinked()`` returns ``True``, the action controls the ``StatusAction`` property; changes made to the action's `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When ``IsStatusActionLinked()`` returns ``False``, the client object does not reflect the `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of this property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``IsStatusActionLinked()`` merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action that has a ``StatusAction`` property), and if so, returns ``True``. Descendant classes can override ``IsStatusActionLinked()`` to determine whether the `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property is linked with the appropriate client property. + ''' + def SetAutoCheck(self, Value: bool) -> None: + ''' + Introduces an interface for setting the `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ property of a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``AutoCheck`` property. + + The associated action calls ``SetAutoCheck()`` when its `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``AutoCheck`` property of the client object. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetAutoCheck()`` does nothing. Descendant classes override ``SetAutoCheck()`` to set the client's ``AutoCheck`` property. + ''' + def SetCaption(self, Value: str) -> None: + ''' + Introduces an interface for setting the ``Caption`` for a client of the ``ActionLink``. + + ``Value`` specifies the string for which the ``Caption`` should be set. + + The associated action calls ``SetCaption()`` when its `Caption <System.Actions.TContainedAction.Caption.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Caption`` value to the client object. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetCaption()`` does nothing. + + Descendant classes can override ``SetCaption()`` to set the client's ``Caption`` property if the ``IsCaptionLinked()`` method returns ``True``. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + Introduces an interface for setting the ``Checked`` property for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``Checked`` property. + + The associated action calls ``SetChecked()`` when its `Checked <System.Actions.TContainedAction.Checked.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``Checked`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetChecked()`` does nothing. Descendant classes override ``SetChecked()`` to set the client's ``Checked`` property if the `IsCheckedLinked <System.Actions.TContainedActionLink.IsCheckedLinked.htm>`__ method returns ``True``. + ''' + def SetEnabled(self, Value: bool) -> None: + ''' + Introduces an interface for setting the ``Enabled`` property for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``Enabled`` property. + + The associated action calls ``SetEnabled()`` when its `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``Enabled`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetEnabled()`` does nothing. Descendant classes override ``SetEnabled()`` to set the client's ``Enabled`` property if the `IsEnabledLinked <System.Actions.TContainedActionLink.IsEnabledLinked.htm>`__ method returns ``True``. + ''' + def SetGroupIndex(self, Value: int) -> None: + ''' + Introduces an interface for setting the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``GroupIndex`` property. + + The associated action calls ``SetGroupIndex()`` when its `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``GroupIndex`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetGroupIndex()`` does nothing. Descendant classes override ``SetGroupIndex()`` to set the client's ``GroupIndex`` property if the `IsGroupIndexLinked <System.Actions.TContainedActionLink.IsGroupIndexLinked.htm>`__ method returns ``True``. + + .. note:: An action itself implements unchecking actions having the same ``GroupIndex`` value in the same ``ActionList``. That is, when the value of the action's `Checked <System.Actions.TContainedAction.Checked.htm>`__ property changes to ``True``, the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of all other actions in the ``ActionList`` having the same ``GroupIndex`` value become ``False``. + ''' + def SetHelpContext(self, Value: HelpContext) -> None: + ''' + Introduces an interface for setting the integer *Help* context ``ID`` of a client. + + ``Value`` specifies the new value of the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property of the action. + + The ``ActionLink`` object calls ``SetHelpContext()`` when the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property of the associated action changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``HelpContext()`` property of the client object. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetHelpContext()`` does nothing. Descendant classes can override ``SetHelpContext()`` to set the client's ``HelpContext()`` property to be equal to the action's `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property if the `IsHelpLinked <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__ method returns ``True``. + ''' + def SetHelpKeyword(self, Value: str) -> None: + ''' + Introduces an interface for setting the ``Help`` keyword of a client. + + ``Value`` specifies the new value of the `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property. + + The ``ActionLink`` object calls ``SetHelpKeyword()`` when the `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property of the associated action changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``HelpKeyword()`` property of the client object. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetHelpKeyword()`` does nothing. Descendant classes can override ``SetHelpKeyword()`` to set the client property that corresponds to the action's `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property if the `IsHelpLinked <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__ method returns ``True``. + ''' + def SetHelpType(self, Value: HelpType) -> None: + ''' + Introduces an interface for setting the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property of a client. + + ``Value`` specifies the new value of the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + + The ``ActionLink`` object calls `SetHelpType <System.Actions.TContainedAction.SetHelpType.htm>`__ when the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property of the associated action changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``HelpType`` property of the client object. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetHelpType`` does nothing. Descendant classes can override ``SetHelpType`` to set the client property that corresponds to the action's `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property if the `IsHelpLinked <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__ method returns ``True``. + ''' + def SetHint(self, Value: str) -> None: + ''' + Introduces an interface for setting the hint string for a client. + + The associated action calls ``SetHint`` when its `Hint <System.Actions.TContainedAction.Hint.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Hint`` value to the client object. + + ``Value`` specifies the new value of the ``Hint`` property. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetHint`` does nothing. Descendant classes override ``SetHint`` to set the client's ``Hint`` property if the `IsHintLinked <System.Actions.TContainedActionLink.IsHintLinked.htm>`__ method returns ``True``. + ''' + def SetImageIndex(self, Value: int) -> None: + ''' + Introduces an interface for setting the ``ImageIndex`` for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``ImageIndex`` property. + + The associated action calls ``SetImageIndex()`` when its `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``ImageIndex`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetImageIndex()`` does nothing. Descendant classes override ``SetImageIndex()`` to set the client's ``ImageIndex`` property if the `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ method returns ``True``. + ''' + def SetShortCut(self, Value: ShortCut) -> None: + ''' + Introduces an interface for setting the ``ShortCut`` property for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``ShortCut`` property. + + The associated action calls ``SetShortCut()`` when its `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``ShortCut`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetShortCut()`` does nothing. Descendant classes override ``SetShortCut()`` to set the client's ``ShortCut`` property if the `IsShortCutLinked <System.Actions.TContainedActionLink.IsShortCutLinked.htm>`__ method returns ``True``. + ''' + def SetVisible(self, Value: bool) -> None: + ''' + Introduces an interface for setting the ``Visible`` property for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``Visible`` property. + + The associated action calls ``SetVisible()`` when its `Visible <System.Actions.TContainedAction.Visible.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``Visible`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetVisible()`` does nothing. + + Descendant classes can override ``SetVisible()`` to set the client's ``Visible`` property if the `IsVisibleLinked <System.Actions.TContainedActionLink.IsVisibleLinked.htm>`__ method returns ``True``. + ''' + def SetStatusAction(self, Value: StatusAction) -> None: + ''' + Introduces an interface for setting the ``StatusAction`` property for a client of the ``ActionLink``. + + ``Value`` specifies the new value of the ``StatusAction`` property. + + The associated action calls ``SetStatusAction()`` when its `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``StatusAction`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, ``SetStatusAction()`` does nothing. Descendant classes override ``SetStatusAction()`` to set the client's ``StatusAction`` property if the `IsStatusActionLinked <System.Actions.TContainedActionLink.IsStatusActionLinked.htm>`__ method returns ``True``. + ''' + +class ActionLink(ContainedActionLink): + ''' + ======================== + Vcl.ActnList.TActionLink + ======================== + + ``ActionLink`` is the base class for ``ActionLink``\ s that connect actions to commonly used properties of *VCL Objects*, *VCL Components*, and *VCL controls. + + As implemented in *XE3* version, ``ActionLink`` just declares the type for VCL ``ActionLink`` objects. ``ActionLink`` does not provide any new business functionality regarding to the `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ ancestor class. + ''' + + __hash__: ClassVar[None] = ... + + def IsImageNameLinked(self) -> bool: + ''' + No have docs. + ''' + +class ControlActionLink(ActionLink): + ''' + =============================== + Vcl.Controls.TControlActionLink + =============================== + + Links an ``Action`` object to a client (generic control). + + ``ControlActionLink`` is designed to link actions to clients (generic controls) that descend from `Control <Vcl.Controls.TControl.htm>`__. + + ``ControlActionLink`` keeps the linked client in the `FClient <Vcl.Controls.TControlActionLink.FClient.htm>`__ field and the linked action in the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property. + + ``ControlActionLink`` defines methods supporting the linking of the action's properties and events with properties and events of the control (client). The ``ControlActionLink()`` methods determine whether the action controls values of properties of the client's control, and sets values to such properties of the control. Most properties and events of the action and client have the same names: ``Caption``, ``Enabled``, ``Hint``, ``Visible``. + + Use ``ControlActionLink`` as a base class when creating an ``ActionLink`` class that targets a more specific client type. Descendent classes of ``ControlActionLink`` already support certain branches of the VCL, such as `WinControlActionLink <Vcl.Controls.TWinControlActionLink.htm>`__, which supports `WinControl <Vcl.Controls.TWinControl.htm>`__ client types. + ''' + + __hash__: ClassVar[None] = ... + FClient: Control + ''' + Keeps the client (control) linked by the ``ActionLink`` to the `action <System.Classes.TBasicActionLink.Action.htm>`__. + + ``FClient`` is the protected field that keeps the client's control. + ''' + def AssignClient(self, AClient: Object) -> None: + ''' + Assigns a client control that is linked to the associated `action <Vcl.Controls.TControl.Action.htm>`__. + + `ControlActionLink <Vcl.Controls.TControlActionLink.htm>`__ overrides `AssignClient <System.Classes.TBasicActionLink.AssignClient.htm>`__ to ensure that the client for the ``Action`` descends from `Control <Vcl.Controls.TControl.htm>`__. Descendants of `ControlActionLink <Vcl.Controls.TControlActionLink.htm>`__ can further limit the type of client associated with the link. `ControlActionLink <Vcl.Controls.TControlActionLink.htm>`__ saves the specified ``AClient`` client's control in the `FClient <Vcl.Controls.TControlActionLink.FClient.htm>`__ field. + ''' + def IsCaptionLinked(self) -> bool: + ''' + Retrieves whether the ``Caption`` for the ``Action`` and the client are linked. + + ``IsCaptionLinked()`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `Сaption <Vcl.Controls.TControl.Caption.htm>`__ property of the control ``ActionLink``\ s. client. + + ``IsCaptionLinked()`` returns ``True`` if the ``Action`` controls this property of the client and ``False`` otherwise. + ''' + def IsDropdownMenuLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the drop-down menu for the client. + + ``IsDropdownMenuLinked`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `drop-down menu <Vcl.Controls.TCustomControlAction.DropdownMenu.htm>`__ of the control ``ActionLink``\ s. client. + + ``IsDropdownMenuLinked()`` returns ``True`` if the ``Action`` is a `CustomControlAction <Vcl.Controls.TCustomControlAction.htm>`__ object (can have a `drop-down menu <Vcl.Controls.TCustomControlAction.DropdownMenu.htm>`__), ``False`` otherwise. + ''' + def IsEnabledLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the enabled state of the client. + + ``IsEnabledLinked()`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ property of the control ``ActionLink``\ s. client. + + ``IsEnabledLinked()`` returns ``True`` if the ``Action`` controls this property of the client and ``False`` otherwise. + ''' + def IsEnableDropdownLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the enabled state of the client's drop-down menu. + + ``IsEnableDropdownLinked`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `enabled state of the drop-down menu <Vcl.Controls.TCustomControlAction.EnableDropdown.htm>`__ of the control ``ActionLink``\ s. client. + + ``IsEnableDropdownLinked()`` returns ``True`` if the ``Action`` is a `CustomControlAction <Vcl.Controls.TCustomControlAction.htm>`__ object (can have a `drop-down menu <Vcl.Controls.TCustomControlAction.DropdownMenu.htm>`__ that can be `enabled or disabled <Vcl.Controls.TCustomControlAction.EnableDropdown.htm>`__), ``False`` otherwise. + ''' + def IsHelpLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the help properties of the client. + + ``IsHelpLinked()`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__, `HelpKeyword <Vcl.Controls.TControl.HelpKeyword.htm>`__, and `HelpType <Vcl.Controls.TControl.HelpType.htm>`__ properties of the control ``ActionLink``\ s. client. + + ``IsHelpLinked()`` returns ``True`` if the ``Action`` controls these properties of the client and ``False`` otherwise. + ''' + def IsHintLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the `Hint <Vcl.Controls.TControl.Hint.htm>`__ property of the client. + + ``IsHintLinked()`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `Hint <Vcl.Controls.TControl.Hint.htm>`__ property of the control ``ActionLink``\ s. client. + + ``IsHintLinked()`` returns ``True`` if the ``Action`` controls this property of the client and ``False`` otherwise. + ''' + def IsVisibleLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the visible state for the client. + + ``IsVisibleLinked()`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property of the control ``ActionLink``\ s. client. + + ``IsVisibleLinked()`` returns ``True`` if the ``Action`` controls this property of the client and ``False`` otherwise. + ''' + def IsOnExecuteLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler of the client. + + ``IsOnExecuteLinked()`` retrieves whether the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler of the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), defines the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler of the control ``ActionLink``\ s. client. + + ``IsOnExecuteLinked()`` returns ``True`` if the ``Action`` controls this event handler of the client and ``False`` otherwise. + ''' + def IsPopupMenuLinked(self) -> bool: + ''' + Retrieves whether the ``Action`` controls the ``PopupMenu`` for the client. + + ``IsPopupMenuLinked`` retrieves whether the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ (control), controls the ```PopupMenu`` <Vcl.Controls.TControl.PopupMenu.htm>`__ of the client. + + ``IsPopupMenuLinked()`` returns ``True`` if the ``Action`` is a `CustomControlAction <Vcl.Controls.TCustomControlAction.htm>`__ object (can have a `PopupMenu <Vcl.Controls.TCustomControlAction.PopupMenu.htm>`__) and the current ``PopupMenu``\ s for the ``Action`` and client are the same, ``False`` otherwise. + ''' + def DoShowHint(self, HintStr: str) -> bool: + ''' + Indicates whether the hint is shown or modified. + + ``DoShowHint`` determines whether a hint is shown when the mouse moves across a control. ``DoShowHint`` also provides an opportunity to modify the hint, and/or append a shortcut to the end of the hint string. If either the application, the control, or the ``Action`` veto showing the hint, then the hint is not shown. ``DoShowHint()`` returns ``True`` by default. You can override this function to return ``False`` if the hint is not shown or modified, or if the shortcut is not appended. + ''' + def SetCaption(self, Value: str) -> None: + ''' + Sets the specified value to the client's `Caption <Vcl.Controls.TControl.Caption.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsCaptionLinked <Vcl.Controls.TControlActionLink.IsCaptionLinked.htm>`__ is ``True``. + + ``SetCaption()`` sets the specified ``Value`` to the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control ``ActionLink`` to the client, controls the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property of the client. That is, if `IsCaptionLinked <Vcl.Controls.TControlActionLink.IsCaptionLinked.htm>`__ is ``True``. + + ``Value`` is the string to use as the control's `caption <Vcl.Menus.TMenuItem.Caption.htm>`__. + ''' + def SetDropdownMenu(self, Value: PopupMenu) -> None: + ''' + Declares the method to set the specified drop-down menu for the client's control. + + As implemented in `ControlActionLink <Vcl.Controls.TControlActionLink.htm>`__, ``SetDropdownMenu`` does not perform any action. In descendant classes, for example in the `Vcl.ComCtrls.TToolButtonActionLink <Vcl.ComCtrls.TToolButtonActionLink.htm>`__ class, ``SetDropdownMenu`` sets the drop-down menu specified by the ``Value`` parameter for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the ``ActionLink`` if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the ``ActionLink`` to the client, controls the ``DropdownMenu`` property of the client. That is, if `IsDropdownMenuLinked <Vcl.ComCtrls.TToolButtonActionLink.IsDropdownMenuLinked.htm>`__ is ``True``. + ''' + def SetEnabled(self, Value: bool) -> None: + ''' + Sets the specified value to the `enabled state <Vcl.Controls.TControl.Enabled.htm>`__ for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsEnabledLinked <Vcl.Controls.TControlActionLink.IsEnabledLinked.htm>`__ is ``True``. + + ``SetEnabled()`` sets the specified ``Value`` to the enabled state (`Enabled <Vcl.Controls.TControl.Enabled.htm>`__ property) for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the menu ``ActionLink`` to the client, controls the `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ property of the client. That is, if `IsEnabledLinked <Vcl.Controls.TControlActionLink.IsEnabledLinked.htm>`__ is ``True``. + ''' + def SetEnableDropdown(self, Value: bool) -> None: + ''' + Declares the method to set the enabled state of a drop-down menu associated with the client's control. + + As implemented in `ControlActionLink <Vcl.Controls.TControlActionLink.htm>`__, ``SetEnableDropdown`` does not perform any action. In descendant classes, for example in the `Vcl.ComCtrls.TToolButtonActionLink <Vcl.ComCtrls.TToolButtonActionLink.htm>`__ class, ``SetEnableDropdown`` sets the specified ``Value`` enabled state for a drop-down menu of the `ActionLink's <Vcl.ComCtrls.TToolButtonActionLink.htm>`__ `client <Vcl.ComCtrls.TToolButtonActionLink.FClient.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the ``ActionLink`` to the client, controls the `EnableDropdown <Vcl.ComCtrls.TToolButton.EnableDropdown.htm>`__ property of the client. That is, if `IsEnableDropdownLinked <Vcl.ComCtrls.TToolButtonActionLink.IsEnableDropdownLinked.htm>`__ is ``True``. + ''' + def SetHint(self, Value: str) -> None: + ''' + Sets the specified `hint <Vcl.Controls.TControl.Hint.htm>`__ to the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsHintLinked <Vcl.Controls.TControlActionLink.IsHintLinked.htm>`__ is ``True``. + + ``SetHint`` sets the specified ``Value`` string to the `Hint <Vcl.Controls.TControl.Hint.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control ``ActionLink`` to the client, controls the `Hint <Vcl.Controls.TControl.Hint.htm>`__ property of the client. That is, if `IsHintLinked <Vcl.Controls.TControlActionLink.IsHintLinked.htm>`__ is ``True``. + + ``Value`` is the string to use as the control's hint. + ''' + def SetHelpContext(self, Value: HelpContext) -> None: + ''' + Sets the specified `help context ``ID`` <Vcl.Controls.TControl.HelpContext.htm>`__ for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsHelpLinked <Vcl.Controls.TControlActionLink.IsHelpLinked.htm>`__ is ``True``. + + ``SetHelpContext()`` sets the specified ``Value`` to the `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control ``ActionLink`` to the client, controls the `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ property of the client. That is, if `IsHelpLinked <Vcl.Controls.TControlActionLink.IsHelpLinked.htm>`__ is ``True``. + + ``Value`` specifies the integer help context ``ID`` to which the `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ property should be set. + ''' + def SetHelpKeyword(self, Value: str) -> None: + ''' + Sets the specified `help keyword <Vcl.Controls.TControl.HelpKeyword.htm>`__ for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsHelpLinked <Vcl.Controls.TControlActionLink.IsHelpLinked.htm>`__ is ``True``. + + ``SetHelpKeyword()`` sets the specified ``Value`` to the `HelpKeyword <Vcl.Controls.TControl.HelpKeyword.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control ``ActionLink`` to the client, controls the `HelpKeyword <Vcl.Controls.TControl.HelpKeyword.htm>`__ property of the client. That is, if `IsHelpLinked <Vcl.Controls.TControlActionLink.IsHelpLinked.htm>`__ is ``True``. + ''' + def SetHelpType(self, Value: HelpType) -> None: + ''' + Sets the specified `help type <Vcl.Controls.TControl.HelpType.htm>`__ for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsHelpLinked <Vcl.Controls.TControlActionLink.IsHelpLinked.htm>`__ is ``True``. + + ``SetHelpType`` sets the specified ``Value`` to the `HelpType <Vcl.Controls.TControl.HelpType.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control ``ActionLink`` to the client, controls the `HelpType <Vcl.Controls.TControl.HelpType.htm>`__ property of the client. That is, if `IsHelpLinked <Vcl.Controls.TControlActionLink.IsHelpLinked.htm>`__ is ``True``. + + The help type ``Value`` can be one of the ``htKeyword`` or ``htContext`` constants declared in `HelpType <System.Classes.THelpType.htm>`__. + ''' + def SetVisible(self, Value: bool) -> None: + ''' + Sets the specified `visible state <Vcl.Controls.TControl.Visible.htm>`__ for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsVisibleLinked <Vcl.Controls.TControlActionLink.IsVisibleLinked.htm>`__ is ``True``. + + ``SetVisible()`` sets the specified ``Value`` to the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the control ``ActionLink`` to the client, controls the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property of the client. That is, if `IsVisibleLinked <Vcl.Controls.TControlActionLink.IsVisibleLinked.htm>`__ is ``True``. + + ``Value`` specifies whether the client's control is visible. + ''' + def SetOnExecute(self, Value: NotifyEvent) -> None: + ''' + Sets the specified `execution event handler <Vcl.Controls.TControl.OnClick.htm>`__ for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if `IsOnExecuteLinked <Vcl.Controls.TControlActionLink.IsOnExecuteLinked.htm>`__ is ``True``. + + ``SetOnExecute()`` sets the specified ``Value`` as the execution event handler to the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ property for the client's `control <Vcl.Controls.TControlActionLink.FClient.htm>`__ of the control `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the menu ``ActionLink`` to the client, controls the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ property of the client. That is, if `IsOnExecuteLinked <Vcl.Controls.TControlActionLink.IsOnExecuteLinked.htm>`__ is ``True``. + + ``Value`` specifies the execution event handler of the client's control that should be used for the `OnClick <Vcl.Menus.TMenuItem.OnClick.htm>`__ event. + ''' + def SetPopupMenu(self, Value: PopupMenu) -> None: + ''' + Sets the specified ``PopupMenu`` for the client's control if `IsPopupMenuLinked <Vcl.Controls.TControlActionLink.IsPopupMenuLinked.htm>`__ is ``True``. + + ``SetPopupMenu`` sets the ``PopupMenu`` specified by the ``Value`` parameter for the `client <Vcl.Controls.TControlActionLink.FClient.htm>`__'s control of the `ActionLink <Vcl.Controls.TControlActionLink.htm>`__ if the `action <System.Classes.TBasicActionLink.Action.htm>`__, associated by the ``ActionLink`` to the client, controls the `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ property of the client. That is, if `IsPopupMenuLinked <Vcl.Controls.TControlActionLink.IsPopupMenuLinked.htm>`__ is ``True``. + ''' + +class WinControlActionLink(ControlActionLink): + ''' + ================================== + Vcl.Controls.TWinControlActionLink + ================================== + + ``WinControlActionLink`` is an ``ActionLink`` used by descendants of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + ``WinControlActionLink`` is designed to link actions to controls based on `WinControl <Vcl.Controls.TWinControl.htm>`__. ``WinControlActionLink`` inherits support for linking actions with the properties of components and controls and adds support for linking the help context. + ''' + + __hash__: ClassVar[None] = ... + FClient: WinControl + ''' + No have docs. + ''' + def AssignClient(self, AClient: Object) -> None: + ''' + Specifies the client control. + + `WinControlActionLink <Vcl.Controls.TWinControlActionLink.htm>`__ overrides ``AssignClient()`` to ensure that the client is a `WinControl <Vcl.Controls.TWinControl.htm>`__ object. + ''' + def IsHelpContextLinked(self) -> bool: + ''' + Indicates whether the ``Help`` context for the ``Action`` and the client are linked. + + ``IsHelpContextLinked()`` indicates whether `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ property is linked to the appropriate client property. ``IsHelpContextLinked()`` returns ``True`` if the client requests that the ``Action`` control this property, ``False`` otherwise. + ''' + def SetHelpContext(self, Value: HelpContext) -> None: + ''' + Sets the ``Help`` context of a windowed control if the client is linked to the ``Action`` for this event. + + ``SetHelpContext()`` sets the help context of a client windowed control, and is called only if the client is linked for this event. ``Value`` specifies whether what the help context should be. + ''' + +class ButtonActionLink(WinControlActionLink): + ''' + ============================== + Vcl.StdCtrls.TButtonActionLink + ============================== + + ``ButtonActionLink`` is an ``ActionLink`` designed specifically for button control clients. + + ``ButtonActionLink`` is designed to specifically link actions to button control clients. ``ButtonActionLink`` overrides methods to determine whether the action and client are linked, and to ensure that action events are appropriate for properties of button control clients. + + ``ButtonActionLink`` inherits, from its ancestors, support for linking actions with the properties of components, generic controls, and windowed controls. ``ButtonActionLink`` adds support for linking the checked property to the appropriate property of a ``Button`` control. + ''' + + __hash__: ClassVar[None] = ... + FClient: ButtonControl + ''' + No have docs. + ''' + def AssignClient(self, AClient: Object) -> None: + ''' + Assigns a client button that is linked to the associated action. + + `ButtonActionLink <Vcl.StdCtrls.TButtonActionLink.htm>`__ overrides ``AssignClient()`` to ensure that the client for the ``Action`` is a ``Button`` control. + ''' + def IsCheckedLinked(self) -> bool: + ''' + Indicates whether the checked state for the ``Action`` and the client are linked. + + ``IsCheckedLinked()`` indicates whether the ``Checked`` property is linked to the appropriate client property. ``IsCheckedLinked()`` returns ``True`` if the client requests that the ``Action`` control this property, ``False`` otherwise. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + Sets the checked state of a ``Button`` control if the client is linked to the ``Action`` for this property. + + ``SetChecked()`` sets the checked state of a ``Button`` control, and is called only if the client is linked for this property. ``Value`` specifies whether the checked state should be set. + ''' + +class ImageMargins(Persistent): + ''' + ========================== + Vcl.StdCtrls.TImageMargins + ========================== + + Margins of image on button. + + A ``Button`` be positioned using margins. ``ImageMargins`` defines the margins of an image on a `Button <Vcl.StdCtrls.TButton.htm>`__. The margin values are in the `Bottom <Vcl.StdCtrls.TImageMargins.Bottom.htm>`__, `Top <Vcl.StdCtrls.TImageMargins.Top.htm>`__, `Left <Vcl.StdCtrls.TImageMargins.Left.htm>`__ and `Right <Vcl.StdCtrls.TImageMargins.Right.htm>`__ properties. + + The `OnChange <Vcl.StdCtrls.TImageMargins.OnChange.htm>`__ event is triggered when a margin changes. + + The `Button <Vcl.StdCtrls.TButton.htm>`__. `ImageMargins <Vcl.StdCtrls.TCustomButton.ImageMargins.htm>`__ property contains a ``ImageMargins`` instance. + ''' + + __hash__: ClassVar[None] = ... + Left: int + ''' + ``Left`` margin of image on button. + + A ``Button`` be positioned using margins. ``Left`` is the left margin of an image on a `Button <Vcl.StdCtrls.TButton.htm>`__. + ''' + Top: int + ''' + ``Top`` margin of image on button. + + A ``Button`` be positioned using margins. ``Top`` is the top margin of an image on a `Button <Vcl.StdCtrls.TButton.htm>`__. + ''' + Right: int + ''' + ``Right`` margin of image on button. + + A ``Button`` be positioned using margins. ``Right`` is the right margin of an image on a `Button <Vcl.StdCtrls.TButton.htm>`__. + ''' + Bottom: int + ''' + ``Bottom`` margin of image on button. + + A ``Button`` be positioned using margins. ``Bottom`` is the bottom margin of an image on a `Button <Vcl.StdCtrls.TButton.htm>`__. + ''' + def Change(self) -> None: + ''' + Called when the image margins change. + + Override ``Change()`` in a derived class to perform actions when the image margins change. + + By default, ``Change()`` calls the `OnChange <Vcl.StdCtrls.TImageMargins.OnChange.htm>`__ event handler. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies the contents of another similar object. + + `Assign <System.Classes.TPersistent.Assign.htm>`__ copies properties and other attributes of the specified ``Source`` object to the current object. The standard form of a call to `Assign <System.Classes.TPersistent.Assign.htm>`__ is: + + .. code-block:: python + + Destination.Assign(Source); {Delphi} + + .. code-block:: python + + Destination->Assign(Source); // C++ + + which tells the current object to copy the contents of the ``Source`` object to itself. + + Most objects override `Assign <System.Classes.TPersistent.Assign.htm>`__ to handle the assignment of properties from similar objects. When overriding `Assign <System.Classes.TPersistent.Assign.htm>`__, call the inherited method if the destination object cannot handle the assignment of properties from the class of the ``Source`` parameter. + + If no overridden `Assign <System.Classes.TPersistent.Assign.htm>`__ method can handle the assignment of properties from ``Source``, the method implemented in `Persistent <System.Classes.TPersistent.htm>`__ calls the source object's `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. This allows the source object to handle the assignment. If the ``Source`` object is ``nil`` (Delphi) or ``NULL`` (C++), `Assign <System.Classes.TPersistent.Assign.htm>`__ raises an `EConvertError <System.SysUtils.EConvertError.htm>`__ exception. + + In general, the statement + + .. code-block:: python + :caption: Delphi + + Destination := Source; {Delphi} + + .. code-block:: python + :caption: C++ + + Destination = Source; // C++ + + is not the same as the statement + + .. code-block:: python + :caption: Delphi + + Destination.Assign(Source); {Delphi} + + .. code-block:: python + :caption: C++ + + Destination->Assign(Source); // C++ + + The assignment operator makes ``Destination`` reference the same object as ``Source``, whereas the `Assign <System.Classes.TPersistent.Assign.htm>`__ method copies the contents of the object referenced by ``Source`` into the object referenced by ``Destination``. + + .. note:: The types of some properties are also objects. If these properties have written methods that use `Assign <System.Classes.TPersistent.Assign.htm>`__ to set the value of the property, then in these cases the assignment operator does the same thing as the `Assign <System.Classes.TPersistent.Assign.htm>`__ method. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Margin changed. + + ``OnChange`` occurs when a margin changes. + ''' + +class PushButtonActionLink(ButtonActionLink): + ''' + ================================== + Vcl.StdCtrls.TPushButtonActionLink + ================================== + + ``PushButtonActionLink`` is an ``ActionLink`` designed specifically for button control clients. + + ``PushButtonActionLink`` is designed to specifically link actions to button control clients. ``PushButtonActionLink`` inherits from its ancestors support for linking actions with the properties of components, generic controls, and windowed controls. ``PushButtonActionLink`` overrides methods to set the client's property that corresponds to the action's `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ property. + ''' + + __hash__: ClassVar[None] = ... + + def IsImageIndexLinked(self) -> bool: + ''' + Retrieves whether the `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property for the action and for the client of the ``ActionLink`` are linked. + + ``Vcl.StdCtrls.TPushButtonActionLink.IsImageIndexLinked`` inherits from `System.Actions.TContainedActionLink.IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__. All content below this line refers to `System.Actions.TContainedActionLink.IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__. + + `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__ descendants call `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ to determine whether they need to propagate changes to the action's `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property to the corresponding ``ImageIndex`` property of the client object: + + - When `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ returns ``True``, the action controls the ``ImageIndex`` property; changes made to the action's `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property are reflected by changes to the corresponding property of the client object. + - When `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ returns ``False``, the client object is not influenced by the `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property of its action, either because it does not have a corresponding property, or, more commonly, because it manages the value of its corresponding property independently. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ merely checks that the `Action <System.Classes.TBasicActionLink.Action.htm>`__ property specifies a descendant of `ContainedAction <System.Actions.TContainedAction.htm>`__ (that is, it is an action that has an ``ImageIndex`` property), and if so, returns ``True``. Descendant classes can override `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ to determine whether the `ImageIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property is linked with the appropriate client property. + ''' + def IsImageNameLinked(self) -> bool: + ''' + No have docs. + ''' + def SetImageIndex(self, Value: int) -> None: + ''' + Introduces an interface for setting the ``ImageIndex`` for a client of the ``ActionLink``. + + ``Vcl.StdCtrls.TPushButtonActionLink.SetImageIndex`` inherits from `System.Actions.TContainedActionLink.SetImageIndex <System.Actions.TContainedActionLink.SetImageIndex.htm>`__. All content below this line refers to `System.Actions.TContainedActionLink.SetImageIndex <System.Actions.TContainedActionLink.SetImageIndex.htm>`__. + + ``Value`` specifies the new value of the ``ImageIndex`` property. + + The associated action calls `SetImageIndex <System.Actions.TContainedActionLink.SetImageIndex.htm>`__ when its `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ property changes so that the ``ActionLink`` can propagate the new ``Value`` to the ``ImageIndex`` property of the client object of the ``ActionLink``. + + As implemented in `ContainedActionLink <System.Actions.TContainedActionLink.htm>`__, `SetImageIndex <System.Actions.TContainedActionLink.SetImageIndex.htm>`__ does nothing. Descendant classes override `SetImageIndex <System.Actions.TContainedActionLink.SetImageIndex.htm>`__ to set the client's ``ImageIndex`` property if the `IsImageIndexLinked <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__ method returns ``True``. + ''' + +class ButtonControl(WinControl): + ''' + =========================== + Vcl.StdCtrls.TButtonControl + =========================== + + ``ButtonControl`` is the base class for objects that represent Windows button controls. + + ``ButtonControl`` encapsulates behavior common to button controls, ``CheckBox``\ es, and ``RadioButton``\ s.. Use ``ButtonControl`` as a base class when defining a ``Button`` that is a wrapper for a *Windows* button. Do not create instances of ``ButtonControl`` directly in an application. Instead, use a descendant of ``ButtonControl`` to put a push button, ``CheckBox``, or ``RadioButton`` on a form. + + .. note:: Some buttons, such as ``SpeedButton`` are not wrappers for *Windows* buttons. These controls do not descend from ``ButtonControl``. + ''' + + __hash__: ClassVar[None] = ... + WordWrap: bool + ''' + pecifies whether the button ``Text`` wraps to fit the width of the control. + + Set ``WordWrap`` to ``True`` to allow the display of multiple lines of text. When ``WordWrap`` is ``True``, text that is too wide for the control wraps at the right margin. + + Set ``WordWrap`` to ``False`` to limit the text to a single line. When ``WordWrap`` is ``False``, text that is too wide for the control appears truncated. + ''' + Checked: bool + ''' + Specifies whether the button control is checked. + + Use ``Checked`` to determine whether a ``Button`` control is checked. + ''' + ClicksDisabled: bool + ''' + Specifies whether the button control accepts mouse clicks. + + Use ``ClicksDisabled`` to determine whether a ``Button`` control accepts mouse clicks. If ``ClicksDisabled`` is ``True``, the button control doesn't accept mouse clicks. Otherwise, the button control accepts mouse clicks. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Updates the button control to reflect changes in its associated action. + + ``ActionChange()`` is called automatically when the associated action changes. It updates the button control to reflect the action's current `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ state. Then it calls the inherited method, which checks the associated properties for that client type. + + The ``Sender`` parameter is the associated action. The ``CheckDefaults`` parameter specifies whether properties and event handlers should be changed if they differ from the default values. When ``CheckDefaults`` is ``True``, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When ``CheckDefaults`` is ``False``, properties and event handlers are changed, regardless of their current values. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the appropriate ``ActionLink`` class that is associated with button controls. + + ``GetActionLinkClass()`` is used to get the appropriate class type for the ``ActionLink`` used with button controls. ``GetActionLinkClass()`` is used internally to create ``ActionLink`` objects for clients when a ``Button`` control has an associated action. The ``ActionLink`` is used to link the action to the button control client. Each ``Action`` link class type is designed to link specific actions to clients based upon the types of properties the client supports. For button controls, ``GetActionLinkClass()`` returns the `ButtonActionLink <Vcl.StdCtrls.TButtonActionLink.htm>`__ class type. + ''' + def GetChecked(self) -> bool: + ''' + Returns whether the button control is checked. + + ``GetChecked()`` is the read implementation of the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + Sets the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + + ``SetChecked()`` is the write implementer for the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Handles *Windows Messages*. + + ``WndProc()`` enables button objects to receive input focus when ``WM_LBUTTONDOWN`` and ``WM_LBUTTONDBLCLK`` messages occur. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` a ``Button`` control. + + ``AOwner`` is the component that is responsible for freeing the button. It becomes the value of the ``Owner()`` property. + ''' + +class CustomButton(ButtonControl): + ''' + ========================== + Vcl.StdCtrls.TCustomButton + ========================== + + Base class for a push button control. + + Use ``CustomButton`` as a base class for a standard push button on a form. + ''' + + __hash__: ClassVar[None] = ... + Active: bool + ''' + No have docs. + ''' + Cancel: bool + ''' + Determines whether the button's ``OnClick`` event handler executes when the *Escape* key is pressed. + + If ``Cancel`` is ``True``, the button's ``OnClick`` event handler executes when the user presses *Esc*. Although an application can have more than one *Cancel* button, the ``Form`` calls the ``OnClick`` event handler only for the first visible button in the tab order. + ''' + CommandLinkHint: str + ''' + ``Text`` displayed as hint below the button ``Caption`` for *Command Link*. + + ``CommandLinkHint`` is the ``Text`` displayed as a hint below the button ``Caption`` when the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsCommandLink`` to specify a *Command Link* button. + + This is available for *Windows Vista*, *Windows 7*, or later Windows operating systems only. + ''' + Default: bool + ''' + Determines whether the button's ``OnClick`` event handler executes when the *Enter* key is pressed. + + If ``Default`` is ``True``, the button's ``OnClick`` event handler executes when the user presses *Enter*. + + Although an application can have more than one ``Default`` button, the ``Form`` calls the ``OnClick`` event handler only for the first ``Visible`` button in the tab order. Moreover, any button that has focus becomes the ``Default`` button temporarily; hence, if the user selects another button before pressing *Enter*, the selected button's ``OnClick`` event handler executes instead. + ''' + DisabledImageIndex: ImageIndex + ''' + ``ImageIndex`` for disabled ``ButtonState``. + + ``DisabledImageIndex`` is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the disabled ``ButtonState``. If the index value is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + DisabledImageName: ImageName + ''' + The ``Name`` of the image is used when the UI is disabled. + ''' + DisabledImages: CustomImageList + ''' + No have docs. + ''' + DropDownMenu: PopupMenu + ''' + Split button drop-down menu. + + When the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsSplitButton``, the button is a *Vista* style split button with a drop-down menu. ``DropDownMenu`` specifies the drop-down menu for the down arrow button part. The `OnDropDownClick <Vcl.StdCtrls.TCustomButton.OnDropDownClick.htm>`__ event also occurs when the down arrow button part is clicked. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + ElevationRequired: bool + ''' + Puts a shield icon on a ``Button``, indicating that elevated access rights are required. + + When ``ElevationRequired`` is ``True``, the button has a shield icon, indicating that elevated access rights are required. Vista or later UI guidelines specify that when there is a ``Button`` that performs an operation requiring elevated access rights, it should have this shield icon. + + This icon overrides any of the properties specifying a ``Button`` image for various ``ButtonState``s, as in `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + HotImageIndex: ImageIndex + ''' + ``ImageIndex`` for the hot ``ButtonState``. + + ``HotImageIndex`` is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the hot ``ButtonState`` (for example, the cursor hovering over the button). If the ``Index`` value is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + HotImageName: ImageName + ''' + The ``Name`` of the image is used when the cursor hovers over the UI. + ''' + Images: CustomImageList + ''' + List of images for a ``Button``. + + ``Images`` is a `CustomImageList <Vcl.ImgList.TCustomImageList.htm>`__ object listing the various images that can be placed on a ``Button``. + + The button's image depends on the ``ButtonState``. These images are determined by the value of the image state properties that index `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__: `DisabledImageIndex <Vcl.StdCtrls.TCustomButton.DisabledImageIndex.htm>`__, `HotImageIndex <Vcl.StdCtrls.TCustomButton.HotImageIndex.htm>`__, `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__, `PressedImageIndex <Vcl.StdCtrls.TCustomButton.PressedImageIndex.htm>`__, and `SelectedImageIndex <Vcl.StdCtrls.TCustomButton.SelectedImageIndex.htm>`__. When the `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__ index is -1, it generally means that no image is used for the normal state. For the other state ``ImageIndex``\ es, -1 means to use the same image as the normal state. + + The `ImageMargins <Vcl.StdCtrls.TCustomButton.ImageMargins.htm>`__ and `ImageAlignment <Vcl.StdCtrls.TCustomButton.ImageAlignment.htm>`__ properties orient the image inside the button. The image is not sized to fit the button, and the button is not stretched. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + ImageAlignment: ImageAlignment + ''' + Alignment of image on button. + + `ImageAlignment <Vcl.StdCtrls.TImageAlignment.htm>`__ indicates the alignment of an image on a ``Button``. It is a `ImageAlignment <Vcl.StdCtrls.TImageAlignment.htm>`__ type. + ''' + ImageIndex: ImageIndex + ''' + ``ImageIndex`` for the normal ``ButtonState``. + + ``ImageIndex`` is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the normal ``ButtonState``. If the ``Index`` value is -1, no image is used. + + In *Vista* or later *Windows* operating systems, a standard green arrow is used when the ``Index`` is -1 and the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsCommandLink`` for a *Command Link* button. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + ImageMargins: ImageMargins + ''' + Margins of image on button. + + A ``Button`` be positioned using margins. ``ImageMargins`` holds a `ImageMargins <Vcl.StdCtrls.TImageMargins.htm>`__ object containing the margins of an image on a ``Button``. The `ImageMargins <Vcl.StdCtrls.TImageMargins.htm>`__.\ `OnChange <Vcl.StdCtrls.TImageMargins.OnChange.htm>`__ event is triggered when a margin changes. + ''' + ModalResult: ModalResult + ''' + Determines whether and how the button closes its (modal) parent form. + + Setting the button component's ``ModalResult`` property is an easy way to make clicking the button close a modal form. When a ``Button`` is clicked, the ``ModalResult`` property of its parent form is set to the same value as the button's ``ModalResult`` property. + + For example, if a dialog box has *OK* and `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ buttons, their ``ModalResult`` properties could be set at design time to ``mrOk`` and ``mrCancel``, respectively. At run time, clicking the *OK* button then changes the dialog's ``ModalResult`` property to ``mrOk``, and clicking the `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ button changes the dialog's ``ModalResult`` property to ``mrCancel``. Unless further processing is required, no ``OnClick`` event handlers are required for the buttons. + + Changes to ModalResult Values at XE2 Release + ============================================ + + The *XE2* release introduced three new ``ModalResult`` values: ``mrContinue``, ``mrHelp``, and ``mrTryAgain``. + + In addition, four of the existing ``ModalResult`` values changed at *XE2*. If your applications use any of the following four ``ModalResult`` values for ``Button``, you need to make code changes: ``mrClose``, ``mrAll``, ``mrNoToAll`` and ``mrYesToAll``. Since these values are stored as numbers in ``.dfm`` files, the values change when you migrate a project to *XE2*. The values have changed as follows: + + - Before *XE2*: + + - ``mrClose=11`` + - ``mrAll=8`` + - ``mrNoToAll=9`` + - ``mrYesToAll=10`` + + - In *XE2*: + + - ``mrClose=8`` + - ``mrAll=12`` + - ``mrNoToAll=13`` + - ``mrYesToAll=14`` + + The following table lists the constants of type `ModalResult <Vcl.Controls.TModalResult.htm>`__ that are defined for the ``ModalResult`` property, along with their values in the *XE2* release and *XE* release (that is, any release before *XE2*): + + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | **Constant** | **Value** | **Meaning** | **Supported Releases** | + +===================+======================================+=======================================================+===========================+ + | ``mrNone`` | ``'0'`` | None ed as a default value before the user exits. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrOk`` | ``idOK = 1`` | The user exited with *OK* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrCancel`` | ``idCancel = 2`` | The user exited with the *CANCEL* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrAbort`` | ``idAbort = 3`` | The user exited with the *ABORT* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrRetry`` | ``idRetry = 4`` | The user exited with the *RETRY* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrIgnore`` | ``idIgnore = 5`` | The user exited with the *IGNORE* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrYes`` | ``idYes = 6`` | The user exited with the *YES* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrNo`` | ``idNo = 7`` | The user exited with the *NO* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrClose`` | ``idClose = 8`` | The user exited with the *CLOSE* button. | - In *XE = 11* | + | | | | - In *XE2 = 8* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrHelp`` | ``idHelp = 9`` | The user exited with the *HELP* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrTryAgain`` | ``idTryAgain = 10`` | The user exited with the *TRY AGAIN* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrContinue`` | ``idContinue = 11`` | The user exited with the *CONTINUE* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrAll`` | ``mrContinue + 1`` (12 or ``$C``) | The user exited with the *ALL* button. | - In XE = 8 | + | | | | - In XE2 = 12 | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrNoToAll`` | ``mrAll +1`` (13 or ``$D``) | The user exited with the *NO TO ALL* button. | - In XE = 9 | + | | | | - In XE2 = 13 | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrYesToAll`` | ``mrNoToAll +1`` or ``$E``) | The user exited with the *YES TO ALL* button. | - In XE =10 | + | | | | - In XE2 = 14 | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + + For complete information and solutions, see "XE2 values of ``mrAll``, ``mrNoToAll``, ``mrYesToAll`` and ``mrClose``" at ``http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:5029`` + ''' + PressedImageIndex: ImageIndex + ''' + ``ImageIndex`` for the pressed ``ButtonState``. + + ``PressedImageIndex`` is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the pressed ``ButtonState``. If the ``Index`` value is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + PressedImageName: ImageName + ''' + The name of the image is used when pressing the UI. + ''' + SelectedImageIndex: ImageIndex + ''' + ``ImageIndex`` for the selected ``ButtonState``. + + ``SelectedImageIndex`` is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the selected ``ButtonState``. If the ``Index`` value is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + SelectedImageName: ImageName + ''' + The name of the image is used when selecting the UI. + ''' + Style: ButtonStyle + ''' + ``Style`` of a ``Button``. + + ``Style`` indicates a ``Button``\ s. style, which is a `ButtonStyle <Vcl.StdCtrls.TCustomButton.TButtonStyle.htm>`__ type. + ''' + StylusHotImageIndex: ImageIndex + ''' + ``ImageIndex`` for a hot ``ButtonState``. + + ``StylusHotImageIndex`` is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for a hot ``ButtonState``, for example, the stylus hovering over the button. If the ``Index`` value is -1, the same image is used as in the normal ``ButtonState``. + + This property is only available on *Windows XP* and more recent releases of *Windows*. + ''' + StylusHotImageName: ImageName + ''' + No have docs. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Updates the button control to reflect changes in its associated action. + + `ActionChange <Vcl.StdCtrls.TButtonControl.ActionChange.htm>`__ is called automatically when the associated action changes. It updates the button control to reflect the action's current `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ state. Then it calls the inherited method, which checks the associated properties for that client type. + + The ``Sender`` parameter is the associated action. The ``CheckDefaults`` parameter specifies whether properties and event handlers should be changed if they differ from the default values. When ``CheckDefaults`` is ``True``, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When ``CheckDefaults`` is ``False``, properties and event handlers are changed, regardless of their current values. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the appropriate ``ActionLink`` class that is associated with button controls. + + ``Vcl.StdCtrls.TCustomButton.GetActionLinkClass`` inherits from `Vcl.StdCtrls.TButtonControl.GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__. All content below this line refers to `Vcl.StdCtrls.TButtonControl.GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__. + + `GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__ is used to get the appropriate class type for the ``ActionLink`` used with button controls. `GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__ is used internally to create ``ActionLink`` objects for clients when a ``Button`` control has an associated action. The ``ActionLink`` is used to link the action to the button control client. Each ``Action`` link class type is designed to link specific actions to clients based upon the types of properties the client supports. For button controls, `GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__ returns the `ButtonActionLink <Vcl.StdCtrls.TButtonActionLink.htm>`__ class type. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a stream. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated Action. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def SetButtonStyle(ADefault: bool) -> None: + ''' + Sets the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property for a ``Button``. + + The ``SetButtonStyle()`` method is called to change the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property according to the button's state, whenever a ``Button`` changes its focus state. + ''' + def UpdateImageList(self) -> None: + ''' + Rebuilds the ``ImageList`` associated with the button. + + The ``UpdateImageList()`` method is called to update the ``ImageList`` associated with the button control. + ''' + def UpdateImages(self) -> None: + ''' + Updates the ``ImageList`` associated with the button. + + The ``UpdateImages()`` method is called to add images to the ``ImageList`` associated with the button control. + ''' + def SetImageList(self, AHandle: HIMAGELIST) -> None: + ''' + No have docs. + ''' + def UpdateImage(self) -> None: + ''' + No have docs. + ''' + def CheckImageIndexes(self) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a ``Button`` instance. + + Use ``Create()`` to programmatically instantiate a ``Button``. Buttons added in the *Form Designer* are created automatically. + + ``AOwner`` is the component that is responsible for freeing the button instance. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TWinControl.Destroy.htm>`__ an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + `Destroys <Vcl.Controls.TWinControl.Destroy.htm>`__ an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `WinControl <Vcl.Controls.TWinControl.htm>`__ reference is not ``nil``, and only then calls `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__. + ''' + def Click(self) -> None: + ''' + Simulates a mouse click, as if the user had clicked the button. + + Calling ``Click()`` assigns the value of the button's `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property to the `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property of its parent form, and then generates an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event. + ''' + def UseRightToLeftAlignment(self) -> bool: + ''' + Specifies whether the control's alignment is in a right-to-left mode. + + For this class, ``UseRightToLeftAlignment()`` always returns ``False``. This is because the alignment of a ``Button`` should never be reversed automatically when running in *Middle Eastern* locales. + ''' + def OnDropDownClick(self, Sender: Object) -> None: + ''' + # OnDropDownClick: NotifyEvent + Down arrow part of a *Vista* or later style split button is clicked. + + ``OnDropDownClick`` occurs when the down arrow part of a *Vista* or later style split button is clicked. This only applies when the button's `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsSplitButton``. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + +class CustomListBox(CustomMultiSelectListControl): + ''' + =========================== + Vcl.StdCtrls.TCustomListBox + =========================== + + ``CustomListBox`` is the base class for ``ListBox`` objects that are wrappers for ``ListBox`` controls. + + ``CustomListBox`` encapsulates behavior common to all ``ListBox`` controls. List box objects are used to display a scrollable list from which users can select one or more items. Use a ``ListBox`` control to limit the user to selecting from a list of items. Items can be added at design time or at runtime. + + As a wrapper for a ``ListBox`` ``CustomListBox`` introduces methods for: + + Displaying, sorting, selecting, manipulating, and querying items in the list. + + Creating owner-draw style ``ListBox``\ es that can display graphical images such as icons and bitmaps. + + Creating multiple-column and multiple-selection lists. + + By default, ``CustomListBox`` is a standard ``ListBox`` that displays items as text strings. These items are contained in a ``Strings`` object, and the methods of the ``Strings`` object are used to add, insert or delete a string. The following code demonstrates adding a new string to the ``ListBox``: + + .. code-block:: python + :caption: Delphi + + MyListBox.Items.Add('New item'); //Delphi + + .. code-block:: python + :caption: C++ + + MyListBox->Items->Add("New item"); // C++ + + Descendants of ``CustomListBox`` inherit the basic functionality of ``CustomListBox``. Some descendants also have specialized behavior and can be linked to file, directory, drive, or database information. Use these ``ListBox``\ es to easily access and list this type of information. + + A ``ComboBox`` is a ``ListBox`` with an edit control and an optional drop down style for the list. Use a ``ComboBox`` to allow users to type their selection into an edit box or to save space on a form by having the list drop down. + + For lists of items that require a matrix or expandable tree-like structure, use list views or ``TreeView``\ s. These controls allow the grouping of items under column headings or in expandable and contractible rows. + ''' + + __hash__: ClassVar[None] = ... + FMoving: bool + ''' + Specifies whether the strings of the ``ListBox`` are changing their position. + + ``FMoving`` is an internal field specifying whether the strings of the ``ListBox`` are moving inside the ``ListBox``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``ListBox`` has a border. + + Use ``BorderStyle`` to change the appearance of the outer boundary of the ``ListBox`` control. A ``ListBox`` can have a single border (bsSingle) or no visible border (bsNone). + ''' + Columns: int + ''' + ''' + ExtendedSelect: bool + ''' + Determines whether the user can select a sequential range of items in the ``ListBox``. + + ``ExtendedSelect`` works with the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. If ``ExtendedSelect`` is ``True`` and `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``True``, the user can select an item, then hold down the *Shift* key and select another, and all the items in between the two selected items also become selected. + + If the user does not hold down the *Shift* or *Ctrl* key while selecting a second item, the first selected item becomes unselected--in other words, the user must use the *Ctrl* key to select multiple noncontiguous items, or the *Shift* key, to select a range of items. + + If ``ExtendedSelect`` is ``False`` and `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``True``, the user can select multiple items without using the *Shift* or *Ctrl* key, but they cannot select a range of items in one operation. + + If `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``False``, the setting of ``ExtendedSelect`` has no effect, as the user will not be able to select more than one item at a time in the ``ListBox``. + ''' + IntegralHeight: bool + ''' + Determines whether the ``ListBox`` displays the partial items. + + ``IntegralHeight`` controls the height of the ``ListBox`` itself. + + When ``IntegralHeight`` is ``True``, and the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lsOwnerDrawFixed``, the ``ListBox`` height will always be a multiple of the `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ property value. In this case, items will never be partially displayed. + + If ``IntegralHeight`` is ``False``, the ``ListBox`` height can be set to any value, but the last item may not be fully displayed. + + If the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property value of the ``ListBox`` is ``lbOwnerDrawVariable``, setting the ``IntegralHeight`` property to true has no effect. + ''' + ItemHeight: int + ''' + Specifies the height in pixels of an item in an owner-draw ``ListBox``. + + Use ``ItemHeight`` to control the height of an item in a ``ListBox`` when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbOwnerDrawFixed``. The ``ItemHeight`` property can also affect the height of the ``ListBox`` itself. When the `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ property is ``True``, the height of the ``ListBox`` is always an increment of the ``ItemHeight`` value. + + If the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbStandard`` or ``lbOwnerDrawVariable``, the value of ``ItemHeight`` is ignored. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. + + To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the form to gray causes all the controls on the form to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + Sorted: bool + ''' + Specifies whether the items in a ``ListBox`` are arranged alphabetically. + + Use ``Sorted`` to sort the items by setting its value to true. If ``Sorted`` is ``False``, the items are unsorted. When ``Sorted`` is ``True``, items are automatically added or inserted into the ``ListBox`` in alphabetical order. + + .. note:: ``Sorted`` has no effect if ``ListBox``\ s. style is ``lbVirtual`` or ``lbVirtualOwnerDraw`` + ''' + Style: ListBoxStyle + ''' + Determines whether the ``ListBox`` is standard or owner-draw and whether it is virtual. + + Use ``Style`` to specify whether the ``ListBox`` is a standard ``ListBox`` that displays text strings, or an owner-draw ``ListBox`` that can display graphical images. Owner-draw ``ListBox``\ es let you display items in some nonstandard way. In this case, you must write the code to paint items in the ``ListBox``. + + In addition, ``Style`` controls whether the ``ListBox`` is virtual, which means that items are supplied dynamically using event handlers. By default, ``Style`` is ``lbStandard``, meaning that the ``ListBox`` is not virtual and it displays each item as a string. + ''' + TabWidth: int + ''' + Specifies the size of the tabs in the ``ListBox``. + + Set ``TabWidth`` to control the number of dialog base units displayed for each tab character that appears in the strings of a ``ListBox``. + + If ``TabWidth`` is set to 0, which is the default setting, the tabs default to the width specified by Windows, which is two dialog base units. + ''' + AutoCompleteDelay: int + ''' + Specifies the delay between a key press and an attempt to autocomplete the field. + + Specifies the delay in milliseconds between a key press and an attempt to autocomplete the field. Autocomplete will position to matching list values as you type, sometimes saving you keystrokes. + + ``AutoCompleteDelay`` is only in effect when `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ is ``True``. + ''' + AutoComplete: bool + ''' + Determines whether the user can give focus to items by typing in the list. + + Use ``AutoComplete`` to specify whether the ``ListBox`` automatically updates the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property in response to user keystrokes. When ``AutoComplete`` is ``True``, the item with focus changes to the first item that begins with the sequence of characters that the user typed. As the user types more characters, `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ may change to a later item because the string to match becomes longer. + ''' + Canvas: Canvas + ''' + Provides a drawing surface when implementing a handler for the `OnDrawItem <Vcl.StdCtrls.TCustomListBox.OnDrawItem.htm>`__ event of an owner-draw ``ListBox``. + + ``Canvas`` is only useful for applications that control the drawing of ``ListBox`` items, that is, for owner-draw ``ListBox``\ es. ``Canvas`` is used to draw graphical images that can be used as items in a ``ListBox``. + + By default a ``ControlCanvas`` object is created for the ``Canvas`` property in the ``ListBox`` constructor. To create an owner-draw ``ListBox`` that uses a canvas, set the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property accordingly. + ''' + Count: int + ''' + Indicates the number of items in the ``ListBox``. + + Use ``Count()`` to determine the number of items in the ``ListBox``. You can only set ``Count()`` when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``, in which case you must set this property. + ''' + Items: str + ''' + Contains the strings that appear in the ``ListBox``. + + Use ``Items`` to add, insert, delete and move items. By default, the items in a ``ListBox`` are of type ``Strings``. Use this item type to access its methods or properties to manipulate the items in the list. + + For example, the following code snippet shows how to add the text in the edit box to the ``ListBox`` as an item: + + .. code-block:: python + :caption: Delphi + + ListBox1.Items.Add(Edit1.Text); + + + .. code-block:: python + :caption: C++ + + ListBox1->Items->Add(Edit1->Text); + + + .. tip:: If you have a ``ListBox`` with multiple columns and you want to add data to specific columns, then you need to use the ``^I`` parameter (that is, capital **i**; Delphi-only) in the ``Add()`` statement, as shown in the snippet below. + + + .. code-block:: python + :caption: Delphi + + ListBox1.Items.Add('First Column'^I'Second Column'); + ListBox1.Items.Add('1'^I'2'); + ListBox1.Items.Add('4'^I'5'); + + And the result would be: + + .. image:: ListBoxIParam.png + :alt: ListBoxIParam.png + :width: 245px + :height: 101px + ''' + Selected: bool + ''' + Indicates whether a particular item is selected. + + Use ``Selected`` to query the state of a particular item in the ``ListBox``. If the item specified by the ``Index`` parameter is selected in the ``ListBox``, the value of the ``Selected`` property is ``True``. If the specified item is not selected, ``Selected`` is ``False``. Set ``Selected`` to change the currently selected item. + + The ``Index`` parameter is the item referenced by its position in the ``ListBox``, with the first item having an ``Index`` value of 0. + + An item is selected when the user highlights it. More than one item in the ``ListBox`` can be selected by setting the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property to true. In this case, the ``Selected`` item is the one that has focus when the ``ListBox`` has input focus. + ''' + ScrollWidth: int + ''' + Specifies the width, in pixels, by which the ``ListBox`` can scroll horizontally. + + Use ``ScrollWidth`` to get or set the logical width of the ``ListBox``. When ``ScrollWidth`` is greater than the client width of the ``ListBox``, the ``ListBox`` gets a horizontal ``ScrollBar``. When ``ScrollWidth`` is less than or equal to ``ClientWidth``, the horizontal ``ScrollBar`` disappears. + ''' + TopIndex: int + ''' + Specifies the index number of the item that appears at the top of the ``ListBox``. + + Use ``TopIndex`` property to find or set the first item displayed at the top of the ``ListBox``. ``TopIndex`` can be used, for example, to change the topmost item to a different item in the list. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the Tab key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the form assigns another form to be its parent. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Instantiates a ``ListBox`` control. + + Call ``Create()`` to instantiate a ``ListBox`` control at runtime. For ``ListBox``\ es created at design time, ``Create()`` is called automatically. ``AOwner`` is the component that is responsible for freeing the ``ListBox``. It becomes the value of the ``Owner()`` property. If ``AOwner`` is nil, the caller is responsible for explicitly freeing the control. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the instance of a ``ListBox`` control. + + Do not call ``Destroy()`` directly in an application. Instead, an application should call Free. Free checks that the ``ListBox`` reference is not nil before it calls ``Destroy()``. + + ``Destroy()`` frees the memory associated with the objects for the `Canvas <Vcl.StdCtrls.TCustomListBox.Canvas.htm>`__ and `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ properties. Then it calls the inherited destructor to destroy the ``ListBox`` object. + ''' + def AddItem(self, Item: str, AObject: Object) -> None: + ''' + Adds an item to the ``ListBox`` + + Call ``AddItem()`` to add a new item to the end of the list. + + ``Item`` is the text of the item to add. + + ``AObject`` is the object associated with the new item. + ''' + def Clear(self) -> None: + ''' + Deletes all items from the ``ListBox``. + + Use ``Clear()`` to delete all of the items in the ``ListBox`` at once. Although the items in a standard ``ListBox`` are of type TStrings, use the ``Clear()`` method of the ``ListBox`` rather than calling the ``Clear()`` method of the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property. This allows descendants of `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__ to perform any other necessary clean-up in the ``Clear()`` method, in addition to deleting the items from the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property. Thus, applications should use + + .. code-block:: python + :caption: Delphi + + ListBox1.Clear; + + .. code-block:: python + :caption: C++ + + ListBox1->Clear(); + + rather than + + .. code-block:: python + :caption: Delphi + + ListBox1.Items.Clear; + + .. code-block:: python + :caption: C++ + + ListBox1->Items->Clear(); + ''' + def ClearSelection(self) -> None: + ''' + Deselects all selected items in the ``ListBox``, if possible. + + Use ``ClearSelection()`` to deselect all the currently selected items in the ``ListBox``. When the ``ListBox`` receives focus, after ``ClearSelection()`` is called, the last item that was selected is the item that receives the current focus in the ``ListBox``. Although this item receives focus, the item itself is not selected. + ''' + def CopySelection(self, Destination: CustomListControl) -> None: + ''' + Copies the selected items to another list-type control. + + Call ``CopySelection()`` to copy all the items selected in the ``ListBox`` to a ``ComboBox``, list view, or another ``ListBox``. If the destination control is not sorted, the selected items are added to the end of its list. + + ``Destination`` is the ``ListBox``, ``ComboBox``, or list view to which the selected items are copied. + ''' + def DeleteSelected(self) -> None: + ''' + Deletes the selected items from the ``ListBox``. + + Call ``DeleteSelected()`` to delete the selected items from the ``ListBox``. + ''' + def GetCount(self) -> int: + ''' + Returns the value of the `Count <Vcl.StdCtrls.TCustomListBox.Count.htm>`__ property. + + ``GetCount()`` is the protected read implementation of the `Count <Vcl.StdCtrls.TCustomListBox.Count.htm>`__ property. + ''' + def ItemAtPos(Pos: Point, Existing: bool) -> int: + ''' + Returns the index of the ``ListBox`` item indicated by the coordinates of a point on the control. + + Use ``ItemAtPos()`` to detect if an item exists at a particular point in the control. + + The ``Pos`` parameter is the point in the control in window coordinates. If ``Pos`` is beyond the last item in the ``ListBox``, the value of the ``Existing`` variable determines the returned value. If Existing is set to true, ``ItemAtPos()`` returns -1, indicating that no item exists at that point. If Existing is set to false, ``ItemAtPos()`` returns the index of the last item in the ``ListBox`` plus one. + ''' + def ItemRect(self, Index: int) -> Rect: + ''' + Returns the rectangle that surrounds the item specified in the ``Item`` parameter. + + Use ``ItemRect()`` to get the coordinates of a particular item in the ``ListBox``. For example, ``ItemRect()`` is used internally by the `ItemAtPos <Vcl.StdCtrls.TCustomListBox.ItemAtPos.htm>`__ method. + + The ``Item`` parameter is the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ of the item whose position is queried. + ''' + def SelectAll(self) -> None: + ''' + Selects the entire block of text in the ``ListBox``. + + Use ``SelectAll()`` to select the entire block of text in the ``ListBox``. To select only part of the text, use the ``SelStart`` and ``SelLength`` properties. + ''' + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes the window-creation parameter record passed in the ``Params`` parameter. + + ``CreateParams()`` is used to pass information, in its ``Params`` parameter, to ``CreateWindowHandle()`` when the ``ListBox`` control is created. + + `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__ overrides ``CreateParams()`` to customize the representation of the window. It uses information from the ``ListBox`` `Columns <Vcl.StdCtrls.TCustomListBox-Columns.htm>`__, `ExtendedSelect <Vcl.StdCtrls.TCustomListBox.ExtendedSelect.htm>`__, `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__, `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__, `Sorted <Vcl.StdCtrls.TCustomListBox.Sorted.htm>`__ and `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ properties and sets ``WS_HSCROLL``, ``WS_VSCROLL``, ``LBS_HASSTRINGS`` and ``LBS_NOTIFY`` Windows styles for creation of the ``ListBox``. + + When overriding ``CreateParams()``, always call the inherited method first to set the default values, then make any desired adjustments. + ''' + def CreateWnd(self) -> None: + ''' + Creates a Windows control corresponding to the ``ListBox`` component. + + ``CreateWnd()`` is called automatically when the ``ListBox`` must be displayed. ``CreateWnd()`` calls the inherited ``CreateWnd()`` method, which calls: + + - ``CreateParams()`` to initialize the window-creation parameters. + - ``CreateWindowHandle()`` to create the window handle for the control. + + ``CreateWnd()`` additionally sets up the ``ListBox`` position, tabs, items, and columns. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in TControl. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. + + To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def DestroyWnd(self) -> None: + ''' + Saves the ``ListBox`` items in a string list before freeing the underlying Windows control. + + ``DestroyWnd()`` saves the ``ListBox`` text string items in the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property to internal storage in a TStringList object that it creates. It then calls the inherited ``DestroyWnd()`` method to destroy the windowed control's window handle and free associated device contexts. + ''' + def DoGetData(self, Index: int) -> str: + ''' + Returns a string in the ``ListBox`` given its index. + + This protected method is called automatically when a virtual ``ListBox`` needs to supply the text of an item. ``DoGetData()`` is never called unless the ``ListBox`` is virtual (that is, unless the value of the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``). + + ``DoGetData()`` generates an `OnData <Vcl.StdCtrls.TCustomListBox.OnData.htm>`__ event and returns the string that is supplied dynamically by the event handler. + ''' + def DoGetDataObject(self, Index: int) -> Object: + ''' + Returns the object associated with an item in a virtual ``ListBox``. + + This protected method is called automatically when a virtual ``ListBox`` needs to supply the object associated with an item. ``DoGetDataObject()`` is never called unless the ``ListBox`` is virtual (that is, unless the value of the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``). + + ``DoGetDataObject()`` generates an `OnDataObject <Vcl.StdCtrls.TCustomListBox.OnDataObject.htm>`__ event and returns the object that is supplied dynamically by the event handler. + ''' + def DoFindData(Data: str) -> int: + ''' + Returns the index of a string in the ``ListBox``. + + This protected method is called automatically when the ``ListBox`` needs to indicate the index for an item. + + If the ``ListBox`` is virtual (that is, if the value of the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``), **DoFindData** generates an `OnDataFind <Vcl.StdCtrls.TCustomListBox.OnDataFind.htm>`__ event so that the index can be provided dynamically. If the ``ListBox`` is not virtual (any other `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__), **DoFindData** locates the specified string from the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property and returns its index. + + ``Data`` is the text of the item to locate. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Handles *Windows* messages. + + ``WndProc()`` overrides the inherited ``WndProc()`` to provide specialized responses to messages that allows the ``ListBox`` to handle auto``DragMode``itself. Then it calls the inherited ``WndProc()`` to handle all other messages. + + When overriding the ``WndProc()`` method, be sure to call the inherited ``WndProc()`` at the end to dispatch any other messages. + ''' + def DragCanceled(self) -> None: + ''' + Sends a mouse message canceling the drag-and-drop operation. + + ``DragCanceled()`` is called in response to the cancellation of a drag-and-drop operation that had started. Users can cancel the operation by dropping the item over a component that does not accept the item, or by pressing *Esc* while dragging. + + The ``OnEndDrag`` event occurs after the call to ``DragCanceled()``. + ''' + def DrawItem(self, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + Generates an ``OnDrawItem`` event. + + ``DrawItem()`` is called whenever a visual aspect of an owner-draw ``ListBox`` changes. The ``ListBox`` calls ``DrawItem()`` for each visible item in its list, passing the index of the item in the ``Index`` parameter. + + By default, the ``DrawItem()`` method for a ``ListBox`` calls any event handler attached to the component's ``OnDrawItem`` event. If there is no handler attached, ``DrawItem()`` fills the rectangle passed in ``Rect`` and draws any text associated with the indexed item. The default drawing ignores the `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ parameter, although `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ is passed along to attached event handlers. + ''' + def GetSelCount(self) -> int: + ''' + Returns the number of selected items. + + ``GetSelCount()`` is the protected read implementation of the `SelCount <Vcl.Controls.TCustomMultiSelectListControl.SelCount.htm>`__ property. + ''' + def MeasureItem(self, Index: int, Height: int) -> None: + ''' + Generates an ``OnMeasureItem`` event. + + ``MeasureItem()`` is called whenever a visual aspect of a variable owner-draw ``ListBox`` changes and the value of the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``csOwnerDrawVariable``. + + Before drawing its items, a variable owner-draw ``ListBox`` calls ``MeasureItem()`` once for each visible item, passing the index of the item to measure, and the default height of the item. Since ``Height`` is passed by reference (a var parameter), ``MeasureItem()`` can increase or reduce the height of each item as needed. + + By default, the ``MeasureItem()`` method does nothing except call any event handler attached to the ``OnMeasureItem`` event. Override ``MeasureItem()`` to change or add functionality to the default behavior. + ''' + def InternalGetItemData(self, Index: int) -> ListBoxItemData: + ''' + Retrieves the data associated with an item in the ``ListBox``. + + ``InternalGetItemData()`` is the low-level protected method for fetching the data associated with an item in the ``ListBox``. It retrieves a reference pointer to the object associated with the specified item, as an integer. + + ``Index`` is the index of the item whose data is to be fetched. + ''' + def InternalSetItemData(self, Index: int, AData: ListBoxItemData) -> None: + ''' + Associates an integer with a specified item in the ``ListBox``. + + ``InternalSetItemData()`` is the low-level protected method for associating data with an item in the ``ListBox``. It associates the item that has the index specified by ``Index`` with the integer specified by ``AData``. + ''' + def GetItemData(self, Index: int) -> ListBoxItemData: + ''' + Returns a 32-bit value associated with the specified item in a ``ListBox``. + + ``GetItemData()`` retrieves the data associated with a particular item in the ``ListBox``. This value can be displayed as that ``ListBox`` item, or can be a value (such as a pointer) associated with the ``ListBox`` item. + ''' + def GetItemIndex(self) -> int: + ''' + Returns the value of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + ``GetItemIndex()`` is the protected read implementation of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. It returns the index of the first selected item in the ``ListBox``. + + The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ is -1. + ''' + def GetSelected(self, Index: int) -> bool: + ''' + Indicates whether a particular item is selected. + + ``GetSelected()`` is the protected read implementation of the `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ property. It returns ``True`` if the item specified by ``Index`` is selected, ``False`` if it is not. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event dispatcher. + + Override the protected `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ method to provide other responses in addition to calling the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler when the user presses the mouse button down while the cursor's hotspot is over the control. + + The ``Button`` parameter determines which mouse button the user pressed. ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) were down when the user pressed the mouse button. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + A control calls `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ in response to any of the Windows mouse-down messages (``WM_LBUTTONDOWN``, ``WM_MBUTTONDOWN``, ``WM_RBUTTONDOWN``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was pressed down: left, right, or middle. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + When a windowed control receives a key-down message (``WM_KEYDOWN``) from Windows, its message handler calls the `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ method. If `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ determines that the control should, in fact, process the character, it calls `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__, passing the key code and shift-key state in the ``Key`` and ``Shift`` parameters, respectively. + + `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ calls any event handler attached to the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Override `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ to provide other responses in addition to the event handler call. + + The ``Key`` parameter is the key on the keyboard. For nonalphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the *Shift*, *Alt*, or *Ctrl* keys are combined with the keystroke. + + Either `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ or the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds when the user presses a key. + + ``KeyPress()`` is called automatically when the ``ListBox`` receives a key-press message (``WM_CHAR``). It generates an ``KeyPress()`` event, and then, if the `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ property is ``True``, updates `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ to reflect the next character that the user typed. + + The ``Key`` parameter is the character represented by the key that is pressed, not a Windows virtual key code. + ''' + def LoadRecreateItems(RecreateItems: str) -> None: + ''' + Sets the value of the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property to the one specified through the parameter. + + ``LoadRecreateItems()`` is used to change the value of the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property to the value specified through the ``RecreateItems`` parameter. + ''' + def SetItemData(self, Index: int, AData: ListBoxItemData) -> None: + ''' + Sets the 32-bit value associated with the specified item in a ``ListBox``. + + Use ``SetItemData()`` to set the data associated with a particular item in a ``ListBox``. This value can be displayed as that ``ListBox`` item, or it can be a value (such as a pointer) represented by the ``ListBox`` item. + ''' + def ResetContent(self) -> None: + ''' + Removes all of the items from a ``ListBox``. + + ``ResetContent()`` is used to remove the items from the ``ListBox``. ``ResetContent()`` is used, for example, by the `Clear <Vcl.StdCtrls.TCustomListBox.Clear.htm>`__ method. + ''' + def SaveRecreateItems(RecreateItems: str) -> None: + ''' + Saves the list of items from a ``ListBox`` into a `Strings <System.Classes.TStrings.htm>`__ variable. + + ``SaveRecreateItems()`` is used to save the value of the `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ property into a `Strings <System.Classes.TStrings.htm>`__ variable transmitted as parameter. + ''' + def DeleteString(self, Index: int) -> None: + ''' + Deletes a string from the ``ListBox``. + + ``DeleteString()`` deletes the string, specified by the ``Index`` parameter, from the ``ListBox`` control. + ''' + def SetMultiSelect(self, Value: bool) -> None: + ''' + Sets the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. + + ``SetMultiSelect()`` is the protected write implementation for the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. ``Value`` is ``True`` if the ``ListBox`` should allow more than one item to be selected, ``False`` if only one item can be selected at a time. + ''' + def SetItemIndex(self, Value: int) -> None: + ''' + Gives focus to the item with a specified index. + + ``SetItemIndex()`` is the protected write implementation for the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. ``Value`` is the index of the item that should receive focus. + ''' + def OnDrawItem(self, Control: WinControl, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + # OnDrawItem: DrawItemEvent + Occurs when an item in an owner-draw ``ListBox`` needs to be redisplayed. + + Use ``OnDrawItem`` to write a handler for drawing of the items in ``ListBox``\ es with the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ values ``lbOwnerDrawFixed``, ``lbOwnerDrawVariable``, or ``lbVirtualOwnerDraw``. ``OnDrawItem`` occurs when the ``ListBox`` needs to display an item. ``OnDrawItem`` occurs only for owner-draw ``ListBox``\ es. + + The size of the rectangle that contains the item is determined either by the `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ property for fixed owner-draw ``ListBox``\ es or by the response to the `OnMeasureItem <Vcl.StdCtrls.TCustomListBox.OnMeasureItem.htm>`__ event for variable owner-draw ``ListBox``\ es. + + ``OnDrawItem`` is an event handler of type `Vcl.StdCtrls.TDrawItemEvent <Vcl.StdCtrls.TDrawItemEvent.htm>`__. + ''' + def OnMeasureItem(self, Control: WinControl, Index: int, Height: int) -> None: + ''' + # OnMeasureItem: MeasureItemEvent + Occurs when the application needs to redisplay an item in a variable height owner-draw ``ListBox``. + + Use ``OnMeasureItem`` to write a handler to measure items to be drawn in a ``ListBox`` with a `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property value of ``lbOwnerDrawVariable``. + + ``OnMeasureItem`` is of type `Vcl.StdCtrls.TMeasureItemEvent <Vcl.StdCtrls.TMeasureItemEvent.htm>`__ which contains three parameters describing the item to measure. + + After the ``OnMeasureItem`` event occurs, the `OnDrawItem <Vcl.StdCtrls.TCustomListBox.OnDrawItem.htm>`__ event occurs, rendering the item with the measured size. + ''' + def OnData(self, Control: WinControl, Index: int, Data: str) -> None: + ''' + # OnData: LBGetDataEvent + Occurs when a virtual ``ListBox`` needs to supply the text of an item. + + You must supply an ``OnData`` event handler to dynamically supply the items in the ``ListBox`` when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``. + + ``OnData`` is an event handler of type `Vcl.StdCtrls.TLBGetDataEvent <Vcl.StdCtrls.TLBGetDataEvent.htm>`__. + ''' + def OnDataObject(self, Control: WinControl, Index: int, DataObject: Object) -> None: + ''' + # OnDataObject: LBGetDataObjectEvent + Occurs when a virtual ``ListBox`` needs to supply the object associated with an item. + + Supply an ``OnDataObject`` event handler to dynamically provide objects associated with the items in a virtual ``ListBox``. + + ``OnDataObject`` is an event handler of type `Vcl.StdCtrls.TLBGetDataObjectEvent <Vcl.StdCtrls.TLBGetDataObjectEvent.htm>`__. + ''' + def OnDataFind(self, Control: WinControl, Findstr: str) -> int: + ''' + # OnDataFind: LBFindDataEvent + Occurs when a virtual ``ListBox`` needs to identify the index of an item given its text. + + You must supply an ``OnDataFind`` event handler to dynamically provide the mapping from list item to index when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``. + + ``OnDataFind`` is an event handler of type `Vcl.StdCtrls.TLBFindDataEvent <Vcl.StdCtrls.TLBFindDataEvent.htm>`__. + ''' + +class ToolWindow(WinControl): + ''' + ======================= + Vcl.ToolWin.TToolWindow + ======================= + + ``ToolWindow`` is the ancestor for windowed controls that require a custom client area and edge borders. + + ``ToolWindow`` is the ancestor of the ``CoolBar`` and ``ToolBar`` components, which facilitate the arrangement of buttons and other visual controls. + ''' + + __hash__: ClassVar[None] = ... + EdgeBorders: EdgeBorders + ''' + Determines which sides of the control have visible borders. + + Use the ``EdgeBorders`` property to add or remove borders. The appearance of the borders can be set with the `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ and `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ properties. + ''' + EdgeInner: EdgeStyle + ''' + Determines the border style for the control's inner edge. + + Use ``EdgeInner`` to provide the ``ToolWindow`` with a three-dimensional beveled look. A ``ToolWindow`` has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. ``EdgeInner`` specifies the appearance of the inner border. It can be raised (``\ esRaised``), lowered (``\ esLowered``), or left off altogether (``\ esNone``). + + .. note:: The ``EdgeInner`` property has an effect only on the sides specified by the `EdgeBorders <Vcl.ToolWin.TToolWindow.EdgeBorders.htm>`__ property. + + Use ``EdgeInner`` with `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ to give the component a three-dimensional look. + ''' + EdgeOuter: EdgeStyle + ''' + Determines the border style for the control's outer edge. + + Use ``EdgeOuter`` to provide the ``ToolWindow`` with a three-dimensional beveled look. A ``ToolWindow`` has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. ``EdgeOuter`` specifies the appearance of the outer border. It can be raised (``\ esRaised``), lowered (``\ esLowered``), or left off altogether (``\ esNone``). + + .. note:: The `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ property has an effect only on the sides specified by the `EdgeBorders <Vcl.ToolWin.TToolWindow.EdgeBorders.htm>`__ property. + + Use ``EdgeOuter`` with `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ to give the component a three-dimensional look. + ''' + def NCPaint(self, DC: HDC) -> None: + ''' + No have docs. + ''' + def WMNCCalcSize(self, Message: WMNCCalcSize) -> None: + ''' + No have docs. + ''' + def WMNCPaint(self, Message: WMNCPaint) -> None: + ''' + No have docs. + ''' + def CMBorderChanged(self, Message: Message) -> None: + ''' + No have docs. + ''' + def CMCtl3DChanged(self, Message: Message) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `ToolWindow <Vcl.ToolWin.TToolWindow.htm>`__ instance. + + ``Create()`` generates a `ToolWindow <Vcl.ToolWin.TToolWindow.htm>`__ and initializes its properties. + ''' + +class CustomFileOpenDialog(CustomFileDialog): + ''' + ================================= + Vcl.Dialogs.TCustomFileOpenDialog + ================================= + + Base class for Vista or later *Windows* operating system style file ``OpenDialog``\ s. + + This class extends `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__. File ``OpenDialog``\ s extend this base class for *Microsoft Windows Vista* or later *Windows* operating system style file ``OpenDialog``\ s. This is a wrapper class for the *Windows Vista* ``CLSID_FileOpenDialog`` and implements the ``IFileOpenDialog`` interface. + ''' + + __hash__: ClassVar[None] = ... + + def CreateFileDialog(self) -> IFileDialog: + ''' + Create an open ``FileDialog``. + + This method creates a *Windows* ``CLSID_FileOpenDialog`` using the *Windows* function ``CoCreateInstance``. + ''' + def GetResults(self) -> HResult: + ''' + Get user's choices in dialog. + + ``GetResults`` obtains the user's choices in a dialog. The ``fdoAllowMultiSelect`` option must be set in `Options <Vcl.Dialogs.TCustomFileDialog.Options.htm>`__ to allow multiple items to be selected. This returns ``S_OK`` if successful or an error value otherwise. + ''' + def SelectionChange(self) -> HResult: + ''' + Respond to a selection change. + + ``SelectionChange`` performs the appropriate processing for a change to the selection in the dialog. `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__. `DoOnSelectionChange <Vcl.Dialogs.TCustomFileDialog.DoOnSelectionChange.htm>`__ is called. The `ShellItem <Vcl.Dialogs.TCustomFileDialog.ShellItem.htm>`__ and `ShellItems <Vcl.Dialogs.TCustomFileDialog.ShellItems.htm>`__ properties are updated. + ''' + +class CommonCalendar(WinControl): + ''' + ============================ + Vcl.ComCtrls.TCommonCalendar + ============================ + + ``CommonCalendar`` is the base class for the controls `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ and MonthCalendar <Vcl.ComCtrls.TMonthCalendar.htm>`__. + + Use ``CommonCalendar`` as a base class when creating custom controls that represent dates in a calendar-like format. Do not create instances of ``CommonCalendar``. Instead, to put a calendar control on a form, use a ``CommonCalendar`` descendant such as `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ or MonthCalendar <Vcl.ComCtrls.TMonthCalendar.htm>`__. + + .. note:: The VCL includes another calendar control that does not descend from ``CommonCalendar``. This is ``Calendar``, which is offered as a sample. + ''' + + __hash__: ClassVar[None] = ... + CalExceptionClass: ECommonCalExceptClass + ''' + Specifies the calendar's exception class. + + Use ``CalExceptionClass`` in a derived class determine the class used for exceptions raised by the calendar control. Descendants of `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__ initialize this value in the constructor so that when `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__ encounters an unexpected condition, it can raise the appropriate type of exception. + ''' + CalColors: MonthCalColors + ''' + Contains the colors used for each part of the calendar. + + Use the ``CalColors`` property to ``get`` or ``set`` the calendar's background color, month background color, text color, title background color, title text color, and trailing text color. + ''' + CalendarHandle: HWND + ''' + Indicates the calendar control's window handle. + + Use the ``CalendarHandle`` property to get the calendar control's window handle. + + The ``CalendarHandle`` property is declared but not implemented in `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__. + + For descendants that use only one window, such as `MonthCalendar <Vcl.ComCtrls.TMonthCalendar.htm>`__, ``CalendarHandle`` is the same as the ``Handle`` property. However, some `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__ descendants such as `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ are implemented using more than one window. In these classes, ``CalendarHandle`` is the window handle for the portion of the control that displays date values. + ''' + Date: Date + ''' + Indicates the date that is marked on the calendar. + + Use ``Date`` to ``get`` or ``set`` the date that is marked on the calendar. The value of ``Date`` must lie within the range specified by the `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ and `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ properties. + + If `MultiSelect <Vcl.ComCtrls.TCommonCalendar.MultiSelect.htm>`__ is ``True``, the selected range of dates goes from ``Date`` to `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__. + + .. note:: You can also set the marked date with the `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ property. + ''' + DateTime: DateTime + ''' + Indicates the date that is marked on the calendar. + + Use ``DateTime`` to ``get`` or ``set`` the date (and, if relevant, time) that is marked on the calendar control. The value of ``DateTime`` must lie within the range specified by the `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ and `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ properties. + + If `MultiSelect <Vcl.ComCtrls.TCommonCalendar.MultiSelect.htm>`__ is ``True``, the selected range of dates goes from ``DateTime`` to `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__. + + .. note:: You can also set the marked date with the `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ property. + ''' + EndDate: Date + ''' + Indicates the last date that in the range of selected dates. + + Use ``EndDate`` to ``get`` or ``set`` the last selected date that is marked on the calendar. The first selected date is given by the `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ property. + + Before you can set the ``EndDate`` property, you must set the `MultiSelect <Vcl.ComCtrls.TCommonCalendar.MultiSelect.htm>`__ property to ``True``. + ''' + FirstDayOfWeek: CalDayOfWeek + ''' + Specifies the left-most day on the calendar. + + Use ``FirstDayOfWeek`` to ``get`` or ``set`` the left-most day on the calendar. To make the left-most day adjust for the locale, set ``FirstDayOfWeek`` to ``dowLocaleDefault``. + ''' + MaxDate: Date + ''' + Indicates the maximum date to which users can scroll the calendar. + + Use ``MaxDate`` to ``get`` or ``set`` the maximum date to which users can scroll the calendar. The values of the `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ and `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__ properties cannot exceed ``MaxDate``. + ''' + MaxSelectRange: int + ''' + Specifies the maximum number of days that can be selected. + + Use ``MaxSelectRange`` to limit the number of days that can be selected when `MultiSelect <Vcl.ComCtrls.TCommonCalendar.MultiSelect.htm>`__ is ``True``. To limit ranges so that they fall between specific date values, use the `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ and `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ properties instead. + ''' + MinDate: Date + ''' + Indicates the minimum date that can be selected. + + Use ``MinDate`` to ``get`` or ``set`` the minimum date that can be selected. + ''' + MonthDelta: int + ''' + Specifies how many months that the calendar scrolls. + + Use ``MonthDelta`` to ``get`` or ``set`` the number of months that the calendar scrolls when the back and forward buttons are clicked. + ''' + MultiSelect: bool + ''' + Specifies whether multiple dates can be selected on the calendar. + + Use ``MultiSelect`` to specify whether the calendar represents a single date or a range of dates. When ``MultiSelect`` is ``True``, the calendar represents the range of dates from `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ to `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__. When ``MultiSelect`` is ``False``, the calendar represents only the value of `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__. + ''' + ShowToday: bool + ''' + Specifies whether today's date is shown below the calendar. + + Use ``ShowToday`` to specify whether today's date (according to the system clock) is shown below the calendar. + ''' + ShowTodayCircle: bool + ''' + Specifies whether today's date is circled on the calendar. + + Use ``ShowTodayCircle`` to specify whether today's date (according to the system clock) is circled on the calendar. + ''' + WeekNumbers: bool + ''' + Specifies whether week numbers are shown to the left of the calendar. + + Use ``WeekNumbers`` to indicate whether week numbers are shown to the left of the calendar. The week numbers correspond to the number of the week in the current year. + ''' + def CheckEmptyDate(self) -> None: + ''' + Clears the ``CheckBox`` associated with the calendar. + + ``CheckEmptyDate()`` is called automatically when `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ is assigned a value that represents a time and not a date value (or `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ is assigned a value of 0). As implemented in `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__, ``CheckEmptyDate`` does nothing. + + ``DateTimePicker`` overrides ``CheckEmptyDate`` to clear the ``CheckBox`` associated with the calendar, or raise an `EDateTimeError <Vcl.ComCtrls.EDateTimeError.htm>`__ if the `ShowCheckbox <Vcl.ComCtrls.TDateTimePicker.ShowCheckbox.htm>`__ property is ``False``. This allows `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ to represent time values that do not include a date portion. (When a ``DateTime`` value represents a time and not a date, the date portion is 0). + ''' + def CheckValidDate(self, Value: Date) -> None: + ''' + Confirms that a date falls between `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__. + + Calendar controls call ``CheckValidDate`` to confirm that a date falls between `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__. + + ``Value`` is the date to check. + + If ``Value`` is outside `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__, an exception of the type specified in the `CalExceptionClass <Vcl.ComCtrls.TCommonCalendar.CalExceptionClass.htm>`__ property is raised. + ''' + def CreateWnd(self) -> None: + ''' + Creates the windows control for the calendar. + + ``CreateWnd()`` is called automatically when the windowed control is first created or when the window must be destroyed and recreated to reflect property changes. Override ``CreateWnd()`` to pass additional initialization messages to the window when it is first created. + + ``CreateWnd()`` calls the ``WinControl`` ``CreateWnd()`` method to generate the window, and then sends messages to initialize the control so that it reflects the current property settings. + ''' + def GetCalendarHandle(self) -> HWND: + ''' + Returns the calendar control's window handle. + + ``GetCalendarHandle`` is the protected read implementation of the `CalendarHandle <Vcl.ComCtrls.TCommonCalendar.CalendarHandle.htm>`__ property. For `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__, this is an abstract method. It must be implemented in descendant classes. + ''' + def GetCalStyles(self) -> DWORD: + ''' + Returns the style flags that are used when creating the calendar's window. + + ``GetCalStyles`` is used internally to create the style flags that reflect the current property settings of the calendar control. + ''' + def MsgSetCalColors(self, ColorIndex: int, ColorValue: Color) -> bool: + ''' + Sets the calendar's colors. + + ``MsgSetCalColors`` implements the `CalColors <Vcl.ComCtrls.TCommonCalendar.CalColors.htm>`__ property by sending a message to the calendar window handle. ``MsgSetCalColors`` is an abstract method, and must be overridden in descendant objects to send the appropriate message. + + The Color``Index`` parameter indicates which of the MonthCalColors <Vcl.ComCtrls.TMonthCalColors.htm>`__ properties is being set. It is one of the following values: + + ========= ================================ + **Value** **Properrty** + ========= ================================ + ``'0'`` ``BackColor`` + ``'1'`` ``TextColor`` + ``'2'`` ``TitleBackColor`` + ``'3'`` ``TitleTextColor`` + ``'4'`` ``MonthBackColor`` + ``'5'`` ``TrailingTextColor`` + ========= ================================ + + The Color``Value`` parameter is the value that should be set. + + ``MsgSetCalColors()`` returns ``True`` if the color is set by the method. + ''' + def MsgSetDateTime(self, Value: SystemTime) -> bool: + ''' + Sets the calendar's date/time. + + ``MsgSetDateTime`` implements the `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ property by sending a message to the calendar window handle. ``MsgSetDateTime`` is an abstract method, and must be overridden in descendant objects to send the appropriate message. + + The ``Value`` parameter indicates the value of `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ as a ``SystemTime`` value. This can be obtained from the `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ property value by calling ``DateTimeToSystemTime``. + + ``MsgSetDateTime()`` returns ``True`` if the date/time ``Value`` is set by the method. + ''' + + @overload + def MsgSetRange(self, Flags: int, SysTime: SystemTimeRangeArray) -> bool: + ''' + Implements the `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ properties. + + ``MsgSetRange`` implements the `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ properties by sending a message to the calendar window handle. ``MsgSetRange`` is an abstract method, and must be overridden in descendant objects to send the appropriate message. + + The ``Flags`` parameter indicates what type of information is included in the ``SysTime`` array. It includes the ``GDTR_MIN`` flag if a minimum date is supplied and ``GDTR_MAX`` if a maximum date is supplied. + + The ``SysTime`` parameter is a two-element array containing the minimum date as the first element and the maximum date as the second element. These values can be obtained from the `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ properties by calling ``DateTimeToSystemTime``. + + ``MsgSetRange()`` returns ``True`` if the range is set by the method. + ''' + + @overload + def MsgSetRange(self, Flags: int, SysTime: PSystemTime, Unused: int) -> bool: ... + + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__. + + Call ``Create()`` to construct and initialize an instance of `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__. The ``AOwner`` parameter assigns a value to the ``Owner()`` property, which is responsible for freeing the calendar control. + + ``Create()`` performs the following tasks: + + Calls the inherited constructor. + + Sets `ShowToday <Vcl.ComCtrls.TCommonCalendar.ShowToday.htm>`__ and `ShowTodayCircle <Vcl.ComCtrls.TCommonCalendar.ShowTodayCircle.htm>`__ to ``True``. + + Sets ``ControlStyle`` to ``[csOpaque, csClickEvents, csDoubleClicks]``. + + Sets `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ to ``Now``. + + Sets `FirstDayOfWeek <Vcl.ComCtrls.TCommonCalendar.FirstDayOfWeek.htm>`__ to ``dowLocaleDefault``. + + Sets `MaxSelectRange <Vcl.ComCtrls.TCommonCalendar.MaxSelectRange.htm>`__ to 31. + + Sets `MonthDelta <Vcl.ComCtrls.TCommonCalendar.MonthDelta.htm>`__ to 1. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__ instance. + + Do not call the `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__ destructor directly in an application. Instead, call ``Free()``, which checks that the calendar reference is not ``nil`` before calling ``Destroy()``. + + Applications do not need to explicitly destroy calendar controls unless they were created without assigning an ``Owner()``. + ''' + def BoldDays(self, Days: list[int], MonthBoldInfo: int) -> None: + ''' + Encodes a set of dates for use in the `OnGetMonthInfo <Vcl.ComCtrls.TCommonCalendar.OnGetMonthInfo.htm>`__ event handler. + + Use ``BoldDays`` to encode the days of the current month that should appear in bold. The value returned by ``BoldDays`` can be assigned to the ``MonthBoldInfo`` parameter of an `OnGetMonthInfo <Vcl.ComCtrls.TCommonCalendar.OnGetMonthInfo.htm>`__ event handler. + + ``Days`` is an array of unsigned integers corresponding to the days that should be bold. + + ``MonthBoldInfo()`` returns the encoding of the values that were passed in the ``Days`` array. This value can be assigned to the ``MonthBoldInfo`` parameter of the `OnGetMonthInfo <Vcl.ComCtrls.TCommonCalendar.OnGetMonthInfo.htm>`__ event handler. (or the ``MonthBoldInfo`` parameter can be passed in for this argument). You shouldn't work with the ``MonthBoldInfo`` variable directly. + + For example, to encode the first and eighth days of a month, call + + .. code-block:: python + + BoldDays([1,8], MonthBoldInfo); + + .. code-block:: python + + unsigned bolddays[2] = {1,2}; + BoldDays(bolddays, MonthBoldInfo); + ''' + def OnGetMonthInfo(self, Sender: Object, Month: int, MonthBoldInfo: int) -> None: + ''' + # OnGetMonthInfo: OnGetMonthInfoEvent + Called whenever a new month is displayed in the calendar. + + Use the ``OnGetMonthInfo`` event to initialize the display properties of a month. In particular, ``OnGetMonthInfo`` allows applications to bold individual days in the calendar (such as holidays). To specify that specific dates are to be bolded, use the `BoldDays <Vcl.ComCtrls.TCommonCalendar.BoldDays.htm>`__ method to obtain a value that can be returned as the ``MonthBoldInfo`` parameter. For example, to bold the first and eighth days of every month that is displayed, call + + .. code-block:: python + + BoldDays([1,8], MonthBoldInfo); + + .. code-block:: python + + unsigned bolddays[2] = {1,2}; + BoldDays(bolddays, MonthBoldInfo); + + from the ``OnGetMonthInfo`` event handler. + + ``OnGetMonthInfo`` is an event handler of type `Vcl.ComCtrls.TOnGetMonthInfoEvent <Vcl.ComCtrls.TOnGetMonthInfoEvent.htm>`__. + ''' + def OnGetMonthBoldInfo(self, Sender: Object, Month: int, Year: int, MonthBoldInfo: int) -> None: + ''' + # OnGetMonthBoldInfo: OnGetMonthBoldInfoEvent + Gets or sets the ``OnGetMonthBoldInfo`` event. + + The ``OnGetMonthBoldInfo`` property gets or sets the ``OnGetMonthBoldInfo`` event of the ``CommonCalendar`` object. + + ``OnGetMonthBoldInfo`` is an event handler of type `Vcl.ComCtrls.TOnGetMonthBoldInfoEvent <Vcl.ComCtrls.TOnGetMonthBoldInfoEvent.htm>`__. + ''' + +class Animate(WinControl): + ''' + ===================== + Vcl.ComCtrls.TAnimate + ===================== + + ``Animate`` is an animation control. + + A ``Animate`` control displays an animation clip, consisting of a series of image frames. The control can load an animation from a file, a resource, or a set of standard animations. To specify an animation, set the ``FileName``, ``CommonAVI``, ``ResName``, or ``ResID`` properties. At design time, you can browse through the frames of the animation using the context menu. + ''' + + __hash__: ClassVar[None] = ... + FrameCount: int + ''' + Indicates the total number of frames in the AVI clip. + + Read ``FrameCount`` to determine the number of frames that can be displayed by the animation control. The animation control can play all the frames in the AVI clip, or run through a subset of those frames. + ''' + FrameHeight: int + ''' + Indicates the height, in pixels, of each image in the animation. + + Read ``FrameHeight`` to determine the height required to fully display the frames of the animation. If ``AutoSize`` is ``True``, the animation control automatically sizes itself to the value of ``FrameHeight``. + ''' + FrameWidth: int + ''' + Indicates the width, in pixels, of each image in the animation. + + Read ``FrameWidth`` to determine the width required to fully display the frames of the animation. If ``AutoSize`` is ``True``, the animation control automatically resizes itself to the value of ``FrameWidth``. + ''' + Open: bool + ''' + Specifies the first frame displayed when the animation control is activated. + + Set ``StartFrame`` to specify the first frame shown when the ``Active`` property is set to ``True``. When ``StartFrame`` is 1, the clip is played from the very beginning, when ``StartFrame`` is 2, the clip begins with the second frame, and so on. If ``Repetitions`` is not 1, after the sequence of frames is played, it starts over at the frame specified by ``StartFrame`` (which may not be the first frame in the clip). + + When the animation control is ``Open`` but not ``Active``, it displays the frame specified by ``StartFrame``. + + .. note:: The ``Play()`` method overrides ``StartFrame`` with the value passed as the ``FromFrame`` parameter. + ''' + ResHandle: Handle + ''' + Specifies the *Windows* handle for the module that contains the AVI clip as a resource. + + Set ``ResHandle`` at runtime to the instance handle or module handle of the module that includes the animation resource. After setting ``ResHandle``, set the `ResId <Vcl.ComCtrls.TAnimate.ResId.htm>`__ or `ResName <Vcl.ComCtrls.TAnimate.ResName.htm>`__ property to specify which resource in the indicated module is the AVI animation that should be displayed by the animation control. + + If a ``Value`` is not specified for ``ResHandle``, the animate control uses the instance of the application's main executable. + + .. note:: Setting ``ResHandle`` automatically sets the `CommonAVI <Vcl.ComCtrls.TAnimate.CommonAVI.htm>`__ property to ``aviNone`` and the `FileName <Vcl.ComCtrls.TAnimate.FileName.htm>`__ property to an empty string. + ''' + ResId: int + ''' + Specifies the resource ``ID`` of the animation. + + Set ``ResId`` to identify an AVI resource that contains the animation. Use `ResHandle <Vcl.ComCtrls.TAnimate.ResHandle.htm>`__ to indicate the module that contains the resource identified by ``ResId``. + + If the resource file identifies the animation by name rather than number, use the `ResName <Vcl.ComCtrls.TAnimate.ResName.htm>`__ property instead. + + .. note:: Setting ``ResId`` automatically sets the `CommonAVI <Vcl.ComCtrls.TAnimate.CommonAVI.htm>`__ property to ``aviNone``, the `FileName <Vcl.ComCtrls.TAnimate.FileName.htm>`__ property to an empty string, and the `ResName <Vcl.ComCtrls.TAnimate.ResName.htm>`__ property to an empty string. + ''' + ResName: str + ''' + Specifies the resource name of the animation. + + Set ``ResName`` to identify an *AVI* resource that contains the animation. Use `ResHandle <Vcl.ComCtrls.TAnimate.ResHandle.htm>`__ to indicate the module that contains the resource identified by ``ResName``. + + If the resource file identifies the animation by number rather than number, use the `ResId <Vcl.ComCtrls.TAnimate.ResId.htm>`__ property instead. + + .. note:: Setting ``ResName`` automatically sets the `CommonAVI <Vcl.ComCtrls.TAnimate.CommonAVI.htm>`__ property to ``aviNone``, the `FileName <Vcl.ComCtrls.TAnimate.FileName.htm>`__ property to an empty string, and the `ResId <Vcl.ComCtrls.TAnimate.ResId.htm>`__ property to 0. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Active: bool + ''' + Indicates whether the animation control is playing the Animation. + + Set ``Active`` to ``True`` to cycle through the frames specified by the StartFrame and StopFrame properties by the number of iterations specified in the ``Repetitions`` property. Set ``Active`` to ``False`` to interrupt the animation control when it is playing the animation file. + + The animation control must be *Open* before it can be ``Active``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + Center: bool + ''' + Determines whether the frames of the AVI clip are centered in the animation control. + + Use ``Center`` to position the frames of the clip in the animation control when ``FrameHeight`` is not the same as ``ClientHeight`` or ``FrameWidth`` is not the same as ``ClientWidth``. When ``Center`` is ``True``, the frames are centered both horizontally and vertically in the client area of the control. When ``Center`` is ``False``, the top left corner of the frames is positioned at the top left corner of the client area. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + CommonAVI: CommonAVI + ''' + Indicates whether the animation control displays one of the common *Windows AVI* clips provided in ``Shell32.dll``. + + Set ``CommonAVI`` to display one of the common *Windows AVI* clips in the animation control. The common *Windows AVI* clips appear in the Windows user interface when the user attempts common file actions. ``CommonAVI`` is ``aviNone`` when the animation control displays an AVI clip that was specified in some other manner. + + Setting ``CommonAVI`` automatically sets the `FileName <Vcl.ComCtrls.TAnimate.FileName.htm>`__ property to an empty string, `ResHandle <Vcl.ComCtrls.TAnimate.ResHandle.htm>`__ and `ResId <Vcl.ComCtrls.TAnimate.ResId.htm>`__ to 0, and `ResName <Vcl.ComCtrls.TAnimate.ResName.htm>`__ to an empty string. + + .. note:: ``CommonAVI`` cannot be used when running under *NT 3.51*. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + FileName: str + ''' + Specifies file containing animation. + + Setting ``FileName`` causes the control to load the animation from the specified file. If the control succeeds in loading the animation from the file, it sets the ``Open`` property to ``True``. + + ``FileName`` must refer to a *Windows AVI* file. The sound track, if present, is ignored. + + .. note:: Setting ``FileName`` automatically sets the ``CommonAVI`` property to ``aviNone``, ``ResHandle`` and ``ResID`` to 0, and ``ResName`` to an empty string. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + Repetitions: int + ''' + Specifies the number of times to repeat the sequence of frames. + + Set ``Repetitions`` to specify the number of times the sequence of frames in the animation is repeated when the ``Active`` property is set to ``True``. After the sequence is repeated by the specified number of times, the value of Active becomes ``False`` again. To show the sequence a single time, set ``Repetitions`` to 1. Set ``Repetitions`` to 0 to indicate that the sequence of frames should repeat indefinitely. When ``Repetitions`` is 0, use the ``Active`` property or Stop method to interrupt the animation. + + The ``Play()`` method overrides ``Repetitions`` with the value passed as the ``Count`` parameter. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + StartFrame: int + ''' + Specifies the first frame displayed when the animation control is activated. + + Set ``StartFrame`` to specify the first frame shown when the ``Active`` property is set to ``True``. When ``StartFrame`` is 1, the clip is played from the very beginning, when ``StartFrame`` is 2, the clip begins with the second frame, and so on. If ``Repetitions`` is not 1, after the sequence of frames is played, it starts over at the frame specified by ``StartFrame`` (which may not be the first frame in the clip). + + When the animation control is ``Open`` but not ``Active``, it displays the frame specified by ``StartFrame``. + + .. note:: The ``Play()`` method overrides ``StartFrame`` with the value passed as the ``FromFrame`` parameter. + ''' + StopFrame: int + ''' + Specifies the last frame displayed when the animation control is activated. + + Set ``StopFrame`` to specify the last frame shown every time the animation control displays its sequence of frames. When ``StopFrame`` is 0, the clip is played to the very end. Otherwise, ``StopFrame`` is the number of the frame in the sequence. When the ``Active`` property is set to ``True``, the animation control displays the sequence of frames from ``StartFrame`` to ``StopFrame``, repeating this sequence by the number of iterations specified by the ``Repetitions`` property. + + .. note:: The ``Play()`` method overrides ``StopFrame`` with the value passed as the ``ToFrame`` parameter. + ''' + Timers: bool + ''' + Specifies whether the frames are displayed using a timer. + + Set ``Timers`` to specify whether the frames in the animation should be changed in response to timer messages, or whether the sequence progresses asynchronously in a separate execution thread. When ``Timers`` is ``True``, the frames progress in response to timer messages. This is useful for synchronizing the animation sequence with other actions such as playing a sound track. When ``Timers`` is ``False``, the animation is played in a separate thread. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether the background color of the frame matches the ``Color`` property. + + Set ``Transparent`` to ``True`` to replace the background color stored in the animation with the value of the ``Color`` property, or the parent control's color if the value of `ParentColor <Vcl.ComCtrls.TCoolBand.ParentColor.htm>`__ is ``True``. Set ``Transparent`` to ``False`` to display the background color stored in the animation. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Indicates how the control can be resized. + + ``CanAutoSize()`` is called automatically when the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True`` and an attempt is made to resize the control. It allows the animation control to adjust to the size of animation frames. + + When ``CanAutoSize()`` is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the control. If the `Open <Vcl.ComCtrls.TAnimate.Open.htm>`__ property is ``True``, ``CanAutoSize()`` adjusts these values so that they reflect the dimensions of the AVI video images and returns ``True``. If the animation control is not `Open <Vcl.ComCtrls.TAnimate.Open.htm>`__, ``CanAutoSize()`` returns ``False``. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def DestroyWnd(self) -> None: + ''' + Destroys the control's window. + + `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ is called when the control needs to replace its window. For example, changing properties that are implemented by window parameter settings require the control to be destroyed and then recreated using the `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method. + + Before the window is destroyed, `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ saves a copy of the control's text in memory, frees any device contexts, and finally calls `DestroyWindowHandle <Vcl.Controls.TWinControl.DestroyWindowHandle.htm>`__. When the window is recreated, the stored copy of the control's text is assigned to the new window. + ''' + def DoOpen(self) -> None: + ''' + No have docs. + ''' + def DoClose(self) -> None: + ''' + No have docs. + ''' + def DoStart(self) -> None: + ''' + No have docs. + ''' + def DoStop(self) -> None: + ''' + No have docs. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a stream. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an animation control. + + Call ``Create()`` to instantiate an animation control at runtime. Animation controls placed on forms at design time are created automatically. + + ``AOwner`` is the component that is responsible for freeing the `Animate <Vcl.ComCtrls.TAnimate.htm>`__ instance. It becomes the value of the ``Owner()`` property. + ''' + def Play(self, FromFrame, ToFrame: int, Count: int) -> None: + ''' + Displays a sequence of frames from the *AVI* clip. + + Call ``Play()`` to display the specified sequence of frames, repeating the sequence ``Count`` times. ``FromFrame`` is the first frame in the sequence, where 1 specifies the first frame in the clip, 2 specifies the second frame, and so on. ``ToFrame`` is the last frame in the sequence. The value of ``ToFrame`` should be greater than or equal to ``FromFrame`` and less than or equal to the value of the ``FrameCount`` property. ``Count`` specifies the number of times the sequence should be repeated. If ``Count`` is 0, the sequence is repeated until the Stop method is called. + + If the animation control is not ``Open`` when ``Play()`` is called, ``Play()`` sets ``Open`` to ``True``. + + .. note:: Calling ``Play()`` is the same as setting ``StartFrame`` to ``FromFrame``, ``StopFrame`` to ``ToFrame``, ``Repetitions`` to ``Count``, and then setting Active to ``True``. + ''' + def Reset(self) -> None: + ''' + Clears the values of ``StartFrame`` and ``StopFrame``, and displays the first frame in the animation. + + Call ``Reset()`` to restore the animation control to a default state. ``Reset()`` closes and reopens the animation control, generating ``OnClose`` and ``OnOpen`` events. The animation control is left open but not active. + ''' + def Seek(self, Frame: int) -> None: + ''' + Displays a specified frame in the sequence. + + Call ``Seek()`` to move to a particular frame in the animation. The ``Frame`` parameter specifies which frame, where 1 is the first frame in the sequence, 2 is the second frame, and so on. ``Frame`` must be a value less than or equal to ``FrameCount``. + + If the animation control is not open when ``Seek()`` is called, ``Seek()`` sets ``Open`` to ``True``. + ''' + def Stop(self) -> None: + ''' + Interrupts the animation control when it is playing. + + Call ``Stop()`` to halt the sequence of images in an active animation control. ``Stop()`` does the same thing as setting the ``Active`` property to ``False``. + ''' + def OnClose(self, Sender: Object) -> None: + ''' + # OnClose: NotifyEvent + Occurs immediately after the animation control is closed. + + Write an ``OnClose`` event handler to take specific action when the ``Open`` property is set to ``False``. For example, if the animation control is used to cycle through a series of *AVI* clips, the clip could be changed in an ``OnClose`` event handler. To respond when the clip stops playing, but the animation control remains open, use the ``OnStop`` event. + + ``OnClose`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnOpen(self, Sender: Object) -> None: + ''' + # OnOpen: NotifyEvent + Occurs immediately after the animation control is opened. + + Write an ``OnOpen`` event handler to take specific action when the ``Open`` property changes from ``False`` to ``True``. This is a good opportunity to set the Repetitions, StartFrame, and ``StopFrame`` properties before the *AVI* clip is activated, or to seek to a particular frame. + + ``OnOpen`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStart(self, Sender: Object) -> None: + ''' + # OnStart: NotifyEvent + Occurs immediately after the animation control starts playing. + + Write an ``OnStart`` event handler to take specific action when the animation is played. Setting the ``Active`` property to ``True`` or calling the ``Play()`` method triggers an ``OnStart`` event. ``OnStart`` is useful for launching other actions that should be synchronized with the playing of the animation sequence. + + ``OnStart`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStop(self, Sender: Object) -> None: + ''' + # OnStop: NotifyEvent + Occurs when the animation control finishes playing. + + Write an ``OnStop`` event handler to take specific action when the animation finishes playing all its repetitions. For example, use an ``OnStop`` event handler to shut down any simultaneous actions that were started in an ``OnStart`` event handler. + + ``OnStop`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + +class InterfacedPersistent(Persistent, IInterface): + ''' + ==================================== + System.Classes.TInterfacedPersistent + ==================================== + + ``InterfacedPersistent`` is an ancestor for persistent objects that implement interfaces. + + ``InterfacedPersistent``, like all persistent objects, supports the ability to read and write its properties to and from a stream. In addition, it supplies a default implementation of the ``IInterface()`` methods (`_AddRef <System.IInterface._AddRef.htm>`__, `_Release <System.IInterface._Release.htm>`__, and `QueryInterface <System.IInterface.QueryInterface.htm>`__). This default implementation simply passes these calls on to the interface of the persistent object's Owner, if any. + + Do not create instances of ``InterfacedPersistent``. Use ``InterfacedPersistent`` as a base class when declaring objects that are not components, but that need to be saved to a stream or have their properties assigned to other objects, and that support interfaces. + ''' + + __hash__: ClassVar[None] = ... + + def _AddRef(self) -> int: + ''' + Increments the reference count for the interfaced object's interface. + + ``_AddRef()`` implements the ``IInterface()`` method, `_AddRef <System.IInterface._AddRef.htm>`__, which increments the reference count of an interface and returns the current reference count. + + If the interfaced persistent object has an ``Owner()`` and that owner supports an interface, then ``_AddRef()`` simply calls the `_AddRef <System.IInterface._AddRef.htm>`__ method of the ``Owner()``. Otherwise, it simply returns -1. + ''' + def _Release(self) -> int: + ''' + Decrements the reference count for the interfaced object's interface. + + ``_Release()`` implements the ``IInterface()`` method, `_Release <System.IInterface._Release.htm>`__, which decrements the reference count of an interface and returns the current reference count. For some interfaces, when this causes the reference count to drop to zero, the object frees itself. + + If the interfaced persistent object has an ``Owner()`` and that owner supports an interface, then ``_Release()`` simply calls the `_Release <System.IInterface._Release.htm>`__ method of the ``Owner()``. Otherwise, it simply returns -1. + ''' + def QueryInterface(self, IID: GUID, Obj) -> HResult: + ''' + Returns a reference to a specified interface if the object supports that interface. + + ``QueryInterface()`` implements the ``IInterface()`` method, ``QueryInterface()``. This method checks whether the interfaced persistent object supports the interface identified by IID. If so, it returns a reference as the ``Obj`` parameter, automatically incrementing the reference count for the interface. If the object does not support the specified interface, it returns a non-zero value. + ''' + def AfterConstruction(self) -> None: + ''' + Obtains a reference to the ``Owner()``\ s. interface. + + ``AfterConstruction()`` is called automatically after the object's last constructor executes. Do not call it explicitly in your applications. + + As implemented in `InterfacedPersistent <System.Classes.TInterfacedPersistent.htm>`__, ``AfterConstruction()`` calls the ``GetOwner()`` method to determine whether this object has an ``Owner()``. If so, it obtains a reference to the ``Owner()``\ s. interface, to which it can delegate ``IInterface`` calls. + ''' + +class IStreamPersist: + ''' + ============================= + System.Classes.IStreamPersist + ============================= + + ``IStreamPersist`` is the interface for responding to requests to load/save an object from/to a persistent stream. + + ``IStreamPersist`` introduces two methods, `SaveToStream <System.Classes.IStreamPersist.SaveToStream.htm>`__ and `LoadFromStream <System.Classes.IStreamPersist.LoadFromStream.htm>`__, which allows the designer to respond a request to store or retrieve the implementing object to a persistent stream. + + You use `SaveToStream <System.Classes.IStreamPersist.SaveToStream.htm>`__ to serialise an object, and save this data in a stream independent of the running application. This serialised version of the object literally persists and is available for loading back using `LoadFromStream <System.Classes.IStreamPersist.LoadFromStream.htm>`__. It is then de-serialised, and reconstituted as an object. + + For example, the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class itself implements the ``IStreamPersist``. + + IStreamPersist = interface + ['{B8CD12A3-267A-11D4-83DA-00C04F60B2DD}'] + procedure LoadFromStream(Stream: Stream); + procedure SaveToStream(Stream: Stream); + end; + ''' + + __hash__: ClassVar[None] = ... + + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Loads an object from a persistent stream. + + Use ``LoadFromStream()`` to reconstitute a serialised version of an object saved to a persistent stream by `SaveToStream <System.Classes.IStreamPersist.SaveToStream.htm>`__. + ''' + def SaveToStream(self, Stream: Stream) -> None: + ''' + Saves the implementing class instance to a persistent stream. + + Use ``SaveToStream()`` to serialise an object, and save this data in a stream independent of the running application. This serialised version of the object literally persists and is available for loading back using `LoadFromStream <System.Classes.IStreamPersist.LoadFromStream.htm>`__ at any time. It is then de-serialised, and reconstituted as an object. + ''' + +class CustomCanvas(Persistent): + ''' + ========================== + Vcl.Graphics.TCustomCanvas + ========================== + + Defines an abstract base class for other ``Canvas`` objects. + + Use ``CustomCanvas`` as a base class for other ``Canvas`` objects. ``CustomCanvas`` introduces a number of abstract methods that must be implemented in descendant classes to provide full support for drawing on a graphical surface. + + The most important functionalities exposed by ``CustomCanvas`` are: + + - Drawing and filling a variety of shapes and lines. + - Writing text + - Rendering graphic images. + - Enabling a response to changes in the current image. + + ``CustomCanvas`` has two descendants, both abstracting drawing operations using a certain operating system-defined API. `Canvas <Vcl.Graphics.TCanvas.htm>`__ uses the Windows GDI backend for drawing, while `Direct2DCanvas <Vcl.Direct2D.TDirect2DCanvas.htm>`__ uses the DirectX DirectDraw API for drawing. + ''' + + __hash__: ClassVar[None] = ... + ClipRect: Rect + ''' + Read-only property that specifies the boundaries of the clipping rectangle. + + Use ``ClipRect`` to determine where the ``Canvas`` needs painting. ``ClipRect`` limits the drawing region of the ``Canvas`` so that any drawing that occurs at coordinates outside the ``ClipRect`` is clipped and does not appear in the image. + + When handling a form's OnPaint event, the ``Canvas``\ s. ``ClipRect`` property is set to the rectangle that needs to be painted. Portions of the image that do not overlap the ``ClipRect`` do not need to be drawn. Thus, OnPaint routines can use the value of ``ClipRect`` to optimize painting, speeding the overall performance of the application. + + .. note:: ``ClipRect`` can be modified using the ``SelectClipRgn`` *Win32 API*. + ''' + LockCount: int + ''' + Indicates the number of times the ``Canvas`` has been locked to prevent interference caused by other threads. + + Read ``LockCount`` to determine whether the ``Canvas`` is locked. Whenever the `Lock <Vcl.Graphics.TCustomCanvas.Lock.htm>`__ method is called to block other threads from interfering with the ``Canvas``, ``LockCount`` increases. Whenever the `Unlock <Vcl.Graphics.TCustomCanvas.Unlock.htm>`__ method is called at the end of a critical section, ``LockCount`` decreases. When ``LockCount`` is 0, other threads may draw on the ``Canvas``. + ''' + CanvasOrientation: CanvasOrientation + ''' + Determines the orientation of the ``Canvas`` as left-to-right or right-to-left. + + ``CanvasOrientation`` is a read-only property used for bidirectional support. It indicates whether the orientation of the ``Canvas`` is left-to-right (``coLeftToRight``) or right-to-left ( ``coRightToLeft``). The default is ``coLeftToRight``, meaning that the 0,0 coordinate is at the top-left corner of the ``Canvas``. In *Middle Eastern* locales, the orientation may be ``coRightToLeft``, meaning that the 0,0 coordinate is at the top-right corner of the ``Canvas``. This property is important for grid controls because it changes the grid's ``Canvas`` orientation during drawing. + ''' + PenPos: Point + ''' + Specifies the current drawing position of the ``Pen``. + + Read ``PenPos`` to learn the current drawing position of the ``Pen``. This is the starting point of a line drawn by the `LineTo <Vcl.Graphics.TCustomCanvas.LineTo.htm>`__ method. Setting the ``PenPos`` property is equivalent to calling the `MoveTo <Vcl.Graphics.TCustomCanvas.MoveTo.htm>`__ method. + ''' + Pixels: list[int, int] + ''' + Specifies the color of the pixels within the current ``ClipRect``. + + Read ``Pixels`` to learn the color on the drawing surface at a specific pixel position within the current clipping region. If the position is outside the clipping rectangle, reading the value of ``Pixels()`` returns -1. + + Write ``Pixels`` to change the color of individual pixels on the drawing surface. Use ``Pixels`` for detailed effects on an image. ``Pixels`` may also be used to determine the color that should be used for the `FillRect <Vcl.Graphics.TCustomCanvas.FillRect.htm>`__ method. + + Not every device context supports the ``Pixels`` property. Reading the ``Pixels`` property for such a device context returns a value of -1. Setting the ``Pixels`` property for such a device context does nothing. + ''' + TextFlags: int + ''' + Specifies how text is written to the ``Canvas``. + + Use ``TextFlags`` to influence the way text is drawn when calling the `TextOut <Vcl.Graphics.TCustomCanvas.TextOut.htm>`__ or `TextRect <Vcl.Graphics.TCustomCanvas.TextRect.htm>`__ method. ``TextFlags`` is an integer made by combining any of the following constants: + + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Constant** | **Meaning** | + +=========================+=========================================================================================================================================================================================================================================================================================+ + | ``ETO_CLIPPED`` | Only the text that fits within a specified rectangle is displayed. This flag is automatically added when calling the `TextRect <Vcl.Graphics.TCustomCanvas.TextRect.htm>`__ method. When writing text using the `TextOut <Vcl.Graphics.TCustomCanvas.TextOut.htm>`__ method, this | + | | flag has no effect because the drawing boundaries are determined by the `TextExtent <Vcl.Graphics.TCustomCanvas.TextExtent.htm>`__ property. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_OPAQUE`` | The text is drawn with an opaque background color. Using this flag improves performance but does not allow images behind the text rectangle to display. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_RTLREADING`` | Text strings are displayed from ``Right`` to ``Left``. This is available only with Mideast versions of *Windows*, where text is written from ``Right`` to ``Left``. Often this is used in combination with a `CanvasOrientation <Vcl.Graphics.TCustomCanvas.CanvasOrientation.htm>`__ | + | | property of ``coRightToLeft``. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_GLYPH_INDEX`` | The text is an array of character placement codes that are parsed directly by the *Windows GDI*. Glyph indexing only applies to ``True``Type fonts, but the flag can be used with other fonts to indicate that the GDI should process the text string directly without language | + | | processing. See the *Windows GDI* documentation for more details. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_IGNORELANGUAGE`` | This is an undocumented Microsoft flag. Check the updates of the Microsoft documentation, where the information will be provided. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_NUMERICSLOCAL`` | All numbers in the text are displayed using digits specific to the current locale. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_NUMERICSLATIN`` | All numbers in the text are displayed using European digits. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``ETO_PDY`` | This flag is only relevant when using the *Windows API* ``ExtTextOut``. When this is set, the array pointed to by ``lpDx`` contains pairs of values. The first value of each pair is, as usual, the distance between origins of adjacent character cells, | + | | but the second ``Value`` is the displacement along the vertical direction of the font. | + +-------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def GetCanvasOrientation(self) -> CanvasOrientation: + ''' + Represents the getter method for the `CanvasOrientation <Vcl.Graphics.TCustomCanvas.CanvasOrientation.htm>`__ property. + + ``GetCanvasOrientation()`` is an abstract method that must be implemented in descending classes. ``GetCanvasOrientation()`` is called each time the value of the `CanvasOrientation <Vcl.Graphics.TCustomCanvas.CanvasOrientation.htm>`__ is read. + ''' + def GetClipRect(self) -> Rect: + ''' + Represents the getter method for the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property. + + ``GetClipRect()`` is an abstract method that must be implemented in descending classes. ``GetClipRect()`` is called each time the value of the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ is read. + ''' + def GetPenPos(self) -> Point: + ''' + Represents the getter method for the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property. + + ``GetPenPos()`` is an abstract method that must be implemented in descending classes. ``GetPenPos()`` is called each time the value of the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property is read. + ''' + + @overload + def GetPixel(self, X: int, Y: int) -> Color: + ''' + Represents the getter method for the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property. + + ``GetPixel()`` is an abstract method that must be implemented in descending classes. ``GetPixel()`` is called each time the color of a pixel in the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property is read. + ''' + + @overload + def GetPixel(self, x: int, y: int, color: int) -> Color: + ''' + PythonType.AddMethod('GetPixel', @TPyDelphiCanvas.GetPixel, + 'TCanvas.GetPixel(x, y) -> Color'#10 + + 'This is the same as TCanvas.Pixels[x, y].'#13+ + 'Returns the color of the pixels within the current ClipRect.'); + ''' + + @overload + def SetPixel(self, x: int, y: int, color: int) -> None: + ''' + PythonType.AddMethod('SetPixel', @TPyDelphiCanvas.SetPixel, + 'TCanvas.SetPixel(x, y, color)'#10 + + 'This is the same as TCanvas.Pixels[x, y] := color'#13+ + 'Specifies the color of the pixels within the current ClipRect.'); + ''' + + @overload + def SetPixel(self, X: int, Y: int, Value: Color) -> None: + ''' + Represents the setter method for the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property. + + ``SetPixel()`` is an abstract method that must be implemented in descending classes. ``SetPixel()`` is called each time the color of a pixel in the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property is changed. + ''' + def SetPenPos(self, Value: Point) -> None: + ''' + Represents the setter method for the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property. + + ``SetPenPos()`` is an abstract method that must be implemented in descending classes. ``SetPenPos()`` is called each time the value of the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property is changed. + ''' + def Changed(self) -> None: + ''' + Called when the ``Canvas`` is changed. + + ``Changed()`` is a method called automatically whenever the contents of a `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__ object is modified. ``Changed()`` triggers the `OnChange <Vcl.Graphics.TCustomCanvas.OnChange.htm>`__ event. + ''' + def Changing(self) -> None: + ''' + Called before the ``Canvas`` is changed. + + ``Changing()`` is a method called automatically before the `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__ object is modified. ``Changing()`` triggers the `OnChanging <Vcl.Graphics.TCustomCanvas.OnChanging.htm>`__ event. + ''' + def RequiredState(self, ReqState: CanvasState) -> None: + ''' + Changes the current state of the ``Canvas`` to meet the given requirements. + + Override ``RequiredState()`` in descending classes. ``RequiredState()`` ensures that a ``Canvas`` meets a set of given requirements. If the requirements are not met, the ``Canvas`` initializes its internal structures so that the requirements are met after the call to ``RequiredState()`` is completed. + ''' + def Arc(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws an ``Arc()`` on the image along the perimeter of the ellipse bounded by the specified rectangle. + + Override the ``Arc()`` method (or just use Arc from descendant classes) to implement drawing of an elliptically curved line with the current ``Pen``. the ``Arc()`` traverses the perimeter of an ellipse that is bounded by the points ``(X1,Y1)`` and ``(X2,Y2)``. the ``Arc()`` is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X3,Y3)``. The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X4, Y4)``. + ''' + def ArcTo(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws an ``Arc()`` on the image along the perimeter of the ellipse bounded by the specified rectangle. + + Override the ``ArcTo()`` method (or just use Arcto from descendant classes) to implement drawing of an elliptically curved line with the current ``Pen``. the ``Arc()`` traverses the perimeter of an ellipse that is bounded by the points ``(X1,Y1)`` and ``(X2,Y2)``. the ``Arc()`` is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X3,Y3)``. The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X4, Y4)``. + + This procedure draws lines by using the current pen and updates the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ to the value of the last endpoint. + ''' + def AngleArc(self, X: int, Y: int, Radius: int, StartAngle: float, SweepAngle: float) -> None: + ''' + Draws an ``Arc()`` on the image along the perimeter of the circle defined by the parameters. + + Override ``AngleArc()`` to draw using the current ``Pen``. + + The ``AngleArc()`` method draws a line from the current position to the starting point of the ``Arc()`` and then a counterclockwise circular arc to the ``Arc()`` endpoint. the ``Arc()`` traverses the perimeter of a circle whose center lies at (``'X'``, ``'Y'``) and whose radius is ``Radius``. the ``Arc()`` is drawn following the perimeter of the circle, counterclockwise, from the ``StartAngle`` with a sweep angle of ``SweepAngle``. + + If the sweep angle is greater than 360 degrees, the entire circle is drawn and part of the ``Arc()`` is drawn multiple times. + ''' + def BrushCopy(self, Dest: Rect, Bitmap: Bitmap, Source: Rect, Color: Color) -> None: + ''' + Copies a portion of a bitmap onto a rectangle on the ``Canvas``, replacing one of the colors of the bitmap with the brush of the ``Canvas``. + + Override the ``BrushCopy()`` method to implement achieving of special effects, such as making the copied image partially transparent. ``BrushCopy()`` should be implemented mainly for backward compatibility. + + ``Dest`` specifies the rectangular portion of the ``Canvas`` that will receive the copy of the bitmap. + + ``Bitmap`` specifies the graphic to copy from. + + ``Source`` specifies the rectangular area of ``Bitmap`` to copy. + + ``Color`` specifies the color in ``Bitmap`` to replace with the brush of the ``Canvas``. + ''' + def Chord(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws a closed figure represented by the intersection of a line and an ellipse. + + Override the ``Chord()`` method to implement creating a shape that is defined by an ``Arc()`` and a line that joins the endpoints of the ``Arc()``. The chord consists of a portion of an ellipse that is bounded by the points ``(X1,Y1)`` and ``(X2,Y2)``. The ellipse is bisected by a line that runs between the points ``(X3,Y3)`` and ``(X4,Y4)``. + + The perimeter of the chord runs counterclockwise from ``(X3, Y3)``, counterclockwise along the ellipse to ``(X4,Y4)``, and straight back to ``(X3,Y3)``. If ``(X3,Y3)`` and ``(X4,Y4)`` are not on the surface of the ellipse, the corresponding corners on the chord are the closest points on the perimeter that intersect the line. + ''' + + @overload + def Draw(self, X: int, Y: int, Graphic: Graphic) -> None: + ''' + Renders the graphic specified by the ``Graphic`` parameter on the ``Canvas`` at the location given by the coordinates ``(X, Y)``. + + Override the ``Draw()`` method to implement the drawing of a graphic on the ``Canvas``. ``Draw()`` calls the ``Draw()`` method of the graphic. The image is rendered into a rectangle determined by the size of the graphic, with the upper-left corner at the point ``(X, Y)``. + ''' + + @overload + def Draw(self, X: int, Y: int, Graphic: Graphic, Opacity: Byte) -> None: ... + + def DrawFocusRect(self, Rect: Rect) -> None: + ''' + Draws a rectangle in the style used to indicate that the object inside the rectangle has focus. + + Override the ``DrawFocusRect()`` method to implement drawing of a focused rectangle. ``DrawFocusRect()`` is called for the perimeter of the image of a control when the control gets or loses input focus. Because ``DrawFocusRect()`` uses an XOR function, calling it a second time while specifying the same rectangle removes the rectangle from the *Screen*. + ''' + + @overload + def Ellipse(self, X1: int, Y1: int, X2: int, Y2: int) -> None: + ''' + Draws the ellipse defined by a bounding rectangle on the ``Canvas``. + + Override the ``Ellipse()`` method to implement drawing a circle or ellipse on the ``Canvas``. Specify the bounding rectangle either by giving: + + - The top left point at pixel coordinates ``(X1, Y1)`` and the bottom right point at ``(X2, Y2)``. + - A ``Rect`` value. + + If the bounding rectangle is a square, a circle is drawn. + ''' + + @overload + def Ellipse(self, Rect: Rect) -> None: ... + + def FillRect(self, Rect: Rect) -> None: + ''' + Fills the specified rectangle on the ``Canvas`` using the current ``Brush``. + + Override the ``FillRect()`` method to implement filling of a rectangular region using the current ``Brush``. The region is filled including the top and left edges of the rectangle, but excluding the bottom and right edges. + ''' + def FloodFill(self, X: int, Y: int, Color: Color, FillStyle: FillStyle) -> None: + ''' + Fills an area of the ``Canvas`` using the current ``Brush``. + + Override the ``FloodFill()`` method to implement filling of a possibly non-rectangular region of the image with the current ``Brush``. The boundaries of the region to be filled are determined by moving outward from the point ``(X, Y)`` until a color boundary involving the + + ``Color`` parameter is encountered. + + ``'X'`` and ``'Y'`` are the coordinates on the ``Canvas`` where filling starts. + + ``Color`` is the color that defines the boundary of the region to fill. Its interpretation depends on the value of ``FillStyle``. + + ``FillStyle`` specifies whether the region is defined by all pixels with the same value as + + ``Color`` or all points with a different value. + ''' + def FrameRect(self, Rect: Rect) -> None: + ''' + Draws a rectangle using the current brush of the ``Canvas()`` to draw the border. + + Override the ``FrameRect()`` method to implement drawing a 1-pixel-wide border around a rectangular region. ``FrameRect()`` does not fill the interior of the rectangle with the current brush pattern. + ''' + def LineTo(self, X: int, Y: int) -> None: + ''' + Draws a line on the ``Canvas`` from `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ to the point specified by ``'X'`` and ``'Y'``, and sets the pen position to ``(X, Y)``. + + Override the ``LineTo()`` method to implement drawing a line from `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ up to, but not including the point ``(X, Y)``. ``LineTo()`` changes the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ to ``(X, Y)``. + ''' + def Lock(self) -> None: + ''' + Prevents other threads from drawing on the ``Canvas``. + + Use ``Lock`` in a multithreaded application to prevent other threads from drawing on the ``Canvas``. ``Lock`` prevents other cooperating threads in the application from executing until the `Unlock <Vcl.Graphics.TCustomCanvas.Unlock.htm>`__ method is called. Nested calls to ``Lock`` increment the `LockCount <Vcl.Graphics.TCustomCanvas.LockCount.htm>`__ property so that the ``Canvas`` is not unlocked until the last lock is released. + + In multithreaded applications that use ``Lock`` to protect a ``Canvas``, all calls that use the ``Canvas`` must be protected by a call to ``Lock``. Any thread that does not lock the ``Canvas`` before using it introduces potential bugs. + + Because ``Lock`` prevents other threads from executing, it can adversely affect performance. Do not call ``Lock`` unless there is a possibility that another thread interferes with drawing on the ``Canvas``. + ''' + def MoveTo(self, X: int, Y: int) -> None: + ''' + Changes the current drawing position to the point ``(X, Y)``. + + Override the ``MoveTo()`` method to implement setting the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ before calling `LineTo <Vcl.Graphics.TCustomCanvas.LineTo.htm>`__. Calling ``MoveTo()`` is equivalent to setting the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property. + ''' + def Pie(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws a pie-shaped section of the ellipse bounded by the rectangle ``(X1, Y1)`` and ``(X2, Y2)`` on the ``Canvas``. + + Override the ``Pie()`` method to implement drawing a pie-shaped wedge on the image. The wedge is defined by the ellipse bounded by the rectangle determined by the points ``(X1, Y1)`` and ``(X2, Y2)``. The drawn section is determined by two lines radiating from the center of the ellipse through the points ``(X3, Y3)`` and ``(X4, Y4)``. + ''' + def Polygon(self, Points: list) -> None: + ''' + Draws a series of lines on the ``Canvas`` connecting the points passed in and closing the shape by drawing a line from the last point to the first point. + + Override the ``Polygon()`` method to implement drawing a closed, many-sided shape on the ``Canvas``, using the value of ``Pen``. After drawing the complete shape, ``Polygon()`` fills the shape using the current ``Brush``. + + The ``Points`` parameter is an array of points that give the vertices of the polygon. The first point is always connected to the last point. To draw a polygon on the ``Canvas``, without filling it, use the `Polyline <Vcl.Graphics.TCustomCanvas.Polyline.htm>`__ method, specifying the first point a second time, at the end. + + .. note:: In Delphi, you can use the `Slice <System.Slice.htm>`__ function to pass a portion of an array of points to the ``Polygon()`` method. For example, to form a polygon using the first ten points from an array of 100 points, use the `Slice <System.Slice.htm>`__ function as follows: ``Canvas.Polygon(Slice(PointArray, 10));`` + ''' + def Polyline(self, Points: list) -> None: + ''' + Draws a series of lines on the ``Canvas`` with the current ``Pen``, connecting each of the points passed to it in ``Points``. + + Override the ``Polyline()`` method to implement connecting a set of points on the ``Canvas``. If you specify only two points, ``Polyline()`` draws a single line. + + The ``Points`` parameter is an array of points to be connected. + + .. note:: In Delphi, you can use the `Slice <System.Slice.htm>`__ function to pass a portion of an array of points to the ``Polyline()`` method. For example, to form a line connecting the first ten points from an array of 100 points, use the `Slice <System.Slice.htm>`__ function as follows: ``Canvas.Polyline(Slice(PointArray, 10));`` + + Calling the `MoveTo <Vcl.Graphics.TCustomCanvas.MoveTo.htm>`__ function with the value of the first point, and then repeatedly calling `LineTo <Vcl.Graphics.TCustomCanvas.LineTo.htm>`__ with all subsequent points will draw the same image on the ``Canvas``. However, unlike `LineTo <Vcl.Graphics.TCustomCanvas.LineTo.htm>`__, ``Polyline()`` does not change the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__. + ''' + def PolyBezier(self, Points: list) -> None: + ''' + Draws a set of ``Bezier`` curves. + + Override the ``PolyBezier()`` method to implement drawing cubic ``Bezier`` curves using the endpoints and control points specified by the ``Points`` parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third is the ending point. + + ``PolyBezier()`` draws lines by using the current ``Pen``. + + The ``Points`` parameter gives the endpoints to use when generating the ``Bezier`` curves. + + .. note:: In Delphi, you can use the `Slice <System.Slice.htm>`__ function to pass a portion of an array of points to the ``PolyBezier()`` method. For example, to form a ``Bezier`` curve using the first ten points from an array of 100 points, use the `Slice <System.Slice.htm>`__ function as follows: ``Canvas.PolyBezier(Slice(PointArray, 10));`` + + ``Control`` points after ``a[Index+3]`` are ignored. Nothing happens if there are not enough control points. + ''' + def PolyBezierTo(self, Points: list) -> None: + ''' + Draws a set of ``Bezier`` curves and updates the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__. + + Override the ``PolyBezierTo()`` method to implement drawing cubic ``Bezier`` curves using the endpoints and control points specified by the ``Points`` parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third is the ending point. ``PolyBezierTo()`` draws lines by using the current ``Pen`` and updates the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ to the value of the last endpoint. + + The ``Points`` parameter gives the endpoints to use when generating the ``Bezier`` curves. + + .. note:: In Delphi, you can use the `Slice <System.Slice.htm>`__ function to pass a portion of an array of points to the ``PolyBezierTo()`` method. For example, to form a ``Bezier`` curve using the first ten points from an array of 100 points, use the `Slice <System.Slice.htm>`__ function as follows: ``Canvas.PolyBezierTo(Slice(PointArray, 10));`` + ''' + + @overload + def Rectangle(self, X1: int, Y1: int, X2: int, Y2: int) -> None: + ''' + Draws a rectangle on the ``Canvas``. + + Override the ``Rectangle()`` method to implement drawing a rectangle using the pen and fill it with the current ``Brush``. Specify the rectangle's coordinates in one of two ways: + + - Giving four coordinates that define the upper-left corner at the point ``(X1, Y1)`` and the lower-right corner at the point ``(X2, Y2)``. + - Using a ``Rect`` type. To fill a rectangular region without drawing the boundary in the current ``Pen``, use `FillRect <Vcl.Graphics.TCustomCanvas.FillRect.htm>`__. To outline a rectangular region without filling it, use `FrameRect <Vcl.Graphics.TCustomCanvas.FrameRect.htm>`__ or `Polygon <Vcl.Graphics.TCustomCanvas.Polygon.htm>`__. To draw a rectangle with rounded corners, use `RoundRect <Vcl.Graphics.TCustomCanvas.RoundRect.htm>`__. + ''' + + @overload + def Rectangle(self, Rect: Rect) -> None: ... + + def Refresh(self) -> None: + ''' + Resets the internal state of the ``Canvas`` to a default state. + + Override the ``Refresh()`` method to implement resetting the state of a ``Canvas``. The operations performed by ``Refresh()`` depend on the actual ``Canvas`` implementation. In most implementations though, ``Refresh()`` destroys the graphical objects, such as pen, brush, or font, that were associated with the ``Canvas``. + ''' + + @overload + def RoundRect(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int) -> None: + ''' + Draws a rectangle with rounded corners on the ``Canvas``. + + Override the ``RoundRect()`` method to implement drawing a rounded rectangle using the current ``Pen`` and fill it with the current ``Brush``. The rectangle will have edges defined by the points ``(X1,Y1)``, ``(X2,Y1)``, ``(X2,Y2)``, ``(X1,Y2)``, but the corners will be shaved to create a rounded appearance. The curve of the rounded corners matches the curvature of an ellipse with width ``X3`` and height ``Y3``. To draw an ellipse instead, use `Ellipse <Vcl.Graphics.TCustomCanvas.Ellipse.htm>`__. To draw a ``True`` rectangle, use `Rectangle <Vcl.Graphics.TCustomCanvas.Rectangle.htm>`__. + ''' + + @overload + def RoundRect(self, Rect: Rect, CX: int, CY: int) -> None: ... + + def StretchDraw(self, Rect: Rect, Graphic: Graphic) -> None: + ''' + Draws the graphic specified by the + + ``Graphic`` parameter in the rectangle specified by the ``Rect`` parameter. + + Override the ``StretchDraw()`` method to implement drawing a graphic on the ``Canvas`` so that the image fits in the specified rectangle. ``StretchDraw()`` calls the `Draw <Vcl.Graphics.TGraphic.Draw.htm>`__ method of the graphic. The graphic object determines how to fit into the rectangle. This may involve changing magnification and/or aspect ratio. To render the graphic in its natural size, use the `Draw <Vcl.Graphics.TCustomCanvas.Draw.htm>`__ method instead. + ''' + def TextExtent(self, Text: str) -> Size: + ''' + Returns the ``Width`` and ``Height``, in pixels, of a string rendered in the current font. + + Override the ``TextExtent()`` method to provide the information about the space a string will occupy in the image. Other elements in the image such as lines, boxes, or additional lines of text can be positioned to accommodate the size of the text. ``TextExtent()`` returns the ``Width`` and ``Height`` of the rectangle that bounds the text on the ``Canvas``. + + Both the `TextHeight <Vcl.Graphics.TCustomCanvas.TextHeight.htm>`__ and `TextWidth <Vcl.Graphics.TCustomCanvas.TextWidth.htm>`__ methods call ``TextExtent()`` to obtain the height and width information. + ''' + def TextHeight(self, Text: str) -> int: + ''' + Returns the height, in pixels, of a string rendered in the current font. + + Use ``TextHeight()`` to determine the height a string will occupy in the image. Other elements in the image such as lines, boxes, or additional lines of text can be positioned to accommodate the height of the text. ``TextHeight()`` returns the height of the font, the ascenders and the descenders, not the actual height of the specified string. If the height of the font is negative, then ``TextHeight()`` is calculated by summing the absolute value of the font's height with the internal leading of the font; otherwise, ``TextHeight()`` equals to the height of the font. + + You can use `TextExtent <Vcl.Graphics.TCustomCanvas.TextExtent.htm>`__ to obtain the same value. + ''' + def TextOut(self, X: int, Y: int, Text: str) -> None: + ''' + Writes a string on the ``Canvas``, starting at the point ``(X, Y)``, and then updates the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ to the end of the string. + + Override the ``TextOut()`` method to implement writing a string onto the ``Canvas``. The string will be written using the current font. Use the `TextExtent <Vcl.Graphics.TCustomCanvas.TextExtent.htm>`__ method to determine the space occupied by text in the image. To write only the text that fits within a clipping rectangle, use `TextRect <Vcl.Graphics.TCustomCanvas.TextRect.htm>`__ instead. + + After a call to ``TextOut()``, the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property indicates the point at the top right of the text on the ``Canvas``. + ''' + + @overload + def TextRect(self, Rect: Rect, Text: str, TextFormat: TextFormat) -> None: + ''' + Writes a string inside a clipping rectangle. + + Override the ``TextRect()`` method to implement writing a string within a limited rectangular region. Any portions of the string that fall outside the rectangle passed in the ``Rect`` parameter are clipped and do not appear. The upper-left corner of the text is placed at the point ``(X, Y)``. + ''' + + @overload + def TextRect(self, Rect: Rect, X: int, Y: int, Text: str) -> None: ... + + def TextWidth(self, Text: str) -> int: + ''' + Returns the width, in pixels, of a string rendered in the current font. + + Use ``TextWidth()`` to determine the length a string will occupy in the image. ``TextWidth()`` indicates whether a given string will fit in the available space. Other graphical elements in the image such as lines or additional strings can be positioned to accommodate the width of the text. + + You can use `TextExtent <Vcl.Graphics.TCustomCanvas.TextExtent.htm>`__ to obtain the same value. + ''' + def TryLock(self) -> bool: + ''' + Locks the ``Canvas`` if it is currently unlocked. + + Call ``TryLock()`` to prevent other threads from writing on the surface of the ``Canvas`` until the `Unlock <Vcl.Graphics.TCustomCanvas.Unlock.htm>`__ method is called. Unlike calls to the `Lock <Vcl.Graphics.TCustomCanvas.Lock.htm>`__ method, which nest so that every call to `Lock <Vcl.Graphics.TCustomCanvas.Lock.htm>`__ must be matched with a subsequent call to `Unlock <Vcl.Graphics.TCustomCanvas.Unlock.htm>`__, ``TryLock()`` need only be matched by a call to `Unlock <Vcl.Graphics.TCustomCanvas.Unlock.htm>`__, if the ``Canvas`` was not already locked. + + If the ``Canvas`` is unlocked, ``TryLock()`` locks the ``Canvas``, sets the `LockCount <Vcl.Graphics.TCustomCanvas.LockCount.htm>`__ property to 1, and returns ``True``. If the ``Canvas`` is already locked, ``TryLock()`` returns ``False`` without making any changes. + + Use ``TryLock()`` before attempting changes to the ``Canvas`` that could interfere with other code that is protected by a `Lock <Vcl.Graphics.TCustomCanvas.Lock.htm>`__/`Unlock <Vcl.Graphics.TCustomCanvas.Unlock.htm>`__ pair of method calls. + ''' + def Unlock(self) -> None: + ''' + Decreases the `LockCount <Vcl.Graphics.TCustomCanvas.LockCount.htm>`__ property, allowing other threads to execute when `LockCount <Vcl.Graphics.TCustomCanvas.LockCount.htm>`__ reaches 0. + + Use ``Unlock()`` at the end of a critical section that began with a call to the `Lock <Vcl.Graphics.TCustomCanvas.Lock.htm>`__ method. Every call to `Lock <Vcl.Graphics.TCustomCanvas.Lock.htm>`__ must be matched by a call to ``Unlock()``. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the image has just changed. + + Write an ``OnChange`` event handler to take specific action whenever the image on the ``Canvas`` changes. When an application calls one of the drawing methods of `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__, the following steps occur: + + #. An `OnChanging <Vcl.Graphics.TCustomCanvas.OnChanging.htm>`__ event occurs. + #. The `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__ method makes the change to the ``Canvas``. + #. An ``OnChange`` event occurs. + + ``OnChange`` events occur on changes to the image, not changes to the properties of the ``Canvas``. For descending ``Canvas`` implementations that support assigned graphical objects such as Brush, Pen, or Font, applications can respond to changes in those by assigning ``OnChange`` event handlers to the corresponding objects. However, most descending ``Canvas`` implementations derived from `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__ assign their own ``OnChange`` event handlers for the attached objects. Before assigning an ``OnChange`` event handler to one of these objects (Pen, Brush, and so on), read the existing event handler. Use that value to call the `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__ descendant's event handler from the new event handler. + ''' + def OnChanging(self, Sender: Object) -> None: + ''' + # OnChanging: NotifyEvent + Occurs just before a change is made to the image. + + Write an ``OnChanging`` event handler to take a specific action before the image on the ``Canvas`` changes. When an application calls one of the drawing methods of `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__, the following steps occur: + + #. An ``OnChanging`` event occurs. + #. The `CustomCanvas <Vcl.Graphics.TCustomCanvas.htm>`__ method makes the change to the ``Canvas``. + #. An `OnChange <Vcl.Graphics.TCustomCanvas.OnChange.htm>`__ event occurs. + ''' + +class ScaledGraphicDrawer(Persistent): + ''' + ================================= + Vcl.Graphics.TScaledGraphicDrawer + ================================= + + `Persistent <System.Classes.TPersistent.htm>`__ is the ancestor for all objects that have assignment and streaming capabilities. + + - Define the procedure for loading and storing unpublished data to a stream. + - Provide the means to assign values to properties. + - Provide the means to assign the contents of one object to another. + + Do not create instances of `Persistent <System.Classes.TPersistent.htm>`__. Use `Persistent <System.Classes.TPersistent.htm>`__ as a base class when declaring objects that are not components, but that need to be saved to a stream or have their properties assigned to other objects. + ''' + + __hash__: ClassVar[None] = ... + Initialized: bool + ''' + No have docs. + ''' + Graphic: Graphic + ''' + No have docs. + ''' + def GetInitialized(self) -> bool: + ''' + No have docs. + ''' + def Create(self, AGraphic: Graphic, AInitialize: bool) -> None: + ''' + Constructs an object and initializes its data before the object is first used. + + `Create <System.TObject.Create.htm>`__ constructs an object. The purpose, size, and behavior of objects differ greatly. The `Create <System.TObject.Create.htm>`__ constructor defined by `Object <System.TObject.htm>`__ allocates memory but does not initialize data. + + Descendant objects usually define a constructor that creates the particular kind of object and initializes its data. + + .. note:: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance. + ''' + def Initialize(self) -> None: + ''' + No have docs. + ''' + def Draw(self, ACanvas: Canvas, ARect: Rect) -> None: + ''' + No have docs. + ''' + +class Font(GraphicsObject): + ''' + ================== + Vcl.Graphics.TFont + ================== + + ``Font`` encapsulates a system font. + + ``Font`` describes font characteristics used when displaying text. ``Font`` defines a set of characters by specifying the height, font family (typeface), attributes (such as bold or italic), and so on. + + ``Font`` encapsulates a *Windows* logical font. + + ''' + + __hash__: ClassVar[None] = ... + FontAdapter: IChangeNotifier + ''' + Designates an interface for providing the font information to *ActiveX* controls. + + Do not use the ``FontAdapter`` property. ``FontAdapter`` is used internally by *ActiveX* controls to communicate font information through an *OLE* interface. + ''' + Handle: HFont + ''' + Provides access to the handle of a system font. + + The ``Handle`` property indicates the *Windows GDI* font object handle. + + Use ``Handle`` as a parameter when calling *Windows API* functions that require a font handle. Set ``Handle`` to make the `Font <Vcl.Graphics.TFont.htm>`__ object represent the *Windows* font indicated by the font handle. Setting ``Handle`` releases the current Windows font resource. + + .. note:: When possible, change a font by setting the other properties of `Font <Vcl.Graphics.TFont.htm>`__ rather than using the ``Handle`` property. Setting ``Handle`` does not reset the properties that describe the font. However, an ``OnChange`` event does occur when ``Handle`` is set directly by an application. + ''' + PixelsPerInch: int + ''' + Indicates the conversion factor between logical inches and the pixels of the device (printer or screen) using the font. + + ``PixelsPerInch`` is used to ensure that when a font is copied from the ``Form``\ s. ``Canvas`` to the printer, the font is the same size in points. The ``PixelsPerInch`` property affects printer fonts only and should not be modified. To modify the size of a font, use the ``Size`` or ``Height`` properties. + ''' + Charset: FontCharset + ''' + Specifies the character set of the font. + + Set ``Charset`` to identify the character set of the font. Each typeface (specified by the ``Name`` property) supports one or more character sets. Check the information supplied by the font vendor to determine what values of ``Charset`` are valid. + ''' + Color: Color + ''' + Specifies the color of the text. + + Use ``Color`` to specify the color of the text characters (as opposed to the background color). If ``Color`` is set to a dithered color, the text appears in the closest non-dithered value. + ''' + Height: int + ''' + Specifies the height of the font. + + Use ``Height`` to specify the height of the font in pixels. If the ``Value`` is negative, the internal leading that appears at the top of each line of text is not measured. If the ``Value`` is positive, ``Height`` represents the height of the characters plus the internal leading. To specify the size of the font in points, use the ``Size`` property instead. Users usually specify font size in points, while applications may be concerned with the actual size of the font in pixels when displaying the font on the *Screen*. + + The value of ``Height`` can be obtained from the point size using this formula: + + .. code-block:: python + + Font.Height = -Font.Size * Font.PixelsPerInch / 72 + + When the ``Height`` property has a positive value, the ``Size`` property has a negative value. When the ``Size`` property has a positive value, the ``Height`` property has a negative value. + ''' + Name: FontName + ''' + Identifies the typeface of the font. + + Use ``Name`` to specify the typeface of the font. If the font family described by ``Name`` includes multiple character sets, be sure to set the ``Charset`` property as well. + + .. note:: If the combination of font family (typeface) and attributes (such as bold or italic) specifies a font that is not available on the system, the system substitutes a different font. + ''' + Orientation: int + ''' + Specifies text orientation. + + Use ``Orientation`` to specify the orientation of text characters. It is the angle in tenths of degrees between the character's baseline and device x-axis. This is similar to the ``lfOrientation`` field of the *Windows GDI* ``LOGFONT`` structure that defines font attributes. + ''' + Pitch: FontPitch + ''' + Specifies whether the characters in the font all have the same width. + + Each typeface has an associated pitch. The characters in fixed-pitch fonts are all the same width. The characters in variable-pitch fonts differ in width. Fixed pitch fonts are generally used for representing source code, because they allow the indentation to line up properly. Variable pitch fonts are generally used to give text a more natural appearance + + Here are the possible values for ``Pitch``: + + =============== ========================================================================================================================= + **Value** **Meaning** + =============== ========================================================================================================================= + ``fpDefault`` The font pitch is set to the default value, which depends on the font specified in the ``Name`` property. + ``fpFixed`` The font pitch is set to ``Fixed``. All characters in the font have the same width. + ``fpVariable`` The font pitch is set to ``Variable``. The characters in the font have varying widths. + =============== ========================================================================================================================= + + Setting the ``Pitch`` of a fixed-pitch font to ``fpVariable`` or a variable-pitch font to ``fpFixed`` will cause window system to find what it considers the best match to all of the font characteristics that have been specified. This might have no effect on the appearance of a font, or might cause the window system to substitute a different font with the appropriate pitch. For example, setting the pitch of Serif (a variable-pitch font) to ``fpFixed`` causes Courier to be displayed. + ''' + Size: int + ''' + Specifies the height of the font in points. + + Use ``Size`` to specify the point size of the font. If the ``Value`` is negative, the internal leading that appears at the top of each line of text is included. If the ``Value`` is positive, ``Size`` represents the height of the characters but not the internal leading. To determine the size of the font in pixels, use the ``Height`` property instead. The value of ``Size`` can be obtained from the height in pixels using this formula: + + .. code-block:: python + + Font.Size = -Font.Height * 72 / Font.PixelsPerInch + + When the ``Size`` property has a positive value, the ``Height`` property has a negative value. When the ``Height`` property has a positive value, the ``Size`` property has a negative value. + ''' + Style: FontStyles + ''' + Determines whether the font is *normal*, *italic*, *underlined*, *bold*, and so on. + + Use ``Style`` to add special characteristics to characters that use the font. ``Style`` is a set containing zero or more values from the following: + + ================= ======================================================== + **Value** **Meaning** + ================= ======================================================== + ``fsBold`` The font is boldfaced. + ``fsItalic`` The font is italicized. + ``fsUnderline`` The font is underlined. + ``fsStrikeOut`` The font is displayed with a horizontal line through it. + ================= ======================================================== + ''' + Quality: FontQuality + ''' + Specifies the font quality. + + Use ``Quality`` to set the font quality of the text to display. + + Here are the possible values for quality: + + ========================== =================================================================================================================================================================================================================================== + **Value** **Meaning** + ========================== =================================================================================================================================================================================================================================== + ``fqDefault`` The quality is determined by the system settings. + ``fqDraft`` For raster fonts, scaling is enabled; the font size can be increased but the quality may be lower. Also the font supports *Bold*, *Italic*, *Underline* or *Strikeout* if necessary. The quality is less important than when ``Proof`` is used. + ``fqProof`` The quality of the characters is important, so for the raster fonts, scaling is disabled and the font closest in size is chosen. + ``fqNonAntialiased`` The font is never antialiased. + ``fqAntialiased`` The font is always antialiased if it supports it. The size of the font cannot be too small or too large. + ``fqClearType`` The font is rendered using the ``ClearType`` antialiasing method. + ``fqClearTypeNatural`` The font is rendered using the ``ClearTypeNatural`` antialiasing method. + ========================== =================================================================================================================================================================================================================================== + ''' + def Changed(self) -> None: + ''' + Generates an ``OnChange`` event when the properties of the graphics object change. + + Descendants of `GraphicsObject <Vcl.Graphics.TGraphicsObject.htm>`__ call `Changed <Vcl.Graphics.TGraphicsObject.Changed.htm>`__ after making changes to the properties encapsulated by the `GraphicsObject <Vcl.Graphics.TGraphicsObject.htm>`__ object. + ''' + def GetHandle(self) -> HFont: + ''' + No have docs. + ''' + def GetHeight(self) -> int: + ''' + No have docs. + ''' + def GetName(self) -> FontName: + ''' + No have docs. + ''' + def GetOrientation(self) -> int: + ''' + No have docs. + ''' + def GetPitch(self) -> FontPitch: + ''' + No have docs. + ''' + def GetSize(self) -> int: + ''' + No have docs. + ''' + def GetStyle(self) -> FontStyle: + ''' + No have docs. + ''' + def GetCharset(self) -> FontCharset: + ''' + No have docs. + ''' + def GetQuality(self) -> FontQuality: + ''' + Access function for the `Quality <Vcl.Graphics.TFont.Quality.htm>`__ property. + + See the `FontQuality <Vcl.Graphics.TFontQuality.htm>`__ for information on the enumeration. + ''' + def SetColor(self, Value: Color) -> None: + ''' + No have docs. + ''' + def SetHandle(self, Value: HFont) -> None: + ''' + No have docs. + ''' + def SetHeight(self, Value: int) -> None: + ''' + No have docs. + ''' + def SetOrientation(self, Value: int) -> None: + ''' + No have docs. + ''' + def SetName(self, Value: FontName) -> None: + ''' + No have docs. + ''' + def SetPitch(self, Value: FontPitch) -> None: + ''' + No have docs. + ''' + def SetSize(self, Value: int) -> None: + ''' + Specifies the height of the font in points. + + Use ``Size`` to specify the point size of the font. If the ``Value`` is negative, the internal leading that appears at the top of each line of text is included. If the ``Value`` is positive, ``Size`` represents the height of the characters but not the internal leading. To determine the size of the font in pixels, use the ``Height`` property instead. The value of ``Size`` can be obtained from the height in pixels using this formula: + + .. code-block:: python + + Font.Size = -Font.Height * 72 / Font.PixelsPerInch + + When the ``Size`` property has a positive value, the ``Height`` property has a negative value. When the ``Height`` property has a positive value, the ``Size`` property has a negative value. + ''' + def SetStyle(self, Value: FontStyles) -> None: + ''' + No have docs. + ''' + def SetCharset(self, Value: FontCharset) -> None: + ''' + No have docs. + ''' + def SetQuality(self, Value: FontQuality) -> None: + ''' + Access function for the `Quality <Vcl.Graphics.TFont.Quality.htm>`__ property. + + See the `FontQuality <Vcl.Graphics.TFontQuality.htm>`__ for information on the enumeration. + ''' + def Create(self) -> None: + ''' + ``Creates`` and initializes an instance of `Font <Vcl.Graphics.TFont.htm>`__. + + Call ``Create()`` to create a font object at runtime. + + ``Create()`` allocates memory for the font resource, and initializes the ``Color`` property to clWindowText. ``Create()`` also initializes the ``PixelsPerInch`` property based on the *Screen* resolution. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `Font <Vcl.Graphics.TFont.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `Font <Vcl.Graphics.TFont.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. ``Destroy()`` frees the resource identified by the ``Handle`` property. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies the properties of another `Font <Vcl.Graphics.TFont.htm>`__ object. + + Call ``Assign()`` to set the properties of the font to match the characteristics of the ``Source`` object. If ``Source`` is another `Font <Vcl.Graphics.TFont.htm>`__ object, ``Assign()`` matches the font characteristics of the source. ``Assign()`` does not copy the ``PixelsPerInch`` property, so this method can be used to copy a screen font to a printer font, or vice versa. + + If the ``Source`` parameter is not another `Font <Vcl.Graphics.TFont.htm>`__ object, ``Assign()`` calls the inherited method so that the font can be copied from any object that can assign font properties in its `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. + ''' + +class GraphicsObject(Persistent): + ''' + ============================ + Vcl.Graphics.TGraphicsObject + ============================ + + ``GraphicsObject`` is the abstract base class for objects which encapsulate a system graphics object: ``Brush``, ``Font``, and ``Pen``. + + Create descendants of ``GraphicsObject`` when drawing an image to a canvas (``TCanvas``). Each ``GraphicsObject`` object describes a system graphics object that is selected into the device context of the canvas. + + ``GraphicsObject`` introduces a mechanism for responding to changes in the properties of the graphics object. + + ''' + + __hash__: ClassVar[None] = ... + OwnerLock: Object + ''' + No have docs. + ''' + OwnerCriticalSection: PRTLCriticalSection + ''' + Points to information about the critical section that the ``Canvas`` which draws with this graphics object uses to lock out other threads. + + Use ``OwnerCriticalSection()`` to obtain information about the thread locking state of the ``Canvas`` that draws with this graphics object. The ``Canvas`` sets ``OwnerCriticalSection`` when it creates the graphics object. Do not change this property while the ``Canvas`` is using the graphics object. + + If the graphics object is created on behalf of a drawing surface that is not a ``Canvas``, set ``OwnerCriticalSection`` to an initialized TRTLCriticalSection that is maintained by the drawing surface. To use ``OwnerCriticalSection`` to block other execution threads, use the `Lock <Vcl.Graphics.TGraphicsObject.Lock.htm>`__ method. + ''' + def Changed(self) -> None: + ''' + Generates an ``OnChange`` event when the properties of the graphics object change. + + Descendants of `GraphicsObject <Vcl.Graphics.TGraphicsObject.htm>`__ call ``Changed()`` after making changes to the properties encapsulated by the `GraphicsObject <Vcl.Graphics.TGraphicsObject.htm>`__ object. + ''' + def Lock(self) -> None: + ''' + Blocks other execution threads from using the associated ``Canvas`` until the Unlock method is called. + + Call ``Lock`` in a multithreaded application before using the graphics object in a section of code that would not otherwise be thread-safe. ``Lock`` prevents other cooperating threads in the application from using the associated ``Canvas`` until the Unlock method is called. Calls to ``Lock`` can be nested so that the ``Canvas`` is not unlocked until the last lock is released. + + Because ``Lock`` prevents other threads from executing, it can adversely affect performance. Do not call ``Lock`` unless there is a danger that another thread might interfere with the drawing. + + .. note:: ``Lock`` will do nothing unless the drawing surface sets the ``OwnerCriticalSection`` property. ``Canvas`` objects automatically set the ``OwnerCriticalSection`` property when they use graphics objects. + ''' + def Unlock(self) -> None: + ''' + Releases the lock on execution threads set by the Lock method. + + Call ``Unlock()`` at the end of a thread-sensitive section of code that was started with a call to the Lock method. When every call to Lock is balanced by a call to ``Unlock()``, other threads are allowed to lock the associated ``Canvas``. + ''' + def HandleAllocated(self) -> bool: + ''' + Indicates whether the `GraphicsObject <Vcl.Graphics.TGraphicsObject.htm>`__ object has acquired a handle to the underlying *GDI* object. + + Use ``HandleAllocated()`` to determine whether the ``Handle`` property is set for the graphics object. ``HandleAllocated()`` indicates whether the underlying *GDI* object has been acquired. Use ``HandleAllocated()`` rather than reading the ``Handle`` property. When an application reads the ``Handle`` property, `GraphicsObject <Vcl.Graphics.TGraphicsObject.htm>`__ descendants automatically create the underlying *GDI* object and return its handle if the property had not been previously set. + ''' + def GetHashCode(self) -> int: + ''' + No have docs. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs immediately after the graphics object changes. + + Write an ``OnChange`` event handler to take specific action when the graphics object changes. The properties of the graphics object reflect the new settings when ``OnChange`` occurs. + ''' + +class CustomFormClass(CustomForm): + ''' + ========================== + Vcl.Forms.TCustomFormClass + ========================== + + ``CustomFormClass`` defines the metaclass for `CustomForm <Vcl.Forms.TCustomForm.htm>`__. + + ``CustomFormClass`` is the metaclass for `CustomForm <Vcl.Forms.TCustomForm.htm>`__. Its ``Value`` is the class reference for `CustomForm <Vcl.Forms.TCustomForm.htm>`__ or for one of its descendants. + ''' + + __hash__: ClassVar[None] = ... + +class CustomFileDialog(Component): + ''' + ============================= + Vcl.Dialogs.TCustomFileDialog + ============================= + + Abstract base class for Vista or later *Windows* operating systems style ``FileDialog``\ s. + + *File* dialogs, such as open and save, extend this abstract base class for *Microsoft Windows Vista* or later *Windows* operating systems style ``FileDialog``\ s. This is a wrapper class for the *Windows Vista* common item dialog and implements the ``IFileDialog`` interface. + + ''' + + __hash__: ClassVar[None] = ... + ClientGuid: str + ''' + **GUID** associated with a dialog's persisted state. + + ``ClientGuid`` holds a **GUID** associated with a dialog's persisted state. Persisted states for a dialog can include such things as its position and size. Having a **GUID** allows an application to remember these persisted states for different versions of the dialog. + ''' + DefaultExtension: str + ''' + Default extension to be added to file names. + + ``DefaultExtension`` contains the default extension to add to file names. + ''' + DefaultFolder: str + ''' + Default folder if there is no recently used folder. + + ``DefaultFolder`` contains the name of the default folder if there is no recently used folder. + ''' + Dialog: IFileDialog + ''' + Pointer to dialog. + + ``Dialog`` contains a pointer to the dialog itself. + ''' + FavoriteLinks: FavoriteLinkItems + ''' + List of places available for the user to open or save items. + + ``FavoriteLinks`` contains a list of places available for the user to open or save items. This is an instance of `FavoriteLinkItems <Vcl.Dialogs.TFavoriteLinkItems.htm>`__. + ''' + FileName: FileName + ''' + Text in the dialog's file name edit box. + + ``FileName`` contains the text currently entered in the dialog's file name edit box. + ''' + FileNameLabel: str + ''' + Text of the ``Label`` next to file name edit box. + + ``FileNameLabel`` holds the text of the ``Label`` next to the file name edit box in the dialog. + ''' + Files: str + ''' + List of selected file names. + + ``Files`` is a string list that contains each selected file name with its full directory path. (To let users select multiple file names, set the ``fdoAllowMultiSelect`` flag in Options.) Use properties and methods for string lists to traverse this list of files and read individual items. + + The example below assigns the list of files in ``Files`` to the ``Items`` property of a ``ListBox`` component. + + .. code-block:: python + :caption: Delphi + + ListBox1.Items.Assign(OpenDialog1.Files); + + .. code-block:: python + + :caption: C++ + + ListBox1->Items->Assign(OpenDialog1->Files); + ''' + FileTypes: FileTypeItems + ''' + Determines the file type masks (filters) available in the dialog. + + ``FileTypes`` is an instance of `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__ containing a list of file types, each of which is an instance of `FileTypeItem <Vcl.Dialogs.TFileTypeItem.htm>`__. To add file types to a dialog, get the `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__ instance from ``FileTypes`` and use the `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__. `Add <Vcl.Dialogs.TFileTypeItems.Add.htm>`__ method as in this sample: + + .. code-block:: python + + with FileOpenDialog1.FileTypes.Add do + begin + DisplayName := All Files; + FileMask := *.*; + end; + ''' + FileTypeIndex: list[int] + ''' + Determines which filter is selected by default when the dialog opens. + + ``FileTypeIndex`` determines which of the file types in `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is selected by default when the dialog opens. Set ``FileTypeIndex`` to 1 to choose the first file type in the list as the default, or set ``FileTypeIndex`` to 2 to choose the second file type as the default, and so forth. If the value of ``FileTypeIndex`` is out or range, the first file type listed in `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is the default. + ''' + Handle: HWnd + ''' + Specifies the window handle of the dialog. + + The ``Handle`` property contains the dialog's window handle after a call to `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__. + ''' + OkButtonLabel: str + ''' + Text of the ``Open`` or *Save* button. + + ``OkButtonLabel`` contains the text of the ``Open`` or *Save* button. + ''' + Options: FileDialogOptions + ''' + List of options that control the dialog. + + ``Options`` is a set of `FileDialogOption <Vcl.Dialogs.TFileDialogOption.htm>`__ options controlling the dialog's behavior. + ''' + ShellItem: IShellItem + ''' + Current shell item. + + ``ShellItem`` holds the most recently accessed shell item in the dialog from a user's action, such as selecting a file or folder. Shell items are container-like objects in Windows, such as folders. See the Microsoft SDK for information on shell items. + + During an event, ``ShellItem`` contains the shell item pertinent to the event, such as a file a user selected; after the event is processed, ``ShellItem`` is ``nil``. After the user clicks *OK*, ``ShellItem`` contains the shell item result from the dialog. + ''' + ShellItems: IShellItemArray + ''' + Array of current shell items. + + ``ShellItems`` holds the most recently accessed shell items in the dialog from a user's action, such as selecting files. Shell items are container-like objects in Windows, such as folders. See the *Microsoft SDK* for information on shell items. The fdoAllowMultiSelect option must be set in `Options <Vcl.Dialogs.TCustomFileDialog.Options.htm>`__ so that multiple items can be selected for ``ShellItems`` to be used. + + During an event, ``ShellItems`` contains the shell items pertinent to the event, such as an array of files a user selected; after the event is processed, ``ShellItems`` is ``nil``. After the user clicks *OK*, ``ShellItems`` contains the shell items result from the dialog. + ''' + Title: str + ''' + Dialog title. + + ``Title`` contains the dialog's title. + ''' + def CreateFileDialog(self) -> IFileDialog: + ''' + Create a ``FileDialog``. + + This method creates a ``FileDialog``. Since it is an abstract method that is not implemented, it must be overridden and implemented by any class extending `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__. The implementation should create a *Windows* common item dialog, usually using the *Windows* function ``CoCreateInstance``. + ''' + def DoOnExecute(self) -> None: + ''' + Call `OnExecute <Vcl.Dialogs.TCustomFileDialog.OnExecute.htm>`__ event method if defined. + + ``DoOnExecute`` calls the `OnExecute <Vcl.Dialogs.TCustomFileDialog.OnExecute.htm>`__ event, if the event is defined. ``DoOnExecute()`` is called by the `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__ method, so this event occurs whenever an instance of `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__ gets executed. `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__ causes the dialog to be displayed. + ''' + def DoOnFileOkClick(self) -> bool: + ''' + Call `OnFileOkClick <Vcl.Dialogs.TCustomFileDialog.OnFileOkClick.htm>`__ event method if defined. + + ``DoOnFileOkClick`` calls the `OnFileOkClick <Vcl.Dialogs.TCustomFileDialog.OnFileOkClick.htm>`__ event, if the event is defined. ``DoOnFileOkClick()`` is called whenever the user clicks the *OK* button. The event occurs just before the dialog returns with a result. + ''' + def DoOnFolderChange(self) -> None: + ''' + Call `OnFolderChange <Vcl.Dialogs.TCustomFileDialog.OnFolderChange.htm>`__ event method if defined. + + ``DoOnFolderChange`` calls the `OnFolderChange <Vcl.Dialogs.TCustomFileDialog.OnFolderChange.htm>`__ event, if the event is defined. ``DoOnFolderChange()`` is called before a directory is opened or closed from the dialog. Such changes happen when the user double-clicks on a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. The event occurs before the change. + ''' + def DoOnFolderChanging(self) -> bool: + ''' + Call `OnFolderChanging <Vcl.Dialogs.TCustomFileDialog.OnFolderChanging.htm>`__ event method if defined. + + ``DoOnFolderChanging`` calls the `OnFolderChanging <Vcl.Dialogs.TCustomFileDialog.OnFolderChanging.htm>`__ event, if the event is defined. ``DoOnFolderChanging()`` is called when a directory is opened or closed from the dialog. This can happen when the user double-clicks on a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. The event occurs after the change. + ''' + def DoOnOverwrite(self, Response: FileDialogOverwriteResponse) -> None: + ''' + Call `OnOverwrite <Vcl.Dialogs.TCustomFileDialog.OnOverwrite.htm>`__ event method if defined. + + ``DoOnOverwrite`` calls the `OnOverwrite <Vcl.Dialogs.TCustomFileDialog.OnOverwrite.htm>`__ event, if the event is defined. ``DoOnOverwrite()`` is called just before a file would be overwritten, so this applies only to ``SaveDialog``\ s. + ''' + def DoOnSelectionChange(self) -> None: + ''' + Call `OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__ event method if defined. + + ``DoOnSelectionChange`` calls the `OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__ event, if the event is defined. ``DoOnSelectionChange()`` is called when the user changes the selection in the dialog. + ''' + def DoOnShareViolation(self, Response: FileDialogShareViolationResponse) -> None: + ''' + Call `OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__ event method if defined. + + ``DoOnShareViolation`` calls the `OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__ event, if the event is defined. ``DoOnShareViolation()`` is called when sharing violations that arise from *Open* or *Save* operations occur. + ''' + def DoOnTypeChange(self) -> None: + ''' + Call `OnTypeChange <Vcl.Dialogs.TCustomFileDialog.OnTypeChange.htm>`__ event method if defined. + + ``DoOnTypeChange`` calls the `OnTypeChange <Vcl.Dialogs.TCustomFileDialog.OnTypeChange.htm>`__ event, if the event is defined. ``DoOnTypeChange()`` is called when the user changes the file type selection in the dialog. + ''' + def GetFileNames(self, Items: IShellItemArray) -> HResult: + ''' + No have docs. + ''' + def GetItemName(self, Item: IShellItem, ItemName: FileName) -> HResult: + ''' + No have docs. + ''' + def GetResults(self) -> HResult: + ''' + No have docs. + ''' + def FileOkClick(self) -> HResult: + ''' + No have docs. + ''' + def FolderChange(self) -> HResult: + ''' + No have docs. + ''' + def FolderChanging(self, psiFolder: IShellItem) -> HResult: + ''' + No have docs. + ''' + def Overwrite(self, psiFile: IShellItem, Response: int) -> HResult: + ''' + No have docs. + ''' + def SelectionChange(self) -> HResult: + ''' + No have docs. + ''' + def ShareViolation(self, psiFile: IShellItem, Response: int) -> HResult: + ''' + No have docs. + ''' + def TypeChange(self) -> HResult: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates and initializes an instance. + + This method creates and initializes an instance of `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance and frees the associated resources. + + This method destroys an instance of `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__ and frees the associated resources. + ''' + + @overload + def Execute(self) -> bool: + ''' + Displays the dialog box. + + ``Execute()`` opens the dialog instance at runtime. Generally, ``Execute()`` returns ``True`` when the user makes a selection and clicks *OK*, and returns ``False`` when the user closes the dialog without making a selection. + + If the window handle parameter is not supplied, the parent window of the application is used as the parent window of the dialog. ``Execute()`` calls `DoOnExecute <Vcl.Dialogs.TCustomFileDialog.DoOnExecute.htm>`__, which triggers the `OnExecute <Vcl.Dialogs.TCustomFileDialog.OnExecute.htm>`__ event. + ''' + + @overload + def Execute(self, ParentWnd: HWND) -> None: ... + +class CustomFileSaveDialog(CustomFileDialog): + ''' + ================================= + Vcl.Dialogs.TCustomFileSaveDialog + ================================= + + Base class for Vista or later *Windows* operating system style file ``SaveDialog``\ s. + + This class extends `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__. File ``SaveDialog``\ s extend this base class for *Microsoft Windows Vista* or later *Windows* operating system style file ``SaveDialog``\ s. This is a wrapper class for the *Windows Vista* ``CLSID_FileSaveDialog`` and implements the ``IFileSaveDialog`` interface. + + ''' + + __hash__: ClassVar[None] = ... + + def CreateFileDialog(self) -> IFileDialog: + ''' + Create an save ``FileDialog``. + + This method creates a *Windows* ``CLSID_FileSaveDialog`` using the *Windows* function ``CoCreateInstance``. + ''' + +class FileSaveDialog(CustomFileSaveDialog): + ''' + =========================== + Vcl.Dialogs.TFileSaveDialog + =========================== + + Class for *Vista* and newer *Windows* operating systems style file ``SaveDialog``\ s. + + This class extends `CustomFileSaveDialog <Vcl.Dialogs.TCustomFileSaveDialog.htm>`__. It allows creating *Microsoft Windows Vista* (or newer *Windows* operating systems) style file ``SaveDialog``\ s ``CLSID_FileSaveDialog`` and implements the ``IFileSaveDialog`` interface. + + ''' + + __hash__: ClassVar[None] = ... + ClientGuid: str + ''' + **GUID** associated with a dialog's persisted state. + + `ClientGuid <Vcl.Dialogs.TCustomFileDialog.ClientGuid.htm>`__ holds a **GUID** associated with a dialog's persisted state. Persisted states for a dialog can include such things as its position and size. Having a **GUID** allows an application to remember these persisted states for different versions of the dialog. + ''' + DefaultExtension: str + ''' + Default extension to be added to file names. + + ``Vcl.Dialogs.TFileSaveDialog.DefaultExtension`` inherits from `Vcl.Dialogs.TCustomFileDialog.DefaultExtension <Vcl.Dialogs.TCustomFileDialog.DefaultExtension.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.DefaultExtension <Vcl.Dialogs.TCustomFileDialog.DefaultExtension.htm>`__. + + `DefaultExtension <Vcl.Dialogs.TCustomFileDialog.DefaultExtension.htm>`__ contains the default extension to add to file names. + ''' + DefaultFolder: str + ''' + Default folder if there is no recently used folder. + + `DefaultFolder <Vcl.Dialogs.TCustomFileDialog.DefaultFolder.htm>`__ contains the name of the default folder if there is no recently used folder. + ''' + FavoriteLinks: FavoriteLinkItems + ''' + List of places available for the user to open or save items. + + `FavoriteLinks <Vcl.Dialogs.TCustomFileDialog.FavoriteLinks.htm>`__ contains a list of places available for the user to open or save items. This is an instance of `FavoriteLinkItems <Vcl.Dialogs.TFavoriteLinkItems.htm>`__. + ''' + FileName: FileName + ''' + Text in the dialog's file name ``Edit`` box. + + `FileName <Vcl.Dialogs.TCustomFileDialog.FileName.htm>`__ contains the text currently entered in the dialog's file name ``Edit`` box. + ''' + FileNameLabel: str + ''' + Text of the ``Label`` next to file name ``Edit`` box. + + `FileNameLabel <Vcl.Dialogs.TCustomFileDialog.FileNameLabel.htm>`__ holds the text of the ``Label`` next to the file name ``Edit`` box in the dialog. + ''' + FileTypes: FileTypeItems + ''' + Determines the file type masks (filters) available in the dialog. + + `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is an instance of `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__ containing a list of file types, each of which is an instance of `FileTypeItem <Vcl.Dialogs.TFileTypeItem.htm>`__. To add file types to a dialog, get the `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__ instance from `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ and use the `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__. `Add <Vcl.Dialogs.TFileTypeItems.Add.htm>`__ method as in this sample: + + .. code-block:: python + :caption: Delphi + + with FileOpenDialog1.FileTypes.Add do + begin + DisplayName := All Files; + FileMask := *.*; + end; + ''' + FileTypeIndex: int + ''' + Determines which filter is selected by default when the dialog opens. + + `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ determines which of the file types in `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is selected by default when the dialog opens. Set `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ to 1 to choose the first file type in the list as the default, or set `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ to 2 to choose the second file type as the default, and so forth. If the value of `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ is out or range, the first file type listed in `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is the default. + ''' + OkButtonLabel: str + ''' + Text of the ``Open`` or *Save* button. + + `OkButtonLabel <Vcl.Dialogs.TCustomFileDialog.OkButtonLabel.htm>`__ contains the text of the ``Open`` or *Save* button. + ''' + Options: FileDialogOptions + ''' + List of options that control the dialog. + + `Options <Vcl.Dialogs.TCustomFileDialog.Options.htm>`__ is a set of `FileDialogOption <Vcl.Dialogs.TFileDialogOption.htm>`__ options controlling the dialog's behavior. + ''' + Title: str + ''' + Dialog title. + + `Title <Vcl.Dialogs.TCustomFileDialog.Title.htm>`__ contains the dialog's title. + ''' + def OnExecute(self, Sender: Object) -> None: + ''' + # OnExecute: NotifyEvent + Occurs when a ``FileDialog`` gets executed. + + `OnExecute <Vcl.Dialogs.TCustomFileDialog.OnExecute.htm>`__ occurs when an instance of `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__ gets executed by the `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__ method. `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__ causes the dialog to be displayed. The `DoOnExecute <Vcl.Dialogs.TCustomFileDialog.DoOnExecute.htm>`__ method triggers this event. + ''' + def OnFileOkClick(self, Sender: Object, CanClose: bool) -> None: + ''' + # OnFileOkClick: FileDialogCloseEvent + Occurs when the user clicks the *OK* button. + + `OnFileOkClick <Vcl.Dialogs.TCustomFileDialog.OnFileOkClick.htm>`__ occurs when the user clicks the *OK* button. The event occurs just before the dialog returns with a result. If an event handler is defined, the property contains a pointer to a `FileDialogCloseEvent <Vcl.Dialogs.TFileDialogCloseEvent.htm>`__. The `DoOnFileOkClick <Vcl.Dialogs.TCustomFileDialog.DoOnFileOkClick.htm>`__ method triggers this event. + ''' + def OnFolderChange(self, Sender: Object) -> None: + ''' + # OnFolderChange: NotifyEvent + Occurs when a directory is opened or closed from the dialog. + + The `OnFolderChange <Vcl.Dialogs.TCustomFileDialog.OnFolderChange.htm>`__ event occurs when the user changes the directory whose contents are displayed in the dialog. This can happen when the user double-clicks a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. The event occurs after the folder changes. The `DoOnFolderChange <Vcl.Dialogs.TCustomFileDialog.DoOnFolderChange.htm>`__ method triggers this event. + ''' + def OnFolderChanging(self, Sender: Object, CanChange: bool) -> None: + ''' + # OnFolderChanging: FileDialogFolderChangingEvent + Occurs before a directory is opened or closed from the dialog. + + ``Vcl.Dialogs.TFileSaveDialog.OnFolderChanging`` inherits from `Vcl.Dialogs.TCustomFileDialog.OnFolderChanging <Vcl.Dialogs.TCustomFileDialog.OnFolderChanging.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.OnFolderChanging <Vcl.Dialogs.TCustomFileDialog.OnFolderChanging.htm>`__. + + `OnFileOkClick <Vcl.Dialogs.TCustomFileDialog.OnFileOkClick.htm>`__ occurs before a directory is opened or closed from the dialog. This can happen when the user double-clicks a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. If an event handler is defined, the property contains a pointer to a `FileDialogFolderChangingEvent <Vcl.Dialogs.TFileDialogFolderChangingEvent.htm>`__. The `DoOnFolderChanging <Vcl.Dialogs.TCustomFileDialog.DoOnFolderChanging.htm>`__ method triggers this event. + ''' + def OnOverwrite(self, Sender: Object, Response: FileDialogOverwriteResponse) -> None: + ''' + # OnOverwrite: FileDialogOverwriteEvent + Occurs just before a file would be overwritten. + + `OnOverwrite <Vcl.Dialogs.TCustomFileDialog.OnOverwrite.htm>`__ occurs just before a file would be overwritten, so this applies only to ``SaveDialog``\ s. If an event handler is defined, the property contains a pointer to a `FileDialogOverwriteEvent <Vcl.Dialogs.TFileDialogOverwriteEvent.htm>`__. The `DoOnOverwrite <Vcl.Dialogs.TCustomFileDialog.DoOnOverwrite.htm>`__ method triggers this event. + ''' + def OnSelectionChange(self, Sender: Object) -> None: + ''' + # OnSelectionChange: NotifyEvent + Occurs when the user changes the selection in the dialog. + + ``Vcl.Dialogs.TFileSaveDialog.OnSelectionChange`` inherits from `Vcl.Dialogs.TCustomFileDialog.OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__. + + `OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__ occurs when the user changes the selection in the dialog. The `DoOnSelectionChange <Vcl.Dialogs.TCustomFileDialog.DoOnSelectionChange.htm>`__ method triggers this event. + ''' + def OnShareViolation(self, Sender: Object, Response: FileDialogShareViolationResponse) -> None: + ''' + # OnShareViolation: FileDialogShareViolationEvent + Occurs when sharing violations arise from open or save operations. + + ``Vcl.Dialogs.TFileSaveDialog.OnShareViolation`` inherits from `Vcl.Dialogs.TCustomFileDialog.OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__. + + `OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__ occurs when sharing violations arise from open or save operations. If an event handler is defined, the property contains a pointer to a `FileDialogShareViolationEvent <Vcl.Dialogs.TFileDialogShareViolationEvent.htm>`__. The `DoOnShareViolation <Vcl.Dialogs.TCustomFileDialog.DoOnShareViolation.htm>`__ method triggers this event. + ''' + def OnTypeChange(self, Sender: Object) -> None: + ''' + # OnTypeChange: NotifyEvent + Occurs when the user changes the file type selection in the dialog. + + `OnTypeChange <Vcl.Dialogs.TCustomFileDialog.OnTypeChange.htm>`__ occurs when the user changes the file type selection in the dialog. The `DoOnTypeChange <Vcl.Dialogs.TCustomFileDialog.DoOnTypeChange.htm>`__ method triggers this event. + ''' + +class StringList(Strings): + ''' + ========================== + System.Classes.TStringList + ========================== + + + ``StringList`` maintains a list of strings. + + Use a string list object to store and manipulate a list of strings. ``StringList`` implements the abstract properties and methods introduced by `Strings <System.Classes.TStrings.htm>`__, and introduces new properties, events, and methods to: + + - Sort the strings in the list. + - Prohibit duplicate strings in sorted lists. + - Respond to changes in the contents of the list. + - ``Control`` whether strings are located, sorted, and identified as duplicates in a case-sensitive or case-insensitive manner. + + ``StringList`` can contain up to 2,147,483,647 strings. This is because the list is indexed using an `integer <Internal_Data_Formats_(Delphi).htm#Integer_Types>`__. See `String Types (Delphi) <String_Types_(Delphi).htm#About_String_Types>`__ for information about the size limit of each string. + + + ''' + + __hash__: ClassVar[None] = ... + Duplicates: Duplicates + ''' + Specifies whether duplicate strings can be added to sorted lists. + + Set ``Duplicates`` to specify what should happen when an attempt is made to add a duplicate string to a sorted list. The `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ property controls whether two strings are considered duplicates if they are identical except for differences in case. + + The value of ``Duplicates`` should be one of the following. + + ================= ========================================================================================================================== + **Value** **Meaning** + ================= ========================================================================================================================== + ``dupdupIgnore`` Ignore attempts to add duplicate strings to the list. + ``dupError`` Raise an ``EStringListError`` exception when an attempt is made to add duplicate strings to the sorted list. + ``dupAccept`` Permit duplicate strings in the sorted list. + ================= ========================================================================================================================== + + Set ``Duplicates`` before adding any strings to the list. Setting ``Duplicates`` to ``dupIgnore`` or ``dupError`` does nothing about duplicate strings that are already in the list. + + .. note:: ``Duplicates`` does nothing if the list is not sorted. + ''' + Sorted: bool + ''' + Specifies whether the strings in the list should be automatically sorted. + + Set ``Sorted`` to ``True`` to cause the strings in the list to be automatically sorted in ascending order. Set ``Sorted`` to ``False`` to allow strings to remain where they are inserted. When ``Sorted`` is ``False``, the strings in the list can be put in ascending order at any time by calling the `Sort <System.Classes.TStringList.Sort.htm>`__ method. + + When ``Sorted`` is ``True``, do not use `Insert <System.Classes.TStringList.Insert.htm>`__ to add strings to the list. Instead, use `Add <System.Classes.TStringList.Add.htm>`__, which will insert the new strings in the appropriate position. When ``Sorted`` is ``False``, use `Insert <System.Classes.TStringList.Insert.htm>`__ to add strings to an arbitrary position in the list, or `Add <System.Classes.TStringList.Add.htm>`__ to add strings to the end of the list. + + .. note:: The `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ property controls whether the strings in the list are sorted based on a case-sensitive or case-insensitive comparison. The sort order takes into account the locale of the system on which the application is running. + ''' + CaseSensitive: bool + ''' + Controls whether strings are located, sorted, and identified as duplicates in a case-sensitive or case-insensitive manner. + + Use ``CaseSensitive`` to indicate whether strings in the list should be compared in a case-sensitive or case-insensitive manner. Set ``CaseSensitive`` to ``True`` to make the ``StringList`` locate, check for duplicates, and sort its strings in a case-sensitive manner. Set ``CaseSensitive`` to ``False`` to make the ``StringList`` perform these operations case-insensitively. + + .. note:: By default, the ``CaseSensitive`` property is set to ``False``. + ''' + OwnsObjects: bool + ''' + Specifies whether the ``StringList`` owns the objects it contains. + + The ``OwnsObjects`` property specifies whether the ``StringList`` owns the stored objects or not. If the ``OwnsObjects`` property is set to ``True``, then the `Destroy <System.Classes.TStringList.Destroy.htm>`__ destructor will free up the memory allocated for those objects. + ''' + def Changed(self) -> None: + ''' + Fires an `OnChange <System.Classes.TStringList.OnChange.htm>`__ event. + + The ``Changed()`` method fires an `OnChange <System.Classes.TStringList.OnChange.htm>`__ event. + ''' + def Changing(self) -> None: + ''' + Fires an `OnChanging <System.Classes.TStringList.OnChanging.htm>`__ event. + + The ``Changing()`` method fires an `OnChanging <System.Classes.TStringList.OnChanging.htm>`__ event. + ''' + def ExchangeItems(self, Index1: int, Index2: int) -> None: + ''' + No have docs. + ''' + def Get(self, Index: int) -> str: + ''' + Returns a ``String``, given its index. + + The ``Get()`` method is used to return the string with the specified ``Index``. + ''' + def GetCapacity(self) -> int: + ''' + Returns the currently allocated size of the ``StringList``. + + The ``GetCapacity()`` method returns the currently allocated size of the ``StringList``. + ''' + def GetCount(self) -> int: + ''' + Returns the number of strings in the list. + + The ``GetCount()`` method is used to return the number of strings that have been added to the list. + ''' + def GetObject(self, Index: int) -> Object: + ''' + Returns the object associated with the string at a specified index. + + ``GetObject()`` is the protected read implementation of the `Objects <System.Classes.TStrings.Objects.htm>`__ property. The method returns the object associated with the string at a specified index. + + ``Index`` is the index of the string with which the object is associated. + ''' + def Put(self, Index: int, S: str) -> None: + ''' + Changes the value of the string with a specified index. + + ``Put()`` is the protected write implementation of the `Strings <System.Classes.TStrings.Strings.htm>`__ property. + + ``Put()`` changes the value of the string with the index specified by ``Index`` to ``'S'``. ``Put()`` does not change the object at the specified position. That is, any object associated with the previous string becomes associated with the new string. + ''' + def PutObject(self, Index: int, AObject: Object) -> None: + ''' + Changes the object associated with the string at a specified index. + + ``PutObject()`` is the protected write implementation of the `Objects <System.Classes.TStrings.Objects.htm>`__ property and is used to provide support for associating objects with the strings in the list. + ''' + def SetCapacity(self, NewCapacity: int) -> None: + ''' + Changes the amount of memory allocated to hold strings in the list. + + ``SetCapacity()`` changes the number of strings that the list can hold. + + .. note:: Assigning a value smaller than `Count <System.Classes.TStrings.Count.htm>`__ removes strings from the end of the list. Assigning a value greater than `Count <System.Classes.TStrings.Count.htm>`__ allocates space for more strings to be added. + ''' + def SetUpdateState(self, Updating: bool) -> None: + ''' + Performs internal adjustments before or after a series of updates. + + ``SetUpdateState()`` is called at the beginning or end of a series of updates. When the `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ method is first called and if the `StringList <System.Classes.TStringList.htm>`__ object is not already in the middle of an update, `StringList <System.Classes.TStringList.htm>`__ calls ``SetUpdateState()`` internally, with + + Updating set to ``True``. When the `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ method is called and it cancels out the last unmatched call to `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__, `StringList <System.Classes.TStringList.htm>`__ calls ``SetUpdateState()`` internally, with + + Updating set to ``False``. + ''' + def CompareStrings(self, S1: str, S2: str) -> int: + ''' + Compares two strings. + + The ``CompareStrings()`` method is used to compare the values of strings that appear in the list. + + ``S1`` and ``S2`` are the strings to compare. + + ``CompareStrings()`` returns a value less than 0 if ``S1`` < ``S2``, 0 if ``S1`` = ``S2``, and a value greater than 0 if ``S1`` > ``S2``. + + As implemented in `StringList <System.Classes.TStringList.htm>`__, ``CompareStrings()`` uses the global `AnsiCompareText <System.SysUtils.AnsiCompareText.htm>`__ function, which compares strings case-insensitively if the `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ property is set to ``False``. Otherwise, the case-sensitive `AnsiCompareStr <System.SysUtils.AnsiCompareStr.htm>`__ method is used. + ''' + def InsertItem(self, Index: int, S: str, AObject: Object) -> None: + ''' + Internally used by the `AddObject <System.Classes.TStrings.AddObject.htm>`__ method. + + The ``InsertItem()`` method is used internally by the `AddObject <System.Classes.TStrings.AddObject.htm>`__ method to add a string and its associated object to the list. + ''' + + @overload + def Create(self) -> None: + ''' + ``Creates`` an instance of a `StringList <System.Classes.TStringList.htm>`__ object. + + The ``Create()`` constructor creates a new instance of the `StringList <System.Classes.TStringList.htm>`__ object. + + ``Create()`` has five overloaded methods: + + #. Takes no parameters. + #. Accepts the ``OwnsObjects`` boolean parameter to specify whether the ``StringList`` `owns the objects <System.Classes.TStringList.OwnsObjects.htm>`__ or not. + #. Accepts the ``QuoteChar`` and ``Delimiter`` parameters to create a new ``StringList`` with the specified `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ and `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ properties. + #. Accepts the ``QuoteChar``, ``Delimiter`` and ``Options`` parameters to create a new ``StringList`` with the specified `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__, `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ and `Options <System.Classes.TStrings.Options.htm>`__ properties. + #. Accepts the ``Duplicates``, ``Sorted`` and ``CaseSensitive`` to create a new ``StringList`` with the specified `Duplicates <System.Classes.TStringList.Duplicates.htm>`__, `Sorted <System.Classes.TStringList.Sorted.htm>`__, `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ properties. + ''' + + @overload + def Create(self, OwnsObjects: bool) -> None: ... + + @overload + def Create(self, QuoteChar: str, Delimiter: str) -> None: ... + + @overload + def Create(self, QuoteChar: str, Delimiter: str, Options: StringOptions) -> None: ... + + @overload + def Create(Duplicates: Duplicates, Sorted: bool, CaseSensitive: bool) -> None: ... + + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `StringList <System.Classes.TStringList.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `StringList <System.Classes.TStringList.htm>`__ reference is not ``nil`` and only then calls ``Destroy()``. + + ``Destroy()`` frees the memory allocated to hold the list of strings and object references before calling the inherited destructor. + ''' + def Add(self, S: str) -> int: + ''' + ``Adds`` a new string to the list. + + Call ``Add()`` to add the string ``'S'`` to the list. If the list is sorted, S is added to the appropriate position in the sort order. If the list is not sorted, S is added to the end of the list. ``Add()`` returns the position of the item in the list, where the first item in the list has a value of 0. + + .. note:: For sorted lists, ``Add()`` will raise an ``EListError`` exception if the string ``'S'`` already appears in the list and `Duplicates <System.Classes.TStringList.Duplicates.htm>`__ is set to ``dupError``. If `Duplicates <System.Classes.TStringList.Duplicates.htm>`__ is set to ``dupIgnore``, trying to add a duplicate string causes ``Add()()()`` to return the index of the existing entry. + ''' + def AddObject(self, S: str, AObject: Object) -> int: + ''' + Adds a string to the list, and associates an object with the string. + + Call ``AddObject()`` to add a string and its associated object to the list. ``AddObject()`` returns the index of the new string and object. + + .. note:: If the `OwnsObjects <System.Classes.TStringList.OwnsObjects.htm>`__ property is set to ``False``, the `StringList <System.Classes.TStringList.htm>`__ object does not own the objects you add using ``AddObject()``. Objects added to the `StringList <System.Classes.TStringList.htm>`__ object still exist even if the `StringList <System.Classes.TStringList.htm>`__ instance is destroyed. They must be explicitly destroyed by the application. If you want the objects to be automatically freed upon destroying the `StringList <System.Classes.TStringList.htm>`__ object, you should set `OwnsObjects <System.Classes.TStringList.OwnsObjects.htm>`__ to ``True`` or use the overloaded `Create <System.Classes.TStringList.Create.htm>`__ constructor that accepts the ``Boolean`` ``OwnsObjects`` parameter, when creating the `StringList <System.Classes.TStringList.htm>`__ object. + + .. note:: For sorted lists, ``AddObject()`` raises an ``EListError`` exception if the string ``'S'`` already appears in the list and `Duplicates <System.Classes.TStringList.Duplicates.htm>`__ is set to ``dupError``. If `Duplicates <System.Classes.TStringList.Duplicates.htm>`__ is set to ``dupIgnore``, trying to add a duplicate string causes ``AddObject()()()`` to return the index of the existing entry. + ''' + def AddString(self, String: str) -> None: + ''' + Adds the specified strings (and objects) to the current `Strings <System.Classes.TStrings.htm>`__ object. + + ``System.Classes.TStringList.AddStrings`` inherits from `System.Classes.TStrings.AddStrings <System.Classes.TStrings.AddStrings.htm>`__. All content below this line refers to `System.Classes.TStrings.AddStrings <System.Classes.TStrings.AddStrings.htm>`__. + + Adds the specified strings (and objects) to the current `Strings <System.Classes.TStrings.htm>`__ object. + + `AddStrings <System.Classes.TStrings.AddStrings.htm>`__, with the ``Strings`` parameter of the `Strings <System.Classes.TStrings.htm>`__ type, `appends <System.Classes.TStrings.AddObject.htm>`__ strings and associated objects from the ``Strings`` object at the end of the ``StringList`` in the current `Strings <System.Classes.TStrings.htm>`__ object. + + `AddStrings <System.Classes.TStrings.AddStrings.htm>`__ with the ``Strings`` parameter representing the `array <System.TArray.htm>`__ of strings, `appends <System.Classes.TStrings.Add.htm>`__ strings from ``Strings`` array at the end of the ``StringList`` in the current `Strings <System.Classes.TStrings.htm>`__ object. + + `AddStrings <System.Classes.TStrings.AddStrings.htm>`__, with two parameters, `appends <System.Classes.TStrings.Add.htm>`__ strings from ``Strings`` array at the end of the ``StringList`` in the current `Strings <System.Classes.TStrings.htm>`__ object and associates references to objects from ``Objects`` with their strings (having the same numbers in ``Strings`` and ``Objects`` arrays). If the number of strings in ``Strings`` is not equal to the number of objects in ``Objects``, then an exception is raised. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Sets, from a ``Source`` object, the strings in the list and the possibly associated objects. + + Use ``Assign()`` to set the value of the `StringList <System.Classes.TStringList.htm>`__ object from another object. If ``Source`` is of type `StringList <System.Classes.TStringList.htm>`__, the list is set to the list of the ``Source`` `StringList <System.Classes.TStringList.htm>`__ object, and if associated objects are supported, any associated objects are copied from ``Source`` as well. + + If ``Source`` is not of type `StringList <System.Classes.TStringList.htm>`__, the inherited ``Assign()`` method will set the value of the list from any object that supports `StringList <System.Classes.TStringList.htm>`__ in its `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. + ''' + def Clear(self) -> None: + ''' + Deletes all the strings from the list. + + Call ``Clear()`` to empty the list of strings. All references to associated objects are also removed. If the list owns the objects, they are freed, otherwise not. + ''' + def Delete(self, Index: int) -> None: + ''' + Removes the string specified by the ``Index`` parameter. + + Call ``Delete()`` to remove a single string from the list. If an object is associated with the string, the reference to the object is removed as well. ``Index`` gives the position of the string, where 0 is the first string, 1 is the second string, and so on. + ''' + def Exchange(self, Index1: int, Index2: int) -> None: + ''' + No have docs. + ''' + def Find(self, S: str, Index: int) -> None: + ''' + Locates the index for a string in a sorted list and indicates whether a string with that value already exists in the list. + + Use ``Find()`` to obtain the index in a sorted list where the string ``'S'`` should be added. If the string ``'S'``, or a string that differs from S only in case when `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ is ``False``, already exists in the list, ``Find()`` returns ``True``. If the list does not contain a string that matches S, ``Find()`` returns ``False``. The index where S should go is returned in the ``Index`` parameter. The value of + + ``Index`` is zero-based, where the first string has the index 0, the second string has the index 1, and so on. + + .. note:: Only use ``Find()`` with sorted lists. For unsorted lists, use the `IndexOf <System.Classes.TStringList.IndexOf.htm>`__ method instead. + + .. tip:: If the ``'S'`` string is not found (thus return value of ``Find()`` is ``False``) then ``Index`` is set to the index of the first string in the list that sorts immediately before or after ``'S'``. + + .. code-block:: python + :caption: Delphi + + var + Index: int; + LStringList: StringList; + + begin + LStringList := TStringList.Create; + LStringList.Add('first string'); + LStringList.Add('second string'); + + LStringList.Find('first string', Index); // Index = 0 because 'first string' is at index 0 + LStringList.Find('third string', Index); // Index = 2 because 'third string' sorts after 'second string' + LStringList.Find('great string', Index); // Index = 1 because 'great string' would sort after 'first string', if it existed + + LStringList.Free; + end; + ''' + def IndexOf(self, S: str) -> int: + ''' + Returns the position of a `string <System.String.htm>`__ in the list. + + Call ``IndexOf()`` to obtain the position of the first occurrence of a string that matches ``'S'``. A string matches ``'S'`` if it is identical to ``'S'`` or, if `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ is ``False``, if they differ only in case. + + ``IndexOf()`` will work in this way on the condition that `Sorted <System.Classes.TStringList.Sorted.htm>`__ is set to ``False`` and `Duplicates <System.Classes.TStringList.Duplicates.htm>`__ is set to ``dupIgnore`` or ``dupError``. This reflects the internal definition of ``IndexOf()``, which calls `Find <System.Classes.TStringList.Find.htm>`__ if ``Sorted`` is set to ``True`` and will locate any string in the list that matches the parameter ``'S'``. Consequently, if `Duplicates <System.Classes.TStringList.Duplicates.htm>`__ is set to ``dupAccept``, the result will not always be the first string matching the parameter ``'S'``. + + Note that ``IndexOf()`` returns the 0-based index of the string. Thus, if ``'S'`` matches the first string in the list, ``IndexOf()`` returns 0, if ``'S'`` is the second string, ``IndexOf()`` returns 1, and so on. If the string does not have a match in the ``StringList``, ``IndexOf()`` returns -1. + ''' + def IndexOfName(self, Name: str) -> int: + ''' + Returns the position of the first name-value pair with the specified name. + + ``System.Classes.TStringList.IndexOfName`` inherits from `System.Classes.TStrings.IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__. All content below this line refers to `System.Classes.TStrings.IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__. + + Returns the position of the first name-value pair with the specified name. + + Call `IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__ to locate the first occurrence of a name-value pair where the name part is equal to the ``Name`` parameter or differs only in case. `IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__ returns the 0-based index of the string. If no string in the list has the indicated name, `IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__ returns -1. + + .. note:: If there is more than one name-value pair with a name portion matching the ``Name`` parameter, `IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__ returns the position of the first such string. + ''' + def IndexOfObject(self, AObject: Object) -> int: + ''' + Returns the index of the first string in the list associated with a given object. + + ``System.Classes.TStringList.IndexOfObject`` inherits from `System.Classes.TStrings.IndexOfObject <System.Classes.TStrings.IndexOfObject.htm>`__. All content below this line refers to `System.Classes.TStrings.IndexOfObject <System.Classes.TStrings.IndexOfObject.htm>`__. + + Returns the index of the first string in the list associated with a given object. + + Call `IndexOfObject <System.Classes.TStrings.IndexOfObject.htm>`__ to locate the first string in the list associated with the object ``AObject``. Specify the object you want to locate as the value of the ``AObject`` parameter. `IndexOfObject <System.Classes.TStrings.IndexOfObject.htm>`__ returns the 0-based index of the string and object. If the object is not associated with any of the strings, `IndexOfObject <System.Classes.TStrings.IndexOfObject.htm>`__ returns -1. + ''' + def Insert(self, Index: int, S: str) -> None: + ''' + ``Inserts`` a string to the list at the position specified by ``Index``. + + Call ``Insert()`` to add the string ``'S'`` to the list at the position specified by ``Index``. If ``Index`` is 0, the string is inserted at the beginning of the list. If ``Index`` is 1, the string is put in the second position of the list, and so on. + + If the string has an associated object, use the `InsertObject <System.Classes.TStringList.InsertObject.htm>`__ method instead. + + .. note:: If the list is sorted, calling ``Insert()`` or `InsertObject <System.Classes.TStringList.InsertObject.htm>`__ will raise an `EListError <System.Classes.EListError.htm>`__ exception. Use `Add <System.Classes.TStringList.Add.htm>`__ or `AddObject <System.Classes.TStringList.AddObject.htm>`__ with sorted lists. + ''' + def InsertObject(self, Index: int, S: str, AObject: Object) -> None: + ''' + Inserts a string into the list at the specified position, and associates it with an object. + + Call ``InsertObject()`` to insert the string ``'S'`` into the list at the position identified by ``Index``, and associate it with the object ``AObject``. If ``Index`` is 0, the string is inserted at the beginning of the list. If ``Index`` is 1, the string is put in the second position of the list, and so on. + ''' + def Sort(self) -> None: + ''' + Sorts the strings in the list in ascending order. + + Call ``Sort()`` to sort the strings in a list that has the `Sorted <System.Classes.TStringList.Sorted.htm>`__ property set to ``False``. String lists with the `Sorted <System.Classes.TStringList.Sorted.htm>`__ property set to ``True`` are automatically sorted. + + .. note:: ``Sort()`` uses AnsiCompareStr to sort the strings when `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ is ``True`` and AnsiCompareText when `CaseSensitive <System.Classes.TStringList.CaseSensitive.htm>`__ is ``False``. To provide your own comparison operator instead, use the `CustomSort <System.Classes.TStringList.CustomSort.htm>`__ method. + ''' + def CustomSort(self, Compare: StringListSortCompare) -> None: + ''' + Sorts the strings in the list in a customized order. + + Use ``CustomSort()`` to sort the strings in the list, where the sort order is defined by the ``Compare`` parameter. + + Supply a value for the Compare function that compares two strings in the ``StringList``. The + + List parameter provides access to the ``StringList``, while the ``Index1`` and ``Index2`` parameters identify the strings to be compared. + + Do not pass ``nil`` (Delphi) or ``NULL`` (C++) as the value of the ``Compare`` parameter. + + .. note:: You must explicitly call the ``CustomSort()`` method. Setting the `Sorted <System.Classes.TStringList.Sorted.htm>`__ property only sorts strings using ANSI (Windows) or UTF-8 (Linux) order, as implemented in the `Sort <System.Classes.TStringList.Sort.htm>`__ method. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs immediately after the list of strings changes. + + Write an ``OnChange`` event handler to respond to changes in the list of strings. For example, if the ``StringList`` is associated with a control, the ``OnChange`` event handler could tell the control to repaint itself whenever the content of the list changes. + + Whenever strings in the list are added, deleted, moved, or modified, the following events take place: + + #. An `OnChanging <System.Classes.TStringList.OnChanging.htm>`__ event occurs before the change. + #. The strings are added, deleted, moved, or modified. + #. An ``OnChange`` event occurs. + + .. note:: ``OnChange`` occurs for every change made to the list, regardless of whether the application calls `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ and `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ around a series of changes. + + ``OnChange`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnChanging(self, Sender: Object) -> None: + ''' + # OnChanging: NotifyEvent + Occurs immediately before the list of strings changes. + + Write an ``OnChanging`` event handler to prepare for changes in the list of strings. For example, if the ``StringList`` is associated with a control, the ``OnChanging`` event handler could tell the control to disable repaints until the `OnChange <System.Classes.TStringList.OnChange.htm>`__ event is triggered, notifying the control that the list has finished changing. + + Whenever strings in the list are added, deleted, moved, or modified, the following events take place: + + #. An ``OnChanging`` event occurs. + #. The strings are added, deleted, moved, or modified. + #. An `OnChange <System.Classes.TStringList.OnChange.htm>`__ event occurs after the changes are complete. + + .. note:: ``OnChanging`` occurs for every change made to the list, regardless of whether the application calls `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ and `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ around a series of changes. + + ``OnChanging`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + +class Screen(Component): + ''' + ================= + Vcl.Forms.TScreen + ================= + + ``Screen`` represents the state of the *Screen* in which an application runs. + + ``Screen`` introduces properties that specify: + + - What forms and data modules have been instantiated by the application. + - The active form, and the active control within that form. + - The size and resolution of the *Screen*. + - The cursors and fonts available for the application to use. + - The list of `monitors <Vcl.Forms.TScreen.Monitors.htm>`__ on which the application's forms can appear, including their dimensions. + + There is the `Screen <Vcl.Forms.Screen.htm>`__ global variable, of type ``Screen``, which is, by default, instantiated to a screen component created basing on information about the current screen device. Use `Screen <Vcl.Forms.Screen.htm>`__ to obtain information about the current state of the *Screen* in an application. + + ``Screen`` effectively handles the layout of the application's user interface on multiple monitors. If your application runs on multiple monitors, the `Monitors <Vcl.Forms.TScreen.Monitors.htm>`__ property maintains a list of monitors used to comprise the desktop, coordinates and dimensions of monitors. The `MonitorCount <Vcl.Forms.TScreen.MonitorCount.htm>`__ property returns the number of monitors. See also handling the `Screen <Handling_the_Screen.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + ActiveControl: WinControl + ''' + Indicates which control currently has input focus on the *Screen*. + + Read ``ActiveControl`` to learn which windowed control object in the active form currently receives the input from the keyboard. + + ``ActiveControl`` is a read-only property. To change the ``ActiveControl``, use the ``SetFocusedControl()`` method of the ``Form`` that contains the control that should receive focus. + + After focus shifts from one control to another, the *Screen* receives an `OnActiveControlChange <Vcl.Forms.TScreen.OnActiveControlChange.htm>`__ event. + ''' + ActiveCustomForm: CustomForm + ''' + Indicates the descendant of ``CustomForm`` that currently has focus. + + Read ``ActiveCustomForm`` to learn which form or property page has input focus. If the active custom form is a ``Form`` object, ``ActiveCustomForm`` is the same as ActiveForm. + ''' + ActiveForm: Form + ''' + Indicates which form currently has focus. + + Read ``ActiveForm`` to learn which form in the application has input focus. If the application is not currently active, ``ActiveForm`` is the ``Form`` that will have focus when the application becomes active again. + + ``ActiveForm`` is a read-only property. To change the ``ActiveForm``, use the ``SetFocus()`` method of the ``Form`` that should receive focus. ``ActiveForm`` also changes if the ``SetFocusedControl()`` method of an inactive form is called to set focus to a control on that inactive form. + + After focus shifts from one form to another, the *Screen* receives an `OnActiveFormChange <Vcl.Forms.TScreen.OnActiveFormChange.htm>`__ event. + + .. note:: If the application window with focus is not a ``Form`` descendant (for example, if it is a property page), it will not appear as ``ActiveForm``. To handle such cases, use the ``ActiveCustomForm`` property instead. + ''' + CustomFormCount: int + ''' + Indicates the number of forms or property pages displayed on the *Screen*. + + Read ``CustomFormCount`` to learn the number of forms or property pages currently displayed on the *Screen*. These forms can be accessed by the ``CustomForms`` property. ``CustomFormCount`` can be used with ``CustomForms`` to iterate over all the ``Form``\ s and property pages in an application. + ''' + CustomForms: list[int] + ''' + Lists all the ``Form``\ s and property ``Pages`` that are currently displayed in the application. + + Use ``CustomForms`` to access a form or property page by ``Index``. The value of ``Index`` is a number between zero (the first custom form) and ``CustomFormCount - 1``. ``CustomForms`` can be used with ``CustomFormCount`` when an application needs to iterate over all its forms and property ``Pages``. + + Unlike the ``Forms`` property, ``CustomForms`` lists ``CustomForm`` descendants that do not derive from ``Form`` (such as property ``Pages``). + + .. warning:: The order in which ``CustomForms`` lists its forms is affected by the *Z order* of the ``Form``\ s. Do not change the *Z order* of forms when using ``CustomForms`` to iterate over the ``Form``\ s in an application. + ''' + CursorCount: int + ''' + The number of changes performed on ``Cursor``. + + Use ``CursorCount()`` to obtain the number of changes made to the global cursor in the application. + ''' + Cursor: Cursor + ''' + Controls the mouse cursor image on a global level. + + Set ``Cursor`` to override the cursor image associated with individual control objects. When ``Cursor`` is ``crDefault``, the individual objects determine the cursor image. Assigning any other value sets the mouse cursor image for all windows belonging to the application. The global mouse cursor image remains in effect until the *Screen*'s ``Cursor`` property is changed back to ``crDefault``. + + ``Cursor`` can be set to any of the cursor values available in the `Cursors <Vcl.Forms.TScreen.Cursors.htm>`__ property. This can be one of the `built-in cursor values <Vcl.Controls.TCursor.htm>`__, or a custom cursor that has been added to the `Cursors <Vcl.Forms.TScreen.Cursors.htm>`__ property. + ''' + Cursors: list[int] + ''' + Lists the cursors available to the application. + + Use `Cursor <Vcl.Forms.TScreen.Cursor.htm>`__ to access a particular cursor for use by the application or by a control within the application. `Screen <Vcl.Forms.TScreen.htm>`__ includes several `built-in cursors <Vcl.Controls.TCursor.htm>`__ that are indexed by symbolic cursor constants such as ``crDefault``. The image associated with the built-in cursor constants can be changed by setting the ``Cursors`` property. + + Custom cursors can be added to the ``Cursors`` property for use by the application or any of its controls. To add a custom cursor to an application, you can either use two bitmaps (one for the normal image and one for the mask image) to create an icon and load it manually to the ``Cursors`` property, or follow the next steps: + + #. Create the cursor resource using a resource editor. + #. Declare a cursor constant with a value that does not conflict with an existing cursor constant. + #. Use the *Windows API* function ``LoadCursor()`` or ``LoadImage()`` to obtain a handle to the new cursor. + #. Set the ``Cursors`` property, indexed by the newly declared cursor constant, to the handle obtained from ``LoadCursor``. + + .. note:: Do not call the *Windows API* function ``DestroyCursor`` when finished with a custom cursor; it is handled automatically. If you use the first method (create an icon from two separate images and load it manually to the ``Cursors`` property), the ``DestroyIcon()`` method is required. + ''' + DataModules: list[int] + ''' + Lists all the data modules that are currently instantiated in the application. + + Use ``DataModules`` to access an instantiated data module by ``Index``. The value of ``Index`` is a number between zero (the first data module) and ``DataModuleCount - 1``. ``DataModules`` can be used with DataModuleCount when an application needs to iterate over all its data modules. + ''' + DataModuleCount: int + ''' + Indicates the number of data modules that are currently instantiated in the application. + + Read ``DataModuleCount`` to learn the number of data modules in the ``DataModules`` property. ``DataModuleCount`` can be used with DataModules when an application needs to iterate over all its data modules. + ''' + DefaultPixelsPerInch: int + ''' + No have docs. + ''' + FocusedForm: CustomForm + ''' + Provides a reference to the ``Form`` that has focus. + + ``FocusedForm()`` returns a reference to the ``Form`` that currently has focus. + ''' + SaveFocusedList: List + ''' + Gives a list containing the currently focused forms. + + Use ``SaveFocusedList()`` to obtain a list with the currently focused forms. + ''' + MonitorCount: int + ''' + Specifies the number of monitors used to comprise the desktop. + + Use ``MonitorCount`` to determine the number of monitors used to comprise the desktop. + ''' + Monitors: list[int] + ''' + Provides access to an individual monitor used to comprise the desktop. + + Use ``Monitors`` to access an individual monitor used to comprise the desktop. + + The `Monitor <Vcl.Forms.TCustomForm.Monitor.htm>`__ with its `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property set to ``True`` is the primary monitor. + ''' + DesktopRect: Rect + ''' + Specifies the boundaries of the virtual desktop relative to the upper-left corner of the primary monitor. + + Use ``DesktopRect`` to determine the coordinates of the entire virtual desktop, which includes all monitors in the system. ``DesktopRect`` is expressed in coordinates where ``(0,0)`` is the upper-left corner of the primary monitor. The primary monitor is the monitor with its `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property set to ``True``. + ''' + DesktopHeight: int + ''' + Specifies the height of the entire virtual desktop. + + Use ``DesktopHeight`` to determine the height of the entire desktop. The desktop is defined as the entire virtual desktop, which includes all monitors in the system. + + On a single-monitor system, ``DesktopHeight`` corresponds to `Height <Vcl.Forms.TScreen.Height.htm>`__. + ''' + DesktopLeft: int + ''' + Specifies the ``'x'``-coordinate of the desktop's left edge relative to the upper-left corner of the primary monitor. + + Use ``DesktopLeft`` to determine the ``'x'``-coordinate of the entire desktop's left edge relative to the upper-left corner of the primary monitor. The primary monitor is the monitor with its `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property set to ``True``. The desktop is defined as the entire virtual desktop, which includes all monitors in the system. + + On a single-monitor system, ``DesktopLeft`` is 0. + ''' + DesktopTop: int + ''' + Specifies the y-coordinate of the entire desktop's top edge relative to the upper-left corner of the primary monitor. + + Use ``DesktopTop`` to determine the y-coordinate of the desktop's top edge relative to the upper-left corner of the primary monitor. The primary monitor is the monitor with its `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property set to ``True``. The desktop is defined as the entire virtual desktop, which includes all monitors in the system. + + On a single-monitor system, ``DesktopTop`` is 0. + ''' + DesktopWidth: int + ''' + Specifies the width of the entire virtual desktop. + + Use ``DesktopWidth`` to determine the width of the desktop. The desktop is defined as the entire virtual desktop, which includes all monitors in the system. + + On a single-monitor system, ``DesktopWidth`` corresponds to `Width <Vcl.Forms.TScreen.Width.htm>`__. + ''' + WorkAreaRect: Rect + ''' + Specifies the boundaries of the usable work area on the primary monitor. + + Use ``WorkAreaRect`` to determine the coordinates of the usable space on the primary monitor. The usable work space is the surface of the primary monitor with the space occupied by the task bar and any tool bars subtracted off. + + The primary monitor is the monitor with its `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property set to ``True``. + ''' + WorkAreaHeight: int + ''' + Specifies the height of the work area on the primary monitor. + + Use ``WorkAreaHeight`` to determine the height of the usable space on the primary monitor. ``WorkAreaHeight`` differs from the `Height <Vcl.Forms.TScreen.Height.htm>`__ property in that it adjusts the work area to subtract any space occupied by the task bar and any tool bars that sit on the desktop. + + The primary monitor is the monitor whose `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property is ``True``. + ''' + WorkAreaLeft: int + ''' + Specifies the left edge of the work area on the primary monitor. + + Use ``WorkAreaLeft`` to determine the left edge of the usable space on the primary monitor. This value indicates the number of pixels between the left edge of the primary monitor, and the space left after accounting for the task bar and any tool bars that sit on the desktop. + + The primary monitor is the monitor whose `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property is ``True``. + ''' + WorkAreaTop: int + ''' + Specifies the top edge of the work area on the primary monitor. + + Use ``WorkAreaTop`` to determine the top edge of the usable space on the primary monitor. This value indicates the number of pixels between the top edge of the primary monitor, and the space left after accounting for the task bar and any tool bars that sit on the desktop. + + The primary monitor is the monitor whose `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property is ``True``. + ''' + WorkAreaWidth: int + ''' + Specifies the width of the work area on the primary monitor. + + Use ``WorkAreaWidth`` to determine the width of the usable space on the primary monitor. ``WorkAreaWidth`` differs from the `Width <Vcl.Forms.TScreen.Width.htm>`__ property in that it adjusts the work area to subtract any space occupied by the task bar and any tool bars that sit on the desktop. + + The primary monitor is the monitor whose `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property is ``True``. + ''' + HintFont: Font + ''' + Specifies the font used to display *Help Hints*. + + ``HintFont`` stores the *Windows* status font setting. This font is used by default for the *Help Hints* that appear when the user pauses the mouse over a control or ``MenuItem``. + ''' + IconFont: Font + ''' + Specifies the font used to display the ``Label``\ s on the icons in file selection dialogs. + + ``IconFont`` stores the *Windows* icon font setting. This font is used to label the icons on the desktop, and icons in the file selection dialogs. + ''' + MenuFont: Font + ''' + Specifies the font used for menu commands. + + ``MenuFont`` stores the *Windows* menu font setting. This font is used for ``MenuItems`` in ``MainMenu``\ s or ``PopupMenu``\ s that do not draw their own ``MenuItems`` in an OnDrawItem event handler. + ''' + MessageFont: Font + ''' + Specifies the font used for displaying text in ``MessageBox()``\ es. + + Use ``MessageFont()`` to obtain or to modify the current font used for displaying text in ``MessageBox()``\ es. + ''' + CaptionFont: Font + ''' + No have docs. + ''' + Fonts: str + ''' + Lists the face names for all fonts supported by the *Screen*. + + Read ``Fonts`` to learn what screen fonts are currently installed. Applications can use ``Fonts`` to ensure that they do not request a font that is not installed on the user's system. When an application uses a ``Font`` object to request a font that is not installed, the system substitutes another font, which may not be a font appropriate to the application's needs. + + .. note:: ``Fonts`` is a list of screen fonts. It does not give any indication of the printer fonts available to the application. + ''' + FormCount: int + ''' + Indicates the number of forms displayed on the *Screen*. + + Read ``FormCount`` to learn the number of forms currently displayed on the *Screen*. These forms can be accessed by the ``Forms`` property. ``FormCount`` can be used with ``Forms`` to iterate over all the ``Form``\ s in an application. + ''' + Forms: list[int] + '''Lists all the forms currently displayed in the application. + + Use ``Forms`` to access a form by index. The value of ``Index`` is a number between zero (the first form) and `FormCount - 1``. ``Forms`` can be used with ``FormCount`` when an application needs to iterate over all its forms, including all dialogs. + + ``Forms`` only lists the ``Form`` descendants in the application. This does not include, for example, property pages. To get a list that includes ``CustomForm`` descendants that do not descend from ``Form``, use ``CustomForms`` instead. + + .. warning:: The order in which ``Forms`` lists its forms is affected by the *Z order* of the forms. Do not change the *Z order* of forms when using ``Forms`` to iterate over the forms in an application. + ''' + Imes: str + ''' + Lists all *Input Method Editor*s (IMEs) installed on the system. + + Read ``Imes()`` to obtain a list of all ``Imes`` that are listed in the *Windows* registry. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. *IME*s vary in user interface, conversion dictionaries, and input method. + + Individual controls can require a specific *IME* to process the keyboard input when they have focus. To specify an *IME*, the control sets its ``ImeName`` property to one of the strings in ``Imes``. + + Each *IME* name in ``Imes`` has an associated keyboard layout handle. A keyboard layout handle is a *Windows* handle that identifies the primary language and *IME* used to process keyboard input. Use the keyboard layout handle in *Windows API* calls for programming the *IME*. To get the keyboard layout handle for a particular *IME*, a control can use code such as the following: + + .. code-block:: python + :caption: Delphi + + HKeyboard := Screen.Imes.Objects(Screen.Imes.IndexOf(ImeName)); + + .. code-block:: python + :caption: C++ + + HKeyboard = Screen->Imes->Objects(Screen->Imes->IndexOf(ImeName)); + ''' + DefaultIme: str + ''' + Indicates which *Input Method Editor* (IME) is active when the `Screen <Vcl.Forms.TScreen.htm>`__ object is created. + + In applications that support Asian language characters, read ``DefaultIme`` to determine the *IME* that is active when the application starts. + + An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. There can be multiple `Imes <Vcl.Forms.TScreen.Imes.htm>`__ installed on a single system. They vary in user interface, conversion dictionaries, and input method. + + Individual controls can override the default *IME*. When a control specifies a different *IME* should be used to enter information into the control, the *IME* that processes keyboard input changes when the control has focus. When the control loses focus, ``DefaultIme`` is restored as the system *IME*. + ''' + DefaultKbLayout: HKL + ''' + Indicates the *Windows* handle to the keyboard layout that was active when the application started running. + + Use ``DefaultKbLayout`` for making *Windows API* calls that require a handle to a keyboard layout. For example, if an application changes the keyboard layout to match the settings for another country, the value of ``DefaultKbLayout`` can be used as a parameter to the *Windows* ActivateKeyboardLayout function in order to restore the original layout. + + For Asian keyboards, the keyboard layout identifies the *Input Method Editor* (IME) as well as the default language. Use ``DefaultKbLayout`` in *Windows API* calls that work with the *IME*. ``DefaultKbLayout`` is the keyboard layout handle associated with the *IME* named by the `DefaultIme <Vcl.Forms.TScreen.DefaultIme.htm>`__ property. + ''' + Height: int + ''' + Indicates the vertical size of the *Screen* in pixels. + + Read ``Height`` to learn the size of the user's *Screen* in pixels. The size or position of objects placed on the *Screen*, can then be set to ensure that the objects fit on screen and don't look crowded. + ''' + PixelsPerInch: int + ''' + Indicates the number of screen pixels that make up a logical inch in the vertical direction. + + Read ``PixelsPerInch`` to convert between measurements in pixels and measurements in logical inches. ``PixelsPerInch`` is only accurate for vertical measurements. Most screens have a different scaling factor for horizontal measurements. The value in ``PixelsPerInch`` is set from system when the application loads. + ''' + CustomForms: list + ''' + Lists all the ``Form``\ s and property ``Pages`` that are currently displayed in the application. + + Use ``CustomForms`` to access a form or property page by ``Index``. The value of ``Index`` is a number between zero (the first custom form) and ``CustomFormCount - 1``. ``CustomForms`` can be used with ``CustomFormCount`` when an application needs to iterate over all its forms and property ``Pages``. + + Unlike the ``Forms`` property, ``CustomForms`` lists ``CustomForm`` descendants that do not derive from ``Form`` (such as property ``Pages``). + + .. warning:: The order in which ``CustomForms`` lists its forms is affected by the *Z order* of the ``Form``\ s. Do not change the *Z order* of forms when using ``CustomForms`` to iterate over the ``Form``\ s in an application. + ''' + PrimaryMonitor: Monitor + ''' + Provides a reference to the primary monitor. + + The coordinates of ``Monitors`` in a multi-monitor configuration are related to the primary monitor. ``PrimaryMonitor()`` returns a reference to the primary monitor. Use the `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property to determine whether a specific monitor is the primary one. + ''' + Width: int + ''' + Indicates the horizontal size of the *Screen* in pixels. + + Read ``Width`` to learn the size of the user's *Screen* in pixels. The size or position of objects placed on the *Screen*, can then be set to ensure that the objects fit on screen and don't look crowded. + ''' + UpdatingAllFonts: bool + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `Screen <Vcl.Forms.TScreen.htm>`__. + + Do not create separate instances of `Screen <Vcl.Forms.TScreen.htm>`__. There is a global variable, ``Screen``, of type `Screen <Vcl.Forms.TScreen.htm>`__, which is already instantiated for use by GUI applications. The properties of Screen are global to the entire application. + + ``AOwner`` specifies the ``Owner()`` of the *Screen*, which is responsible for freeing it. For the global `Screen <Vcl.Forms.TScreen.htm>`__ object, this is the application. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `Screen <Vcl.Forms.TScreen.htm>`__. + + Do not destroy the global object Screen that is automatically instantiated in GUI applications. + ''' + def DisableAlign(self) -> None: + ''' + Prevents forms from being aligned in the *Screen*. + + Call ``DisableAlign()`` to prevent forms from being aligned in the *Screen*. After calling ``DisableAlign()``, the ``Align`` properties of the *Screen*'s forms are ignored until the call is matched by a call to `EnableAlign <Vcl.Forms.TScreen.EnableAlign.htm>`__. + ''' + def EnableAlign(self) -> None: + ''' + Allows forms to be aligned in the *Screen*. + + Call ``EnableAlign()`` to allow forms to be aligned in the *Screen*. After calling `DisableAlign <Vcl.Forms.TScreen.DisableAlign.htm>`__, the ``Align`` properties of the *Screen*'s forms are ignored until that call is matched by a call to ``EnableAlign()``. + ''' + def MonitorFromPoint(self, Point: Point, MonitorDefault: MonitorDefaultTo) -> Monitor: + ''' + Returns the monitor where a specified point is located. + + Call ``MonitorFromPoint`` determine the monitor where a specified point is located. + + ``Point`` is the coordinates of the point to locate. It is in pixels relative to the upper-left corner of the primary monitor. + + ``MonitorDefault`` indicates how to select a monitor when the point does not fall clearly on a single monitor. + ''' + def MonitorFromRect(self, Rect: Rect, MonitorDefault: MonitorDefaultTo) -> Monitor: + ''' + Returns the monitor where a specified rectangle is located. + + Call ``MonitorFromRect`` determine the monitor where a specified boundary rectangle falls. + + ``Rect`` is the coordinates of the rectangle to locate. It is in pixels relative to the upper-left corner of the primary monitor. + + ``MonitorDefault`` indicates how to select a monitor when the rectangle does not fall entirely on a single monitor. + ''' + def MonitorFromWindow(self, Handle: Handle, MonitorDefault: MonitorDefaultTo) -> Monitor: + ''' + Returns the monitor where a specified window is located. + + Call ``MonitorFromWindow`` determine the monitor that displays a specified window. + + Handle is the window handle for the window to be located. + + ``MonitorDefault`` indicates how to select a monitor when the window does not fall entirely on a single monitor. + ''' + def Realign(self) -> None: + ''' + ``Realigns`` the *Screen*'s forms according to their ``Align`` properties. + + Call ``Realign()`` to realign the *Screen*'s forms according to their ``Align`` properties. + ''' + def ResetFonts(self) -> None: + ''' + Reinitializes the fonts listed in the `Fonts <Vcl.Forms.TScreen.Fonts.htm>`__ property. + + Call ``ResetFonts`` to ensure that the fonts listed in the `Fonts <Vcl.Forms.TScreen.Fonts.htm>`__ property are up to date. ``ResetFonts`` reinitializes the `Fonts <Vcl.Forms.TScreen.Fonts.htm>`__ property so that its ``Value`` is reread from the operating system the next time it is needed. + + `Screen <Vcl.Forms.TScreen.htm>`__ calls ``ResetFonts`` internally in response to messages from *Windows* that the available fonts have changed. + ''' + def OnActiveControlChange(self, Sender: Object) -> None: + ''' + # OnActiveControlChange: NotifyEvent + Occurs immediately after input focus changes to a new windowed control. + + Write an ``OnActiveControlChange`` event handler to take specific action when input focus changes to a new control. The change in focus may be within the active form, or across forms to a new form that then becomes the active form. + + When focus moves from one control to another, the following events occur. + + 1) If the new focused control is in a different form, focus moves to the new form. + + 2) Focus moves to the new active control. + + 3) If the active form changed, an ``OnActiveFormChange`` event occurs. + + 4) An ``OnActiveControlChange`` event occurs. + ''' + def OnActiveFormChange(self, Sender: Object) -> None: + ''' + # OnActiveFormChange: NotifyEvent + Occurs immediately after a new form becomes active in a multi-form application. + + Write an ``OnActiveFormChange`` event handler to take specific action when a new form becomes active. ``OnActiveFormChange`` occurs when the active form for the application changes, not when a form becomes active because the application becomes active. + ''' + +class CustomTaskDialog(Component): + ''' + ============================= + Vcl.Dialogs.TCustomTaskDialog + ============================= + + Base class for *Task Dialogs*. + + ``CustomTaskDialog`` provides the base class for Task Dialogs. Derived classes should inherit from `TaskDialog <Vcl.Dialogs.TTaskDialog.htm>`__ instead of ``CustomTaskDialog``. + + ''' + + __hash__: ClassVar[None] = ... + Button: TaskDialogButtonItem + ''' + Selected button. + + ``Button`` is the selected button on the *Task Dialog*. + ''' + Buttons: TaskDialogButtons + ''' + The collection of all buttons on the *Task Dialog*. + + ``Buttons`` contains all of the buttons for the *Task Dialog*. + ''' + Caption: str + ''' + ``Caption`` for the *Task Dialog*. + + ``Caption`` contains the ``Caption`` for the *Task Dialog*. + ''' + CommonButtons: TaskDialogCommonButtons + ''' + Specifies the push buttons displayed in the *Task Dialog*. + + ``CommonButtons`` specifies the common push buttons for the *Task Dialog*. If no buttons are specified, the *OK* button is displayed. + ''' + CustomFooterIcon: Icon + ''' + Indicates the custom footer icon, if any, for the *Task Dialog*. + + ``CustomFooterIcon`` points to the custom footer icon for this *Task Dialog*, if ``tfUseHiconFooter`` is set in `Flags <Vcl.Dialogs.TCustomTaskDialog.Flags.htm>`__. + ''' + CustomMainIcon: Icon + ''' + Indicates the custom main icon, if any, for the *Task Dialog*. + + ``CustomMainIcon`` points to the custom main icon for this *Task Dialog*, if ``tfUseHiconMain`` is set in `Flags <Vcl.Dialogs.TCustomTaskDialog.Flags.htm>`__. + ''' + DefaultButton: TaskDialogCommonButton + ''' + The default button for this *Task Dialog*. + + ``DefaultButton`` indicates the default button for this *Task Dialog*. + ''' + ExpandButtonCaption: str + ''' + Additional information for this button. + + ``ExpandButtonCaption`` contains additional text to be displayed when the ``Caption`` is expanded. + ''' + Expanded: bool + ''' + Indicates whether the *Task Dialog* is expanded. + + ``Expanded`` is ``True`` when the *Task Dialog* is expanded. + ''' + ExpandedText: str + ''' + Text to display when the *Task Dialog* is expanded. + + ``ExpandedText`` contains additional information to display when the *Task Dialog* is expanded. + ''' + Flags: TaskDialogFlags + ''' + Flags for this *Task Dialog*. + + ``Flags`` provides flags for `CustomTaskDialog <Vcl.Dialogs.TCustomTaskDialog.htm>`__. + + ============================== =============================================================================== + ..Flag.. *``Description``* + ============================== =============================================================================== + ``tfEnableHyperlinks`` If set, content, footer, and expanded text can include hyperlinks. + ``tfUseHiconMain`` If set, use the custom main icon. + ``tfUseHiconFooter`` If set, use the custom footer icon. + ``tfAllowDialogCancellation`` If set, permits *Task Dialog* to be closed in the absence of a *Cancel* button. + ``tfUseCommandLinks`` If set, buttons are displayed as command links using a standard dialog glyph. + ``tfUseCommandLinksNoIcon`` If set, buttons are displayed as command links without a glyph. + ``tfExpandFooterArea`` If set, display expanded text in the footer. + ``tfExpandedByDefault`` If set, expanded text is displayed when the *Task Dialog* opens. + ``tfVerificationFlagChecked`` If set, the verification ``CheckBox`` is initially checked. + ``tfShowProgressBar`` If set, display the progress bar. + ``tfShowMarqueeProgressBar`` If set, display the marquee progress bar. + ``tfCallbackTimer`` If set, dialogs *callback* will be called every 200 milliseconds. + ``tfPositionRelativeToWindow`` If set, *Task Dialog* is centered with respect to parent window. + ``tfRtlLayout`` If set, text reads right-to-left. + ``tfNoDefaultRadioButton`` If set, there is no default ``RadioButton``. + ``tfCanBeMinimized`` If set, the *Task Dialog* can be minimized. + ============================== =============================================================================== + ''' + FooterIcon: TaskDialogIcon + ''' + Indicates which standard footer icon to display. + + ``FooterIcon`` indicates which standard footer icon to display in the *Task Dialog*. Legal values include ``tdiNone``, ``tdiWarning``, ``tdiError``, ``tdiInformation``, and ``tdiShield``. + ''' + FooterText: str + ''' + String to be used in the footer area of the *Task Dialog*. + + ``FooterText`` provides a string to be used in the footer area of the *Task Dialog*. + ''' + Handle: HWND + ''' + Handle to the parent window. + + ``Handle`` provides a handle to the parent window. This field can be ``NULL``. + ''' + HelpContext: HelpContext + ''' + Help context for the *Task Dialog*. + + ``HelpContext()`` provides the help context for the *Task Dialog*. + ''' + MainIcon: TaskDialogIcon + ''' + Indicates which standard main icon to display. + + ``MainIcon`` indicates which standard main icon to display in the *Task Dialog*. Legal values include ``tdiNone``, ``tdiWarning``, ``tdiError``, ``tdiInformation``, and ``tdiShield``. + ''' + ModalResult: ModalResult + ''' + Modal result. + + ``ModalResult`` contains the modal result of the *Task Dialog*: ``mrYes``, ``mrNo``, ``mrOk``, ``mrCancel`` ``mrAbort``, ``mrRetry``, ``mrIgnore``, ``mrAll``, ``mrNoToAll``, ``mrYesToAll``, ``mrClose``. + ''' + ProgressBar: TaskDialogProgressBar + ''' + Progress bar for this *Task Dialog*. + + ``ProgressBar`` is the TaskDialogProgressBar <Vcl.Dialogs.TTaskDialogProgressBar.htm>`__ for this *Task Dialog*. + ''' + RadioButton: TaskDialogRadioButtonItem + ''' + Selected ``RadioButton``. + + ``RadioButton`` is the selected ``RadioButton`` on this *Task Dialog*. + ''' + RadioButtons: TaskDialogButtons + ''' + Collection of all ``RadioButton``\ s on this *Task Dialog*. + + ``RadioButtons`` is the collection of ``RadioButton``\ s for this class dialog. + ''' + Text: str + ''' + The main text on this *Task Dialog*. + + ``Text`` contains the main text to be displayed in this *Task Dialog*. + ''' + Title: str + ''' + The title of this *Task Dialog*. + + ``Title`` contains the title of this *Task Dialog*. + ''' + URL: str + ''' + URL for the *Task Dialog*. + + ``URL`` contains the URL for the *Task Dialog*. + ''' + VerificationText: str + ''' + Text used to label the verification ``CheckBox``. + + ``VerificationText`` contains text used to label the verification ``CheckBox``. + ''' + def DoExecute(self, ParentWnd: HWND) -> bool: + ''' + Executes the *Task Dialog*. + + Use ``DoExecute`` to perform the execution of the *Task Dialog*. + ''' + def DoOnButtonClicked(self, AModalResult: int, CanClose: bool) -> None: + ''' + Performs the click function of the *Task Dialog*. + + Use ``DoOnButtonClicked`` to perform the click action of the *Task Dialog*. + ''' + def DoOnDialogContructed(self) -> None: + ''' + Performs the on-construction actions of the *Task Dialog*. + + Use ``DoOnDialogContructed`` to perform the on-construction actions of the *Task Dialog*. + ''' + def DoOnDialogCreated(self) -> None: + ''' + Performs the on-creation actrions of a *Task Dialog*. + + Use ``DoOnDialogCreated`` to perform the on-creation actions of the *Task Dialog*. + ''' + def DoOnDialogDestroyed(self) -> None: + ''' + Performs the on-destruction actions of a *Task Dialog*. + + Use ``DoOnDialogDestroyed`` to perform the on-destruction actions of a *Task Dialog*. + ''' + def DoOnExpandButtonClicked(self, Expanded: bool) -> None: + ''' + Performs the expansion action of a *Task Dialog* when the ``Expand`` button is pushed. + + Use ``DoOnExpandButtonClicked`` to perform the expansion action of a *Task Dialog*. + ''' + def DoOnHelp(self) -> None: + ''' + Performs the help function for a *Task Dialog*. + + Use ``DoOnHelp`` to perform the help function for a *Task Dialog*. + ''' + def DoOnHyperlinkClicked(self, AURL: str) -> None: + ''' + Performs the hyperlink click action of a *Task Dialog*. + + Use ``DoOnHyperlinkClicked`` to perform the hyperlink click action of a *Task Dialog*. + ''' + def DoOnNavigated(self) -> None: + ''' + Performs the navigation action of a *Task Dialog*. + + Use ``DoOnNavigated`` to perform the navigation action of a *Task Dialog*. + ''' + def DoOnRadioButtonClicked(self, ButtonID: int) -> None: + ''' + Performs the ``RadioButton`` click action of a *Task Dialog*. + + Use ``DoOnRadioButtonClicked`` to perform the radion button click action of a *Task Dialog*. + ''' + def DoOnTimer(self, TickCount: int, Reset: bool) -> None: + ''' + Performs the timer action of a *Task Dialog*. + + Use ``DoOnTimer`` to perform the timer action of the *Task Dialog*. + ''' + def DoOnVerificationClicked(self, Checked: bool) -> None: + ''' + Performs the verification check action of a *Task Dialog*. + + Use ``DoOnVerificationClicked`` to perform the verification check action of a *Task Dialog*. + ''' + def ShowHelpException(self, E: Exception) -> None: + ''' + No have docs. + ''' + def CallbackProc(self, hwnd: HWND, msg: UINT, wParam: WPARAM, LParam: LPARAM, lpRefData: LONG_PR) -> HResult: + ''' + An application-defined function used with *Task Dialog*s. + + Use ``CallbackProc`` as an application-defined function used with the TaskDialogIndirect function. It receives messages from the *Task Dialog* when various events occur. An application must register this *callback* function. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates a custom *Task Dialog* instance. + + Use ``Create()`` to create an instance of `CustomTaskDialog <Vcl.Dialogs.TCustomTaskDialog.htm>`__. Derived classes should inherit from the `TaskDialog <Vcl.Dialogs.TTaskDialog.htm>`__ instead of this one. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance of a custom *Task Dialog*. + + Use ``Destroy()`` to destroy an instance of `CustomTaskDialog <Vcl.Dialogs.TCustomTaskDialog.htm>`__. + ''' + + @overload + def Execute(self) -> bool: + ''' + Displays the *Task Dialog*. + + Use ``Execute()`` to display the *Task Dialog*. ``Execute()`` opens the task-selection dialog, returning ``True`` when the user selects a task and clicks Open. If the user clicks Cancel, ``Execute()`` returns ``False``. + + The ``ParentWnd`` parameter is a window handle of type `HWND MSDN <http://msdn.microsoft.com/aa383751(VS.85).aspx>`__. If none is provided, the current form handle is used, accessed from `Vcl.Forms.TApplication.ActiveFormHandle <Vcl.Forms.TApplication.ActiveFormHandle.htm>`__ in the global variable `Vcl.Forms.Application <Vcl.Forms.Application.htm>`__. + ''' + + @overload + def Execute(self, ParentWnd: HWND) -> bool: ... + + def OnButtonClicked(self, Sender: Object, ModalResult: ModalResult, CanClose: bool) -> None: + ''' + # OnButtonClicked: TaskDlgClickEvent + ``Button`` click event. + + ``OnButtonClicked`` is the button click event for *Task Dialog*. + ''' + def OnDialogConstructed(self, Sender: Object) -> None: + ''' + # OnDialogConstructed: NotifyEvent + Dialog constructed event. + + ``OnDialogConstructed`` is the dialog constructed event. + ''' + def OnDialogCreated(self, Sender: Object) -> None: + ''' + # OnDialogCreated: NotifyEvent + *Task Dialog* creation event. + + ``OnDialogCreated`` is the *Task Dialog* creation event. + ''' + def OnDialogDestroyed(self, Sender: Object) -> None: + ''' + # OnDialogDestroyed: NotifyEvent + Task dialog destruction event. + + ``OnDialogDestroyed`` is the *Task Dialog* destroy event. + ''' + def OnExpanded(self, Sender: Object) -> None: + ''' + # OnExpanded: NotifyEvent + Task dialog expanded event. + + ``OnExpanded`` is the *Task Dialog* expanded event. + ''' + def OnHyperlinkClicked(self, Sender: Object) -> None: + ''' + # OnHyperlinkClicked: NotifyEvent + Task dialog hyperlink clicked event. + + ``OnHyperlinkClicked`` is the *Task Dialog* hyperlink clicked event. + ''' + def OnNavigated(self, Sender: Object) -> None: + ''' + # OnNavigated: NotifyEvent + *Task Dialog* navigation event. + + ``OnNavigated`` is the *Task Dialog* navigation event. + ''' + def OnRadioButtonClicked(self, Sender: Object) -> None: + ''' + # OnRadioButtonClicked: NotifyEvent + *Task Dialog* ``RadioButton`` click event. + + ``OnRadioButtonClicked`` occurs when the user clicks the ``RadioButton`` in a *Task Dialog*. + ''' + def OnTimer(self, Sender: Object, TickCount: int, Reset: bool) -> None: + ''' + # OnTimer: TaskDlgTimerEvent + Task dialog timer event. + + ``OnTimer`` is the *Task Dialog* timer event. + ''' + def OnVerificationClicked(self, Sender: Object) -> None: + ''' + # OnVerificationClicked: NotifyEvent + *Task Dialog* verification ``CheckBox`` event. + + ``OnVerificationClicked`` is the *Task Dialog* verification ``CheckBox`` event. + ''' + +class TaskDialog(CustomTaskDialog): + ''' + ======================= + Vcl.Dialogs.TTaskDialog + ======================= + + Class for *Task Dialog* properties. + + ``TaskDialog`` is a class for *Task Dialog*s. + + A Task dialog is a dialog box somewhat like the standard call to ``Application.MessageBox()`` in the VCL, but for *Vista* and *Windows 7* (and later versions) of *Windows* only. Besides the usual default sets of buttons (OK and Cancel), you can define extra ``Button``\ s. Properties in ``TaskDialog`` exist for ``Caption``, ``Title``, and ``Text``. + + .. note:: *Task Dialog*s require *Vista*, *Windows 7*, or later *Windows* operating systems. + + ''' + + __hash__: ClassVar[None] = ... + Buttons: TaskDialogButtons + ''' + The collection of all buttons on the *Task Dialog*. + + `Buttons <Vcl.Dialogs.TCustomTaskDialog.Buttons.htm>`__ contains all of the buttons for the *Task Dialog*. + ''' + Caption: str + ''' + ``Caption`` for the *Task Dialog*. + + `Caption <Vcl.Dialogs.TCustomTaskDialog.Caption.htm>`__ contains the ``Caption`` for the *Task Dialog*. + ''' + CommonButtons: TaskDialogCommonButtons + ''' + Specifies the push buttons displayed in the *Task Dialog*. + + `CommonButtons <Vcl.Dialogs.TCustomTaskDialog.CommonButtons.htm>`__ specifies the common push buttons for the *Task Dialog*. If no buttons are specified, the *OK* button is displayed. + ''' + CustomFooterIcon: Icon + ''' + Indicates the custom footer icon, if any, for the *Task Dialog*. + + ``Vcl.Dialogs.TTaskDialog.CustomFooterIcon`` inherits from `Vcl.Dialogs.TCustomTaskDialog.CustomFooterIcon <Vcl.Dialogs.TCustomTaskDialog.CustomFooterIcon.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.CustomFooterIcon <Vcl.Dialogs.TCustomTaskDialog.CustomFooterIcon.htm>`__. + + `CustomFooterIcon <Vcl.Dialogs.TCustomTaskDialog.CustomFooterIcon.htm>`__ points to the custom footer icon for this *Task Dialog*, if ``tfUseHiconFooter`` is set in `Flags <Vcl.Dialogs.TCustomTaskDialog.Flags.htm>`__. + ''' + CustomMainIcon: Icon + ''' + Indicates the custom main icon, if any, for the *Task Dialog*. + + `CustomMainIcon <Vcl.Dialogs.TCustomTaskDialog.CustomMainIcon.htm>`__ points to the custom main icon for this *Task Dialog*, if ``tfUseHiconMain`` is set in `Flags <Vcl.Dialogs.TCustomTaskDialog.Flags.htm>`__. + ''' + DefaultButton: TaskDialogCommonButton + ''' + The default button for this *Task Dialog*. + + `DefaultButton <Vcl.Dialogs.TCustomTaskDialog.DefaultButton.htm>`__ indicates the default button for this *Task Dialog*. + ''' + ExpandButtonCaption: str + ''' + Additional information for this button. + + ``Vcl.Dialogs.TTaskDialog.ExpandButtonCaption`` inherits from `Vcl.Dialogs.TCustomTaskDialog.ExpandButtonCaption <Vcl.Dialogs.TCustomTaskDialog.ExpandButtonCaption.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.ExpandButtonCaption <Vcl.Dialogs.TCustomTaskDialog.ExpandButtonCaption.htm>`__. + + `ExpandButtonCaption <Vcl.Dialogs.TCustomTaskDialog.ExpandButtonCaption.htm>`__ contains additional text to be displayed when the ``Caption`` is expanded. + ''' + ExpandedText: str + ''' + Text to display when the *Task Dialog* is expanded. + + `ExpandedText <Vcl.Dialogs.TCustomTaskDialog.ExpandedText.htm>`__ contains additional information to display when the *Task Dialog* is expanded. + ''' + Flags: TaskDialogFlags + ''' + Flags for this *Task Dialog*. + + `Flags <Vcl.Dialogs.TCustomTaskDialog.Flags.htm>`__ provides flags for `CustomTaskDialog <Vcl.Dialogs.TCustomTaskDialog.htm>`__. + + ============================== =============================================================================== + ..Flag.. *``Description``* + ============================== =============================================================================== + ``tfEnableHyperlinks`` If set, content, footer, and expanded text can include hyperlinks. + ``tfUseHiconMain`` If set, use the custom main icon. + ``tfUseHiconFooter`` If set, use the custom footer icon. + ``tfAllowDialogCancellation`` If set, permits *Task Dialog* to be closed in the absence of a *Cancel* button. + ``tfUseCommandLinks`` If set, buttons are displayed as command links using a standard dialog glyph. + ``tfUseCommandLinksNoIcon`` If set, buttons are displayed as command links without a glyph. + ``tfExpandFooterArea`` If set, display expanded text in the footer. + ``tfExpandedByDefault`` If set, expanded text is displayed when the *Task Dialog* opens. + ``tfVerificationFlagChecked`` If set, the verification ``CheckBox`` is initially checked. + ``tfShowProgressBar`` If set, display the progress bar. + ``tfShowMarqueeProgressBar`` If set, display the marquee progress bar. + ``tfCallbackTimer`` If set, dialogs *callback* will be called every 200 milliseconds. + ``tfPositionRelativeToWindow`` If set, *Task Dialog* is centered with respect to parent window. + ``tfRtlLayout`` If set, text reads right-to-left. + ``tfNoDefaultRadioButton`` If set, there is no default ``RadioButton``. + ``tfCanBeMinimized`` If set, the *Task Dialog* can be minimized. + ============================== =============================================================================== + ''' + FooterIcon: TaskDialogIcon + ''' + Indicates which standard footer icon to display. + + `FooterIcon <Vcl.Dialogs.TCustomTaskDialog.FooterIcon.htm>`__ indicates which standard footer icon to display in the *Task Dialog*. Legal values include ``tdiNone``, ``tdiWarning``, ``tdiError``, ``tdiInformation``, and ``tdiShield``. + ''' + FooterText: str + ''' + String to be used in the footer area of the *Task Dialog*. + + `FooterText <Vcl.Dialogs.TCustomTaskDialog.FooterText.htm>`__ provides a string to be used in the footer area of the *Task Dialog*. + ''' + HelpContext: HelpContext + ''' + Help context for the *Task Dialog*. + + `HelpContext <Vcl.Dialogs.TCustomTaskDialog.HelpContext.htm>`__ provides the help context for the *Task Dialog*. + ''' + MainIcon: TaskDialogIcon + ''' + Indicates which standard main icon to display. + + `MainIcon <Vcl.Dialogs.TCustomTaskDialog.MainIcon.htm>`__ indicates which standard main icon to display in the *Task Dialog*. Legal values include ``tdiNone``, ``tdiWarning``, ``tdiError``, ``tdiInformation``, and ``tdiShield``. + ''' + ProgressBar: TaskDialogProgressBar + ''' + Progress bar for this *Task Dialog*. + + `ProgressBar <Vcl.Dialogs.TCustomTaskDialog.ProgressBar.htm>`__ is the TaskDialogProgressBar <Vcl.Dialogs.TTaskDialogProgressBar.htm>`__ for this *Task Dialog*. + ''' + RadioButtons: TaskDialogButtons + ''' + Collection of all ``RadioButton``\ s on this *Task Dialog*. + + `RadioButtons <Vcl.Dialogs.TCustomTaskDialog.RadioButtons.htm>`__ is the collection of ``RadioButton``\ s for this class dialog. + ''' + Text: str + ''' + The main text on this *Task Dialog*. + + `Text <Vcl.Dialogs.TCustomTaskDialog.Text.htm>`__ contains the main text to be displayed in this *Task Dialog*. + ''' + Title: str + ''' + The title of this *Task Dialog*. + + `Title <Vcl.Dialogs.TCustomTaskDialog.Title.htm>`__ contains the title of this *Task Dialog*. + ''' + VerificationText: str + ''' + Text used to label the verification ``CheckBox``. + + ``Vcl.Dialogs.TTaskDialog.VerificationText`` inherits from `Vcl.Dialogs.TCustomTaskDialog.VerificationText <Vcl.Dialogs.TCustomTaskDialog.VerificationText.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.VerificationText <Vcl.Dialogs.TCustomTaskDialog.VerificationText.htm>`__. + + `VerificationText <Vcl.Dialogs.TCustomTaskDialog.VerificationText.htm>`__ contains text used to label the verification ``CheckBox``. + ''' + def OnButtonClicked(self, Sender: Object, ModalResult: ModalResult, CanClose: bool) -> None: + ''' + # OnButtonClicked: TaskDlgClickEvent + ``Button`` click event. + + `OnButtonClicked <Vcl.Dialogs.TCustomTaskDialog.OnButtonClicked.htm>`__ is the button click event for *Task Dialog*. + ''' + def OnDialogConstructed(self, Sender: Object) -> None: + ''' + # OnDialogConstructed: NotifyEvent + Dialog constructed event. + + ``Vcl.Dialogs.TTaskDialog.OnDialogConstructed`` inherits from `Vcl.Dialogs.TCustomTaskDialog.OnDialogConstructed <Vcl.Dialogs.TCustomTaskDialog.OnDialogConstructed.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.OnDialogConstructed <Vcl.Dialogs.TCustomTaskDialog.OnDialogConstructed.htm>`__. + + `OnDialogConstructed <Vcl.Dialogs.TCustomTaskDialog.OnDialogConstructed.htm>`__ is the dialog constructed event. + ''' + def OnDialogCreated(self, Sender: Object) -> None: + ''' + # OnDialogCreated: NotifyEvent + *Task Dialog* creation event. + + `OnDialogCreated <Vcl.Dialogs.TCustomTaskDialog.OnDialogCreated.htm>`__ is the *Task Dialog* creation event. + ''' + def OnDialogDestroyed(self, Sender: Object) -> None: + ''' + # OnDialogDestroyed: NotifyEvent + Task dialog destruction event. + + ``Vcl.Dialogs.TTaskDialog.OnDialogDestroyed`` inherits from `Vcl.Dialogs.TCustomTaskDialog.OnDialogDestroyed <Vcl.Dialogs.TCustomTaskDialog.OnDialogDestroyed.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.OnDialogDestroyed <Vcl.Dialogs.TCustomTaskDialog.OnDialogDestroyed.htm>`__. + + `OnDialogDestroyed <Vcl.Dialogs.TCustomTaskDialog.OnDialogDestroyed.htm>`__ is the *Task Dialog* destroy event. + ''' + def OnExpanded(self, Sender: Object) -> None: + ''' + # OnExpanded: NotifyEvent + Task dialog expanded event. + + `OnExpanded <Vcl.Dialogs.TCustomTaskDialog.OnExpanded.htm>`__ is the *Task Dialog* expanded event. + ''' + def OnHyperlinkClicked(self, Sender: Object) -> None: + ''' + # OnHyperlinkClicked: NotifyEvent + Task dialog hyperlink clicked event. + + ``Vcl.Dialogs.TTaskDialog.OnHyperlinkClicked`` inherits from `Vcl.Dialogs.TCustomTaskDialog.OnHyperlinkClicked <Vcl.Dialogs.TCustomTaskDialog.OnHyperlinkClicked.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.OnHyperlinkClicked <Vcl.Dialogs.TCustomTaskDialog.OnHyperlinkClicked.htm>`__. + + `OnHyperlinkClicked <Vcl.Dialogs.TCustomTaskDialog.OnHyperlinkClicked.htm>`__ is the *Task Dialog* hyperlink clicked event. + ''' + def OnNavigated(self, Sender: Object) -> None: + ''' + # OnNavigated: NotifyEvent + *Task Dialog* navigation event. + + `OnNavigated <Vcl.Dialogs.TCustomTaskDialog.OnNavigated.htm>`__ is the *Task Dialog* navigation event. + ''' + def OnRadioButtonClicked(self, Sender: Object) -> None: + ''' + # OnRadioButtonClicked: NotifyEvent + *Task Dialog* ``RadioButton`` click event. + + ``Vcl.Dialogs.TTaskDialog.OnRadioButtonClicked`` inherits from `Vcl.Dialogs.TCustomTaskDialog.OnRadioButtonClicked <Vcl.Dialogs.TCustomTaskDialog.OnRadioButtonClicked.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.OnRadioButtonClicked <Vcl.Dialogs.TCustomTaskDialog.OnRadioButtonClicked.htm>`__. + + `OnRadioButtonClicked <Vcl.Dialogs.TCustomTaskDialog.OnRadioButtonClicked.htm>`__ occurs when the user clicks the ``RadioButton`` in a *Task Dialog*. + ''' + def OnTimer(self, Sender: Object, TickCount: int, Reset: bool) -> None: + ''' + # OnTimer: TaskDlgTimerEvent + *Task Dialog* timer event. + + `OnTimer <Vcl.Dialogs.TCustomTaskDialog.OnTimer.htm>`__ is the *Task Dialog* timer event. + ''' + def OnVerificationClicked(self, Sender: Object) -> None: + ''' + # OnVerificationClicked: NotifyEvent + *Task Dialog* verification ``CheckBox`` event. + + ``Vcl.Dialogs.TTaskDialog.OnVerificationClicked`` inherits from `Vcl.Dialogs.TCustomTaskDialog.OnVerificationClicked <Vcl.Dialogs.TCustomTaskDialog.OnVerificationClicked.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomTaskDialog.OnVerificationClicked <Vcl.Dialogs.TCustomTaskDialog.OnVerificationClicked.htm>`__. + + `OnVerificationClicked <Vcl.Dialogs.TCustomTaskDialog.OnVerificationClicked.htm>`__ is the *Task Dialog* verification ``CheckBox`` event. + ''' + +class CustomFlowPanel(CustomPanel): + ''' + ============================= + Vcl.ExtCtrls.TCustomFlowPanel + ============================= + + The base class for all ``FlowPanel`` components. + + Use ``CustomFlowPanel`` as a base class when defining ``FlowPanel``\ s that include other controls as constituent parts. + ''' + + __hash__: ClassVar[None] = ... + AutoWrap: bool + ''' + Specifies whether controls are automatically wrapped to fit on the ``FlowPanel``. + + If set to ``True``, a new control is automatically placed in a location on the ``FlowPanel`` in which it is visible. If set to ``False``, a new control continues in the same direction as the previous control, even if it would no longer be visible on the panel. You can increase the size of the panel to view controls that are not automatically wrapped to the next line or column. + ''' + FlowStyle: FlowStyle + ''' + Specifies the starting point and direction for controls added to a ``FlowPanel``. + + Use ``FlowStyle`` to set the starting position for the first control added to a ``FlowPanel``, as well as the subsequent position for additional controls. + + ======================== ================================================================================================================================================================================================ + ..Flow_Style.. *``Description``* + ======================== ================================================================================================================================================================================================ + ``BottomTopLeftRight`` The first control is at the *bottom* *left* corner of the panel. Subsequent controls are added from *bottom* to *top* and then from ``Left`` to ``Right``. + ``BottomTopRightLeft`` The first control is at the *bottom* *right* corner of the panel. Subsequent controls are added from *bottom* to *top* and then from ``Right`` to ``Left``. + ``LeftRightBottomTop`` The first control is at the *bottom* *left* corner of the panel. Subsequent controls are added from ``Left`` to ``Right`` and then from *bottom* to *top*. + ``LeftRightTopBottom`` The first control is at the *top* *left* corner of the panel. Subsequent controls are added from ``Left`` to ``Right`` and then from *top* to *bottom*. This is the default setting. + ``RightLeftBottomTop`` The first control is at the *bottom* *right* corner of the panel. Subsequent controls are added from ``Right`` to ``Left`` and then from *bottom* to *top*. + ``RightLeftTopBottom`` The first control is at the *top* *right* corner of the panel. Subsequent controls are added from ``Right`` to ``Left`` and then from *top* to *bottom*. + ``TopBottomLeftRight`` The first control is at the *top* *left* corner of the panel. Subsequent controls are added from *top* to *bottom* and then from ``Left`` to ``Right``. + ``TopBottomRightLeft`` The first control is at the *top* *right* corner of the panel. Subsequent controls are added from *top* to *bottom* and then from ``Right`` to ``Left``. + ======================== ================================================================================================================================================================================================ + ''' + def AlignControls(self, AControl: Control, Rect: Rect) -> None: + ''' + Aligns any controls for which the control is the parent within a specified area of the control. + + Use `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__ to align all controls within an area of a ``Form``, ``Panel`` ``GroupBox``, scroll box, or any container control. Specify the area in which to align the controls as the value of the ``Rect`` parameter. + + `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__ uses the `Align <Vcl.Controls.TControl.Align.htm>`__ property value for each child control to determine how to align it. The ``AControl`` parameter can be ``nil`` (Delphi) or ``NULL`` (C++). If you specify a control in ``AControl``, that control takes precedence in alignment over other, similarly-aligned controls. + ''' + def ControlListChanging(self, Inserting: bool, Child: Control, AParent: WinControl) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ and initializes an instance of `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__. + + Call `Create <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ to instantiate a panel at runtime. Panels placed in forms at design time do not need to be explicitly created because they are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the panel. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified method for each child of the control. + + `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ is called by the streaming system that loads and saves components. Applications seldom need to call this routine. + + `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ executes the *callback* specified by the ``Proc`` parameter for every child control listed by the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property that lists the ``Root`` parameter as its ``Owner()``. + + Override `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ to limit or augment which child controls are saved with the control. When overriding `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__, call the procedure passed as the ``Proc`` parameter for every child control that should be saved. The ``Root`` parameter indicates the component (usually a form) that owns the control. + ''' + def GetControlIndex(self, AControl: Control) -> int: + ''' + No have docs. + ''' + def SetControlIndex(self, AControl: Control, Index: int) -> None: + ''' + No have docs. + ''' + +class FlowPanel(CustomFlowPanel): + ''' + ======================= + Vcl.ExtCtrls.TFlowPanel + ======================= + + ``FlowPanel`` implements a ``FlowPanel`` control in which components are placed in pre-defined locations. + + Use ``FlowPanel`` to put an empty ``FlowPanel`` on a form. The major difference between a traditional panel and a ``FlowPanel`` is the way in which controls are placed. With a traditional panel, you place a control (such as a ``Button``) in a specific location. You can freely move that control to any location within the ``Panel`` using the mouse. In a ``FlowPanel``, each control is placed in a specific location, regardless of where you place it with the mouse. The automatic location is controlled by the ``FlowStyle`` property. For example, using the default ``FlowStyle`` property of ``LeftRightTopBottom``, the first control you add to the ``FlowPanel`` snaps to the top left corner. The second control that you add snaps next to the first control, and so on. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the ``Caption`` is aligned within the ``Panel``. + + Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to specify if the ``Caption`` of a panel appears on the *left*, *right*, or *center* of the panel. For example, to use a panel as a ``StatusBar`` that displays the ``Application``. ::``Hint`` property as the panel's ``Caption`` property, set `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ to ``taLeftJustify`` to place the hint text on the left side of the panel. + + .. note:: Use the `VerticalAlignment <Vcl.ExtCtrls.TCustomPanel.VerticalAlignment.htm>`__ property to control the vertical position of the ``Caption``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + AutoWrap: bool + ''' + Specifies whether controls are automatically wrapped to fit on the ``FlowPanel``. + + If set to ``True``, a new control is automatically placed in a location on the ``FlowPanel`` in which it is visible. If set to ``False``, a new control continues in the same direction as the previous control, even if it would no longer be visible on the panel. You can increase the size of the panel to view controls that are not automatically wrapped to the next line or column. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Determines the style of the inner bevel of a panel. + + Use `BevelInner <Vcl.ExtCtrls.TCustomPanel.BevelInner.htm>`__ to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the bevels, if they are drawn, is the ``BevelWidth`` property. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Determines the style of the outer bevel of a panel. + + Use `BevelOuter <Vcl.ExtCtrls.TCustomPanel.BevelOuter.htm>`__ to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the outer bevel is specified in the ``BevelWidth`` property in pixels. + ''' + BevelWidth: BevelWidth + ''' + Determines the width, in pixels, of both the inner and outer bevels of a panel. + + Use `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ to specify how wide the inner or outer bevel should be. Do not confuse `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__, which is the width of the bevels, with BorderWidth, which is the space between the bevels. + + If both the ``BevelInner`` and ``BevelOuter`` properties are ``bvNone``, `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ has no effect. To remove both bevels, set the ``BevelInner`` and ``BevelOuter`` properties to ``bvNone``, rather than setting the `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ to 0, as this involves less overhead when painting. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderWidth: BorderWidth + ''' + Specifies the distance, in pixels, between the outer and inner bevels. + + Use `BorderWidth <Vcl.ExtCtrls.TCustomPanel.BorderWidth.htm>`__ to specify how wide the border around the panel should be. A value of 0 (zero) means no border should appear. + + The border of a panel is the area between the outer and inner bevels. It is visible only if the inner bevel is raised or lowered, but affects the inset of the caption within the ``Panel`` even if ``BevelInner`` is ``bvNone``. If the ``Alignment`` property is not ``taCenter``, the ``Caption`` will be aligned to the inner edge of the border. This edge is `BorderWidth <Vcl.ExtCtrls.TCustomPanel.BorderWidth.htm>`__ pixels in from the outer bevel if ``BevelInner`` is ``bvNone``. It is the inner edge of the inner bevel otherwise. + + Do not confuse the border of the panel with line drawn around the panel itself. The line around the panel is specified by the ``BorderStyle`` property. + ''' + BorderStyle: BorderStyle + ''' + Determines the style of the line drawn around the perimeter of the panel control. + + Use `BorderStyle <Vcl.ExtCtrls.TCustomPanel.BorderStyle.htm>`__ to specify whether the panel has a single line drawn around it. These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + + Do not confuse the line drawn around the panel with the ``BorderWidth`` of the panel. The ``BorderWidth`` of the panel is the distance between the outer and inner bevels. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + UseDockManager: bool + ''' + Specifies whether the docking manager is used in drag-and-dock operations. + + Use `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``get`` or ``set`` whether a docking manager is used in drag-and-dock operations. + + The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + FlowStyle: FlowStyle + ''' + Specifies the starting point and direction for controls added to a ``FlowPanel``. + + Use ``FlowStyle`` to set the starting position for the first control added to a ``FlowPanel``, as well as the subsequent position for additional controls. + + ======================= ================================================================================================================================================================================================== + ..Flow Style.. *``Description``* + ======================= ================================================================================================================================================================================================== + ``BottomTopLeftRight`` The first control is at the *bottom* *left* corner of the panel. Subsequent controls are added from *bottom* to *top* and then from ``Left`` to ``Right``. + ``BottomTopRightLeft`` The first control is at the *bottom* *right* corner of the panel. Subsequent controls are added from *bottom* to *top* and then from ``Right`` to ``Left``. + ``LeftRightBottomTop`` The first control is at the *bottom* *left* corner of the panel. Subsequent controls are added from ``Left`` to ``Right`` and then from *bottom* to *top*. + ``LeftRightTopBottom`` The first control is at the *top* *left* corner of the panel. Subsequent controls are added from ``Left`` to ``Right`` and then from *top* to *bottom*. This is the default setting. + ``RightLeftBottomTop`` The first control is at the *bottom* *right* corner of the panel. Subsequent controls are added from ``Right`` to ``Left`` and then from *bottom* to *top*. + ``RightLeftTopBottom`` The first control is at the *top* *right* corner of the panel. Subsequent controls are added from ``Right`` to ``Left`` and then from *top* to *bottom*. + ``TopBottomLeftRight`` The first control is at the *top* *left* corner of the panel. Subsequent controls are added from *top* to *bottom* and then from ``Left`` to ``Right``. + ``TopBottomRightLeft`` The first control is at the *top* *right* corner of the panel. Subsequent controls are added from *top* to *bottom* and then from ``Right`` to ``Left``. + ======================= ================================================================================================================================================================================================== + ''' + FullRepaint: bool + ''' + Determines how the panel repaints itself when it is resized. + + `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ controls how the panel responds when it is resized. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``True``, the entire panel, including the beveled border repaints when the size changes. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``False``, only the area inside the beveled border repaints. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Locked: bool + ''' + Determines whether a panel that is used as a ``ToolBar`` is replaced by a ``ToolBar`` supplied by an *OLE* server. + + Set the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``False`` when the panel is used as a ``ToolBar`` by a ``OleContainer`` component. Any panels aligned to a ``OleContainer`` are assumed to be replaceable ``ToolBar``\ s unless the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property is ``True``. Prevent the panel from being replaced by an *OLE* server's ``ToolBar`` by setting the panel's `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``True``. + + .. note:: An *OLE* application's ``ToolBar``\ s must be in panels aligned to a side of the ``Form`` (that is, their ``Align`` properties must be set to ``alTop``, ``alBottom``, ``alLeft``, or ``alRight``). + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TFlowPanel.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowCaption: bool + ''' + Specifies whether to display the ``Caption`` of the panel control. + + `ShowCaption <Vcl.ExtCtrls.TCustomPanel.ShowCaption.htm>`__ is a ``Boolean`` property that you can use to specify whether to display the ``Caption`` of the panel control. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + VerticalAlignment: VerticalAlignment + ''' + Sets the vertical position of the ``Caption``. + + Use the ``VerticalAlignment`` property to control the position of the ``Caption`` within the ``Panel``. Choose one of the following values. + + ========================= ======================================================== + **Value** *``Description``* + ========================= ======================================================== + ``taAlignBottom`` The ``Caption`` displays at the bottom of the panel. + ``taAlignTop`` The ``Caption`` displays at the top of the panel. + ``taVerticalCenter`` The ``Caption`` displays at the center of the panel. + ========================= ======================================================== + + .. note:: Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to control the horizontal position of the ``Caption``. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and false otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +==================================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new ``Width`` and ``Height`` of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + # OnConstrainedResize: ConstrainedResizeEvent + Adjusts the resize constraints. + + Use `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ to adjust a control's constraints when an attempt is made to resize it. Upon entry to the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ handler is called immediately after the ``OnCanResize`` handler. + + `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + +class CellItem(CollectionItem): + ''' + ====================== + Vcl.ExtCtrls.TCellItem + ====================== + + Represents an item in a `CellCollection <Vcl.ExtCtrls.TCellCollection.htm>`__. + + The ``CellItem`` class represents a cell on a ``GridPanel``. + ''' + + __hash__: ClassVar[None] = ... + Size: int + ''' + No have docs. + ''' + AutoAdded: bool + ''' + No have docs. + ''' + SizeStyle: SizeStyle + ''' + Specifies the manner in which column size or row size is specified. + + Use the ``SizeStyle`` property to specify whether the size of the row or column in a grid is an absolute value, a percentage of the grid size, or generated automatically. + + The following styles are available: + + ================ ================================================================================================================================================ + ..Style.. *``Description``* + ================ ================================================================================================================================================ + ``ssAbsolute`` The number specified for the `Value <Vcl.ExtCtrls.TCellItem.Value.htm>`__ property is interpreted as the number of pixels for the row or column. + ``ssAuto`` The number specified for the `Value <Vcl.ExtCtrls.TCellItem.Value.htm>`__ property is ignored, and the row or column is sized automatically. + ``ssPercent`` The number specified for the `Value <Vcl.ExtCtrls.TCellItem.Value.htm>`__ property is interpreted as a percentage of the entire ``GridPanel``. + ================ ================================================================================================================================================ + ''' + Value: float + ''' + Sets the size of the cell item. + + Use the ``Value`` property to specify the size of the column or row in the grid. This value can be set automatically or expressed as a percentage of the grid size or as an absolute value, depending on the `SizeStyle <Vcl.ExtCtrls.TCellItem.SizeStyle.htm>`__. For example, if SizeStyle is set to ``ssPercent``, and you specify a value of 60, the column occupies approximately 60% of the grid panes width or a row occupies approximately 60% of the ``GridPanel`` height. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of an object to a destination object. + + Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method to extend the functionality of the `Assign <System.Classes.TPersistent.Assign.htm>`__ method of destination objects so that they handle newly created object classes. When defining a new object class, override the `Assign <System.Classes.TPersistent.Assign.htm>`__ method for every existing object class that should be able to copy its properties to the new class. Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method for every existing class to which the new class can copy. + + The `Assign <System.Classes.TPersistent.Assign.htm>`__ method of `Persistent <System.Classes.TPersistent.htm>`__ calls `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ if the descendant object does not succeed in copying the properties of a source object. The `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method defined by `Persistent <System.Classes.TPersistent.htm>`__ raises an ``EConvertError`` exception. + + For example, given the following code in which ``'A'`` and ``'B'`` are instance variables: + + .. code-block:: python + + A.Assign(B); {Delphi} + + .. code-block:: python + + A->Assign(B); // C++ + + if ``'A'`` knows how to handle ``'B'``, then it does so and returns. If ``'A'`` doesn't know how to handle ``'B'``\ s type, execution will trickle to the `Persistent <System.Classes.TPersistent.htm>`__ version of `Assign <System.Classes.TPersistent.Assign.htm>`__, which calls: + + .. code-block:: python + + B.AssignTo(A); {Delphi} + + .. code-block:: python + + B->AssignTo(A); // C++ + + If ``'B'`` knows how to copy to ``'A'``, the assignment succeeds. Otherwise, `Persistent <System.Classes.TPersistent.htm>`__ raises an exception. + ''' + def SetSizeStyle(self, Value: SizeStyle) -> None: + ''' + No have docs. + ''' + def SetValue(self, Value: float) -> None: + ''' + No have docs. + ''' + def Create(self, Collection: Collection) -> None: + ''' + `Creates <System.Classes.TCollectionItem.Create.htm>`__ and initializes a `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance. + + Do not call `Create <System.Classes.TCollectionItem.Create.htm>`__ to instantiate a collection item. Instead, call the `Add <System.Classes.TCollection.Add.htm>`__ method of the collection to which the item should belong. + + ``Collection`` identifies the `Collection <System.Classes.TCollection.htm>`__ instance to which the new item belongs. + ''' + +class RowItem(CellItem): + ''' + ===================== + Vcl.ExtCtrls.TRowItem + ===================== + + Represents an item in a `CellCollection <Vcl.ExtCtrls.TCellCollection.htm>`__. + + ``RowItem`` represents a cell on a `CellCollection <Vcl.ExtCtrls.TCellCollection.htm>`__ ``GridPanel``. + ''' + + __hash__: ClassVar[None] = ... + +class ColumnItem(CellItem): + ''' + ======================== + Vcl.ExtCtrls.TColumnItem + ======================== + + Specifies an item in a collection. + + ``ColumnItem`` is an item in a `ColumnCollection <Vcl.ExtCtrls.TColumnCollection.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + +class CellCollection(OwnedCollection): + ''' + ============================ + Vcl.ExtCtrls.TCellCollection + ============================ + + A collection of `CellItem <Vcl.ExtCtrls.TCellItem.htm>`__ objects. + + Use ``CellCollection`` to represent all the cell items in a ``GridPanel``. + ''' + + __hash__: ClassVar[None] = ... + Items: list[int] + ''' + Lists the items of the cell collection. + + Use the ``Items`` property to list the items of `CellCollection <Vcl.ExtCtrls.TCellCollection.htm>`__. + ''' + def GetAttrCount(self) -> int: + ''' + Returns the number of custom attributes associated with items in the collection. + + ``Vcl.ExtCtrls.TCellCollection.GetAttrCount`` inherits from `System.Classes.TCollection.GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. All content below this line refers to `System.Classes.TCollection.GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. + + `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__ returns the number of distinct attributes assigned to each item in the collection. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__ always returns 0, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def GetAttr(self, Index: int) -> str: + ''' + Returns the name of a custom attribute that can be retrieved using the `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ method. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. The `GetAttr <System.Classes.TCollection.GetAttr.htm>`__ method returns the name of an attribute. + + ``Index`` identifies the attribute whose name is requested. This is a value between 0 and n-1, where n is the value returned by `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + As implemented by `Collection <System.Classes.TCollection.htm>`__, `GetAttr <System.Classes.TCollection.GetAttr.htm>`__ always returns an empty string, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def GetItemAttr(self, Index: int, ItemIndex: int) -> str: + ''' + Returns the value of a custom attribute assigned to one of the collection's items. + + ``Vcl.ExtCtrls.TCellCollection.GetItemAttr`` inherits from `System.Classes.TCollection.GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__. All content below this line refers to `System.Classes.TCollection.GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and -- for each item in the collection -- a value, which is a string. + + `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ returns the value of one of these attributes for a specified item in the collection. + + ``Index`` identifies which of the attribute's values is desired. This is a value between 0 and n-1, where n is the value returned by `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + ``ItemIndex`` identifies the item whose attribute ``Value`` is desired. This is an index into the `Items <System.Classes.TCollection.Items.htm>`__ property array. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ always returns an empty string, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def GetItem(self, Index: int) -> CellItem: + ''' + Returns a specified item in the collection. + + `GetItem <System.Classes.TCollection.GetItem.htm>`__ is the protected read implementation of the `Items <System.Classes.TCollection.Items.htm>`__ property. + ''' + def SetItem(self, Index: int, Value: CellItem) -> None: + ''' + Copies the properties of another item to a specified item in the collection. + + `SetItem <System.Classes.TCollection.SetItem.htm>`__ is the protected write implementation of the `Items <System.Classes.TCollection.Items.htm>`__ property. It calls the `Assign <System.Classes.TCollection.Assign.htm>`__ method of the item specified by ``Index``, so that the properties of the item specified by ``Value`` are copied to that item. + ''' + def Update(self, Item: CollectionItem) -> None: + ''' + `Updates <System.Classes.TCollection.Update.htm>`__ the collection to reflect changes to its items. + + Override `Update <System.Classes.TCollection.Update.htm>`__ in a descendent class to make any necessary changes when the items in the collection change. This method is called automatically when an update is complete. + + ``Item`` identifies the item that changed. If the ``Item`` parameter is ``nil`` (Delphi) or ``NULL`` (C++), then the change affects more than one item in the collection. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `Update <System.Classes.TCollection.Update.htm>`__ does nothing. Descendent classes override this method to make any necessary adjustments. + ''' + def Owner(self) -> CustomGridPanel: + ''' + Returns the ``Owner()`` of the cell collection. + + Use the ``Owner()`` method to obtain a reference to the ``ListView`` that owns this cell collection. + ''' + def EquallySplitPercentuals(self) -> None: + ''' + No have docs. + ''' + +class RowCollection(CellCollection): + ''' + =========================== + Vcl.ExtCtrls.TRowCollection + =========================== + + Controls the ``Collection Editor`` for rows within a ``GridPanel``. + + ``RowCollection`` controls the ``Collection Editor`` for rows within a ``GridPanel``. + ''' + + __hash__: ClassVar[None] = ... + + def GetItemAttr(self, Index: int, ItemIndex: int) -> str: + ''' + Returns the value of a custom attribute assigned to one of the collection's items. + + ``Vcl.ExtCtrls.TRowCollection.GetItemAttr`` inherits from `System.Classes.TCollection.GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__. All content below this line refers to `System.Classes.TCollection.GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and -- for each item in the collection -- a value, which is a string. + + `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ returns the value of one of these attributes for a specified item in the collection. + + ``Index`` identifies which of the attribute's values is desired. This is a value between 0 and ``n-1``, where n is the value returned by `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + ``ItemIndex`` identifies the item whose attribute ``Value`` is desired. This is an index into the `Items <System.Classes.TCollection.Items.htm>`__ property array. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ always returns an empty string, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def Notify(self, Item: CollectionItem, Action: CollectionNotification) -> None: + ''' + Responds when items are added to or removed from the collection. + + `Notify <System.Classes.TCollection.Notify.htm>`__ is called automatically when the items in the collection change. + + ``Item`` is the item that was just added to or that is about to be removed from the collection. + + ``Action`` indicates whether the item was added, is about to be extracted or is about to be deleted. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `Notify <System.Classes.TCollection.Notify.htm>`__ calls `Added <System.Classes.TCollection.Added.htm>`__ when + + ``Action`` is `cnAdded <System.Classes.TCollectionNotification.htm>`__ and calls `Deleting <System.Classes.TCollection.Deleting.htm>`__ when + + ``Action`` is ``cnDeleting``. `Collection <System.Classes.TCollection.htm>`__ ignores the ``cnExtracting`` action. Descendant classes can override `Notify <System.Classes.TCollection.Notify.htm>`__ to modify this behavior. + ''' + def Create(self, AOwner: Persistent) -> None: + ''' + `Creates <System.Classes.TOwnedCollection.Create.htm>`__ and initializes a `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ instance. + + ``Vcl.ExtCtrls.TRowCollection.Create`` inherits from `System.Classes.TOwnedCollection.Create <System.Classes.TOwnedCollection.Create.htm>`__. All content below this line refers to `System.Classes.TOwnedCollection.Create <System.Classes.TOwnedCollection.Create.htm>`__. + + The `Create <System.Classes.TOwnedCollection.Create.htm>`__ method takes two parameters: the name of an instance object descended from `Persistent <System.Classes.TPersistent.htm>`__ and the name of a `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant class. The first parameter is the owner of the `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ instance. The second parameter determines the class of the items created by the Add method. + ''' + def Add(self) -> RowItem: + ''' + Adds a row to the ``GridPanel``. + + Use the Add method to add a row to the ``GridPanel``. + ''' + +class ColumnCollection(CellCollection): + ''' + ============================== + Vcl.ExtCtrls.TColumnCollection + ============================== + + Controls the ``Collection Editor`` for columns within a ``GridPanel``. + + ``ColumnCollection`` controls the ``Collection Editor`` for columns within a ``GridPanel``. + ''' + + __hash__: ClassVar[None] = ... + + def GetItemAttr(self, Index: int, ItemIndex: int) -> str: + ''' + Returns the value of a custom attribute assigned to one of the collection's items. + + ``Vcl.ExtCtrls.TColumnCollection.GetItemAttr`` inherits from `System.Classes.TCollection.GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__. All content below this line refers to `System.Classes.TCollection.GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and -- for each item in the collection -- a value, which is a string. + + `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ returns the value of one of these attributes for a specified item in the collection. + + ``Index`` identifies which of the attribute's values is desired. This is a value between 0 and ``n-1``, where n is the value returned by `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + ``ItemIndex`` identifies the item whose attribute ``Value`` is desired. This is an index into the `Items <System.Classes.TCollection.Items.htm>`__ property array. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ always returns an empty string, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def Notify(self, Item: CollectionItem, Action: CollectionNotification) -> None: + ''' + Responds when items are added to or removed from the collection. + + `Notify <System.Classes.TCollection.Notify.htm>`__ is called automatically when the items in the collection change. + + ``Item`` is the item that was just added to or that is about to be removed from the collection. + + ``Action`` indicates whether the item was added, is about to be extracted or is about to be deleted. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `Notify <System.Classes.TCollection.Notify.htm>`__ calls `Added <System.Classes.TCollection.Added.htm>`__ when + + ``Action`` is `cnAdded <System.Classes.TCollectionNotification.htm>`__ and calls `Deleting <System.Classes.TCollection.Deleting.htm>`__ when + + ``Action`` is ``cnDeleting``. `Collection <System.Classes.TCollection.htm>`__ ignores the ``cnExtracting`` action. Descendant classes can override `Notify <System.Classes.TCollection.Notify.htm>`__ to modify this behavior. + ''' + def Create(self, AOwner: Persistent) -> None: + ''' + `Creates <System.Classes.TOwnedCollection.Create.htm>`__ and initializes a `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ instance. + + ``Vcl.ExtCtrls.TColumnCollection.Create`` inherits from `System.Classes.TOwnedCollection.Create <System.Classes.TOwnedCollection.Create.htm>`__. All content below this line refers to `System.Classes.TOwnedCollection.Create <System.Classes.TOwnedCollection.Create.htm>`__. + + The `Create <System.Classes.TOwnedCollection.Create.htm>`__ method takes two parameters: the name of an instance object descended from `Persistent <System.Classes.TPersistent.htm>`__ and the name of a `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant class. The first parameter is the owner of the `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ instance. The second parameter determines the class of the items created by the Add method. + ''' + def Add(self) -> ColumnItem: + ''' + Adds a column to the ``GridPanel``. + + Use the Add method to add a new column to the ``GridPanel``. + ''' + +class CollectionItem(Persistent): + ''' + ============================== + System.Classes.TCollectionItem + ============================== + + ``CollectionItem`` represents an item in a collection. + + A `Collection <System.Classes.TCollection.htm>`__ holds a group of ``CollectionItem`` objects. ``CollectionItems`` are created and destroyed by `Collection <System.Classes.TCollection.htm>`__'s `Add <System.Classes.TCollection.Add.htm>`__ and `Clear <System.Classes.TCollection.Clear.htm>`__ methods. Each ``CollectionItem`` has a `Collection <System.Classes.TCollectionItem-Collection.htm>`__ property that points to the `Collection <System.Classes.TCollection.htm>`__ object to which the item belongs. + + Objects descending from `Collection <System.Classes.TCollection.htm>`__ can contain objects descending from ``CollectionItem``. For example, a `DBGridColumns <Vcl.DBGrids.TDBGridColumns.htm>`__ object contains `Column <Vcl.DBGrids.TColumn.htm>`__ objects; these two classes are used by `DBGrid <Vcl.DBGrids.TDBGrid.htm>`__ to represent grid columns. + ''' + + __hash__: ClassVar[None] = ... + Collection: Collection + ''' + Specifies the `Collection <System.Classes.TCollection.htm>`__ instance to which the `CollectionItem <System.Classes.TCollectionItem.htm>`__ belongs. + + Each `CollectionItem <System.Classes.TCollectionItem.htm>`__ belongs to the `Collection <System.Classes.TCollection.htm>`__ that creates it. The **Collection** property points to the collection object to which the item belongs. + ''' + ID: int + ''' + A unique, permanent index for the item. + + In most cases, ``ID`` is the value of the item's `Index <System.Classes.TCollectionItem.Index.htm>`__ property when it was first added to the collection. But, unlike `Index <System.Classes.TCollectionItem.Index.htm>`__ values, ``ID`` values are never changed or reassigned. If an item is removed from a collection, its ``ID`` not used again. + + An item's `Index <System.Classes.TCollectionItem.Index.htm>`__ may change when other items are deleted from the collection or when items are rearranged. ``ID`` provides a unique identifier for each item that is unchanged for the life of the collection. + ''' + Index: int + ''' + Returns the item's position in the + + Items array of `Collection <System.Classes.TCollection.htm>`__. + + Each `CollectionItem <System.Classes.TCollectionItem.htm>`__ is indexed in the + + Items array of the `Collection <System.Classes.TCollection.htm>`__ to which it belongs. The ``Index`` property of the `CollectionItem <System.Classes.TCollectionItem.htm>`__ contains the item's ``Index`` value in that array. Read the value of ``Index`` to determine the collection item's position. Set the value of ``Index`` to move the collection item to a new position. + + Items is a zero-based array. The first member of the collection has an ``Index`` value of 0, the second member has an ``Index`` value of 1, and so forth. + ''' + DisplayName: str + ''' + The name displayed in the `Collection <System.Classes.TCollectionItem-Collection.htm>`__ editor. + + ``DisplayName`` is the string that represents the item in the `Collection <System.Classes.TCollectionItem-Collection.htm>`__ editor. When the item is selected in the `Collection <System.Classes.TCollectionItem-Collection.htm>`__ editor, the ``DisplayName`` can also appear in the *Object Inspector* as the value of another property (for example, as the ``Text`` property of THeaderSection or TStatusPanel). By default, ``DisplayName`` is the name of the `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant class of which the item is an instance. + + For `Vcl.ExtActns.TRecipientItem <Vcl.ExtActns.TRecipientItem.htm>`__, the ``DisplayName`` name also appears in the *To*, *CC*, or *BCC* fields of the e-mail message along with the recipient's address. + ''' + def Changed(self, AllItems: bool) -> None: + ''' + Updates the collection to reflect changes to the collection item. + + ``Changed()`` is called automatically when a collection item changes in a way that must be reflected by the collection to which the item belongs. For example, when an item's `Index <System.Classes.TCollectionItem.Index.htm>`__ property changes, the collection must update the indexes of all other items. Call this method in the implementation of a descendant class when making changes that require the collection to update. + + The ``AllItems`` parameter indicates whether the change affects just the collection item (such as a change to its `DisplayName <System.Classes.TCollectionItem.DisplayName.htm>`__ property) or whether it requires corresponding changes to other items in the collection (such as a change to the `Index <System.Classes.TCollectionItem.Index.htm>`__ property). + ''' + def GetOwner(self) -> Persistent: + ''' + Returns the collection to which this item belongs. + + ``GetOwner()`` is used by the `GetNamePath <System.Classes.TCollectionItem.GetNamePath.htm>`__ method to find the collection that owns the collection item, allowing the collection item to appear in the *Object Inspector*. It returns the value of the `Collection <System.Classes.TCollectionItem-Collection.htm>`__ property. + + .. note:: The ``Owner()`` of a collection item is not synonymous with a component's ``Owner()``. It has no implications about the freeing of objects but merely serves to represent relationships to the *Object Inspector*. + ''' + def GetDisplayName(self) -> str: + ''' + Returns the name of the collection item as it appears in the collection editor. + + ``GetDisplayName`` is the protected read implementation of the `DisplayName <System.Classes.TCollectionItem.DisplayName.htm>`__ property. + ''' + def SetCollection(self, Value: Collection) -> None: + ''' + Sets the value of the `Collection <System.Classes.TCollectionItem-Collection.htm>`__ property. + + ``SetCollection`` is the protected write implementation of the `Collection <System.Classes.TCollectionItem-Collection.htm>`__ property. + + ``Value`` specifies the collection to which this item should be added. + + ``SetCollection`` removes this item from the collection to which it currently belongs and adds it to the collection specified by ``Value``. + ''' + def SetIndex(self, Value: int) -> None: + ''' + Moves the collection item to a specified position in the parent collection. + + ``SetIndex`` is the protected write implementation of the `Index <System.Classes.TCollectionItem.Index.htm>`__ property. The ``Value`` parameter specifies the new (0-based) position for the item in its parent collection. + ''' + def SetDisplayName(self, Value: str) -> None: + ''' + Sets the name of the collection item as it appears in the collection editor. + + ``SetDisplayName`` is the protected write implementation of the `DisplayName <System.Classes.TCollectionItem.DisplayName.htm>`__ property. + + ``Value`` specifies the name for the item that should appear in the collection editor. + ''' + def Create(self, Collection: Collection) -> None: + ''' + ``Creates`` and initializes a `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance. + + Do not call ``Create()`` to instantiate a collection item. Instead, call the `Add <System.Classes.TCollection.Add.htm>`__ method of the collection to which the item should belong. + + ``Collection`` identifies the `Collection <System.Classes.TCollection.htm>`__ instance to which the new item belongs. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance and frees its memory. + + ``Destroy()`` is called indirectly by `Collection <System.Classes.TCollection.htm>`__'s `Clear <System.Classes.TCollection.Clear.htm>`__ or `Delete <System.Classes.TCollection.Delete.htm>`__ method. + ''' + def Release(self) -> None: + ''' + No have docs. + ''' + def GetNamePath(self) -> str: + ''' + Returns a string used by the *Object Inspector*. + + ``GetNamePath()`` determines the text that represents the collection in the *Object Inspector*. `CollectionItem <System.Classes.TCollectionItem.htm>`__ overrides the inherited method to return the name of the collection followed by the index of the item within that collection. + ''' + +class ControlItem(CollectionItem): + ''' + ========================= + Vcl.ExtCtrls.TControlItem + ========================= + + Represents an item in a collection. + + ``ControlItem`` is an item in a `ControlCollection <Vcl.ExtCtrls.TControlCollection.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + GridPanel: CustomGridPanel + ''' + No have docs. + ''' + Pushed: bool + ''' + No have docs. + ''' + Column: int + ''' + No have docs. + ''' + ColumnSpan: CellSpan + ''' + No have docs. + ''' + Control: Control + ''' + No have docs. + ''' + Row: int + ''' + No have docs. + ''' + RowSpan: CellSpan + ''' + No have docs. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of an object to a destination object. + + Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method to extend the functionality of the `Assign <System.Classes.TPersistent.Assign.htm>`__ method of destination objects so that they handle newly created object classes. When defining a new object class, override the `Assign <System.Classes.TPersistent.Assign.htm>`__ method for every existing object class that should be able to copy its properties to the new class. Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method for every existing class to which the new class can copy. + + The `Assign <System.Classes.TPersistent.Assign.htm>`__ method of `Persistent <System.Classes.TPersistent.htm>`__ calls `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ if the descendant object does not succeed in copying the properties of a source object. The `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method defined by `Persistent <System.Classes.TPersistent.htm>`__ raises an ``EConvertError`` exception. + + For example, given the following code in which ``'A'`` and ``'B'`` are instance variables: + + .. code-block:: python + + A.Assign(B); {Delphi} + + .. code-block:: python + + A->Assign(B); // C++ + + if ``'A'`` knows how to handle ``'B'``, then it does so and returns. If ``'A'`` doesn't know how to handle ``'B'``\ s type, execution will trickle to the `Persistent <System.Classes.TPersistent.htm>`__ version of `Assign <System.Classes.TPersistent.Assign.htm>`__, which calls: + + .. code-block:: python + + B.AssignTo(A); {Delphi} + + .. code-block:: python + + B->AssignTo(A); // C++ + + If ``'B'`` knows how to copy to ``'A'``, the assignment succeeds. Otherwise, `Persistent <System.Classes.TPersistent.htm>`__ raises an exception. + ''' + def InternalSetLocation(self, AColumn: int, ARow: int, APushed: bool, MoveExisting: bool) -> None: + ''' + No have docs. + ''' + def Create(self, Collection: Collection) -> None: + ''' + `Creates <System.Classes.TCollectionItem.Create.htm>`__ and initializes a `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance. + + Do not call `Create <System.Classes.TCollectionItem.Create.htm>`__ to instantiate a collection item. Instead, call the `Add <System.Classes.TCollection.Add.htm>`__ method of the collection to which the item should belong. + + ``Collection`` identifies the `Collection <System.Classes.TCollection.htm>`__ instance to which the new item belongs. + ''' + def Destroy(self) -> None: + ''' + `Destroys <System.Classes.TCollectionItem.Destroy.htm>`__ the `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance and frees its memory. + + ``Vcl.ExtCtrls.TControlItem.Destroy`` inherits from `System.Classes.TCollectionItem.Destroy <System.Classes.TCollectionItem.Destroy.htm>`__. All content below this line refers to `System.Classes.TCollectionItem.Destroy <System.Classes.TCollectionItem.Destroy.htm>`__. + + `Destroys <System.Classes.TCollectionItem.Destroy.htm>`__ the `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance and frees its memory. + + `Destroy <System.Classes.TCollectionItem.Destroy.htm>`__ is called indirectly by `Collection <System.Classes.TCollection.htm>`__'s `Clear <System.Classes.TCollection.Clear.htm>`__ or `Delete <System.Classes.TCollection.Delete.htm>`__ method. + ''' + def SetLocation(self, AColumn: int, ARow: int, APushed: bool) -> None: + ''' + No have docs. + ''' + +class OwnedCollection(Collection): + ''' + =============================== + System.Classes.TOwnedCollection + =============================== + + ``OwnedCollection`` is a collection that maintains information about its owner. + + Each ``OwnedCollection`` holds a group of `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendants. + + ``OwnedCollection`` extends `Collection <System.Classes.TCollection.htm>`__ by maintaining information about its owner. Knowledge of the ``OwnedCollection`` owner lets the `Object Inspector <Object_Inspector.htm>`__ display the collection's name at design time. Notice that: + + - Classes that descend directly from `Collection <System.Classes.TCollection.htm>`__ must implement the `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ method if they are to appear in the *Object Inspector*. Typical descendants see in the `Collection <System.Classes.TCollection.htm>`__ class. + - By descending from ``OwnedCollection``, the derived class does not need to add anything in order to appear in the *Object Inspector*, because ``OwnedCollection`` implements the `GetOwner <System.Classes.TOwnedCollection.GetOwner.htm>`__ method. + + The following table lists some typical descendants of ``OwnedCollection`` with the corresponding `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant and the component that uses each pair: + + ========================================================================================= ================================================================================== ================================================================================ + ..TOwnedCollection_descendant.. **CollectionItem descendant** **Component** + ========================================================================================= ================================================================================== ================================================================================ + `CustomMultiResBitmap <FMX.MultiResBitmap.TCustomMultiResBitmap.htm>`__ `CustomBitmapItem <FMX.MultiResBitmap.TCustomBitmapItem.htm>`__ `Image <FMX.Objects.TImage.htm>`__ + `FieldDefs <Data.DB.TFieldDefs.htm>`__ `FieldDef <Data.DB.TFieldDef.htm>`__ `DataSet <Data.DB.TDataSet.htm>`__ + `IndexDefs <Data.DB.TIndexDefs.htm>`__ `IndexDef <Data.DB.TIndexDef.htm>`__ `ClientDataSet <Datasnap.DBClient.TClientDataSet.htm>`__ + `WorkAreas <Vcl.ComCtrls.TWorkAreas.htm>`__ `WorkArea <Vcl.ComCtrls.TWorkArea.htm>`__ `ListView <Vcl.ComCtrls.TListView.htm>`__ + `TaskDialogButtons <Vcl.Dialogs.TTaskDialogButtons.htm>`__ TaskDialogButtonItem <Vcl.Dialogs.TTaskDialogButtonItem.htm>`__ `TaskDialog <Vcl.Dialogs.TTaskDialog.htm>`__ + `CellCollection <Vcl.ExtCtrls.TCellCollection.htm>`__ `CellItem <Vcl.ExtCtrls.TCellItem.htm>`__ `GridPanel <Vcl.ExtCtrls.TGridPanel.htm>`__ + `ControlCollection <Vcl.ExtCtrls.TControlCollection.htm>`__ `ControlItem <Vcl.ExtCtrls.TControlItem.htm>`__ `GridPanel <Vcl.ExtCtrls.TGridPanel.htm>`__ + `ListControlItems <Vcl.ListActns.TListControlItems.htm>`__ `ListControlItem <Vcl.ListActns.TListControlItem.htm>`__ StaticListAction <Vcl.ListActns.TStaticListAction.htm>`__ + `RecipientCollection <Vcl.ExtActns.TRecipientCollection.htm>`__ RecipientItem <Vcl.ExtActns.TRecipientItem.htm>`__ SendMail <Vcl.ExtActns.TSendMail.htm>`__ + `ActionListCollection <Vcl.ActnMan.TActionListCollection.htm>`__ `ActionListItem <Vcl.ActnMan.TActionListItem.htm>`__ `ActionManager <Vcl.ActnMan.TActionManager.htm>`__ + `ActionBars <Vcl.ActnMan.TActionBars.htm>`__ `ActionBarItem <Vcl.ActnMan.TActionBarItem.htm>`__ `ActionManager <Vcl.ActnMan.TActionManager.htm>`__ + ========================================================================================= ================================================================================== ================================================================================ + ''' + + __hash__: ClassVar[None] = ... + + def GetOwner(self) -> Persistent: + ''' + Returns the ``Owner()`` of an object. + + ``System.Classes.TOwnedCollection.GetOwner`` inherits from `System.Classes.TPersistent.GetOwner <System.Classes.TPersistent.GetOwner.htm>`__. All content below this line refers to `System.Classes.TPersistent.GetOwner <System.Classes.TPersistent.GetOwner.htm>`__. + + `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ is used by the `GetNamePath <System.Classes.TPersistent.GetNamePath.htm>`__ method to find the owner of a persistent object. `GetNamePath <System.Classes.TPersistent.GetNamePath.htm>`__ and `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ are introduced in `Persistent <System.Classes.TPersistent.htm>`__ so descendants such as collections can appear in the *Object Inspector*. As implemented in `Persistent <System.Classes.TPersistent.htm>`__, `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ returns ``nil`` (Delphi) or ``NULL``(C++). + + For `OwnedCollection <System.Classes.TOwnedCollection.htm>`__, ``GetOwner()`` returns the owner of the collection. For `CollectionItem <System.Classes.TCollectionItem.htm>`__ collection items, `GetOwner <System.Classes.TCollectionItem.GetOwner.htm>`__ returns the collection object into which the collection item has been inserted. For `Component <System.Classes.TComponent.htm>`__, `GetOwner <System.Classes.TComponent.GetOwner.htm>`__ returns the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. + ''' + def Create(self, AOwner: Persistent, ItemClass: CollectionItemClass) -> None: + ''' + ``Creates`` and initializes a `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ instance. + + The ``Create()`` method takes two parameters: the name of an instance object descended from `Persistent <System.Classes.TPersistent.htm>`__ and the name of a `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant class. The first parameter is the owner of the `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ instance. The second parameter determines the class of the items created by the Add method. + ''' + +class ControlCollection(OwnedCollection): + ''' + =============================== + Vcl.ExtCtrls.TControlCollection + =============================== + + Specifies a collection of control items. + + ``ControlCollection`` is a collection of control items. + ''' + + __hash__: ClassVar[None] = ... + Controls: list[int, int] + ''' + Lists the controls associated with the control items in the control collection. + + Use ``Controls`` to access individual controls associated with control items in the collection. Each control is identified through the `Row <Vcl.ExtCtrls.TControlItem.Row.htm>`__ and `Column <Vcl.ExtCtrls.TControlItem-Column.htm>`__ properties of its corresponding control item. + ''' + ControlItems: list[int, int] + ''' + Lists the control items in the control collection. + + Use ``ControlItems`` to access individual control items in the control collection. Each control item is identified through its `Row <Vcl.ExtCtrls.TControlItem.Row.htm>`__ and `Column <Vcl.ExtCtrls.TControlItem-Column.htm>`__ properties. + ''' + Items: list[int] + ''' + No have docs. + ''' + def GetControl(self, AColumn: int, ARow: int) -> Control: + ''' + Returns the control of the first control item in the collection with the specified `Row <Vcl.ExtCtrls.TControlItem.Row.htm>`__ and `Column <Vcl.ExtCtrls.TControlItem-Column.htm>`__ properties. + + ``GetControl`` is the protected read implementation of the `Controls <Vcl.ExtCtrls.TControlCollection.Controls.htm>`__ property. + ''' + def GetControlItem(self, AColumn: int, ARow: int) -> ControlItem: + ''' + Returns the first control item in the collection with the specified `Row <Vcl.ExtCtrls.TControlItem.Row.htm>`__ and `Column <Vcl.ExtCtrls.TControlItem-Column.htm>`__ properties. + + ``GetControlItem`` is the protected read implementation of the `ControlItems <Vcl.ExtCtrls.TControlCollection.ControlItems.htm>`__ property. + ''' + def GetItem(self, Index: int) -> ControlItem: + ''' + Returns a specified item in the collection. + + `GetItem <System.Classes.TCollection.GetItem.htm>`__ is the protected read implementation of the `Items <System.Classes.TCollection.Items.htm>`__ property. + ''' + def SetControl(self, AColumn: int, ARow: int, Value: Control) -> None: + ''' + Copies the properties of another control to a specified item in the `Controls <Vcl.ExtCtrls.TControlCollection.Controls.htm>`__ collection. + + ``SetControl`` is the protected write implementation of the `Controls <Vcl.ExtCtrls.TControlCollection.Controls.htm>`__ property. + ''' + def SetItem(self, Index: int, Value: ControlItem) -> None: + ''' + Copies the properties of another control item to a specified control item in the `Items <Vcl.ExtCtrls.TControlCollection.Items.htm>`__ collection. + + ``SetItem()`` is the protected write implementation of the `Items <Vcl.ExtCtrls.TControlCollection.Items.htm>`__ property. + ''' + def Update(self, Item: CollectionItem) -> None: + ''' + `Updates <System.Classes.TCollection.Update.htm>`__ the collection to reflect changes to its items. + + Override `Update <System.Classes.TCollection.Update.htm>`__ in a descendent class to make any necessary changes when the items in the collection change. This method is called automatically when an update is complete. + + ``Item`` identifies the item that changed. If the ``Item`` parameter is ``nil`` (Delphi) or ``NULL`` (C++), then the change affects more than one item in the collection. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, `Update <System.Classes.TCollection.Update.htm>`__ does nothing. Descendent classes override this method to make any necessary adjustments. + ''' + def Create(self, AOwner: Persistent) -> None: + ''' + Creates and initializes a `ControlCollection <Vcl.ExtCtrls.TControlCollection.htm>`__ instance. + + Call ``Create()`` to instantiate a `ControlCollection <Vcl.ExtCtrls.TControlCollection.htm>`__ object at run time. + ''' + def Add(self) -> ControlItem: + ''' + Creates a new `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance and adds it to the `Items <System.Classes.TCollection.Items.htm>`__ array. + + Call `Add <System.Classes.TCollection.Add.htm>`__ to create an item in the collection. The new item is placed at the end of the `Items <System.Classes.TCollection.Items.htm>`__ array. + + `Add <System.Classes.TCollection.Add.htm>`__ returns the new collection item. + ''' + def AddControl(self, AControl: Control, AColumn: int, ARow: int) -> None: + ''' + Creates a new `ControlItem <Vcl.ExtCtrls.TControlItem.htm>`__ instance and adds it to the collection. + + Call ``AddControl`` to create a control item in the collection. ``AddControl()`` returns the new control collection item. + ''' + def RemoveControl(self, AControl: Control) -> None: + ''' + Removes all control items in the collection with the specified control property. + + Call ``RemoveControl()`` to remove all control items in the `Items <Vcl.ExtCtrls.TControlCollection.Items.htm>`__ array with the control property equal to the given ``AControl`` parameter. The `Items <Vcl.ExtCtrls.TControlCollection.Items.htm>`__ array is subsequently updated by moving up any items that come after the deleted ones. + ''' + def IndexOf(self, AControl: Control) -> int: + ''' + Returns the index of the first control in the `Items <Vcl.ExtCtrls.TControlCollection.Items.htm>`__ array with a specified value. + + Call ``IndexOf()`` to get the index for a control in the `Items <Vcl.ExtCtrls.TControlCollection.Items.htm>`__ array. Specify the control as the ``AControl`` parameter. + + The first item in the array has index 0, the second item has index 1, and so on. If a control item is not in the list, IndexOf returns -1. If a control item appears more than once in the array, ``IndexOf()`` returns the index of the first appearance. + ''' + def Owner(self) -> CustomGridPanel: + ''' + Returns the `Owner <System.Classes.TCollection.Owner.htm>`__ of the collection. + + Call `Owner <System.Classes.TCollection.Owner.htm>`__ to obtain a reference to the object that owns this collection. Typically, the owner uses the collection to implement one of its properties. + ''' + +class CustomGridPanel(CustomPanel): + ''' + ============================= + Vcl.ExtCtrls.TCustomGridPanel + ============================= + + The base class for all grid panel components. + + Use ``CustomGridPanel`` as a base class when defining grid panels that include other controls as constituent parts. + ''' + + __hash__: ClassVar[None] = ... + ColumnSpanIndex: list[int, int] + ''' + No have docs. + ''' + CellCount: int + ''' + No have docs. + ''' + CellSize: list[int, int] + ''' + No have docs. + ''' + CellRect: list[int, int] + ''' + Returns the *Screen* coordinates of a cell in the grid. + + Use the ``CellRect`` property to return the *Screen* coordinates of a cell in the grid. + ''' + RecalcCellSizesEnabled: bool + ''' + No have docs. + ''' + RecalcCellPercentsEnabled: bool + ''' + No have docs. + ''' + ColumnCollection: ColumnCollection + ''' + Sets the number and size of the columns on the ``GridPanel``. + + Use the ``ColumnCollection`` property to set the number of columns as well as the size of each column. You can use the `SizeStyle <Vcl.ExtCtrls.TCellItem.SizeStyle.htm>`__ property to specify whether column sizes are based on a percentage of the available width, based on an absolute value, or automatically sized. + ''' + ControlCollection: ControlCollection + ''' + Specifies the controls currently placed on the ``GridPanel``. + + Use ``ControlCollection`` to add, remove, or access control items in the collection of controls of a `CustomGridPanel <Vcl.ExtCtrls.TCustomGridPanel.htm>`__ component. Each control item is identified through its `Row <Vcl.ExtCtrls.TControlItem.Row.htm>`__ and `Column <Vcl.ExtCtrls.TControlItem-Column.htm>`__ properties. To add a control to the collection, use the `AddControl <Vcl.ExtCtrls.TControlCollection.AddControl.htm>`__ method. To remove a control from the collection, use the `RemoveControl <Vcl.ExtCtrls.TControlCollection.RemoveControl.htm>`__ method. To access a control from the collection, use the `ControlItems <Vcl.ExtCtrls.TControlCollection.ControlItems.htm>`__ property. + ''' + ExpandStyle: ExpandStyle + ''' + Specifies whether rows or columns are added to a filled ``GridPanel`` to accommodate additional controls. + + Use the ``ExpandStyle`` property to specify how a ``GridPanel`` is expanded when each cell of the grid contains a control, and a new control is added. The property can take 3 values, which are described in the following table: + + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Value** | **Meaning** | + +==================+========================================================================================================================================================================================================================================================================================+ + | ``emAddRows`` | The ``GridPanel`` is expanded vertically -- only rows are added. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``emAddColumns`` | The ``GridPanel`` is expanded horizontally -- only columns are added. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``emFixedSize`` | The ``GridPanel`` has a fixed number of rows and columns given by the `Count <System.Classes.TCollection.Count.htm>`__ property of both `ColumnCollection <Vcl.ExtCtrls.TCustomGridPanel-ColumnCollection.htm>`__ and | + | | `RowCollection <Vcl.ExtCtrls.TCustomGridPanel.RowCollection.htm>`__ collections. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + The property is used when a new control is added to the `ControlCollection <Vcl.ExtCtrls.TCustomGridPanel.ControlCollection.htm>`__ using `AddControl <Vcl.ExtCtrls.TControlCollection.AddControl.htm>`__ with the ``AColumn`` and ``ARow`` parameters set to -1. + + For example: + + .. code-block:: python + :caption: Delphi + + GridPanel1.ControlCollection.GridAddControl(control,-1,-1); + + where ``control`` is the control added to the ``GridPanel1`` `GridPanel <Vcl.ExtCtrls.TGridPanel.htm>`__. + ''' + RowCollection: RowCollection + ''' + Sets the number and size of the rows on the ``GridPanel``. + + Use the ``RowCollection`` property to set the number of rows as well as the size of each row. You can use the `SizeStyle <Vcl.ExtCtrls.TCellItem.SizeStyle.htm>`__ property to specify whether row sizes are based on a percentage of the available width, based on an absolute value, or automatically sized. + ''' + RowSpanIndex: list[int, int] + ''' + No have docs. + ''' + RowHeights: list[int] + ''' + Gives the height (in pixels) of all rows in the grid. + + Read ``RowHeights`` to determine the height of the cells in the row specified by the ``Index`` parameter. An index of 0 refers to the first row. Set RowWidths at runtime to change the height of an individual row. + + If the height of a row has not been set explicitly by resizing with the mouse, or by using the ``RowHeights`` property, its height is DefaultRowHeight. + + Use the ``RowCount`` property to determine the number of entries in the ``RowHeights`` array. + ''' + TabStops: list[int] + ''' + Indicates whether the user can tab to specified columns in the grid. + + Set ``TabStops`` to ``False()`` to remove the column identified by ``Index`` from the tab order. The first column in the grid is identified by an ``Index`` of 0. + + .. note:: When the ``Options`` property does not include goTabs, the user can't tab to any column, even if ``TabStops`` is ``True``. + ''' + def AutoAddColumn(self) -> ColumnItem: + ''' + No have docs. + ''' + def AutoAddRow(self) -> RowItem: + ''' + No have docs. + ''' + def CellToCellIndex(self, AColumn: int, ARow: int) -> int: + ''' + No have docs. + ''' + def CellIndexToCell(self, AIndex: int, AColumn: int, ARow: int) -> None: + ''' + No have docs. + ''' + def AlignControls(self, AControl: Control, Rect: Rect) -> None: + ''' + Aligns any controls for which the control is the parent within a specified area of the control. + + Use `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__ to align all controls within an area of a ``Form``, ``Panel`` ``GroupBox``, scroll box, or any container control. Specify the area in which to align the controls as the value of the ``Rect`` parameter. + + `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__ uses the `Align <Vcl.Controls.TControl.Align.htm>`__ property value for each child control to determine how to align it. The ``AControl`` parameter can be ``nil`` (Delphi) or ``NULL`` (C++). If you specify a control in ``AControl``, that control takes precedence in alignment over other, similarly-aligned controls. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def Paint(self) -> None: + ''' + Renders the image of the panel. + + Override the `Paint <Vcl.ExtCtrls.TCustomPanel.Paint.htm>`__ method to change the way the panel is drawn. The `Paint <Vcl.ExtCtrls.TCustomPanel.Paint.htm>`__ method for `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__ draws the bevels of the panel, sets the brush and font for the panel, and fills in the interior of the panel. Finally, `Paint <Vcl.ExtCtrls.TCustomPanel.Paint.htm>`__ writes the value of ``Caption`` on the panel. + ''' + def RemoveEmptyAutoAddColumns(self) -> None: + ''' + No have docs. + ''' + def RemoveEmptyAutoAddRows(self) -> None: + ''' + No have docs. + ''' + def UpdateControlOriginalParentSize(self, AControl: Control, AOriginalParentSize: Point) -> None: + ''' + Updates the original size of the parent control. + + ``Vcl.ExtCtrls.TCustomGridPanel.UpdateControlOriginalParentSize`` inherits from `Vcl.Controls.TWinControl.UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__. + + `UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__ is a protected method that updates the original size of the parent control. It is used internally to update the anchor rules of the control. + ''' + def ControlChange(self, Inserting: bool, Child: Control) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ and initializes an instance of `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__. + + Call `Create <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ to instantiate a panel at runtime. Panels placed in forms at design time do not need to be explicitly created because they are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the panel. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def BeginUpdate(self) -> None: + ''' + Use this method before adding, removing, or editing outline items to prevent the ``GridPanel`` from adjusting to changes in size and position until the `EndUpdate <Vcl.ExtCtrls.TCustomGridPanel.EndUpdate.htm>`__ method is called. Use ``BeginUpdate()`` to speed processing time by deferring repaints until `EndUpdate <Vcl.ExtCtrls.TCustomGridPanel.EndUpdate.htm>`__ is called. + ''' + def EndUpdate(self) -> None: + ''' + Use ``EndUpdate()`` method to re-enable the ``GridPanel`` to adjust the changes in size and position, after this was disabled by the `BeginUpdate <Vcl.ExtCtrls.TCustomGridPanel.BeginUpdate.htm>`__ method. + ''' + def ScaleForPPI(self, NewPPI: int) -> None: + ''' + No have docs. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified method for each child of the control. + + `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ is called by the streaming system that loads and saves components. Applications seldom need to call this routine. + + `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ executes the *callback* specified by the ``Proc`` parameter for every child control listed by the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property that lists the ``Root`` parameter as its ``Owner()``. + + Override `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ to limit or augment which child controls are saved with the control. When overriding `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__, call the procedure passed as the ``Proc`` parameter for every child control that should be saved. The ``Root`` parameter indicates the component (usually a form) that owns the control. + ''' + def IsColumnEmpty(self, AColumn: int) -> bool: + ''' + No have docs. + ''' + def IsRowEmpty(self, ARow: int) -> bool: + ''' + No have docs. + ''' + def UpdateControlsColumn(self, AColumn: int) -> None: + ''' + No have docs. + ''' + def UpdateControlsRow(self, ARow: int) -> None: + ''' + No have docs. + ''' + +class GridPanel(CustomGridPanel): + ''' + ======================= + Vcl.ExtCtrls.TGridPanel + ======================= + + ``GridPanel`` implements a grid panel control in which each component is placed within a cell on a grid. + + Use ``GridPanel`` to put an empty grid panel on a form. The major difference between a traditional panel and a grid panel is the way in which controls are placed. With a traditional panel, you place a control (such as a ``Button``) in a specific location. You can freely move that control to any location within the ``Panel`` using the mouse. In a grid panel, you specify the number of rows and columns on the panel, then each component is placed into the next available cell in the grid, regardless of where you place it with the mouse. If each grid contains a control and you add more controls, the location for the new controls is determined by the Expand``Style`` property. For example, using the default Expand``Style`` property of ``AddRows``, a new row is added to the grid, and each cell in the row can contain a new control. + ''' + + __hash__: ClassVar[None] = ... + DockManager: IDockManager + ''' + Specifies the control's docking manager interface. + + Use `DockManager <Vcl.Controls.TWinControl.DockManager.htm>`__ to specify the control's docking manager. The docking manager handles the layout of docking zones (where controls are docked) and any painting associated with docking zones. + + If you set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ and `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``True``, but do not assign a value to `DockManager <Vcl.Controls.TWinControl.DockManager.htm>`__, the windowed control generates a default docking manager, using the global `DefaultDockTreeClass <Vcl.Controls.DefaultDockTreeClass.htm>`__ variable. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the ``Caption`` is aligned within the panel. + + Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to specify if the ``Caption`` of a panel appears on the *left*, *right*, or *center* of the panel. For example, to use a panel as a ``StatusBar`` that displays the ``Application``. ::``Hint`` property as the panel's ``Caption`` property, set `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ to ``taLeftJustify`` to place the hint text on the left side of the panel. + + .. note:: Use the `VerticalAlignment <Vcl.ExtCtrls.TCustomPanel.VerticalAlignment.htm>`__ property to control the vertical position of the ``Caption``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Determines the style of the inner bevel of a panel. + + Use `BevelInner <Vcl.ExtCtrls.TCustomPanel.BevelInner.htm>`__ to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the bevels, if they are drawn, is the ``BevelWidth`` property. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Determines the style of the outer bevel of a panel. + + Use `BevelOuter <Vcl.ExtCtrls.TCustomPanel.BevelOuter.htm>`__ to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the outer bevel is specified in the ``BevelWidth`` property in pixels. + ''' + BevelWidth: int + ''' + Determines the width, in pixels, of both the inner and outer bevels of a panel. + + Use `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ to specify how wide the inner or outer bevel should be. Do not confuse `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__, which is the width of the bevels, with BorderWidth, which is the space between the bevels. + + If both the ``BevelInner`` and ``BevelOuter`` properties are ``bvNone``, `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ has no effect. To remove both bevels, set the ``BevelInner`` and ``BevelOuter`` properties to ``bvNone``, rather than setting the `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ to 0, as this involves less overhead when painting. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderWidth: int + ''' + Specifies the distance, in pixels, between the outer and inner bevels. + + Use `BorderWidth <Vcl.ExtCtrls.TCustomPanel.BorderWidth.htm>`__ to specify how wide the border around the panel should be. A value of 0 (zero) means no border should appear. + + The border of a panel is the area between the outer and inner bevels. It is visible only if the inner bevel is raised or lowered, but affects the inset of the caption within the panel even if ``BevelInner`` is ``bvNone``. If the ``Alignment`` property is not ``taCenter``, the ``Caption`` will be aligned to the inner edge of the border. This edge is `BorderWidth <Vcl.ExtCtrls.TCustomPanel.BorderWidth.htm>`__ pixels in from the outer bevel if ``BevelInner`` is ``bvNone``. It is the inner edge of the inner bevel otherwise. + + Do not confuse the border of the panel with line drawn around the panel itself. The line around the panel is specified by the Border``Style`` property. + ''' + BorderStyle: BorderStyle + ''' + Determines the style of the line drawn around the perimeter of the panel control. + + Use `BorderStyle <Vcl.ExtCtrls.TCustomPanel.BorderStyle.htm>`__ to specify whether the panel has a single line drawn around it. These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + + Do not confuse the line drawn around the panel with the ``BorderWidth`` of the panel. The ``BorderWidth`` of the panel is the distance between the outer and inner bevels. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + - **NOTES:** + + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + ColumnCollection: ColumnCollection + ''' + Sets the number and size of the columns on the grid panel. + + ``Vcl.ExtCtrls.TGridPanel.ColumnCollection`` inherits from `Vcl.ExtCtrls.TCustomGridPanel.ColumnCollection <Vcl.ExtCtrls.TCustomGridPanel-ColumnCollection.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomGridPanel.ColumnCollection <Vcl.ExtCtrls.TCustomGridPanel-ColumnCollection.htm>`__. + + Sets the number and size of the columns on the grid panel. + + Use the ``ColumnCollection`` property to set the number of columns as well as the size of each column. You can use the `SizeStyle <Vcl.ExtCtrls.TCellItem.SizeStyle.htm>`__ property to specify whether column sizes are based on a percentage of the available width, based on an absolute value, or automatically sized. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + ControlCollection: ControlCollection + ''' + Specifies the controls currently placed on the grid panel. + + ``Vcl.ExtCtrls.TGridPanel.ControlCollection`` inherits from `Vcl.ExtCtrls.TCustomGridPanel.ControlCollection <Vcl.ExtCtrls.TCustomGridPanel.ControlCollection.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomGridPanel.ControlCollection <Vcl.ExtCtrls.TCustomGridPanel.ControlCollection.htm>`__. + + Use `ControlCollection <Vcl.ExtCtrls.TCustomGridPanel.ControlCollection.htm>`__ to add, remove, or access control items in the collection of controls of a `CustomGridPanel <Vcl.ExtCtrls.TCustomGridPanel.htm>`__ component. Each control item is identified through its `Row <Vcl.ExtCtrls.TControlItem.Row.htm>`__ and `Column <Vcl.ExtCtrls.TControlItem-Column.htm>`__ properties. To add a control to the collection, use the `AddControl <Vcl.ExtCtrls.TControlCollection.AddControl.htm>`__ method. To remove a control from the collection, use the `RemoveControl <Vcl.ExtCtrls.TControlCollection.RemoveControl.htm>`__ method. To access a control from the collection, use the `ControlItems <Vcl.ExtCtrls.TControlCollection.ControlItems.htm>`__ property. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + UseDockManager: bool + ''' + Specifies whether the docking manager is used in drag-and-dock operations. + + Use `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``get`` or ``set`` whether a docking manager is used in drag-and-dock operations. + + The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + ExpandStyle: ExpandStyle + ''' + Specifies whether rows or columns are added to a filled grid panel to accommodate additional controls. + + Use the `ExpandStyle <Vcl.ExtCtrls.TCustomGridPanel.ExpandStyle.htm>`__ property to specify how a grid panel is expanded when each cell of the grid contains a control, and a new control is added. The property can take 3 values, which are described in the following table: + + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Value** | **Meaning** | + +==================+========================================================================================================================================================================================================================================================================================+ + | ``emAddRows`` | The ``GridPanel`` is expanded vertically -- only rows are added. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``emAddColumns`` | The ``GridPanel`` is expanded horizontally -- only columns are added. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``emFixedSize`` | The ``GridPanel`` has a fixed number of rows and columns given by the `Count <System.Classes.TCollection.Count.htm>`__ property of both `ColumnCollection <Vcl.ExtCtrls.TCustomGridPanel-ColumnCollection.htm>`__ and | + | | `RowCollection <Vcl.ExtCtrls.TCustomGridPanel.RowCollection.htm>`__ collections. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + The property is used when a new control is added to the `ControlCollection <Vcl.ExtCtrls.TCustomGridPanel.ControlCollection.htm>`__ using `AddControl <Vcl.ExtCtrls.TControlCollection.AddControl.htm>`__ with the ``AColumn`` and ``ARow`` parameters set to -1. + + For example: + + .. code-block:: python + :caption: Delphi + + GridPanel1.ControlCollection.GridAddControl(control,-1,-1); + + where ``control`` is the control added to the *GridPanel1* `GridPanel <Vcl.ExtCtrls.TGridPanel.htm>`__. + ''' + FullRepaint: bool + ''' + Determines how the panel repaints itself when it is resized. + + `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ controls how the panel responds when it is resized. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``True``, the entire panel, including the beveled border repaints when the size changes. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``False``, only the area inside the beveled border repaints. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Locked: bool + ''' + Determines whether a panel that is used as a ``ToolBar`` is replaced by a ``ToolBar`` supplied by an *OLE* server. + + Set the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``False`` when the panel is used as a ``ToolBar`` by a ``OleContainer`` component. Any panels aligned to a ``OleContainer`` are assumed to be replaceable ``ToolBar``\ s unless the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property is ``True``. Prevent the panel from being replaced by an *OLE* server's ``ToolBar`` by setting the panel's `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``True``. + + .. note:: An *OLE* application's ``ToolBar``\ s must be in panels aligned to a side of the ``Form`` (that is, their ``Align`` properties must be set to ``alTop``, ``alBottom``, ``alLeft``, or ``alRight``). + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TGridPanel.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + RowCollection: RowCollection + ''' + Sets the number and size of the rows on the grid panel. + + Use the ``RowCollection`` property to set the number of rows as well as the size of each row. You can use the `SizeStyle <Vcl.ExtCtrls.TCellItem.SizeStyle.htm>`__ property to specify whether row sizes are based on a percentage of the available width, based on an absolute value, or automatically sized. + ''' + ShowCaption: str + ''' + Specifies whether to display the ``Caption`` of the panel control. + + `ShowCaption <Vcl.ExtCtrls.TCustomPanel.ShowCaption.htm>`__ is a ``Boolean`` property that you can use to specify whether to display the ``Caption`` of the panel control. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + VerticalAlignment: VerticalAlignment + ''' + Sets the vertical position of the ``Caption``. + + Use the ``VerticalAlignment`` property to control the position of the ``Caption`` within the ``Panel``. Choose one of the following values. + + ========================= ======================================================== + **Value** **Description** + ========================= ======================================================== + ``taAlignBottom`` The ``Caption`` displays at the bottom of the panel. + ``taAlignTop`` The ``Caption`` displays at the top of the panel. + ``taVerticalCenter`` The ``Caption`` displays at the center of the panel. + ========================= ======================================================== + + .. note:: Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to control the horizontal position of the ``Caption``. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and false otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +==================================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new ``Width`` and ``Height`` of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + # OnConstrainedResize: ConstrainedResizeEvent + Adjusts the resize constraints. + + Use `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ to adjust a control's constraints when an attempt is made to resize it. Upon entry to the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ handler is called immediately after the ``OnCanResize`` handler. + + `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + +class CustomRadioGroup(CustomGroupBox): + ''' + ============================== + Vcl.ExtCtrls.TCustomRadioGroup + ============================== + + ``CustomRadioGroup`` is the base class for ``RadioGroup`` components. + + ``RadioGroup``\ s are collections of ``RadioButton``\ s in a single ``GroupBox``. ``CustomRadioGroup`` is the class from which ``RadioGroup`` components--including ``RadioGroup`` and ``DBRadioGroup``--descend. + + ``RadioButton``\ s that are contained directly in the same control component are said to be "grouped." When the user checks a ``RadioButton``, all other ``RadioButton``\ s in its group become unchecked. Hence, two ``RadioButton``\ s on a form can be checked at the same time only if they are placed in separate containers, such as ``GroupBox``\ es. + ''' + + __hash__: ClassVar[None] = ... + Columns: int + ''' + Specifies number of columns in the ``RadioGroup``. + + ``Columns`` determines the number of columns in the ``RadioGroup`` if ``Orientation`` is ``orVertical`` (the default), and the number of rows if ``Orientation`` is ``orHorizontal``. Its value can range from 1 to 16. The default ``Value`` is 1, which means that the ``RadioButton``\ s are arranged in a single line. + ''' + ItemIndex: int + ''' + Indicates which ``RadioButton`` in the group is currently selected. + + ``ItemIndex`` holds the index of the selected ``RadioButton`` in the ``Items`` list. (The first button is 0.) The value of ``ItemIndex`` changes at runtime as the user selects ``RadioButton``\ s.. If you want one of the buttons to appear selected when the application starts, assign that button to ``ItemIndex`` at design time; otherwise, leave ``ItemIndex`` set to the default value of -1, which means that no button is selected. + ''' + Items: Strings + ''' + Lists the ``RadioButton``\ s in the ``RadioGroup``. + + ``Items`` holds a ``Strings`` object that lists the ``Caption``\ s of the ``RadioButton``\ s in the group. In `CustomRadioGroup <Vcl.ExtCtrls.TCustomRadioGroup.htm>`__ descendants, where this property is published, ``RadioButton``\ s can be added or removed by editing the ``Items`` list from the *Object Inspector*. + + .. note:: A ``RadioButton`` object is created automatically for each string in ``Items``. You cannot directly add or remove ``RadioButton`` objects, but you can access individual ``Button`` objects through the `Buttons <Vcl.ExtCtrls.TCustomRadioGroup.Buttons.htm>`__ property. + ''' + Reading: bool + ''' + No have docs. + ''' + ButtonList: List + ''' + No have docs. + ''' + Buttons: list[RadioButton] + ''' + Access individual ``RadioButton`` objects. + + ``Buttons`` provides direct access to the individual ``RadioButton`` objects created by the control. ``Buttons`` is a read-only property. This means you can access individual ``RadioButton`` objects, but you cannot add or delete ``RadioButton`` objects. To modify the button list, change the `Items <Vcl.ExtCtrls.TCustomRadioGroup.Items.htm>`__ property. + + ``Index`` is the zero-origin button index. If ``Index`` is equal to or greater than the number of buttons, an error is raised. + ''' + WordWrap: bool + ''' + Specifies whether the text for the ``RadioButton``\ s wraps to fit the width of the ``RadioGroup``. + + Set ``WordWrap`` to ``True`` to allow the display of multiple lines of text next to each ``RadioButton`` in the ``RadioGroup``. When ``WordWrap`` is ``True``, text that is too wide for the ``RadioGroup`` wraps at the right margin. + + Set ``WordWrap`` to ``False`` to limit the text to a single line. When ``WordWrap`` is ``False``, text that is too wide for the ``RadioGroup`` appears truncated. + ''' + TopMarginButtons: int + ''' + No have docs. + ''' + def ArrangeButtons(self) -> None: + ''' + No have docs. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def Loaded(self) -> None: + ''' + Initializes the ``RadioGroup`` after it is loaded into memory. + + Do not call ``Loaded()``. The component streaming system calls ``Loaded()`` automatically after the ``RadioGroup``\ s. form is loaded into memory so that it can complete any initializations that depend on other objects in the ``Form``. + + ``Loaded()`` overrides the inherited method to ensure that the buttons in the group are properly arranged. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Reads the ``RadioGroup``\ s. data from a *Stream*. + + ``ReadState()`` is part of a sequence of calls used by the streaming system that loads and saves *VCL Components*. It reads the values of all the ``RadioGroup``\ s. published properties, stored data, and owned components from the reader object passed in ``Reader``. Do not call ``ReadState()`` directly. ``ReadState()`` calls the inherited ``ReadState()`` method to read the ``RadioGroup``\ s. published properties and other stored data to a reader object. It then initializes and redraws the buttons in the group. + ''' + def CanModify(self) -> bool: + ''' + Determines whether the user can select a different ``RadioButton`` in the group. + + Event handlers call ``CanModify()`` to verify that the user is allowed to select a different ``RadioButton`` in the group. As defined in `CustomRadioGroup <Vcl.ExtCtrls.TCustomRadioGroup.htm>`__, this method always returns ``True``; override it to return ``False`` in situations where the user should not be able to make changes. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomRadioGroup <Vcl.ExtCtrls.TCustomRadioGroup.htm>`__ instance. + + Call ``Create()`` to instantiate a ``RadioGroup`` at runtime. ``RadioGroup`` components added to forms at design time are created automatically. + + ``AOwner`` is the component that is responsible for freeing the ``RadioGroup`` instance. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `CustomRadioGroup <Vcl.ExtCtrls.TCustomRadioGroup.htm>`__ instance and the ``RadioButton``\ s it contains. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` checks that the ``RadioGroup`` is not ``nil``, and only then calls ``Destroy()``. + + ``Destroy()`` frees the memory for each item in the group, then calls the inherited destructor. + ''' + def FlipChildren(self, AllLevels: bool) -> None: + ''' + Prevents the default behavior of flipping the child ``RadioButton``\ s.. + + ``FlipChildren()`` overrides the inherited ``FlipChildren()`` method to disable flipping the ``RadioButton``\ s.. To flip the children of a ``RadioGroup``, use the ``BiDiMode`` property. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Prevents the streaming system from loading and saving child controls in the usual fashion. + + ``GetChildren()`` is called in the streaming sequence that loads and saves *VCL Components*. Because ``RadioGroup``\ s load and save their buttons using the `ReadState <System.Classes.TComponent.ReadState.htm>`__ and ``WriteState()`` methods, `CustomRadioGroup <Vcl.ExtCtrls.TCustomRadioGroup.htm>`__ overrides ``WinControl`` to disable the ``GetChildren()`` method. + ''' + +class CustomControlBar(CustomControl): + ''' + ============================== + Vcl.ExtCtrls.TCustomControlBar + ============================== + + ``CustomControlBar`` is the base class for ``ControlBar`` components. + + Use ``CustomControlBar`` as a base class when defining ``ControlBar`` components. ``Control`` bars are designed to manage the layout of ``ToolBar`` controls, although they can contain other controls as well. They provide a convenient docking site in applications that have dockable ``ToolBar``\ s. + + Do not create instances of ``CustomControlBar``. To add a ``ControlBar`` to a form, use ``ControlBar`` instead. + ''' + + __hash__: ClassVar[None] = ... + Picture: Picture + ''' + Specifies the ``ControlBar``\ s. picture. + + Use ``Picture`` to specify the ``ControlBar``\ s. picture. The picture is tiled across the ``ControlBar``. + ''' + AutoDock: bool + ''' + Determines whether the ``ControlBar`` temporarily docks drag clients to provide visual feedback. + + If ``AutoDock`` is ``True`` (the default), when a dockable object is dragged over the ``ControlBar``, the ``ControlBar`` temporarily docks the object so that the user can see the impact of the drag operation. That is, the user can see the dock position and how other docked controls will be repositioned to make room. When the user releases the mouse, the dragged object is docked at the current spot, and any temporary dockings are canceled. However, if the user cancels the drag-and-dock operation, the dragged object reverts to its last temporary dock site rather than to its location at the start of the drag operation. + + If ``AutoDock`` is ``False``, the ``ControlBar`` does not temporarily dock dragged objects. Instead, the user only sees the dragging rectangle as it passes over the ``ControlBar``, with no feedback as to the adjustments the ``ControlBar`` would make if the dragged object were released. + ''' + AutoDrag: bool + ''' + Specifies whether control bands can be undocked by dragging. + + Use ``AutoDrag`` to specify whether control bands are automatically undocked when the user drags them. If ``AutoDrag`` is ``True``, control bands (``TToolBar`` objects) are undocked when dragged off the ``ControlBar``. Otherwise, control bands are kept within the ``ControlBar``. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + CornerEdge: CornerEdge + ''' + Stores the size of the cornering for the edge of the bands. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DrawingStyle: BandDrawingStyle + ''' + No have docs. + ''' + GradientDirection: GradientDirection + ''' + Stores the direction of the gradient as horizontal or vertical. + ''' + GradientStartColor: Color + ''' + Stores the color that the gradient is painted with when it starts. + + Use this property to store the color that you want to use to initialize the drawing. + ''' + GradientEndColor: Color + ''' + Stores the color that the gradient is painted with when it ends. + + Use this property to store the color that you want to use to end your drawing. (This blends with the start color.) + ''' + RowSize: RowSize + ''' + Specifies the height of the ``ControlBar``\ s. rows. + + Use ``RowSize`` to specify the height, in pixels, of the ``ControlBar``\ s. rows. + ''' + RowSnap: bool + ''' + Specifies whether controls are snapped to the ``ControlBar``\ s. rows when docked. + + Use ``RowSnap`` to specify whether controls are snapped to the ``ControlBar``\ s. rows when docked. Controls that are snapped have their ``Top`` and ``Height`` properties set automatically to correspond to the ``ControlBar``\ s. rows. + ''' + def AlignControls(self, AControl: Control, ARect: Rect) -> None: + ''' + Aligns controls in the ``ControlBar``. + + Use ``AlignControls()`` to align all controls within an area of the ``ControlBar``. The alignment of child controls is based on their ``Align`` property. + + ``AControl`` is a child control that takes precedence in alignment over other, similarly-aligned controls. This parameter can be ``nil`` (Delphi) or ``NULL`` (C++). + + ``Rect`` specifies the area in which to align the controls. + + `CustomControlBar <Vcl.ExtCtrls.TCustomControlBar.htm>`__ overrides the inherited method to enforce the alignment of child controls in a manner appropriate to a ``ControlBar``. ``AlignControls()`` determines the best alignment for each control according to its size and the available space. + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Specifies whether the ``ControlBar`` can size itself to accommodate its contents. + + ``CanAutoSize()`` is called automatically when the ``AutoSize`` property is ``True`` and an attempt to resize the control is made to resize the control. It allows controls to implement the ``AutoSize`` property before the resize sequence. This sequence begins with the ``OnCanResize`` and ``OnConstrainedResize`` events and ends with the ``OnResize`` event. When ``CanAutoSize()`` is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the ``ControlBar``. ``CanAutoSize()`` adjusts these values so that the ``ControlBar``\ s. bands are all visible. ``CanAutoSize()`` returns ``True``, indicating that the resize sequence should proceed. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Sets the ``ControlBar``\ s. window flags. + + The `CreateWnd <Vcl.ExtCtrls.TCustomColorBox.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. ``CreateParams()`` fills in the parameter record that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the `CreateWindowEx MSDN <http://msdn.microsoft.com/ms632680(v=vs.85).aspx>`__ API function. + + In `CustomControlBar <Vcl.ExtCtrls.TCustomControlBar.htm>`__, ``CreateParams()`` overrides the inherited method in order to turn off the ``CS_HREDRAW`` and ``CS_VREDRAW`` windows flags. + ''' + def DoBandMove(self, Control: Control, ARect: Rect) -> None: + ''' + Generates an ``OnBandMove`` event. + + Do not call ``DoBandMove``. It is called automatically when a band is moved in the ``ControlBar``. + + ``Control`` is the band that is about to be moved. + + ``ARect`` is the area to which the control is about to be moved. This value can be changed by the ``OnBandMove`` event handler. + + Override ``DoBandMove`` to perform actions in addition to calling the ``OnBandMove`` event handler when a band is moved. + ''' + def DoBandPaint(self, Control: Control, Canvas: Canvas, ARect: Rect, Options: BandPaintOptions) -> None: + ''' + Generates an ``OnBandPaint`` event. + + Do not call ``DoBandPaint``. It is called automatically for each band when the ``ControlBar`` is painted. Override ``DoBandPaint`` to provide class-specific paint code for the bands or to suppress the ``OnBandPaint`` event. + + ``Control`` is the control (usually a tool bar) whose band is about to be painted. + + ``Canvas`` is the ``ControlBar``\ s. canvas. This is the canvas to use for drawing the band. + + ``ARect`` is the dimensions of the band on the canvas. The ``OnBandPaint`` event handler can change this value to alter where the frame and grabber are drawn. + + ``Options`` specifies which parts of the band should be drawn after ``DoBandPaint`` exits. + ''' + def DoBeginBandMove(self, Control: Control) -> bool: + ''' + No have docs. + ''' + def DoEndBandMove(self, Control: Control) -> None: + ''' + No have docs. + ''' + def DockOver(self, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Generates an `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event and ensures proper docking of floating controls. + + ``DockOver()`` overrides the inherited method to ensure proper docking of floating controls that are accepted by the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event handler. + ''' + def DoPaletteChange(self) -> bool: + ''' + Prepares the ``ControlBar`` to realize a new palette. + + Call ``DoPaletteChange`` to prepare the ``ControlBar`` to realize a new palette. ``DoPaletteChange()`` returns ``True`` if the ``ControlBar`` should be redrawn to reflect the new palette, and ``False`` otherwise. + + ``DoPaletteChange()`` is called when the `Picture <Vcl.ExtCtrls.TCustomControlBar.Picture.htm>`__ property changes. + ''' + def DragControl(self, AControl: Control, X: int, Y: int, KeepCapture: bool) -> bool: + ''' + Starts a drag operation on a control band. + + Call ``DragControl`` to start a drag operation on a control band. + + If ``AutoDrag`` is ``True``, ``DragControl()`` is called automatically when a control is undocked from the ``ControlBar``. + + ``AControl`` is the control on the band that should be dragged. + + ``'X'`` and ``'Y'`` are the current positions of the mouse pointer. + + ``KeepCapture`` indicates whether the ``ControlBar`` should capture the mouse when processing the drag. + ''' + def GetControlInfo(self, AControl: Control, Insets: Rect, PreferredSize: int, RowCount: int) -> None: + ''' + Generates an ``OnBandInfo`` event. + + ``GetControlInfo()`` is called automatically when the ``ControlBar`` needs to arrange the position of its bands. It generates an ``OnBandInfo`` event to obtain information about a control band. + + ``AControl`` is the control associated with the band being positioned. + + ``Insets()`` returns the margin between the edges of the control and the edges of its band. + + ``PreferredSize()`` returns the control's preferred width. (The control's width is reduced if it can't fit inside the ``ControlBar``.) + + ``RowCount()`` returns the number of control rows that the control spans in the ``ControlBar``. + ''' + def GetPalette(self) -> HPALETE: + ''' + Returns the ``ControlBar`` palette. + + ``GetPalette()`` returns the palette used for the ``ControlBar`` picture (``Picture`` property). It is called when the ``ControlBar`` needs to realize its palette. + ''' + def GetSiteInfo(self, Client: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + Returns the ``ControlBar``\ s. dock site information. + + ``GetSiteInfo()`` generates an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event to allow an application influence how controls are docked to the ``ControlBar``. On return from the event handler, ``GetSiteInfo()`` sets the + + ``CanDock`` parameter to ``False`` if the control is not floating. This prevents controls that have been docked to other dock sites from being moved to the ``ControlBar``. + + ``Client`` is the control that is a potential dock client. + + ``OutboundClient`` code returns the dimensions where the client will be docked. + + ``MousePos`` is the position of the mouse pointer. + + ``CanDock()`` returns whether the client is permitted to dock in the ``ControlBar``. + ''' + def HitTest(self, X: int, Y: int) -> Control: + ''' + Returns the control at the specified coordinates. + + Call ``HitTest`` to get the control at the specified coordinates. + + ``'X'`` and ``'Y'`` are the coordinates. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Handles mouse button clicks. + + ``MouseDown()`` is called automatically when the user clicks the ``ControlBar`` with the mouse. After generating an `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event, ``MouseDown()`` determines whether a band is being dragged and if so, computes its position. + + ``Button`` indicates which button was clicked. + + ``Shift`` indicates the state of the Alt, Ctrl, and *Shift* keys and the state of the mouse buttons. + + ``'X'`` and ``'Y'`` are the position where the mouse was clicked. + ''' + def MouseMove(self, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Handles mouse movements. + + ``MouseMove()`` generates an `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event and then performs special processing if a control is being undocked from the ``ControlBar`` or moved within the ``ControlBar``. + + ``Shift`` indicates the state of the *Alt*, *Ctrl*, and *Shift* keys and the state of the mouse buttons. + + ``'X'`` and ``'Y'`` are the current position of the mouse. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Handles releasing of a mouse button. + + ``MouseUp()`` handles the dropping of a control onto the ``ControlBar`` and, once the control (if any) is docked, generates an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event. + + ``Button`` indicates which button was released. + + ``Shift`` indicates the state of the *Alt*, *Ctrl*, and *Shift* keys and the state of the mouse buttons. + + ``'X'`` and ``'Y'`` are the position where the mouse was released. + ''' + def Paint(self) -> None: + ''' + ``Paints`` the ``ControlBar``. + + ``Paint()`` is called automatically when the ``ControlBar`` needs to paint itself. To customize the painting, either override the ``Paint()`` method, or specify options in the `OnPaint <Vcl.ExtCtrls.TCustomControlBar.OnPaint.htm>`__ and `OnBandPaint <Vcl.ExtCtrls.TCustomControlBar.OnBandPaint.htm>`__ event handlers. + ''' + def PaintControlFrame(self, Canvas: Canvas, AControl: Control, ARect: Rect) -> None: + ''' + Paints a control band's frame. + + The ``Paint()`` method calls ``PaintControlFrame`` for each band to render its image. ``PaintControlFrame`` generates an ``OnBandPaint`` event, and then draws the frame and grabber for the band, depending on the values returned by the event handler. + + ``Canvas`` is the ``ControlBar``\ s. canvas. + + ``AControl`` is the control on the band to be painted. + + ``ARect`` indicates the dimensions of the band. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def ScaleControlsForDpi(self, NewPPI: int) -> None: + ''' + Scales all the contained controls to the ``NewPPI`` value. + + ``Vcl.ExtCtrls.TCustomControlBar.ScaleControlsForDpi`` inherits from `Vcl.Controls.TWinControl.ScaleControlsForDpi <Vcl.Controls.TWinControl.ScaleControlsForDpi.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ScaleControlsForDpi <Vcl.Controls.TWinControl.ScaleControlsForDpi.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `CustomControlBar <Vcl.ExtCtrls.TCustomControlBar.htm>`__. + + Call ``Create()`` to instantiate a ``ControlBar`` at runtime. ``Control`` bars added to forms at design time are created automatically. + + ``AOwner`` is a component, typically the ``Form``, that is responsible for freeing the ``ControlBar`` instance. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `CustomControlBar <Vcl.ExtCtrls.TCustomControlBar.htm>`__ instance. + + Do not call ``Destroy()``. Instead, call ``Free()``. + + ``Destroy()`` frees the memory allocated for the `CustomControlBar <Vcl.ExtCtrls.TCustomControlBar.htm>`__ properties. + ''' + def FlipChildren(self, AllLevels: bool) -> None: + ''' + Reverses the positions of child controls. + + Call `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ to flip the control's children; that is, to move children on the left side of the control to the right side and vice versa. `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ reverses the position of all child controls and adjusts their `Align <Vcl.Controls.TControl.Align.htm>`__ properties, if necessary, to enforce the new position. + + AllLevels specifies whether `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ should be called recursively on the control's children. + + `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ can be used to reverse the layout of an application when it is running in *Middle Eastern* locales where users read from ``Right`` to ``Left`` instead of ``Left`` to ``Right``: 'Call `'UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__ to determine whether the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property dictates a reversal of alignment based on the system locale. + + .. note:: `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ does the same thing as the *Flip Children* command on the control's context menu in the *IDE*. + ''' + def StickControls(self) -> None: + ''' + Places controls in their final positions after a control is moved in or dropped on the ``ControlBar``. + + Override ``StickControls`` to specify how controls are set in their final positions after a control is moved in or dropped on the ``ControlBar``. + ''' + def OnBandDrag(self, Sender: Object, Control: Control, Drag: bool) -> None: + ''' + # OnBandDrag: BandDragEvent + Occurs when the user starts a drag operation on a specified control. + + Use ``OnBandDrag`` to conditionally allow the user to start dragging a control in the ``ControlBar``. + + ``OnBandDrag`` is an event handler of type `Vcl.ExtCtrls.TBandDragEvent <Vcl.ExtCtrls.TBandDragEvent.htm>`__. + ''' + def OnBandInfo(self, Sender: Object, Control: Control, Insets: Rect, PreferredSize: int, RowCount: int) -> None: + ''' + # OnBandInfo: BandInfoEvent + Occurs when the ``ControlBar`` adjusts the docking position of a band. + + Write code in the ``OnBandInfo`` event handler to provide information to the ``ControlBar`` that it can use when arranging its bands. The ``OnBandInfo`` event handler has several parameters that can be used to return information about how the band should be positioned, including its size, inset, and number of rows. + + ``OnBandInfo`` is an event handler of type `Vcl.ExtCtrls.TBandInfoEvent <Vcl.ExtCtrls.TBandInfoEvent.htm>`__. + ''' + def OnBandMove(self, Sender: Object, Control: Control, ARect: Rect) -> None: + ''' + # OnBandMove: BandMoveEvent + Occurs when a control band is moving. + + Write an ``OnBandMove`` event handler to perform actions when a band is moving. + + Use ``OnBandMove`` to specify the destination rectangle for the band. For example, adjust the destination rectangle so that its right edge matches the right edge of the ``ControlBar``. This means the control extends to the ``ControlBar``\ s. right edge no matter where it is moved. + + ``OnBandMove`` is an event handler of type `Vcl.ExtCtrls.TBandMoveEvent <Vcl.ExtCtrls.TBandMoveEvent.htm>`__. + ''' + def OnBandPaint(self, Sender: Object, Control: Control, Canvas: Canvas, ARect: Rect, Options: BandPaintOptions) -> None: + ''' + # OnBandPaint: BandPaintEvent + Occurs when a control band is painted. + + Write an ``OnBandPaint`` event handler to customize the way the ``ControlBar`` draws its bands. From the event handler, you can draw to the ``ControlBar``\ s. canvas, using the dimensions of the band that are passed in as the ``ARect`` parameter. You can change the dimensions so that the automatically drawn frame and grabber appear in a different portion of the ``ControlBar`` (for example, indented slightly). You can suppress the automatic painting of the frame or grabber by removing options from the ``Options`` parameter. + + ``OnBandPaint`` is an event handler of type `Vcl.ExtCtrls.TBandPaintEvent <Vcl.ExtCtrls.TBandPaintEvent.htm>`__. + ''' + def OnBeginBandMoveEvent(self, Sender: Object, Control: Control, AllowMove: bool) -> None: + ''' + # OnBeginBandMove: BeginBandMoveEvent + Occurs when a control band begins to move. + + ``OnBeginBandMove`` is an event handler of type `Vcl.ExtCtrls.TBeginBandMoveEvent <Vcl.ExtCtrls.TBeginBandMoveEvent.htm>`__. + ''' + def OnEndBandMoveEvent(self, Sender: Object, Control: Control) -> None: + ''' + # OnEndBandMove: EndBandMoveEvent + Occurs when a control band ends moving. + + ``OnEndBandMove`` is an event handler of type `Vcl.ExtCtrls.TEndBandMoveEvent <Vcl.ExtCtrls.TEndBandMoveEvent.htm>`__. + ''' + def OnPaint(self, Sender: Object) -> None: + ''' + # OnPaint: NotifyEvent + Occurs when the ``ControlBar`` is painted. + + Write an ``OnPaint`` event handler to change the way the ``ControlBar`` is rendered. When a ``ControlBar`` receives a *Windows* paint message, it first draws the background picture, if any, and then generates an ``OnPaint`` event. After the ``OnPaint`` event exits, the ``ControlBar`` generates an ``OnBandPaint`` event for each band, finally rendering the grabbers and frames for each band. + + Use the ``Canvas`` property to draw the ``ControlBar``\ s. image. Use the ``ClientRect`` property to obtain the dimensions on which to draw. + + If the custom drawing is intended to change the appearance of individual bands, use the ``OnBandPaint`` event instead. + ''' + +class BoundLabel(CustomLabel): + ''' + ======================== + Vcl.ExtCtrls.TBoundLabel + ======================== + + ``BoundLabel`` implements the ``Label`` of a ``LabeledEdit`` control. Unlike other label controls such as ``Label``, ``BoundLabel`` "belongs" to the ``LabeledEdit`` control (it is a subcomponent of the edit control). This means that the ``BoundLabel``\ s. ``Owner()`` is the edit control rather than the ``Form``, and the edit control is responsible for loading and saving the ``BoundLabel``. + + Use the properties of ``BoundLabel`` to specify how you want the ``LabeledEdit`` control's label to appear. For example, you can use the ``Caption`` property to specify the text that appears in the ``Label``. You can use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ and ``Layout`` properties to specify the placement of that caption within the ``Label``. + ''' + + __hash__: ClassVar[None] = ... + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Left: int + ''' + Specifies the horizontal coordinate of the left edge of a component relative to its parent. + + Use the `Left <Vcl.Controls.TControl.Left.htm>`__ property to determine where the left side of the control begins or to reposition the left side of the control. + + If the control is contained in another control, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the parent control. If the control is contained directly by the ``Form``, the property values are relative to the ``Form``. For forms, the value of the `Left <Vcl.Controls.TControl.Left.htm>`__ property is relative to the *Screen* in pixels. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowAccelChar: bool + ''' + Determines how an ampersand in the ``Label`` text is displayed. + + Set `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ to ``True`` to allow the ``Label`` to display an underlined accelerator key value. When `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``True``, any character preceded by an ampersand (``'&'``) appears underlined. If the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is set, the windowed control specified by the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property receives input focus when the user types that underlined character. To display an ampersand when `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``True``, use two ampersands (``'&&'``) to stand for the single ampersand that is displayed. + + Set `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ to ``False`` to display the ``Label`` ``Text`` with all ampersands appearing as ampersands. When `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``False``, the value of the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is not used. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Top: int + ''' + Specifies the ``'Y'`` coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. + + Use `Top <Vcl.Controls.TControl.Top.htm>`__ to locate the ``Top`` of the control or reposition the control to a different ``'Y'`` coordinate. The `Top <Vcl.Controls.TControl.Top.htm>`__ property, like the `Left <Vcl.Controls.TControl.Left.htm>`__ property, is the position of the control relative to its container. Thus, if a control is contained in a `Panel <Vcl.ExtCtrls.TPanel.htm>`__, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the panel. If the control is contained directly by the ``Form``, it is relative to the ``Form``. For forms, the value of the `Top <Vcl.Controls.TControl.Top.htm>`__ property is relative to the *Screen* in pixels. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether controls that sit below the ``Label`` on a form can be seen through the ``Label``. + + Set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``True`` to prevent the ``Label`` from obscuring other controls on the ``Form``. For example, if the ``Label`` is used to add text to a graphic, set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``True`` so that the ``Label`` does not stand out as a separate object. + + When `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``True``, the ``Label`` always displays in the background color, and any `Color <Vcl.Controls.TControl-Color.htm>`__ setting is ignored. Also, when `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``True``, writing text is slower than writing text when `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``False``. If the ``Label`` is not obscuring a complicated image, you might choose to optimize performance by doing both of the following things: + + - Set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``, and + - Set the `background color <Vcl.Controls.TControl-Color.htm>`__ of the ``Label`` to match the object beneath it. + ''' + Layout: TextLayout + ''' + Specifies the vertical placement of the text within the ``Label``. + + Set `Layout <Vcl.StdCtrls.TCustomLabel.Layout.htm>`__ to specify how the text of the ``Label`` is placed within the ``ClientRect`` of the ``Label`` control. `Layout <Vcl.StdCtrls.TCustomLabel.Layout.htm>`__ is the vertical analog to the `Alignment <Vcl.StdCtrls.TCustomLabel.Alignment.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the ``Label`` text wraps when it is too long for the width of the ``Label``. + + Set `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ to ``True`` to allow the ``Label`` to display multiple line of text. When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, text that is too wide for the ``Label`` control wraps at the right margin and continues in additional lines. + + Set `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ to ``False`` to limit the ``Label`` to a single line. When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, text that is too wide for the ``Label`` appears truncated. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` a new `BoundLabel <Vcl.ExtCtrls.TBoundLabel.htm>`__ object. + + Do not create instances of `BoundLabel <Vcl.ExtCtrls.TBoundLabel.htm>`__. ``BoundLabel``\ s are instantiated by the ``Label``ed ``Edit`` controls to which they belong. + + ``AOwner`` specifies the ``Label``ed ``Edit`` control that acts as the ``BoundLabel``\ s. ``Owner()``. + ''' + def AdjustBounds(self) -> None: + ''' + Resizes the ``Label`` when the text changes. + + When the text in the ``Label`` or the font changes, `AdjustBounds <Vcl.StdCtrls.TCustomLabel.AdjustBounds.htm>`__ is implicitly called. It redraws the text in the client area, and then resizes the ``Label`` if the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property is ``True``. + + When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, the width of the ``Label`` is fixed. If `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is also ``True``, changes to the text cause the ``Label`` to change in height. When `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is ``True`` and `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, the height of the ``Label`` is determined by the font, and changes to the text cause the ``Label`` to change in width. + + Override `AdjustBounds <Vcl.StdCtrls.TCustomLabel.AdjustBounds.htm>`__ to make additional adjustments when the text changes. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + +class CustomLabeledEdit(CustomEdit): + ''' + =============================== + Vcl.ExtCtrls.TCustomLabeledEdit + =============================== + + ``CustomLabeledEdit`` is the base class for ``Edit`` controls that have an associated label. This class introduces new properties for managing a ``Label`` that sits on one side of the edit control. + + Do not create instances of ``CustomLabeledEdit``. Use ``CustomLabeledEdit`` as a base class when declaring ``Edit`` controls that include a ``Label``. Properties and methods of ``CustomLabeledEdit`` provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior. + ''' + + __hash__: ClassVar[None] = ... + EditLabel: BoundLabel + ''' + Specifies the control that implements the ``Label``. + + Use ``EditLabel`` to work with the ``Label`` that is associated with this labeled ``Edit`` control. Use this ``Label``\ s. properties to specify the ``Caption`` that appears on the ``Label``, the position of the ``Caption`` within the ``Label``, the font used to write that caption, and so on. At design time, expand the ``EditLabel`` property in the *Object Inspector* to set its properties. + ''' + LabelPosition: LabelPosition + ''' + Specifies the position of the ``Label`` relative to the ``Edit`` control. + + Set ``LabelPosition`` to indicate where the ``Label`` sits relative to the ``Edit`` control. + ''' + LabelSpacing: int + ''' + Specifies the distance, in pixels, between the ``Label`` and the edit region. + + Set ``LabelSpacing`` to indicate the distance, in pixels, between the ``Label`` and the ``Edit`` control. + ''' + def SetParent(self, AParent: WinControl) -> None: + ''' + Sets the value of the ``Parent`` property. + + ``SetParent()`` is the protected property setter for the ``Parent`` property. `CustomLabeledEdit <Vcl.ExtCtrls.TCustomLabeledEdit.htm>`__ overrides ``SetParent()`` to ensure that the ``Label`` has the same parent as the edit control. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications when objects are created or destroyed. + + This protected method is called automatically immediately after objects are created and immediately before they are destroyed. `CustomLabeledEdit <Vcl.ExtCtrls.TCustomLabeledEdit.htm>`__ overrides this method to update the `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ property when it receives a notification that the ``Label`` component is about to be destroyed. + + ``AComponent`` is the component that was just created or that is about to be destroyed. + + ``Operation`` indicates whether the notification indicates the creation or destruction of ``AComponent``. + ''' + def SetName(self, Value: ComponentName) -> None: + ''' + Sets the name of the control. + + `SetName <Vcl.Controls.TControl.SetName.htm>`__ is the protected write implementation of the ``Name`` property. `Control <Vcl.Controls.TControl.htm>`__ updates the ``Text`` or ``Caption`` property, if appropriate, after changing the value of ``Name``. + + Override `SetName <Vcl.Controls.TControl.SetName.htm>`__ to execute additional code when the value of the ``Name`` property changes. + ''' + def CMVisiblechanged(self, Message: Message) -> None: + ''' + Responds when the ``Visible`` property changes. + + ``CMVisiblechanged()`` is called automatically when an application changes the ``Visible`` property. + + ``Message`` is a ``CM_VISIBLECHANGED`` message that notifies the ``LabeledEdit`` of the change. + + The ``LabeledEdit`` control responds by changing the ``Visible`` property of the associated label to the value of its own ``Visible`` property. + ''' + def CMEnabledchanged(self, Message: Message) -> None: + ''' + in Create, and freed in Destroy + Responds when the `Enabled <Vcl.ExtCtrls.TTimer.Enabled.htm>`__ property changes. + + ``CMEnabledchanged()`` is called automatically when an application changes the `Enabled <Vcl.ExtCtrls.TTimer.Enabled.htm>`__ property. + + ``Message`` is a ``CM_ENABLEDCHANGED`` message that notifies the ``Label``ed edit of the change. + + The ``LabeledEdit`` control responds by changing the `Enabled <Vcl.ExtCtrls.TTimer.Enabled.htm>`__ property of the associated label to the value of its own `Enabled <Vcl.ExtCtrls.TTimer.Enabled.htm>`__ property. + ''' + def CMBidimodechanged(self, Message: Message) -> None: + ''' + Responds when the ``BiDiMode`` property changes. + + ``CMBidimodechanged()`` is called automatically when an application changes the ``BiDiMode`` property. + + ``Message`` is a ``CM_BIDIMODECHANGED`` message that notifies the ``LabeledEdit`` of the change. + + The ``LabeledEdit`` control responds by changing the ``BiDiMode`` property of the associated label to the value of its own ``BiDiMode`` property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `CustomLabeledEdit <Vcl.ExtCtrls.TCustomLabeledEdit.htm>`__. + + Call ``Create()`` to instantiate a ``Label``ed ``Edit`` control. ``AOwner`` specifies a component, typically the ``Form``, that is responsible for freeing the ``Label``ed ``Edit`` control. + ''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + ''' + Sets the windowed control's boundary properties all at once. + + Use `SetBounds <Vcl.Controls.TWinControl.SetBounds.htm>`__ to change all of the control's boundary properties at once. The same effect can be achieved by setting the `Left <Vcl.Controls.TControl.Left.htm>`__, `Top <Vcl.Controls.TControl.Top.htm>`__, `Width <Vcl.Controls.TControl.Width.htm>`__, and `Height <Vcl.Controls.TControl.Height.htm>`__ properties separately. By setting all four properties at once, `SetBounds <Vcl.Controls.TWinControl.SetBounds.htm>`__ ensures that the control will not repaint between changes + + Specify the values for the `Left <Vcl.Controls.TControl.Left.htm>`__, `Top <Vcl.Controls.TControl.Top.htm>`__, `Width <Vcl.Controls.TControl.Width.htm>`__, and `Height <Vcl.Controls.TControl.Height.htm>`__ properties as the value of the ``ALeft``, ``ATop``, ``AWidth``, and ``AHeight`` parameters, respectively. + ''' + def SetupInternalLabel(self) -> None: + ''' + Initializes the control that implements the `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ property. + + Applications do not need to call ``SetupInternalLabel`` because this method is called when you set the `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ property. + + ``SetupInternalLabel`` ensures that there is a control to implement the `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ property, adds the ``Label``ed ``Edit`` control to the list of components that should be notified when the ``Label`` is freed, and sets the ``Label``\ s. ``FocusControl()`` property to the labeled ``Edit`` control. + ''' + +class EditButton(Persistent): + ''' + ======================== + Vcl.ExtCtrls.TEditButton + ======================== + + ``Button`` in a `ButtonedEdit <Vcl.ExtCtrls.TButtonedEdit.htm>`__. + + ``EditButton`` is a ``Button`` in a `ButtonedEdit <Vcl.ExtCtrls.TButtonedEdit.htm>`__ control. + ''' + + __hash__: ClassVar[None] = ... + CustomHint: CustomHint + ''' + Custom hint for an edit button. + + The ``CustomHint`` property is of type `CustomHint <Vcl.Controls.CustomHint.htm>`__ and can be used to specify the appearance of the edit button's hint. Custom hints behave just like hints, reacting to a mouse-over. To display a custom hint for an edit button you must: + + Place a `CustomHint <Vcl.Controls.CustomHint.htm>`__, such as a `BalloonHint <Vcl.Controls.BalloonHint.htm>`__ on the ``Form`` and enter it as the edit button's ``CustomHint`` property. + + Place a `ImageList <Vcl.Controls.TImageList.htm>`__ on the ``Form``, populate it and use it for the `CustomHint <Vcl.Controls.CustomHint.htm>`__ `Images <Vcl.ExtCtrls.TEditButton.Images.htm>`__ property. + + Set the `EditButton <Vcl.ExtCtrls.TEditButton.htm>`__ `Hint <Vcl.ExtCtrls.TEditButton.Hint.htm>`__ property in the following manner to specify text to be used in the ``CustomHint`` box. Set values separated by a | character (the vertical bar "or" symbol). For example, + + .. code-block:: python + :caption: Delphi + + Edit1.Hint := 'Enter Name|Enter full name in the ``Edit`` box|1'; + + .. code-block:: python + :caption: C++ + + Edit1->Hint = "Enter Name|Enter full name in the ``Edit`` box|1"; + + The "Enter Name" part is the short hint and appears at the top of the custom hint box. "Enter full name in the ``Edit`` box" is the long hint and appears below the short hint. ``'1'`` is an ``ImageIndex`` into the ``Images`` property of the edit button and specifies which image to use in the custom hint. The `Hint <Vcl.ExtCtrls.TEditButton.Hint.htm>`__ property must contain an ``ImageIndex`` for the ``CustomHint`` to appear. + + Set the owner's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property to ``True``. + ''' + DisabledImageIndex: ImageIndex + ''' + Determines which image is displayed when the button is diabled. + + Set ``DisabledImageIndex`` to associate the button with one of the images in the ``Images`` property of the parent buttoned ``Edit`` control. The selected image will be displayed when the button is in the disabled state. + ''' + DisabledImageName: ImageName + ''' + The name of the image is used when the UI is disabled. + ''' + DropDownMenu: PopupMenu + ''' + Drop down menu for button. + + ``DropDownMenu`` is a `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__ that is activated when the button is pressed. + ''' + Enabled: bool + ''' + Specifies whether the embedded button is enabled. + + Use ``Enabled`` to enable or disable a embedded button. If ``Enabled`` is ``True``, the button ``OnClick`` event handler is called when the user selects the item with the mouse. If ``Enabled`` is ``False``, the embedded button appears dimmed and the user cannot select it. However, calling the button ``OnClick`` event handler method works even when ``Enabled`` is ``False``. + ''' + Hint: str + ''' + Contains the text string that can appear when the user moves the mouse over the edit button. + + Use the ``Hint`` property to provide a string of help text for a `EditButton <Vcl.ExtCtrls.TEditButton.htm>`__. + + A Help ``Hint`` is a box containing help text that appears for an edit button when the user moves the mouse pointer over the button and pauses momentarily. To set up *Help Hints*: + + - Specify the ``Hint`` property of each edit button of a `ButtonedEdit <Vcl.ExtCtrls.TButtonedEdit.htm>`__ for which a *Help Hint* should appear. + + - Set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the parent ``TButtonedEdit`` to ``True``. + + - See information in the ``Control`` `Hint <Vcl.Controls.TControl.Hint.htm>`__ property for how to use the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler or the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property and the ``ShowHint`` property of the ``Form`` to display hints. + + - If the ``Hint`` property contains only one value, the entire string is used as a *Help Hint*. + + .. note:: If the application's ``ShowHint`` property is ``False``, the *Help Hint* does not appear. + ''' + HotImageIndex: ImageIndex + ''' + Determines which image is displayed when the mouse is over the button. + + Set ``HotImageIndex`` to associate the button with one of the images in the ``Images`` property of the parent buttoned ``Edit`` control. The selected image will be displayed when the mouse is over the button. + ''' + HotImageName: ImageName + ''' + The name of the image is used when the cursor hovers over the UI. + ''' + ImageIndex: ImageIndex + ''' + Determines which image is displayed when the button in the unselected state. + + Set ImageIndex to associate the button with one of the images in the ``Images`` property of the parent buttoned ``Edit`` control. The selected image will be displayed when the button in the unselected state. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + PressedImageIndex: ImageIndex + ''' + Determines which image is displayed when the button is pressed. + + Set ``PressedImageIndex`` to associate the button with one of the images in the ``Images`` property of the parent buttoned ``Edit`` control. The selected image will be displayed when the button is pressed. + ''' + PressedImageName: ImageName + ''' + The name of the image is used when pressing the UI. + ''' + Visible: bool + ''' + Indicates button visibility. + + ``Visible`` is ``True`` if the button is displayed and ``False`` otherwise. + ''' + def GetOwner(self) -> Persistent: + ''' + Returns the owner of an object. + + `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ is used by the `GetNamePath <System.Classes.TPersistent.GetNamePath.htm>`__ method to find the owner of a persistent object. `GetNamePath <System.Classes.TPersistent.GetNamePath.htm>`__ and `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ are introduced in `Persistent <System.Classes.TPersistent.htm>`__ so descendants such as collections can appear in the *Object Inspector*. As implemented in `Persistent <System.Classes.TPersistent.htm>`__, `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ returns ``nil`` (Delphi) or ``NULL`` (C++). + + For `OwnedCollection <System.Classes.TOwnedCollection.htm>`__, `GetOwner <System.Classes.TOwnedCollection.GetOwner.htm>`__ returns the owner of the collection. For `CollectionItem <System.Classes.TCollectionItem.htm>`__ collection items, `GetOwner <System.Classes.TCollectionItem.GetOwner.htm>`__ returns the collection object into which the collection item has been inserted. For `Component <System.Classes.TComponent.htm>`__, `GetOwner <System.Classes.TComponent.GetOwner.htm>`__ returns the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. + ''' + def UpdateBounds(self) -> None: + ''' + Updates the positon and size of the image in this ``EditButton`` instance depending on themes and properties of this TEditButton. + + Adjusts the position and size of the image in this buttoned ``Edit`` control. This adjustment takes into account theming, and the dimensions, border style and beveling of the buttoned ``Edit`` control in an effort to display as much of the image as possible. ``Height`` and ``Width`` of this buttoned ``Edit`` control are zeroed if the ``ImageList`` is not currently populated. + ''' + def CheckImageIndexes(self) -> None: + ''' + No have docs. + ''' + def UpdateImageName(self, Index: ImageIndex, Name: ImageName) -> None: + ''' + No have docs. + ''' + def UpdateImageIndex(self, Name: ImageName, Index: ImageIndex) -> None: + ''' + No have docs. + ''' + def Create(self, EditControl: CustomButtonedEdit, APosition: ButtonPosition) -> None: + ''' + Allocates memory and constructs a safely initialized instance of a ``EditButton``. + + Use ``Create()`` to create an instance of the ``EditButton`` class. + + ``EditControl`` specifies the buttoned ``Edit`` control that is to be the parent of this ``EditButton`` instance. + + ``APosition`` specifies whether this ``EditButton`` instance is the `LeftButton <Vcl.ExtCtrls.TCustomButtonedEdit.LeftButton.htm>`__ or the `RightButton <Vcl.ExtCtrls.TCustomButtonedEdit.RightButton.htm>`__ of the ButtonedEdit parent. + ''' + def Destroy(self) -> None: + ''' + Destroys the `Persistent <System.Classes.TPersistent.htm>`__ instance and frees its memory. + + Do not call `Destroy <System.Classes.TPersistent.Destroy.htm>`__ directly. Call `Free <System.TObject.Free.htm>`__ instead. `Free <System.TObject.Free.htm>`__ checks that the object reference is not ``nil`` before calling `Destroy <System.Classes.TPersistent.Destroy.htm>`__. + ''' + +class CustomButtonedEdit(CustomEdit): + ''' + ================================ + Vcl.ExtCtrls.TCustomButtonedEdit + ================================ + + ``CustomButtonedEditis`` the base class for ``Edit`` controls that contain embedded buttons. + + A ``CustomButtonedEdit`` is the base class for ``Edit`` controls that have associated buttons. This class introduces new properties for managing buttons that sit to the sides of the edit control. + + This class contains an ``Images`` property that holds an ``Imagelist`` that displays on the ``LeftButton`` and ``RightButton`` to indicate state. ``LeftButton`` and ``RightButton`` properties contain indexes into the ``Images`` ``ImageList`` to specify which image to use for which state. ``OnLeftButtonClick`` and ``OnRightButtonClick`` are event handlers for the buttons. + + Do not create instances of ``CustomButtonedEdit``. Use ``CustomButtonedEdit`` as a base class when declaring ``Edit`` controls that include buttons. Properties and methods of ``CustomButtonedEdit`` provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior. + ''' + + __hash__: ClassVar[None] = ... + Images: CustomImageList + ''' + Lists the images that can appear on the control's embedded buttons. + + ``Images`` contains a list of images that can appear on the control's embedded buttons. If ``Images`` is unassigned, no images are displayed on the buttons. + + ``Images`` in the list should be 16x16. + ''' + LeftButton: EditButton + ''' + Specifies the control that implements the left embedded button. + + Use ``LeftButton`` to work with the left button embedded in this ``Edit`` control. Use this button's properties to specify images to correspond to the various states of the button, to disable the button, to toggle its visibility, and to add a dropdown menu. At design time, expand the ``LeftButton`` property in the *Object Inspector* to set its properties. + ''' + RightButton: EditButton + ''' + Specifies the control that implements the right embedded button. + + Use ``RightButton`` to work with the right button embedded in this ``Edit`` control. Use this button's properties to specify images to correspond to the various states of the button, to disable the button, to toggle its visiblity and to add a dropdown menu. At design time, expand the ``RightButton`` property in the *Object Inspector* to set its properties. + ''' + def DoSetTextHint(self, Value: str) -> None: + ''' + Sets the value of `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__. + + ``DoSetTextHint()`` is a protected method used to set the value of `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__. + ''' + def GetEditButtonClass(self) -> EditButtonClass: + ''' + Returns `EditButton <Vcl.ExtCtrls.TEditButton.htm>`__. + + Returns the type of object used for the button in the buttoned ``Edit`` control, namely `EditButton <Vcl.ExtCtrls.TEditButton.htm>`__. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def UpdateEditMargins(self) -> None: + ''' + Update the margins of the ``Edit`` control to provide adequate space for the buttons. + + Use UpdateEditMargins to set the margins of the ``Edit`` control to provide adequate space for the buttons. The ``LeftButton`` or the ``RightButton`` must be visible for this to occur. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the control. + + Override `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ to change the initial *Windows Message* handler for the control. The ``WindowProc()`` property is initialized to point to the `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method. + + `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ for `WinControl <Vcl.Controls.TWinControl.htm>`__ overrides the inherited method to define responses for focus, mouse, and keyboard messages. It sends all others to its inherited `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__. + + When overriding `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ to provide specialized responses to messages, call the inherited `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ at the end to dispatch any unhandled messages. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ an instance of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. + + Call `Create <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ to create and initialize an instance of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. + + ``AOwner`` is another component, typically the ``Form``, that is responsible for freeing the ``Edit`` control. It becomes the value of the ``Owner()`` property. + + Derived objects that override the `Create <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ method should call the inherited `Create <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ before performing any additional initialization. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TWinControl.Destroy.htm>`__ an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `WinControl <Vcl.Controls.TWinControl.htm>`__ reference is not ``nil``, and only then calls `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__. + ''' + def DefaultHandler(self, Message) -> None: + ''' + Provides message handling for all messages that the control does not fully process itself. + + Override `DefaultHandler <Vcl.StdCtrls.TCustomEdit.DefaultHandler.htm>`__ to change the default message handling for the ``Edit`` control. The ``Message`` parameter can be cast to a ``Message`` type to obtain the ``WParam``, ``LParam``, and ``Result`` of the message. If the ``Result`` of the message is non-zero, the message has already been handled. Set the ``Result`` field to a non-zero value to prevent further processing of the message by the inherited method. + + .. note:: In Delphi, calling inherited in a message-handling method results in a call to the ancestor's `DefaultHandler <Vcl.StdCtrls.TCustomEdit.DefaultHandler.htm>`__ method if that ancestor does not specify a handler for the message being handled. + ''' + def OnLeftButtonClick(self, Sender: Object) -> None: + ''' + # OnLeftButtonClick: NotifyEvent + Occurs when the user clicks the `LeftButton <Vcl.ExtCtrls.TCustomButtonedEdit.LeftButton.htm>`__. + + Use the ``OnLeftButtonClick`` event handler to respond when the user clicks the ``LeftButton`` of the control. + ''' + def OnRightButtonClick(self, Sender: Object) -> None: + ''' + # OnRightButtonClick: NotifyEvent + Occurs when the user clicks the `RightButton <Vcl.ExtCtrls.TCustomButtonedEdit.RightButton.htm>`__. + + Use the ``OnRightButtonClick`` event handler to respond when the user clicks the ``RightButton`` of the control. + ''' + +class ButtonedEdit(CustomButtonedEdit): + ''' + ========================== + Vcl.ExtCtrls.TButtonedEdit + ========================== + + ``ButtonedEdit`` is an edit control that has two embedded buttons. + + Use a ``ButtonedEdit`` to add an edit control with two (optional) embedded buttons, one on either side of the text, to a form. ``ButtonedEdit`` uses the ``Images`` property to supply images from a ``ImageList`` to the embedded buttons, referenced by its ``LeftButton`` and ``RightButton`` properties. Use each button's ``ImageIndex``, ``HotImageIndex``, ``PressedImageIndex`` and ``DisabledImageIndex`` properties to specify images for each possible state. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the text is aligned within the text edit control. + + Use `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ to change the way the text is formatted in the text edit control. `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ can take one of the following values: + + ==================== ============================================ + **Value** **Meaning** + ==================== ============================================ + ``taLeftJustify`` Align text to the left side of the control + ``taCenter`` Center text horizontally in the control. + ``taRightJustify`` Align text to the right side of the control. + ==================== ============================================ + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSelect: bool + ''' + Determines whether all the text in the edit control is automatically selected when the control gets focus. + + Set `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ to select all the text when the edit control gets focus. `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ only applies to single-line ``Edit`` controls. + + Use `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ when the user is more likely to replace the text in the edit control than to append to it. + ''' + AutoSize: bool + ''' + Determines whether the height of the edit control automatically resizes to accommodate the text. + + Use `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ to make the edit control adjust its size automatically so the client area accommodates the height of the text. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``False``, the edit control has a fixed height. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``True``, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style. + + .. note:: `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ only adjusts the height of the edit control. Even with `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ set to ``True``, text in the edit control may appear truncated if it extends beyond the width of the control. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelWidth: int + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``Edit`` control has a single line border around the client area. + + Use `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ to affect the sharpness with which the client area of the ``Edit`` control stands out. `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ can have a value of either ``bsSingle`` or ``bsNone``. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsSingle``, the ``Edit`` control has a single-line border around the client area. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsNone``, there will be no border. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text within the ``Edit`` control. + + Use `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to force the contents of the ``Edit`` control to assume a particular case. + + When `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types them into the ``Edit`` control. Changing the `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ property to ``ecLowerCase`` or ``ecUpperCase`` changes the actual contents of the text, not just the appearance. Any case information is lost and can't be recaptured by changing `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to ``ecNormal``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HideSelection: bool + ''' + Determines whether the visual indication of the selected text remains when focus shifts to another control. + + Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` to provide visual feedback of the selected portion of the text even when the ``Edit`` control does not have focus. Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``True`` to show the selection only when the ``Edit`` control has focus. `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ does not affect the actual value of the selection, only the visual indication. Always setting `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` can make forms with many ``Edit`` controls look too busy. + ''' + Images: CustomImageList + ''' + Lists the images that can appear on the control's embedded buttons. + + `Images <Vcl.ExtCtrls.TCustomButtonedEdit.Images.htm>`__ contains a list of images that can appear on the control's embedded buttons. If ``Images`` is unassigned, no images are displayed on the buttons. + + ``Images`` in the list should be 16x16. + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: int + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + LeftButton: int + ''' + Specifies the control that implements the left embedded button. + + Use ``LeftButton`` to work with the left button embedded in this ``Edit`` control. Use this button's properties to specify images to correspond to the various states of the button, to disable the button, to toggle its visibility, and to add a dropdown menu. At design time, expand the ``LeftButton`` property in the *Object Inspector* to set its properties. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can enter into the ``Edit`` control. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the number of characters that can be entered into the ``Edit`` control. A value of 0 indicates that there is no application-defined limit on the length. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the length of the text in an ``Edit`` control if that text will be copied into a fixed-length buffer. + + .. note:: Setting `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ characters. + + .. note:: Even when `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an ``Edit`` control. + + .. note:: The unit of ``MaxLength`` is characters (not bytes) if the application is using themes. + ''' + OEMConvert: bool + ''' + Determines whether characters typed in the ``Edit`` control are converted from *ANSI* to *OEM* and then back to *ANSI*. + + `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ is most useful for ``Edit`` controls used to enter file names when the application does not use Unicode file names. + ''' + NumbersOnly: bool + ''' + Allows only numbers to be typed into the text ``Edit``. + + Use `NumbersOnly <Vcl.StdCtrls.TCustomEdit.NumbersOnly.htm>`__ to prohibit entry of non-numeric characters in the ``textfield``. Note, however, that a user can paste non-numeric characters in the ``textfield`` even when this property is set. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TButtonedEdit.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PasswordChar: str + ''' + Indicates the character, if any, to display in place of the actual characters typed in the control. + + Use the `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ property to create an ``Edit`` control that displays a special character in place of any entered text. If `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ is set to the ``NULL`` character (*ANSI* character zero), the ``Edit`` control displays its text normally. If `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ is any other character, the ``Edit`` control displays `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ in place of each character typed. `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ affects the appearance of the ``Edit`` control only. The value of the ``Text`` property reflects the actual characters that are typed. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the ``Edit`` control. To restrict the ``Edit`` control to display only, set the `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ property to ``True``. Set `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``False`` to allow the contents of the ``Edit`` control to be edited. + + Setting `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + RightButton: EditButton + ''' + Specifies the control that implements the right embedded button. + + Use ``RightButton`` to work with the right button embedded in this ``Edit`` control. Use this button's properties to specify images to correspond to the various states of the button, to disable the button, to toggle its visiblity and to add a dropdown menu. At design time, expand the ``RightButton`` property in the *Object Inspector* to set its properties. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Text: Caption + ''' + Contains a text string associated with the control. + + Use the `Text <Vcl.Controls.TControl.Text.htm>`__ property to read the `Text <Vcl.Controls.TControl.Text.htm>`__ of the control or to specify a new string for the `Text <Vcl.Controls.TControl.Text.htm>`__ value. By default, `Text <Vcl.Controls.TControl.Text.htm>`__ is the control name. For ``Edit`` controls and memos, the `Text <Vcl.Controls.TControl.Text.htm>`__ appears within the control. For ``ComboBox``\ es, the `Text <Vcl.Controls.TControl.Text.htm>`__ is the content of the ``Edit`` control portion of the ``ComboBox``. + + .. note:: Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. Which property is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + ''' + TextHint: str + ''' + A hint or message to be displayed when the ``Text`` property is empty. + + Use `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ to cue the user on what kind of entry is expected in the text field. Runtime themes must be enabled. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def OnChange(self, Sender: Object) -> None: + ''' + OnChange: NotifyEvent + Occurs when the text for the ``Edit`` control may have changed. + + Write an `OnChange <Vcl.StdCtrls.TCustomEdit.OnChange.htm>`__ event handler to take specific action whenever the text for the ``Edit`` control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the ``Edit`` control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the ``Edit`` control. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnLeftButtonClick(self, Sender: Object) -> None: + ''' + OnLeftButtonClick: NotifyEvent + Occurs when the user clicks the `LeftButton <Vcl.ExtCtrls.TCustomButtonedEdit.LeftButton.htm>`__. + + ``Vcl.ExtCtrls.TButtonedEdit.OnLeftButtonClick`` inherits from `Vcl.ExtCtrls.TCustomButtonedEdit.OnLeftButtonClick <Vcl.ExtCtrls.TCustomButtonedEdit.OnLeftButtonClick.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomButtonedEdit.OnLeftButtonClick <Vcl.ExtCtrls.TCustomButtonedEdit.OnLeftButtonClick.htm>`__. + + Use the ``OnLeftButtonClick`` event handler to respond when the user clicks the ``LeftButton`` of the control. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnRightButtonClick(self, Sender: Object) -> None: + ''' + OnRightButtonClick: NotifyEvent + Occurs when the user clicks the `RightButton <Vcl.ExtCtrls.TCustomButtonedEdit.RightButton.htm>`__. + + ``Vcl.ExtCtrls.TButtonedEdit.OnRightButtonClick`` inherits from `Vcl.ExtCtrls.TCustomButtonedEdit.OnRightButtonClick <Vcl.ExtCtrls.TCustomButtonedEdit.OnRightButtonClick.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomButtonedEdit.OnRightButtonClick <Vcl.ExtCtrls.TCustomButtonedEdit.OnRightButtonClick.htm>`__. + + Occurs when the user clicks the `RightButton <Vcl.ExtCtrls.TCustomButtonedEdit.RightButton.htm>`__. + + Use the ``OnRightButtonClick`` event handler to respond when the user clicks the ``RightButton`` of the control. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + +class CustomColorListBox(CustomListBox): + ''' + ================================ + Vcl.ExtCtrls.TCustomColorListBox + ================================ + + Specifies a ``CustomColorListBox``. + + ``CustomColorListBox`` is a wrapper over `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__ and implements a ``CustomColorListBox`` that is used by the `ColorListBox <Vcl.ExtCtrls.TColorListBox.htm>`__ component. + ''' + + __hash__: ClassVar[None] = ... + Style: ColorBoxStyle + ''' + Determines whether the ``ListBox`` is standard or owner-draw and whether it is virtual. + + Use `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ to specify whether the ``ListBox`` is a standard ``ListBox`` that displays text strings, or an owner-draw ``ListBox`` that can display graphical images. Owner-draw ``ListBox``\ es let you display items in some nonstandard way. In this case, you must write the code to paint items in the ``ListBox``. + + In addition, `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ controls whether the ``ListBox`` is virtual, which means that items are supplied dynamically using event handlers. By default, `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ is ``lbStandard``, meaning that the ``ListBox`` is not virtual and it displays each item as a string. + ''' + Colors: list + ''' + No have docs. + ''' + ColorNames: list + ''' + No have docs. + ''' + Selected: Color + ''' + Indicates whether a particular item is selected. + + Use `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ to query the state of a particular item in the ``ListBox``. If the item specified by the ``Index`` parameter is selected in the ``ListBox``, the value of the `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ property is ``True``. If the specified item is not selected, `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ is ``False``. Set `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ to change the currently selected item. + + The ``Index`` parameter is the item referenced by its position in the ``ListBox``, with the first item having an ``Index`` value of 0. + + An item is selected when the user highlights it. More than one item in the ``ListBox`` can be selected by setting the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property to ``True``. In this case, the `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ item is the one that has focus when the ``ListBox`` has input focus. + ''' + DefaultColorColor: Color + ''' + No have docs. + ''' + NoneColorColor: Color + ''' + No have docs. + ''' + def CreateWnd(self) -> None: + ''' + Creates a *Windows* control corresponding to the ``ListBox`` component. + + `CreateWnd <Vcl.StdCtrls.TCustomListBox.CreateWnd.htm>`__ is called automatically when the ``ListBox`` must be displayed. `CreateWnd <Vcl.StdCtrls.TCustomListBox.CreateWnd.htm>`__ calls the inherited `CreateWnd <Vcl.StdCtrls.TCustomListBox.CreateWnd.htm>`__ method, which calls: + + - ``CreateParams()`` to initialize the window-creation parameters. + - ``CreateWindowHandle()`` to create the window handle for the control. + + `CreateWnd <Vcl.StdCtrls.TCustomListBox.CreateWnd.htm>`__ additionally sets up the ``ListBox`` position, tabs, items, and columns. + ''' + def DrawItem(self, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + Generates an `DrawItem <Vcl.StdCtrls.TCustomListBox.DrawItem.htm>`__ event. + + `DrawItem <Vcl.StdCtrls.TCustomListBox.DrawItem.htm>`__ is called whenever a visual aspect of an owner-draw ``ListBox`` changes. The ``ListBox`` calls `DrawItem <Vcl.StdCtrls.TCustomListBox.DrawItem.htm>`__ for each visible item in its list, passing the index of the item in the ``Index`` parameter. + + By default, the `DrawItem <Vcl.StdCtrls.TCustomListBox.DrawItem.htm>`__ method for a ``ListBox`` calls any event handler attached to the component's `DrawItem <Vcl.StdCtrls.TCustomListBox.DrawItem.htm>`__ event. If there is no handler attached, `DrawItem <Vcl.StdCtrls.TCustomListBox.DrawItem.htm>`__ fills the rectangle passed in ``Rect`` and draws any text associated with the indexed item. The default drawing ignores the `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ parameter, although `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ is passed along to attached event handlers. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + When a windowed control receives a key-down message (``WM_KEYDOWN``) from *Windows* , its message handler calls the `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ method. If `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ determines that the control should, in fact, process the character, it calls `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__, passing the key code and shift-key state in the ``Key`` and ``Shift`` parameters, respectively. + + `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ calls any event handler attached to the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Override `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ to provide other responses in addition to the event handler call. + + The ``Key`` parameter is the key on the keyboard. For nonalphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the *Shift*, *Alt*, or *Ctrl* keys are combined with the keystroke. + + Either `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ or the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds when the user presses a key. + + `KeyPress <Vcl.StdCtrls.TCustomListBox.KeyPress.htm>`__ is called automatically when the ``ListBox`` receives a key-press message (``WM_CHAR``). It generates an `OnKeyPress <Vcl.StdCtrls.TCustomListBox.KeyPress.htm>`__ event, and then, if the `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ property is ``True``, updates `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ to reflect the next character that the user typed. + + The ``Key`` parameter is the character represented by the key that is pressed, not a *Windows* virtual key code. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a stream. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated Action. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def PickCustomColor(self) -> bool: + ''' + No have docs. + ''' + def PopulateList(self) -> None: + ''' + No have docs. + ''' + def SetStyle(self, AStyle: ColorBoxStyle) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Instantiates a ``ListBox`` control. + + Call `Create <Vcl.StdCtrls.TCustomListBox.Create.htm>`__ to instantiate a ``ListBox`` control at runtime. For ``ListBox``\ es created at design time, `Create <Vcl.StdCtrls.TCustomListBox.Create.htm>`__ is called automatically.``AOwner`` is the component that is responsible for freeing the ``ListBox``. It becomes the value of the ``Owner()`` property. If ``AOwner`` is ``nil``, the caller is responsible for explicitly freeing the control. + ''' + def OnGetColors(self, Sender: Object, Items: str) -> None: + ''' + # OnGetColors: LBGetColorsEvent + Occurs when the control is populated with a customized list of colors. + + Use ``OnGetColors`` to populate a customized list of colors to be placed in the ``ColorListBox`` colors list. ``OnGetColor`` is only called if `Vcl.ExtCtrls.TCustomColorListBox.Style <Vcl.ExtCtrls.TCustomColorListBox.Style.htm>`__ includes ``cbCustomColor``. + + ``OnGetColors`` is an event handler of type `Vcl.ExtCtrls.TLBGetColorsEvent <Vcl.ExtCtrls.TLBGetColorsEvent.htm>`__. + ''' + +class ColorListBox(CustomColorListBox): + ''' + ========================== + Vcl.ExtCtrls.TColorListBox + ========================== + + ``ColorListBox`` represents a ``ListBox`` that lets users select a color. + + `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ is the base class for ``ColorListBox`` and for ``ComboBox``\ es that display a list of colors. The ``ListBox`` displays a list of all the colors for which the ``Graphics`` unit defines a constant. For a list of these colors, see ``Color``. Each color is displayed next to a small square that is drawn in the corresponding color. + + Do not use `CustomColorBox <Vcl.ExtCtrls.TCustomColorBox.htm>`__ in applications. It is intended to act as a base class for color selection controls. Rather, to add a ``ListBox`` control with selectable colors, use the ``ColorListBox`` component. To use a drop-down ``ComboBox`` that lets users select a color, use the `ColorBox <Vcl.ExtCtrls.TColorBox.htm>`__ component, which appears on the *Additional* page of the component palette. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AutoComplete: bool + ''' + Determines whether the user can give focus to items by typing in the list. + + Use `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ to specify whether the ``ListBox`` automatically updates the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property in response to user keystrokes. When `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ is ``True``, the item with focus changes to the first item that begins with the sequence of characters that the user typed. As the user types more characters, `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ may change to a later item because the string to match becomes longer. + ''' + DefaulColorColor: Color + ''' + No have docs. + ''' + NoneColorColor: Color + ''' + No have docs. + ''' + Selected: Color + ''' + Indicates whether a particular item is selected. + + Use `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ to query the state of a particular item in the ``ListBox``. If the item specified by the ``Index`` parameter is selected in the ``ListBox``, the value of the `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ property is ``True``. If the specified item is not selected, `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ is ``False``. Set `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ to change the currently selected item. + + The ``Index`` parameter is the item referenced by its position in the ``ListBox``, with the first item having an ``Index`` value of 0. + + An item is selected when the user highlights it. More than one item in the ``ListBox`` can be selected by setting the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property to ``True``. In this case, the `Selected <Vcl.StdCtrls.TCustomListBox.Selected.htm>`__ item is the one that has focus when the ``ListBox`` has input focus. + ''' + Style: ColorBoxStyle + ''' + Determines whether the ``ListBox`` is standard or owner-draw and whether it is virtual. + + Use `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ to specify whether the ``ListBox`` is a standard ``ListBox`` that displays text strings, or an owner-draw ``ListBox`` that can display graphical images. Owner-draw ``ListBox``\ es let you display items in some nonstandard way. In this case, you must write the code to paint items in the ``ListBox``. + + In addition, `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ controls whether the ``ListBox`` is virtual, which means that items are supplied dynamically using event handlers. By default, `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ is ``lbStandard``, meaning that the ``ListBox`` is not virtual and it displays each item as a string. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ItemHeight: int + ''' + Specifies the height in pixels of an item in an owner-draw ``ListBox``. + + Use `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ to control the height of an item in a ``ListBox`` when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbOwnerDrawFixed``. The `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ property can also affect the height of the ``ListBox`` itself. When the `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ property is ``True``, the height of the ``ListBox`` is always an increment of the `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ value. + + If the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbStandard`` or ``lbOwnerDrawVariable``, the value of `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ is ignored. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TColorListBox.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetColors(self, Sender: Object, Items: str) -> None: + ''' + # OnGetColors: LBGetColorsEvent + Occurs when the control is populated with a customized list of colors. + + Use ``OnGetColors`` to populate a customized list of colors to be placed in the ``ColorListBox`` colors list. ``OnGetColor`` is only called if `Vcl.ExtCtrls.TCustomColorListBox.Style <Vcl.ExtCtrls.TCustomColorListBox.Style.htm>`__ includes ``cbCustomColor``. + + ``OnGetColors`` is an event handler of type `Vcl.ExtCtrls.TLBGetColorsEvent <Vcl.ExtCtrls.TLBGetColorsEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + +class CustomTrayIcon(Component): + ''' + ============================ + Vcl.ExtCtrls.TCustomTrayIcon + ============================ + + The base class for `TrayIcon <Vcl.ExtCtrls.TTrayIcon.htm>`__. + + ``CustomTrayIcon`` is the base class for `TrayIcon <Vcl.ExtCtrls.TTrayIcon.htm>`__, which places an icon in the system tray next to the clock. + ''' + + __hash__: ClassVar[None] = ... + Data: NotifyIconData + ''' + No have docs. + ''' + Animate: bool + ''' + Specifies whether the icon in the system tray is static or animated. + + When set to ``True``, the icon shown in the system tray displays, in sequence, the images in the ``ImageList`` specified by the `Icons <Vcl.ExtCtrls.TCustomTrayIcon.Icons.htm>`__ property. The images change only if the specified ``ImageList`` contains images. The images change on a rotating basis by the interval set by the `AnimateInterval <Vcl.ExtCtrls.TCustomTrayIcon.AnimateInterval.htm>`__ property. When set to ``False`` the animation stops. + ''' + AnimateInterval: int + ''' + Controls the length of time between image changes for the ``TrayIcon`` image. + + Use ``AnimateInterval`` to specify the length of time between image changes in the ``TrayIcon``. The default interval is 1000ms (1 second). + ''' + Hint: str + ''' + Specifies the text that appears when the user moves the mouse over the control. + ''' + BalloonHint: str + ''' + Specifies the text within a ``BalloonHint``. + + Use ``BalloonHint`` to specify the text string that appears when a ``BalloonHint`` is shown. + ''' + BalloonTitle: str + ''' + Specifies the text that appears as the balloon title. + ''' + BalloonTimeout: int + ''' + Specifies the length of time that the balloon displays. + + Use ``BalloonTimeout`` to set the length of time that a balloon displays. By default, this ``Value`` is set to 3000ms (3 seconds). + ''' + BalloonFlags: BalloonFlags + ''' + Specifies an icon for the ``BalloonHint``. + + The following values specify an icon to be displayed in the ``BalloonHint``: + + - ``bfNone`` + - ``bfInfo`` + - ``bfWarning`` + - ``bfError`` + ''' + Icon: Icon + ''' + Specifies the default icon shown in the system tray. + + Use the ``Icon`` property to set the default icon to be shown in the system tray. If you do not specify a value, the application icon is used. + ''' + Icons: CustomImageList + ''' + Specifies the list of images to be displayed for the icon in the system tray. + + Use this property to specify the list of images used for the icon in the system tray. These images are displayed when the `Animate <Vcl.ExtCtrls.TCustomTrayIcon.Animate.htm>`__ property is set to ``True``. + ''' + IconIndex: int + ''' + This is an index into the Icons ``ImageList`` which is the icon currently being displayed in the system tray. + ''' + PopupMenu: PopupMenu + ''' + Identifies the pop-up menu associated with the ``TrayIcon``. + + Use ``PopupMenuOn`` to specify when the menu is displayed. + ''' + Visible: bool + ''' + Determines whether the icon appears in the system tray. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Vcl.ExtCtrls.TCustomTrayIcon.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Forwards notification messages to all owned components. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def SetHint(self, Value: str) -> None: + ''' + No have docs. + ''' + def GetAnimateInterval(self) -> int: + ''' + No have docs. + ''' + def SetAnimateInterval(self, Value: int) -> None: + ''' + No have docs. + ''' + def SetAnimate(self, Value: bool) -> None: + ''' + No have docs. + ''' + def SetBalloonHint(self, Value: str) -> None: + ''' + No have docs. + ''' + def GetBalloonTimeout(self) -> int: + ''' + No have docs. + ''' + def SetBalloonTimeout(self, Value: int) -> None: + ''' + No have docs. + ''' + def SetBalloonTitle(self, Value: str) -> None: + ''' + No have docs. + ''' + def SetVisible(self, Value: bool) -> None: + ''' + No have docs. + ''' + def SetIconIndex(self, Value: int) -> None: + ''' + No have docs. + ''' + def SetIcon(self, Value: Icon) -> None: + ''' + No have docs. + ''' + def SetIconList(self, Value: CustomImageList) -> None: + ''' + No have docs. + ''' + def WindowProc(self, Message: Message) -> None: + ''' + No have docs. + ''' + def DoOnAnimate(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def Create(self, Owner: Component) -> None: + ''' + Creates and initializes a ``CustomTrayIcon`` instance. + ''' + def Destroy(self) -> None: + ''' + Frees the memory associated with the ``CustomTrayIcon`` object. + ''' + def Refresh(self, Message: int) -> bool: + ''' + Repaints the ``TrayIcon`` on the *Screen*. + ''' + def SetDefaultIcon(self) -> None: + ''' + Sets the ``TrayIcon`` to the default application icon. + + This method sets the ``TrayIcon`` to the default application icon if the `Icon <Vcl.ExtCtrls.TCustomTrayIcon.Icon.htm>`__ property is unassigned. This method is generally not used. + ''' + def ShowBalloonHint(self) -> None: + ''' + Displays the ``BalloonHint``. + ''' + def OnBalloonClick(self, Sender: Object) -> None: + ''' + # OnBalloonClick: NotifyEvent + Occurs when the ``BalloonHint`` is clicked. + + The event ``OnBalloonClick`` is triggered whenever the ``TrayIcon`` ``BalloonHint`` is clicked. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the ``TrayIcon``. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double clicks the ``TrayIcon``. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over the ``TrayIcon``. + + ``OnMouseMove`` is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button while the mouse pointer is over a control. + ''' + def OnAnimate(self, Sender: Object) -> None: + ''' + # OnAnimate: NotifyEvent + Occurs each time the icon changes when the ``TrayIcon`` is animating. + ''' + +class TrayIcon(CustomTrayIcon): + ''' + ====================== + Vcl.ExtCtrls.TTrayIcon + ====================== + + Creates an icon in the system tray next to the clock. + + Use the ``TrayIcon`` component to create an icon in the system tray next to the clock. ``TrayIcon`` has events for mouse clicks, properties for menus and animation of the icon, and methods for showing ``BalloonHint``\ s.. + ''' + + __hash__: ClassVar[None] = ... + Animate: bool + ''' + Specifies whether the icon in the system tray is static or animated. + + When set to ``True``, the icon shown in the system tray displays, in sequence, the images in the ``ImageList`` specified by the `Icons <Vcl.ExtCtrls.TCustomTrayIcon.Icons.htm>`__ property. The images change only if the specified ``ImageList`` contains images. The images change on a rotating basis by the interval set by the `AnimateInterval <Vcl.ExtCtrls.TCustomTrayIcon.AnimateInterval.htm>`__ property. When set to ``False`` the animation stops. + ''' + AnimateInterval: int + ''' + Controls the length of time between image changes for the tray ``IconImage``. + + Use ``AnimateInterval`` to specify the length of time between image changes in the tray icon. The default interval is 1000ms (1 second). + ''' + Hint: str + ''' + Specifies the text that appears when the user moves the mouse over the control. + ''' + BalloonHint: str + ''' + Specifies the text within a ``BalloonHint``. + + Use ``BalloonHint`` to specify the text string that appears when a ``BalloonHint`` is shown. + ''' + BalloonTitle: str + ''' + Specifies the text that appears as the balloon title. + ''' + BalloonTimeout: int + ''' + Specifies the length of time that the balloon displays. + + Use ``BalloonTimeout`` to set the length of time that a balloon displays. By default, this ``Value`` is set to 3000ms (3 seconds). + ''' + BalloonFlags: BalloonFlags + ''' + Specifies an icon for the ``BalloonHint``. + + The following values specify an icon to be displayed in the ``BalloonHint``: + + - ``bfNone`` + - ``bfInfo`` + - ``bfWarning`` + - ``bfError`` + ''' + Icon: Icon + ''' + Specifies the default icon shown in the system tray. + + Use the ``Icon`` property to set the default icon to be shown in the system tray. If you do not specify a value, the application icon is used. + ''' + Icons: CustomImageList + ''' + Specifies the list of images to be displayed for the icon in the system tray. + + Use this property to specify the list of images used for the icon in the system tray. These images are displayed when the `Animate <Vcl.ExtCtrls.TCustomTrayIcon.Animate.htm>`__ property is set to ``True``. + ''' + IconIndex: int + ''' + This is an index into the Icons ``ImageList`` which is the icon currently being displayed in the system tray. + ''' + PopupMenu: PopupMenu + ''' + Identifies the pop-up menu associated with the tray icon. + + Use ``PopupMenuOn`` to specify when the menu is displayed. + ''' + Visible: bool + ''' + Determines whether the icon appears in the system tray. + ''' + def OnAnimate(self, Sender: Object) -> None: + ''' + # OnAnimate: NotifyEvent + Occurs each time the icon changes when the tray icon is animating. + ''' + def OnBalloonClick(self, Sender: Object) -> None: + ''' + # OnBalloonClick: NotifyEvent + Occurs when the ``BalloonHint`` is clicked. + + The event `OnBalloonClick <Vcl.ExtCtrls.TCustomTrayIcon.OnBalloonClick.htm>`__ is triggered whenever the tray icon ``BalloonHint`` is clicked. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the tray icon. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double clicks the tray icon. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button while the mouse pointer is over a control. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over the ``TrayIcon``. + + ``OnMouseMove`` is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + ''' + +class CustomTransparentControl(CustomControl): + '''' + ====================================== + Vcl.Controls.TCustomTransparentControl + ====================================== + + Base class for transparent controls. + + Use ``CustomTransparentControl`` as the base class for drawing transparent controls. + ''' + + __hash__: ClassVar[None] = ... + InterceptMouse: bool + ''' + Specifies whether the control is transparent to the mouse. + + If set to ``True``, the transparent control captures mouse clicks. If set to ``False``, the transparent control ignores mouse clicks. By default, ``InterceptMouse`` is set to ``False``. + ''' + def WMNCHitTest(self, Message: WMNCHitTest) -> None: + ''' + Called automatically when the control receives a ``WM_NCHITTEST`` message. + + ``WMNCHitTest()`` is called automatically when the `CustomTransparentControl <Vcl.Controls.TCustomTransparentControl.htm>`__ receives a ``WM_NCHITTEST`` message. ``WMNCHitTest`` is used internally. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def InvalidateControlsUnderneath(self) -> None: + ''' + Repaints the controls added before the transparent control was added. + + ``InvalidateControlsUnderneath`` entirely repaints the controls added on the transparent control's parent before the transparent control was added. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.Controls.TCustomControl.Create.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Calling `Create <Vcl.Controls.TCustomControl.Create.htm>`__ constructs and initializes an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. However, you should never attempt to instantiate a `CustomControl <Vcl.Controls.TCustomControl.htm>`__. This class is intended solely as a base class from which other control classes descend and you should only call `Create <Vcl.Controls.TCustomControl.Create.htm>`__ to instantiate one of these descendants. Controls placed on forms at design time are created automatically. + + After calling the inherited constructor, `Create <Vcl.Controls.TCustomControl.Create.htm>`__ initializes the control and also a `Canvas <Vcl.Graphics.TCanvas.htm>`__ object for its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + When overriding `Create <Vcl.Controls.TCustomControl.Create.htm>`__, always call the inherited `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. + + .. note:: If a component's constructor allocates resources or memory, also override the destructor to free those resources. + ''' + def Invalidate(self) -> None: + ''' + Schedules a control repaint. + + `Invalidate <Vcl.Controls.TWinControl.Invalidate.htm>`__ informs a control that its entire surface needs to be repainted. Calling `Invalidate <Vcl.Controls.TWinControl.Invalidate.htm>`__ can prevent flicker caused by a series of partial repaints. There is no performance penalty for calling `Invalidate <Vcl.Controls.TWinControl.Invalidate.htm>`__ multiple times before the control is actually repainted. + + The actual repaint does not occur until the control is updated. To force an immediate repaint, call `Repaint <Vcl.Controls.TWinControl.Repaint.htm>`__ instead. + ''' + +class CategoryPanelSurface(CustomTransparentControl): + ''' + ================================== + Vcl.ExtCtrls.TCategoryPanelSurface + ================================== + + ``CategoryPanelSurface`` defines the surface of a `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__. + + Use ``CategoryPanelSurface`` to define the drawing surface for a `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__ control. + ''' + + __hash__: ClassVar[None] = ... + + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def WMEraseBkgnd(self, Message: WmEraseBkgnd) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Create()`` creates and initializes an instance of `CategoryPanelSurface <Vcl.ExtCtrls.TCategoryPanelSurface.htm>`__. + + Call ``Create()`` to create a `CategoryPanelSurface <Vcl.ExtCtrls.TCategoryPanelSurface.htm>`__. When a `CategoryPanel <Vcl.ExtCtrls.TCategoryPanel.htm>`__ is placed on forms at design time, the `CategoryPanelSurface <Vcl.ExtCtrls.TCategoryPanelSurface.htm>`__ is created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the surface. + + ``Create()`` calls the inherited method `CustomTransparentControl.Create <Vcl.Controls.TCustomTransparentControl.Create.htm>`__. + ''' + +class CustomCategoryPanel(CustomPanel): + ''' + ================================= + Vcl.ExtCtrls.TCustomCategoryPanel + ================================= + + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + + __hash__: ClassVar[None] = ... + FPanelSurface: CategoryPanelSurface + ''' + ``FPanelSurface`` is the surface of the `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__. + + ``FPanelSurface`` is internally used to keep the surface of a `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__. + ''' + Collapsed: bool + ''' + Specifies whether the ``CategoryPanel`` is collapsed. + + Use ``Collapsed`` to determine if the ``CategoryPanel`` is in a collapsed state. It can also be used to cause the ``CategoryPanel`` to collapse or expand. + ''' + CollapsedHotImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the mouse is hovering over the header. + + Set ``CollapsedHotImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CategoryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the collapsed state while the mouse hovers over the header. This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + CollapsedHotImageName: ImageName + ''' + No have docs. + ''' + CollapsedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is *collapsed* and the mouse is not hovering over the header. + + Set ``CollapsedImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. + + The selected image will be displayed when the ``CategoryPanel`` is in the *collapsed* state while the mouse is outside of the area of the header. + + This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + CollapsedImageName: ImageName + ''' + No have docs. + ''' + CollapsedPressedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the left mouse button is pressed while the mouse hovers the header. + + ``Vcl.ExtCtrls.TCategoryPanel.CollapsedPressedImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedPressedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedPressedImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedPressedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedPressedImageIndex.htm>`__. + + Set ``CollapsedPressedImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. + + The selected image will be displayed when the ``CategoryPanel`` is in the collapsed state while the left mouse button is pressed while the mouse hovers over the header. + + This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + CollapsedPressedImageName: ImageName + ''' + No have docs. + ''' + ExpandedHotImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is expanded and the mouse is hovering over the header. + + ``Vcl.ExtCtrls.TCategoryPanel.ExpandedHotImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex.htm>`__. + + Set ``ExpandedHotImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CategoryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the expanded state while the mouse hovers over the header. This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + ExpandedHotImageName: ImageName + ''' + No have docs. + ''' + ExpandedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is expanded and the mouse is not hovering over the header. + + ``VCL.ExtCtrls.TCategoryPanel.ExpandedImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex.htm>`__. + + Set ``ExpandedImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the expanded state while the mouse is outside of the area of the header. + ''' + ExpandedImageName: ImageName + ''' + No have docs. + ''' + ExpandedPressedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the left mouse button is pressed while the mouse hovers over the header. + + ``Vcl.ExtCtrls.TCategoryPanel.ExpandedPressedImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedPressedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedPressedImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedPressedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedPressedImageIndex.htm>`__. + + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the left mouse button is pressed while the mouse hovers over the header. + + Set ``CollapsedPressedImageIndex`` to associate the chevron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the collapsed state and the left mouse button is pressed while the mouse hovers over the header. + + This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + ExpandedPressedImageName: ImageName + ''' + No have docs. + ''' + PanelGroup: CustomCategoryPanelGroup + ''' + Indentifies the parent ``CategoryPanelGroup`` of the ``CategoryPanel``. + + Use the ``PanelGroup`` property to ``get`` or ``set`` the parent ``PanelGroup`` of this ``CategoryPanel``. The ``CategoryPanel`` will adopt properties of the new ``CategoryPanelGroup`` (e.g. Width, HeaderHeight, Images). + ''' + def CalcRectBounds(self) -> None: + ''' + Sets the rectangles used to display the text and glyphs of the ``CategoryPanel``. + + Changes the position and size of the glyph rect and text used in the ``DrawHeaderChevron`` and ``UpdateButtonState()`` methods by using the themes, header and group images information. + ''' + def ControlListChanging(self, Inserting: bool, Item: ControlListItem) -> None: + ''' + No have docs. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Provides methods to read and write the `IsControl <Vcl.Controls.TControl.IsControl.htm>`__ property to a *Stream* such as a form file. + + `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ is called automatically by the streaming system that loads and saves *VCL Components*. It allows persistent objects to read and write properties that are not published. Published properties are loaded and stored automatically. + + `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ uses the methods of the filer passed as the ``Filer`` parameter to assign methods that can load and save the `IsControl <Vcl.Controls.TControl.IsControl.htm>`__ property. + + Override `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ to persist unpublished properties. Call the ``DefineBinaryProperty`` or ``DefineProperty()`` method of the ``Filer`` parameter to assign methods that load or save property values. + + .. note:: When overriding this method, call the parent class's `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ method first. + ''' + def DrawCollapsedPanel(self, ACanvas: Canvas) -> None: + ''' + Displays the ``CategoryPanel`` in the collapsed state. + ''' + + @overload + def DrawHeader(self) -> None: + ''' + Calls other ``CategoryPanel()`` methods to display the entire header of the ``CategoryPanel``. + + This `HDC <http://msdn.microsoft.com/aa383751(VS.85).aspx>`__ overload of ``DrawHeader`` uses the device context passed in as a parameter and sets the rectangles used to display the text and glyphs of the ``CategoryPanel``. ``DrawHeader`` then displays the header background, the header chevron and the header caption. If the ``CategoryPanel`` is collapsed, ``DrawHeader`` displays the ``CategoryPanel`` in the collapsed state. + + If the ``HDC`` parameter is not provided, the device context is derived using the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property inherited from ``WinControl`` and calling the `GetWindowDC (MSDN) <http://msdn.microsoft.com/dd144947(VS.85).aspx>`__ function. The non-``HDC`` overload then calls the ``HDC`` overload. + + Both overloads of ``DrawHeader`` are protected methods and so can only be called in the implementation of an extended class of `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__. + ''' + + @overload + def DrawHeader(self, DC: HDC) -> None: ... + + def DrawHeaderBackground(self, ACanvas: Canvas) -> None: + ''' + Draws the background of the header of the ``CategoryPanel``. + + Use ``DrawHeaderBackground()`` to draw the background of the ``CategoryPanel`` according to properties of the parent ``CategoryPanelGroup``. The ``ACanvas`` parameter requires a ``Canvas`` instance created with the window's device context assigned to the ``Canvas``\ s. ``Handle`` property. This ``Canvas`` instance should be freed after the ``DrawHeaderBackground()`` is called. + + The rectangle drawn by ``DrawHeaderBackground`` is specified in the ``ClientRect`` of this control with the bottom of the rectangle set to the ``HeaderHeight``. The header is drawn according to the properties of the ``CategoryPanel``\ s. group parent. + + If the ``CategoryPanelGroup``\ s. ``HeaderStyle`` property is set to ``hsGradient``, then the ``GraphUtil()`` function ``GradientFillCanvas()`` is called with the ``CategoryPanelGroup``\ s. ``GradientBaseColor`` property, ``GradientColor`` property, and ``GradientDirection`` property. + + If the ``CategoryPanelGroup``\ s. ``HeaderStyle`` property is set to ``hsThemed``, then the ``ACanvas`` is filled with the ``Color`` of this ``CategoryPanel`` instance in the rectangle specified by the ``ClientRect`` of this ``CategoryPanel``. The ``Canvas`` is then passed to the *Windows* ``DrawThemeBackground()`` procedure. + + If the ``CategoryPanelGroup``\ s. ``HeaderStyle`` property is set to ``hsImage``, and the ``CategoryPanelGroup``\ s. ``HeaderImage`` property contains an image, then the image is drawn in the ``ClientRect`` with the ``Canvas``\ s. ``StretchDraw()`` procedure. If the ``HeaderImage`` is empty, then ``GradientFillCanvas()`` is called. + + ``DrawHeaderBackground`` is a protected method and so can only be called in the implementation of an extended class of ``CustomCategoryPanel``. + ''' + def DrawHeaderCaption(self, ACanvas: Canvas) -> None: + ''' + Draws the ``Caption`` of the header of the ``CategoryPanel``. + + Use ``DrawHeaderCaption()`` to draw the ``Caption`` of the ``CategoryPanel`` according to properties of the parent ``CategoryPanelGroup``. The ``ACanvas`` parameter requires a ``Canvas`` instance created with the window's device context assigned to the ``Canvas``\ s. ``Handle`` property. This ``Canvas`` instance should be freed after the ``DrawHeaderCaption()`` is called. + + The font used is specified in the ``HeaderFont`` from the ``CategoryPanelGroup`` parent. The ``Alignment`` property of the ``CategoryPanel`` and text flags setting of the ``Canvas``\ s. ``BiDiMode`` property are use to draw the ``Caption``. + + If the ``CategoryPanelGroup``\ s. ``HeaderStyle`` property is set to ``hsThemed`` and themes are enabled, the ``Caption`` is drawn by the theme service ``DrawText()`` function. Otherwise the ``Caption`` is drawn using the *Windows API DrawText Function*. + + ``DrawHeaderCaption`` is a protected method and so can only be called in the implementation of an extended class of ``CustomCategoryPanel``. + ''' + def DrawHeaderChevron(self, ACanvas: Canvas) -> None: + ''' + Draws the chevron of the header of the ``CategoryPanel``. + + Use ``DrawHeaderChevron()`` to draw the chevron of the header of the ``CategoryPanel`` according to properties of the parent ``CategoryPanelGroup``. The ``ACanvas`` parameter requires a ``Canvas`` instance created with the window's device context assigned to the ``Canvas``\ s. ``Handle`` property. This ``Canvas`` instance should be freed after the ``DrawHeaderChevron()`` is called. + + If the ``CategoryPanelGroup``\ s. ``HeaderStyle`` property is set to ``hsThemed``, the ``HeaderState`` and the ``Collapsed`` property of this ``CategoryPanel`` instance are passed to the *Windows* ``DrawThemeBackground()`` procedure. + + If the ``CategoryPanelGroup`` contains an ``ImageList`` in its ``Images`` property; and the ``Collapsed``, ``ExpandedImageIndex``, and ``CollapsedImageIndex`` properties are set as to require the use of an image in the chevron; then the ``CategoryPanelGroup``\ s. Images' Draw routine is used to display the chevron. + + If themes are not enabled and images are not used, the default is to display the chevron with the ``GraphUtil`` ``DrawChevron`` routine. + + ``DrawHeaderChevron`` is a protected method and so can only be called in the implementation of an extended class of ``CustomCategoryPanel``. + ''' + def GetCategoryPanelSurfaceClass(self) -> CategoryPanelSurfaceClass: + ''' + ``GetCategoryPanelSurfaceClass()`` returns the `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__ surface class. + + ``GetCategoryPanelSurfaceClass`` is internally used to get the `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__ surface class. + ''' + def GetCollapsedHeight(self) -> int: + ''' + Returns the height of the ``CategoryPanel`` in the collaped state. + + Use ``GetCollapsedHeight`` to get the height of the ``CategoryPanel`` in its collaped state. + + ``GetCollapsedHeight`` is a protected method and so can only be called in the implementation of an extended class of `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__. + ''' + def Loaded(self) -> None: + ''' + Initializes the panel's bounds after the ``CategoryPanel`` has been assigned to its ``CategoryPanelGroup``. + + Do not call ``Loaded()``. The *VCL Streaming* system calls ``Loaded()`` automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + ``Loaded()`` overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + + As implemented by ``CustomCategoryPanel``, ``Loaded()`` calculates and assigns the bounding rectangle of the panel if the panel has been assigned to a ``CategoryPanelGroup``. + + ``Loaded()`` is a protected method and so can only be called in the implementation of an extended class of `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Prepares the ``CategoryPanel`` for having its properties assigned values read from a *Stream*. + + ``ReadState()`` is part of a sequence of calls used by the streaming system that loads and saves component state. It reads the values of all the control's published properties, stored data, and owned components from the reader object passed in ``Reader``. + + As implemented for ``CustomCategoryPanel``, the ``Control`` `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__ ``ReadState()`` is overridden to set the ``PanelGroup`` property of the CustomPanel if the Reader is the parent ``PanelGroup``. The inherited ``WinControl`` `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__ is then called. + ''' + def ResizeHeader(self, OldHeight, NewHeight: int) -> None: + ''' + Changes the height of the header. + + Use ``ResizeHeader`` to change the `Height <Vcl.Controls.TControl.Height.htm>`__ of the header of this ``CategoryPanel``. The height increases if the ``NewHeight`` is larger than the ``OldHeight``. + ''' + def SetParent(self, AParent: WinControl) -> None: + ''' + Sets the parent of the control. + + `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ is the protected implementation of the ``Parent`` property. Override `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ to execute additional code when the value of the ``Parent`` property changes. + + The ``AParent`` parameter specifies the new parent of the control. + + If the control already has a parent, `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ removes the control from that parent's list of controls by calling the parent's ``RemoveControl()`` method. If ``AParent`` is not ``nil`` (Delphi) or ``NULL`` (C++), `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ calls its ``InsertControl()`` method to add the control to its list of controls. + + The `Control <Vcl.Controls.TControl.htm>`__ destructor calls `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ (``nil`` (Delphi) or ``NULL`` (C++)) to remove the control from its parent's control list before destroying the component. + ''' + def UpdateControlOriginalParentSize(self, AControl: Control, AOriginalParentSize: Point) -> None: + ''' + Updates the original size of the parent control. + + `UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__ is a protected method that updates the original size of the parent control. It is used internally to update the anchor rules of the control. + + The `CustomCategoryPanel <Vcl.ExtCtrls.TCustomCategoryPanel.htm>`__ implementation of ``UpdateControlOriginalParentSize()`` reduces the height or the control by the height of the header. + ''' + def UpdateHeader(self) -> None: + ''' + Sets the alignment of the panel and then draws the header. + + Use ``UpdateHeader`` to set the alignment of the ``CategoryPanel`` to the ``PanelGroup``\ s. `HeaderAlignment <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderAlignment.htm>`__ and then draw the header using the `DrawHeader <Vcl.ExtCtrls.TCustomCategoryPanel.DrawHeader.htm>`__ method. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the control. + + Override `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ to change the initial *Windows Message* handler for the control. The ``WindowProc()`` property is initialized to point to the `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method. + + `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ for `WinControl <Vcl.Controls.TWinControl.htm>`__ overrides the inherited method to define responses for focus, mouse, and keyboard messages. It sends all others to its inherited `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__. + + When overriding `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ to provide specialized responses to messages, call the inherited `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ at the end to dispatch any unhandled messages. + ''' + def CheckImageIndexes(self) -> None: + ''' + No have docs. + ''' + def UpdateImageName(self, Index: ImageIndex, Name: ImageName) -> None: + ''' + No have docs. + ''' + def UpdateImageIndex(self, Name: ImageName, Index: ImageIndex) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ and initializes an instance of `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__. + + Call `Create <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ to instantiate a panel at runtime. Panels placed in forms at design time do not need to be explicitly created because they are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the panel. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def Collapse(self, Node: TreeNode) -> None: + ''' + Collapses the ``CategoryPanel``. + + Collapse is called automatically when the user clicks on the header of an expanded ``CategoryPanel``. This function will set the ``Collapsed`` property to ``True``. + ''' + def Expand(self, Node: TreeNode) -> None: + ''' + Expands the ``CategoryPanel``. + + Expand is called automatically when the user clicks on the header of a collapsed ``CategoryPanel``. This function will set the ``Collapsed`` property to ``False``. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified procedure for every control in the ``CategoryPanel``. + + ``GetChildren()`` is called by the streaming system that loads and saves components. Applications seldom need to call this routine. ``GetChildren()`` executes the *callback* specified by the ``Proc`` parameter for every child control listed by the ``Control``\ s property. Override ``GetChildren()`` to limit or augment which child controls are saved with the control. When overriding ``GetChildren()``, call the procedure passed as the ``Proc`` parameter for every child control that should be saved. + + The ``Proc`` parameter defines the *callback*. + + The ``Root`` parameter is ignored. + ''' + def GetTabControlList(self, List: List) -> None: + ''' + Builds a list of owned controls. + + Call `GetTabControlList <Vcl.Controls.TWinControl.GetTabControlList.htm>`__ to construct a list of child controls. + + `GetTabControlList <Vcl.Controls.TWinControl.GetTabControlList.htm>`__ iterates through the control's internal tab order list, adding each of the child controls to ``List``. The result is a list of all the owned controls in `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__. + ''' + def GetTabOrderList(self, List: List) -> None: + ''' + Builds a list of controls in tab order. + + Call ``GetTabOrderList()`` to construct a list of child controls in tab order. + + ``GetTabOrderList()`` iterates through the control's internal tab-order list, adding each of the child controls to ``List``, including any controls contained in those controls. The result is a list of all the controls and their owned controls, in tab order. + + The ``FindNextControl()`` method calls ``GetTabOrderList()`` to build a complete list of the controls that ``FindNextControl()`` uses to locate the next control in the tab order. + + If the ``CategoryPanel`` is collapsed, ``GetTabOrderList()`` returns an empty list. + ''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + ''' + Changes the position and size of the ``CategoryPanel`` in a single operation. + + Changes the position and size of the ``CategoryPanel`` within the constraints of the ``CategoryPanelGroup``. ``SetBounds()`` will not allow the height to be less than the header height of the ``CategoryPanel``. Other ``CategoryPanel``\ s within the same ``CategoryPanelGroup`` will be adjusted accordingly. By calling ``SetBounds()`` instead of adjusting the ``Left``, ``Top``, ``Width``, and ``Height`` individually, you ensure that the panel will not repaint between changes. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ and initializes an instance of `CustomPanel <Vcl.ExtCtrls.TCustomPanel.htm>`__. + + Call `Create <Vcl.ExtCtrls.TCustomPanel.Create.htm>`__ to instantiate a panel at runtime. Panels placed in forms at design time do not need to be explicitly created because they are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the panel. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def Collapse(self) -> None: + ''' + Collapses the ``CategoryPanel``. + + Collapse is called automatically when the user clicks on the header of an expanded ``CategoryPanel``. This function will set the ``Collapsed`` property to ``True``. + ''' + def Expand(self) -> None: + ''' + Expands the ``CategoryPanel``. + + Expand is called automatically when the user clicks on the header of a collapsed ``CategoryPanel``. This function will set the ``Collapsed`` property to ``False``. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified procedure for every control in the ``CategoryPanel``. + + ``GetChildren()`` is called by the streaming system that loads and saves components. Applications seldom need to call this routine. ``GetChildren()`` executes the *callback* specified by the ``Proc`` parameter for every child control listed by the Controls property. Override ``GetChildren()`` to limit or augment which child controls are saved with the control. When overriding ``GetChildren()``, call the procedure passed as the ``Proc`` parameter for every child control that should be saved. + + The ``Proc`` parameter defines the *callback*. + + The ``Root`` parameter is ignored. + ''' + def GetTabControlList(self, List: List) -> None: + ''' + Builds a list of owned controls. + + Call `GetTabControlList <Vcl.Controls.TWinControl.GetTabControlList.htm>`__ to construct a list of child controls. + + `GetTabControlList <Vcl.Controls.TWinControl.GetTabControlList.htm>`__ iterates through the control's internal tab order list, adding each of the child controls to ``List``. The result is a list of all the owned controls in `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__. + ''' + def GetTabOrderList(self, List: List) -> None: + ''' + Builds a list of controls in tab order. + + Call ``GetTabOrderList()`` to construct a list of child controls in tab order. + + ``GetTabOrderList()`` iterates through the control's internal tab-order list, adding each of the child controls to ``List``, including any controls contained in those controls. The result is a list of all the controls and their owned controls, in tab order. + + The ``FindNextControl()`` method calls ``GetTabOrderList()`` to build a complete list of the controls that ``FindNextControl()`` uses to locate the next control in the tab order. + + If the ``CategoryPanel`` is collapsed, ``GetTabOrderList()`` returns an empty list. + ''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + ''' + Changes the position and size of the ``CategoryPanel`` in a single operation. + + Changes the position and size of the ``CategoryPanel`` within the constraints of the ``CategoryPanel`` group. ``SetBounds()`` will not allow the height to be less than the header height of the ``CategoryPanel``. Other ``CategoryPanel``\ s within the same ``CategoryPanel`` group will be adjusted accordingly. By calling ``SetBounds()`` instead of adjusting the ``Left``, ``Top``, ``Width``, and ``Height`` individually, you ensure that the panel will not repaint between changes. + + ''' + def OnCollapse(self) -> None: + ''' + # OnCollapse: NotifyEvent + Occurs immediately after a ``CategoryPanel`` is collapsed. + + An ``OnCollapse`` event handler to perform special processing when a ``CategoryPanel`` is collapsed. + ''' + def OnExpand(self) -> None: + ''' + # OnExpand: NotifyEvent + Occurs immediately after a ``CategoryPanel`` is expanded. + + An ``OnExpand`` event handler to perform special processing when a ``CategoryPanel`` is expanded. + ''' + +class CategoryPanel(CustomCategoryPanel): + ''' + =========================== + Vcl.ExtCtrls.TCategoryPanel + =========================== + + ``CategoryPanel`` is used to hold the set of display control legends for a particular display category. + + ``CategoryPanel`` is basically a `Panel <Vcl.ExtCtrls.TPanel.htm>`__ with a header to collapse and expand the panel. + ''' + + __hash__: ClassVar[None] = ... + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Collapsed: bool + ''' + Specifies whether the ``CategoryPanel`` is collapsed. + + Use ``Collapsed`` to determine if the ``CategoryPanel`` is in a collapsed state. It can also be used to cause the ``CategoryPanel`` to collapse or expand. + ''' + CollapsedHotImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the mouse is hovering over the header. + + ``Vcl.ExtCtrls.TCategoryPanel.CollapsedHotImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedHotImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedHotImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedHotImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedHotImageIndex.htm>`__. + + Set ``CollapsedHotImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CategoryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the collapsed state while the mouse hovers over the header. This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + CollapsedHotImageName: ImageName + ''' + No have docs. + ''' + CollapsedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the mouse is not hovering over the header. + + ``Vcl.ExtCtrls.TCategoryPanel.CollapsedImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedImageIndex.htm>`__. + + Set ``CollapsedImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the collapsed state while the mouse is outside of the area of the header. This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + CollapsedImageName: ImageName + ''' + No have docs. + ''' + CollapsedPressedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is collapsed and the left mouse button is pressed while the mouse hovers the header. + + ``Vcl.ExtCtrls.TCategoryPanel.CollapsedPressedImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedPressedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedPressedImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.CollapsedPressedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel-CollapsedPressedImageIndex.htm>`__. + + Set ``CollapsedPressedImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the collapsed state while the left mouse button is pressed while the mouse hovers over the header. This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + CollapsedPressedImageName: ImageName + ''' + No have docs. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + UseDockManager: bool + ''' + Specifies whether the docking manager is used in drag-and-dock operations. + + Use `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``get`` or ``set`` whether a docking manager is used in drag-and-dock operations. + + The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + ExpandedHotImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is expanded and the mouse is hovering over the header. + + ``Vcl.ExtCtrls.TCategoryPanel.ExpandedHotImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedHotImageIndex.htm>`__. + + Set ``ExpandedHotImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CategoryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the expanded state while the mouse hovers over the header. This property has no effect if the ``HeaderStyle`` property of the parent ``PanelGroup`` is set to ``hsThemed``. + ''' + ExpandedHotImageName: ImageName + ''' + No have docs. + ''' + ExpandedImageIndex: ImageIndex + ''' + Determines which image is displayed as the chevron when the ``CategoryPanel`` is expanded and the mouse is not hovering over the header. + + ``VCL.ExtCtrls.TCategoryPanel.ExpandedImageIndex`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex <Vcl.ExtCtrls.TCustomCategoryPanel.ExpandedImageIndex.htm>`__. + + Set ``ExpandedImageIndex`` to associate the cheveron with one of the images in the ``Images`` property of the parent ``CateogryPanelGroup``. The selected image will be displayed when the ``CategoryPanel`` is in the expanded state while the mouse is outside of the area of the header. + ''' + ExpandedImageName: ImageName + ''' + No have docs. + ''' + ExpandedPressedImageName: ImageName + ''' + No have docs. + ''' + FullRepaint: bool + ''' + Determines how the panel repaints itself when it is resized. + + `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ controls how the panel responds when it is resized. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``True``, the entire panel, including the beveled border repaints when the size changes. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``False``, only the area inside the beveled border repaints. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Left: int + ''' + Specifies the horizontal coordinate of the left edge of a component relative to its parent. + + Use the `Left <Vcl.Controls.TControl.Left.htm>`__ property to determine where the left side of the control begins or to reposition the left side of the control. + + If the control is contained in another control, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the parent control. If the control is contained directly by the ``Form``, the property values are relative to the ``Form``. For forms, the value of the `Left <Vcl.Controls.TControl.Left.htm>`__ property is relative to the *Screen* in pixels. + ''' + Locked: bool + ''' + Determines whether a panel that is used as a ``ToolBar`` is replaced by a ``ToolBar`` supplied by an *OLE* server. + + Set the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``False`` when the panel is used as a ``ToolBar`` by a ``OleContainer`` component. Any panels aligned to a ``OleContainer`` are assumed to be replaceable ``ToolBar``\ s unless the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property is ``True``. Prevent the panel from being replaced by an *OLE* server's ``ToolBar`` by setting the panel's `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``True``. + + .. note:: An *OLE* application's ``ToolBar``\ s must be in panels aligned to a side of the ``Form`` (that is, their ``Align`` properties must be set to ``alTop``, ``alBottom``, ``alLeft``, or ``alRight``). + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``VCL.ExtCtrls.TCategoryPanel.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes false automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExpand(self, Sender: Object) -> None: + ''' + # OnExpand: NotifyEvent + Occurs immediately after a ``CategoryPanel`` is expanded. + + An ``OnExpand`` event handler to perform special processing when a ``CategoryPanel`` is expanded. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + +class CustomCategoryPanelGroup(ScrollingWinControl): + ''' + ====================================== + Vcl.ExtCtrls.TCustomCategoryPanelGroup + ====================================== + + Implements a container for collapsible panels that are `CategoryPanel <Vcl.ExtCtrls.TCategoryPanel.htm>`__ objects. + + ``CustomCategoryPanelGroup`` implements a container for collapsible panels that are `CategoryPanel <Vcl.ExtCtrls.TCategoryPanel.htm>`__ objects. The `CategoryPanelGroup <Vcl.ExtCtrls.TCategoryPanelGroup.htm>`__ class is based on ``CustomCategoryPanelGroup``. + ''' + + __hash__: ClassVar[None] = ... + ChevronAlignment: Alignment + ''' + Determines how the chevron is aligned within the header of the ``CategoryPanel``\ s in this ``CategoryPanelGroup``. + + Use the ``ChevronAlignment`` property to control the position of the chevron of the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. These are the possible values: + + ======================== ===================================================================== + **Value** **Meaning** + ======================== ===================================================================== + ``taLeftJustify`` Align ``Chevron`` on the left side of the panel. + ``taCenter`` Center the chevron on the panel. + ``taRightJustify`` Align ``Chevron`` on the right side of the panel. + ======================== ===================================================================== + ''' + ChevronColor: Color + ''' + Specifies the color of the default chevron in the normal state. + + Use the ``ChevronColor`` property to select the color of the default normal chevron of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. This property has no effect if the ``CategoryPanel`` overrides the default normal chevron with the ``CollapsedImageIndex`` property or the ``ExpandedImageIndex`` property. + ''' + ChevronHotColor: Color + ''' + Specifies the color of the default chevron in the hot state. + + Use the ChevronHot``Color`` property to select the color of the default hot chevron of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. This property has no effect if the ``CategoryPanel`` overrides the default hot chevron color with the CollpasedHot``ImageIndex`` property or the ``ExpandedHotImageIndex`` property. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + GradientBaseColor: Color + ''' + Specifies the left or top color of the panel header in gradient style. + + Use the ``GradientBaseColor`` property to select the base gradient color for the panel header when ``HeaderStyle`` is set to ``hsGradient``. If ``GradientDirection`` is set to ``gdHorizontal``, ``GradientBaseColor`` represents the left color of the header. If ``GradientDirection`` is set to ``gdVertical``, ``GradientBaseColor`` represents the top color of the header. This property has no effect if ``HeaderStyle`` is set to something other than ``hsGradient``. + ''' + GradienColor: Color + ''' + No have docs. + ''' + GradientDirection: GradientDirection + ''' + Specifies the direction of the gradient in the panel header. + + Use the ``GradientDirection`` property to select the direction of the gradient header of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. The direction can either be horizontal or vertical. This property has no effect if ``HeaderStyle`` is set to something other than ``hsGradient``. + ''' + HeaderAlignment: Alignment + ''' + Determines how the caption is aligned within the headers of the ``CategoryPanel``\ s in this ``CategoryPanelGroup``. + + Use the ``HeaderAlignment`` property to control the position of the ``Caption`` of the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. These are the possible values: + + ======================= ============================================== + **Value** **Meaning** + ======================= ============================================== + ``taLeftJustify`` Align caption on the left side of the header. + ``taCenter`` Center the caption in the header. + ``taRightJustify`` Align caption on the right side of the header. + ======================= ============================================== + ''' + HeaderFont: Font + ''' + Specifies the font of the caption of the headers of the panels. + + Use the ``HeaderFont`` property to specify the font and font properties used to draw the caption of the headers of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. The ``HeaderFont`` property has no effect when ``HeaderStyle`` is ``hsThemed``. + ''' + HeaderHeight: int + ''' + Specifies the height of the headers of the panels. + + Use the Header``Height`` property to specify the height of the headers of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. + ''' + HeaderImage: Picture + ''' + Specifies the image used for the background of the headers of the panels. + + Use the ``HeaderImage`` property to specify an image as the background for the headers of the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. This property has no effect if ``HeaderStyle`` is set to something other than ``hsImage``. + ''' + HeaderStyle: HeaderStyle + ''' + Specifies the appearance of the headers of the the ``CategoryPanel``\ s. + + Use ``HeaderStyle`` to determine the appearance of headers of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. + + ================ ======================================================================================================================================================================== + **Value** **Meaning** + ================ ======================================================================================================================================================================== + ``hsGradient`` Header is a gradient determined by the ``GradientBaseColor``, ``GradientColor``, and ``GradientDirection`` properties. + ``hsImage`` Header is the stretched image defined by the ``HeaderImage`` property. If ``HeaderImage`` is undefined, the ``hsGradient`` style will be used instead. + ``hsThemed`` Header is defined by the system's theme. If runtime themes aren't enabled or supported, the ``hsGradient`` style will be used instead. + ================ ======================================================================================================================================================================== + ''' + Images: CustomImageList + ''' + Specifies an ``ImageList`` that can be used by the panels to replace the chevron. + + Use the images property to define a set of pictures that can be use by the ``CategoryPanel``\ s within the ``CategoryPanelGroup`` to replace the chevron. + ''' + Panels: List + ''' + Lists the panels (``TCategoryPanel`` objects) in the ``CategoryPanelGroup``. + + Use ``Panels`` to access the list of ``CategoryPanel``\ s within the ``CategoryPanelGroup``. + ''' + def CreateWnd(self) -> None: + ''' + Creates a *Windows* control corresponding to the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + Creates a *Windows* control corresponding to the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + `CreateWnd <Vcl.Forms.TScrollingWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the window must be destroyed and recreated to reflect property changes. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes the window creation parameters so that the entire window is not redrawn when the width or height of the client area changes. + + ``Vcl.ExtCtrls.TCustomCategoryPanelGroup.CreateParams`` inherits from `Vcl.Forms.TScrollingWinControl.CreateParams <Vcl.Forms.TScrollingWinControl.CreateParams.htm>`__. All content below this line refers to `Vcl.Forms.TScrollingWinControl.CreateParams <Vcl.Forms.TScrollingWinControl.CreateParams.htm>`__. + + Initializes the window creation parameters so that the entire window is not redrawn when the width or height of the client area changes. + + The `CreateWnd <Vcl.Forms.TScrollingWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Forms.TScrollingWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Forms.TCustomForm.CreateWindowHandle.htm>`__. `CreateParams <Vcl.Forms.TScrollingWinControl.CreateParams.htm>`__ calls the inherited method and uses that *Window* class style, removing the ``CS_HREDRAW`` and ``CS_VREDRAW`` styles from it. + + By removing these styles the scrolling windowed control will only redraw the invalidated regions, not the entire window. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resizes the scrolling windowed control by a specific ratio. + + Use `ChangeScale <Vcl.Forms.TScrollingWinControl.ChangeScale.htm>`__ to resize the scrolling windowed control by a specific ratio. + + ``'M'`` is the multiplier of the ratio; ``'D'`` is the divisor of the ratio. For example, to resize the scrolling windowed control to four-fifths of its current size, set M to four and D to five. + ''' + def GetCategoryPanelClass(self) -> CategoryPanelClass: + ''' + Gets the class of a ``CategoryPanel``. + + Call ``GetCategoryPanelClass`` to get the current class of a ``CategoryPanel``. ``GetCategoryPanelClass`` is a protected method used in the implementation of a ``CategoryPanelGroup()`` method to retrieve the class of a ``CategoryPanel`` used to create an instance of that class. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def ReorderPanels(self) -> None: + ''' + Orders the panels in the ``PanelGroup``. + + A ``CategoryPanelGroup``\ s. ``ReorderPanels()`` method is called by a ``CategoryPanel``\ s. ``SetBounds()`` method if the ``CategoryPanel``\ s. top has changed, if the panel is not currently in the process of aligning (``csAligning`` in ``ControlState``) or loading (``csLoading`` in ``ComponentState``). All the panels in the ``PanelGroup`` are then reordered starting with the largest top property. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the control. + + Override `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ to change the initial *Windows Message* handler for the control. The ``WindowProc()`` property is initialized to point to the `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method. + + `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ for `WinControl <Vcl.Controls.TWinControl.htm>`__ overrides the inherited method to define responses for focus, mouse, and keyboard messages. It sends all others to its inherited `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__. + + When overriding `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ to provide specialized responses to messages, call the inherited `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ at the end to dispatch any unhandled messages. + ''' + def Create(self, AOwner: Component) -> None: + ''' + collapsed stateaCreates and initializes a new `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + Use `Create <Vcl.Forms.TScrollingWinControl.Create.htm>`__ to create and initialize a new `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object. + + ``AOwner`` is a TComponent object that owns the scrolling windowed control. + ''' + def Destroy(self) -> None: + ''' + Removes the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object from memory. + + Do not call `Destroy <Vcl.Forms.TScrollingWinControl.Destroy.htm>`__. Instead, call ``Free()``, which calls `WinControl.Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ if the `ScrollingWinControl <Vcl.Forms.TScrollingWinControl.htm>`__ object is not ``nil``. + ''' + def CollapseAll(self) -> None: + ''' + Collapses all the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. + + Call ``CollapseAll`` to collapse all the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. + ''' + def CreatePanel(self, AOwner: Component) -> CustomCategoryPanel: + ''' + Creates a new ``CategoryPanel`` for the ``CategoryPanelGroup``. + + Call ``CreatePanel`` to create a ``CategoryPanel`` object and assign it to the ``PanelGroup``. + + ``AOwner`` is the owner of the ``CustomCategoryPanel`` object and is responsible for freeing that object during cleanup. + ''' + def ExpandAll(self) -> None: + ''' + Expands all the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. + + Call ``ExpandAll`` to expand all the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. + ''' + +class CategoryPanelGroup(CustomCategoryPanelGroup): + ''' + ================================ + Vcl.ExtCtrls.TCategoryPanelGroup + ================================ + + ``CategoryPanelGroup`` is a container for collapsible panels that are ``CategoryPanel`` objects. To add a new panel to ``CategoryPanelGroup`` at design time, right-click the ``CategoryPanelGroup`` object and choose *New Panel*. You can also collapse or expand all the panel in the same context menu by selecting *Collapse All* or *Expand All*. To collapse or expand and individual panel, you can toggle the ``Collapsed`` property in the object inspector for the desired ``CateoryPanel`` object. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + ChevronAlignment: Alignment + ''' + Determines how the chevron is aligned within the header of the ``CategoryPanel``\ s in this ``CategoryPanelGroup``. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.ChevronAlignment`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronAlignment <Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronAlignment.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronAlignment <Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronAlignment.htm>`__. + + Determines how the chevron is aligned within the header of the ``CategoryPanel``\ s in this ``CategoryPanelGroup``. + + Use the ``ChevronAlignment`` property to control the position of the chevron of the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. These are the possible values: + + ===================== =================================================== + **Value** **Meaning** + ===================== =================================================== + ``taLeftJustify`` Align ``Chevronon`` the left side of thepanel. + ``taCenter`` Center the chevronon the panel. + ``taRightJustify`` Align ``Chevronon`` therightside of thepanel. + ===================== =================================================== + ''' + ChevronColor: Color + ''' + Specifies the color of the default chevron in the normal state. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.ChevronColor`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronColor.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronColor.htm>`__. + + Specifies the color of the default chevron in the normal state. + + Use the ``ChevronColor`` property to select the color of the default normal chevron of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. This property has no effect if the ``CategoryPanel`` overrides the default normal chevron with the ``CollapsedImageIndex`` property or the ``ExpandedImageIndex`` property. + ''' + ChevronHotColor: Color + ''' + Specifies the color of the default chevron in the hot state. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.ChevronHotColor`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronHotColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronHotColor.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronHotColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.ChevronHotColor.htm>`__. + + Use the ``ChevronHotColor`` property to select the color of the default hot chevron of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. This property has no effect if the ``CategoryPanel`` overrides the default hot chevron color with the ``CollpasedHotImageIndex`` property or the ``ExpandedHotImageIndex`` property. + ''' + Constraints: SizeConstraints + ''' + No have docs. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + GradientBaseColor: Color + ''' + Specifies the left or top color of the panel header in gradient style. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.GradientBaseColor`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientBaseColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientBaseColor.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientBaseColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientBaseColor.htm>`__. + + Use the ``GradientBaseColor`` property to select the base gradient color for the panel header when ``HeaderStyle`` is set to ``hsGradient``. If ``GradientDirection`` is set to ``gdHorizontal``, ``GradientBaseColor`` represents the left color of the header. If ``GradientDirection`` is set to ``gdVertical``, ``GradientBaseColor`` represents the top color of the header. This property has no effect if ``HeaderStyle`` is set to something other than ``hsGradient``. + ''' + GradientColor: Color + ''' + Specifies the right or bottom color of the panel header in gradient style. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.GradientColor`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientColor.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientColor <Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientColor.htm>`__. + + Use the ``GradientColor`` property to select the gradient color for the panel header when ``HeaderStyle`` is set to ``hsGradient``. If ``GradientDirection`` is set to ``gdHorizontal``, ``GradientColor`` represents the right color of the header. If ``GradientDirection`` is set to ``gdVertical``, ``GradientColor`` represents the bottom color of the header. This property has no effect if ``HeaderStyle`` is set to something other than ``hsGradient``. + ''' + GradientDirection: GradientDirection + ''' + Specifies the direction of the gradient in the panel header. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.GradientDirection`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientDirection <Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientDirection.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientDirection <Vcl.ExtCtrls.TCustomCategoryPanelGroup.GradientDirection.htm>`__. + + Use the ``GradientDirection`` property to select the direction of the gradient header of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. The direction can either be horizontal or vertical. This property has no effect if ``HeaderStyle`` is set to something other than ``hsGradient``. + ''' + HeaderAlignment: Alignment + ''' + Determines how the ``Caption`` is aligned within the headers of the ``CategoryPanel``\ s in this ``CategoryPanelGroup``. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.HeaderAlignment`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderAlignment <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderAlignment.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderAlignment <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderAlignment.htm>`__. + + Determines how the ``Caption`` is aligned within the headers of the ``CategoryPanel``\ s in this ``CategoryPanelGroup``. + + Use the ``HeaderAlignment`` property to control the position of the ``Caption`` of the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. These are the possible values: + + ===================== ===================================================== + **Value** **Meaning** + ===================== ===================================================== + ``taLeftJustify`` Align caption on the left side of the header. + ``taCenter`` Center the caption in the header. + ``taRightJustify`` Align caption on the right side of the header. + ===================== ===================================================== + ''' + HeaderFont: Font + ''' + Specifies the font of the ``Caption`` of the headers of the panels. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.HeaderFont`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderFont <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderFont.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderFont <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderFont.htm>`__. + + Specifies the font of the ``Caption`` of the headers of the panels. + + Use the ``HeaderFont`` property to specify the font and font properties used to draw the ``Caption`` of the headers of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. The ``HeaderFont`` property has no effect when ``HeaderStyle`` is ``hsThemed``. + ''' + HeaderHeight: int + ''' + Specifies the height of the headers of the panels. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.HeaderHeight`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderHeight <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderHeight.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderHeight <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderHeight.htm>`__. + + Specifies the height of the headers of the panels. + + Use the ``HeaderHeight`` property to specify the height of the headers of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. + ''' + HeaderImage: Picture + ''' + Specifies the image used for the background of the headers of the panels. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.HeaderImage`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderImage <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderImage.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderImage <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderImage.htm>`__. + + Use the ``HeaderImage`` property to specify an image as the background for the headers of the ``CategoryPanel``\ s within the ``CategoryPanelGroup``. This property has no effect if ``HeaderStyle`` is set to something other than ``hsImage``. + ''' + HeaderStyle: HeaderStyle + ''' + Specifies the appearance of the headers of the the ``CategoryPanel``\ s. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.HeaderStyle`` inherits from `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderStyle <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderStyle.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderStyle <Vcl.ExtCtrls.TCustomCategoryPanelGroup.HeaderStyle.htm>`__. + + Use ``HeaderStyle`` to determine the appearance of headers of the ``CategoryPanel``\ s in the ``CategoryPanelGroup``. + + ================ ============================================================================================================================================================================= + **Value** **Meaning** + ================ ============================================================================================================================================================================= + ``hsGradient`` Header is a gradient determined by the ``GradientBaseColor``, ``GradientColor``, and ``GradientDirection`` properties. + ``hsImage`` Header is the stretched image defined by the ``HeaderImage`` property. If ``HeaderImageis`` undefined, the ``hsGradient`` style will be used instead. + ``hsThemed`` Header is defined by the system's theme. If runtime themes aren't enabled or supported, the ``hsGradient`` style will be used instead. + ================ ============================================================================================================================================================================= + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Images: CustomImageList + ''' + Specifies an ``ImageList`` that can be used by the panels to replace the chevron. + + Use the images property to define a set of pictures that can be use by the ``CategoryPanel``\ s within the ``CategoryPanelGroup`` to replace the chevron. + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TCategoryPanelGroup.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' +' Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. +' ''' + StyleName: str + ''' + No have docs. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new ``Width`` and ``Height`` of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + # OnConstrainedResize: ConstrainedResizeEvent + Adjusts the resize constraints. + + Use `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ to adjust a control's constraints when an attempt is made to resize it. Upon entry to the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ handler is called immediately after the ``OnCanResize`` handler. + + `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseWheel(self, Sender: Object, Shift: ShiftState, WheelDelta: int, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheel: MouseWheelEvent + Occurs when the mouse wheel is rotated. + + Write code in the `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event handler to respond to mouse wheel messages. If there is no `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event handler, or if the mouse wheel message is not handled in the `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event handler, then an `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ or `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event occurs, depending on the direction the mouse wheel was rotated. + + ``OnMouseWheel`` is an event handler of type `Vcl.Controls.TMouseWheelEvent <Vcl.Controls.TMouseWheelEvent.htm>`__. + ''' + def OnMouseWheelDown(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelDown: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated downward. + + Write code in the `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event handler to perform actions when the mouse wheel is rotated downward. OnMouseWheelDown occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelDown`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnMouseWheelUp(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelUp: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated upward. + + Write code in the `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ event handler to perform actions when the mouse wheel is rotated upward. ``OnMouseWheelUp`` occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelUp`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + +class Application(Component): + ''' + ====================== + Vcl.Forms.TApplication + ====================== + + ``Application`` is the type used for a GUI windowed application. + + ``Application`` encapsulates a windowed application. The methods and properties introduced in ``Application`` reflect the fundamentals established in the Windows operating system to create, run, sustain, and destroy an application. ``Application`` thereby simplifies the interface between the developer and the Windows environment. For this purpose, ``Application`` encapsulates behavior for: + + - *Windows* message processing + - Context-sensitive online help + - Menu accelerator and key processing + - Exception handling + - Managing the fundamental parts defined by the Windows operating system for an application, such as ``MainWindow``, ``WindowClass``, and so on + + Each GUI application automatically declares an ``Application`` variable as the instance of the application. If the application is not a Web server application, control panel applet, or NT service application, this variable is of type ``Application``. + + ``Application`` does not appear on the *Component Palette*, nor is it available in the *Form Designer* to visually manipulate; so it has no published properties. Nevertheless, some of its public properties can be set or modified at design time in the ``Forms`` and ``Application`` pages of the **Project|Options** dialog box. In addition, you can add a `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component to any form in the project to intercept the application's events, and supply event handlers using the *IDE*. + + .. note:: For application-wide properties and methods that affect the display, see `Screen <Vcl.Forms.TScreen.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + Active: bool + ''' + Specifies whether the application is active and has focus. + + ``Active`` is ``True`` while the application is active and ``False`` if it is not. ``Active`` is set to ``True`` in the constructor. + + An application is active if the ``Form`` or ``Application`` has focus. An application becomes inactive when a window from a different application is about to become activated. When the application closes, ``Active`` is set to ``False`` in the destructor. + + .. note:: ``Active`` is read-only. + ''' + ActionUpdateDelay: int + ''' + Delays the call to ``DoActionIdle()``. + + Use ``ActionUpdateDelay`` to delay the call to ``DoActionIdle()``. The following example demonstrates the usefulness of this property: + + #. Create an *MDI* project with a main form, a *MDI Child* and a ``Action`` class. + #. Link the ``Action`` ``OnUpdate`` event to a method. + #. Run the program and maximize the *MDI Child*. + + If you open *Windows Task Manager*, you can see that CPU usage for the *MDI Application* is nearly 100%. However, if you set ``Application.ActionUpdateDelay`` to a non-zero value, the CPU usage for the application is significantly lower than 100%. + ''' + ActiveFormHandle: HWND + ''' + Gives the *Windows* handle of the currently active form. + + ``ActiveFormHandle`` gives the *Windows* handle of the currently active form. + ''' + AllowTesting: bool + ''' + Represents information for the *IDE*. + + Do not use ``AllowTesting``; it is for internal use only. + ''' + AutoDragDocking: bool + ''' + Indicates whether dragged windows are automatically docked. + + Set ``AutoDragDocking`` to enable drag-and-dock behavior when windows are dragged. When ``AutoDragDocking`` is ``True``, dragged windows are automatically docked when the mouse is released over a docking site. When ``AutoDragDocking`` is ``False``, dragged windows are only docked when the *Ctrl* key is pressed. + ''' + HelpSystem: IHelpSystem + ''' + Provides access to the interface for working with the ``Help`` system. + + `Application <Vcl.Forms.TApplication.htm>`__ uses `IHelpSystem <System.HelpIntfs.IHelpSystem.htm>`__ to interact with a *Help* system manager. This interface includes methods for displaying ``Help`` topics based on a keyword or topic ``ID``. + + Applications can use the ``HelpSystem`` property to interact directly with the ``Help`` system manager, or they can use the application's Help-oriented methods such as `HelpCommand <Vcl.Forms.TApplication.HelpCommand.htm>`__ and `HelpJump <Vcl.Forms.TApplication.HelpJump.htm>`__. + + In order for the ``Help`` to work properly, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header files. + + For information about the native ``Help`` handling functions (``HTMLHelp`` or other) and about the data passed to them, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + ''' + CurrentHelpFile: str + ''' + Indicates the current *Help* file. + + Read ``CurrentHelpFile`` to determine the name of the ``Help`` file that is currently used by the application when it executes a Help command (through the `HelpCommand <Vcl.Forms.TApplication.HelpCommand.htm>`__ method) or when it brings up context-sensitive Help (through the `HelpContext <Vcl.Forms.TApplication.HelpContext.htm>`__ or `HelpJump <Vcl.Forms.TApplication.HelpJump.htm>`__ method). If ``CurrentHelpFile`` is an empty string, the application ignores the attempts to display Help. + + The *Help* system specified by `HelpSystem <Vcl.Forms.TApplication.HelpSystem.htm>`__ displays ``Help`` topics from the ``Help`` file specified by ``CurrentHelpFile``. + + `HelpFile <Vcl.Forms.TApplication.HelpFile.htm>`__ supplies the value of ``CurrentHelpFile`` unless there is a *Help* file specified by `Form.HelpFile <Vcl.Forms.TCustomForm.HelpFile.htm>`__ for the active form. Then the ``Help`` file from `Form.HelpFile <Vcl.Forms.TCustomForm.HelpFile.htm>`__ is used. + ''' + DefaultFont: Font + ''' + Specifies the default font used by the application. + + ``DefaultFont`` specifies the default font used by the application. All newly created forms use ``DefaultFont`` if the `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ property is set to ``True``. Changing ``DefaultFont`` later at run-time will trigger an update for all forms that use the parent font. + ''' + DialogHandle: HWnd + ''' + Provides a mechanism for using non-VCL dialog boxes in an application. + + Use ``DialogHandle`` when displaying a modeless dialog box that was created using the CreateDialog API function. Assigning the handle of the modeless dialog box to ``DialogHandle`` allows the dialog to see messages from the application's message loop. + + Assign the handle of the modeless dialog box to ``DialogHandle`` when it receives an activation message (WM_NCACTIVATE) and set ``DialogHandle`` to zero when the dialog box receives a deactivation message. + ''' + EnumAllWindowsOnActivateHint: bool + ''' + Is a ``Boolean`` variable used for hint displaying. + + ``EnumAllWindowsOnActivateHint`` is used internally by VCL for hint displaying. Do not use directly. + ''' + ExeName: str + ''' + Contains the file name of the application's executable file including path information. + + Use ``ExeName()`` to obtain the name of the executable file for the application. ``ExeName`` is the fully-qualified name, including the path to the application's executable. + + The name of the application is the root name of the project with an ``.exe`` extension. By default, this name is PROJECT1.EXE. To change the ``ExeName``, save the project by the desired new root name and rebuild the application. ``ExeName`` will reflect the change to the project file name. + + ``ExeName`` is a read-only property. + ''' + HelpFile: str + ''' + Specifies the name of the default *Help* file the application uses to display the ``Help`` from. + + Use the ``HelpFile`` property to specify the default *Help* file for an application that uses the VCL *Help* system. + + You can either programmatically assign a *Help* file name to the ``HelpFile`` property of the ``Application`` type object at run time, or specify a *Help* file name to the **Help* file* option on the `Application Options <Application_Options.htm>`__ page of the `Project Options <Project_Options_Dialog_Box.htm>`__ dialog box at design time. + + The *Help* system specified by `Application.HelpSystem <Vcl.Forms.TApplication.HelpSystem.htm>`__ displays ``Help`` topics from the ``Help`` file specified by `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__. ``HelpFile`` supplies the value of `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ unless there is a *Help* file specified by the `Form.HelpFile <Vcl.Forms.TCustomForm.HelpFile.htm>`__ for the active form. + + By default, ``HelpFile`` is a null string, and the application's ``Help()`` method ignores attempts to display the ``Help`` unless the active form has an associated *Help* file. + + In order for the ``Help`` to work and to call the proper native ``Help`` handling function, insert the appropriate `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__, `Vcl.WinHelpViewer <Vcl.WinHelpViewer.htm>`__, or other unit in the ``uses`` clause of your application. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` or ``WinHelpViewer.hpp`` header file. + ''' + Hint: str + ''' + Specifies the text string that appears in the *Help Hint* box. + + The ``Hint`` property stores the ``Hint`` value of the control or menu item that appears in the *Help Hint* box when the mouse is moving over the control. It can also be assigned a string value that informs the user of an action, error, or something else. Therefore, use ``Hint`` either to: + + - Transfer hints from controls to another area of display, such as a ``StatusBar``, using the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler. This reads the ``Hint`` property. + + - Indicate the status of the application while it is processing an action. This sets the ``Hint`` property. + + *Help Hints* appear when the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event occurs. Therefore, if the ``Application``\ s ``Hint`` property is assigned to the ``StatusBar``\ s. caption, for example, the caption of the ``StatusBar`` control displays the current string value of the ``Hint`` property during an `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event. + + There are two parts to the ``Hint`` string--short and long--separated by the ``'|'`` character. Short hints are used by pop-up tool tips. Long hints are used by the ``StatusBar``. Use the `GetShortHint <Vcl.Controls.GetShortHint.htm>`__ and `GetLongHint <Vcl.Controls.GetLongHint.htm>`__ global functions from the ``Controls`` unit to extract the long and short hints from a hint string. + + .. note:: When setting a ``Hint`` to a message informing the user of an event occurring in the application, remember that, by default, the ``Hint`` string is reset to a control's ``Hint`` when the mouse cursor moves over a control. + ''' + HintColor: Color + ''' + Determines the color of the hint boxes for the *Help Hints* for the application. + + Use ``HintColor`` to specify the hint box color. A default color value of ``clInfoBk`` is set for the ``HintColor`` property in the constructor, when the application is created. To change the ``HintColor``, assign it a new `Color <Vcl.Graphics.TColor.htm>`__ value at run time. + + .. tip:: To further customize the hint window, create a custom descendant of `HintWindow <Vcl.Controls.THintWindow.htm>`__ and assign it to the global `HintWindowClass <Vcl.Forms.HintWindowClass.htm>`__ variable. + ''' + HintHidePause: int + ''' + Specifies the time interval to wait before hiding the *Help Hint* if the mouse has not moved from the control or menu item. + + Use ``HintHidePause`` to specify a wait time in milliseconds. The default value is 2500 milliseconds (or 2 1/2seconds), which is set in the constructor. The *Help Hint* for the control or menu item is specified in the `Hint <Vcl.Forms.TApplication.Hint.htm>`__ property. + + .. note:: The default ``HintHidePause`` value is several times longer than `HintPause <Vcl.Forms.TApplication.HintPause.htm>`__. + ''' + HintPause: int + ''' + Specifies the time interval that passes before the control's *Help Hint* appears when the user places the mouse pointer on a control or menu item. + + Use ``HintPause`` to change the default pause time of 500 milliseconds (or 1/2second) that is set in the constructor. When assigning a value to ``HintPause``, specify the interval in milliseconds. The *Help Hint* displayed at the end of the pause is specified in the `Hint <Vcl.Forms.TApplication.Hint.htm>`__ property. + ''' + HintShortCuts: bool + ''' + Specifies whether the application's pop-up Hints include shortcut information. + + If ``HintShortCuts`` is ``True``, the shortcut information is displayed. + + For example, if ``HintShortCuts`` is ``True``, the hint for the ``Cut`` command might be ``Cut (Ctrl+X)`` instead of ``Cut``. + ''' + HintShortPause: int + ''' + Specifies the time period to wait before bringing up a ``Hint`` if another ``Hint`` has already been shown. + + Use ``HintShortPause`` to reduce the flicker when moving the mouse quickly over a set of buttons that all have *Help Hints* on. Specify a ``HintShortPause`` value in milliseconds. The default value is 50 milliseconds, which is set in the constructor. + ''' + Icon: Icon + ''' + Determines which icon represents the application on the Windows task bar. + + Use ``Icon`` to assign a specific icon to represent the application. Set the ``Icon`` property by either: + + Assigning it a ``Icon`` at runtime. + + Loading an icon on the ``Application`` page of the Project|Options dialog box at design time. + + ``Icon`` represents the application when it is minimized and appears either on the Windows desktop or task bar. + ''' + IsMetropolisUI: bool + ''' + No have docs. + ''' + MainForm: Form + ''' + Identifies the ``Form`` in the application that is the main form. + + The value of ``MainForm`` is the ``Form`` that is the application's main window. The main form is the first form created in the main body of the application by a call to `CreateForm <Vcl.Forms.TApplication.CreateForm.htm>`__. When the main form closes, the application terminates. + + When you create a new project, ``Form1`` automatically becomes the value of the ``MainForm`` property. To assign a different form to the ``MainForm`` property, select the ``Form`` on the *Project > *Options* > `Forms <Forms_(dialog_box).htm>`__ dialog box at design time. ``MainForm`` cannot be modified at run time (it is read-only at run time). + + .. note:: By default, the ``Form`` created by the first call to `CreateForm <Vcl.Forms.TApplication.CreateForm.htm>`__ in a project becomes the application's main form. Before calling `CreateForm <Vcl.Forms.TApplication.CreateForm.htm>`__, you can create as many forms as wanted by calling their own constructor. + + .. note:: Before showing the ``MainForm``, you can add a splash window. The ``MainForm`` will be shown after the initialization of the application finishes. + ''' + MainFormHandle: HWND + ''' + Gives the *Windows* handle of the application main form. + + ``MainFormHandle`` gives the *Windows* handle of the application main form. + ''' + MainFormOnTaskBar: bool + ''' + Controls how Windows ``TaskBar`` buttons are handled in a VCL application. + + If the ``MainFormOnTaskBar`` is ``True``, a ``TaskBar`` button represents the application's main form and displays its caption. If ``False``, a ``TaskBar`` button represents the application's (hidden) main window and bears the application's Title. + + ``MainFormOnTaskBar`` must be ``True`` to use *Windows Vista* or *Windows 7 Aero* effects, including live ``TaskBar`` thumbnails, *Dynamic Windows*, *Windows Flip*, and *Windows Flip 3D*. + + If a change to the default behavior is required, ``MainFormOnTaskBar`` should be set in the project source file after ``Application.Initialize`` and before the main form creation. The ``MainFormOnTaskBar`` setting is intended to persist for the life of the application; later run-time changes of this property could result in unexpected behavior. + + ``MainFormOnTaskBar`` defaults to ``True`` for applications created in *Delphi 2007* and later products, and to ``False`` for earlier products. + + The ``MainFormOnTaskBar`` property can be applied to older applications. Note that it affects the Z-order of your MainForm in case your application depends on this. To update existing VCL applications, add the following line to the project source file (example includes the application initialization line, which must precede the line that sets ``MainFormOnTaskBar``): + + + .. code-block:: python + :caption: Delphi + + Application.Initialize; + ... + Application.MainFormOnTaskbar := True; + + + .. code-block:: python + :caption: C++ + + Application->Initialize(); + Application->MainFormOnTaskBar = true; + + Note that the line is automatically added to new projects. + + For further information, see http://www.microsoft.com/windows/products/windowsvista/features/experiences/aero.mspx. + ''' + ModalLevel: int + ''' + Gives the number of currently open modal forms. + + ``ModalLevel`` is a read-only property that gives the number of modal forms which are currently open. + + Any call to `ModalStarted <Vcl.Forms.TApplication.ModalStarted.htm>`__ increments the value of ``ModalLevel``, while each call to `ModalFinished <Vcl.Forms.TApplication.ModalFinished.htm>`__ decrements its value. + ''' + ModalPopupMode: PopupMode + ''' + Controls how the modal form behaves, with respect to Windows' ``WS_POPUP`` style. + + Use ``ModalPopupMode`` to set the way modal forms behave, with respect to Windows' ``WS_POPUP`` style. The possible values for ``ModalPopupMode`` are given in the table below. + + =============== ======================================================================================================== + **Value** **Meaning** + =============== ======================================================================================================== + ``pmNone`` The popup window has the pre-Delphi 8 behavior. + ``pmAuto`` Popup handling is automatic. + ``pmExplicit`` This is used for non-modal design windows, causing the windows to always remain on top of the main form. + =============== ======================================================================================================== + + .. note:: When you use a value other than ``pmNone``, you may `experience undesired results <http://stackoverflow.com/q/32099167/939364>`__ when you combine a persistent modal form with a parent form that is dynamically created and freed. + ''' + BiDiMode: BiDiMode + ''' + Indicates the layout of the application when running under *Middle Eastern* versions of Windows. + + Use ``BiDiMode`` to specify the bi-directional mode for the application. The bi-directional mode controls the direction in which text appears (left-to-right or right-to-left), the placement of vertical ``ScrollBar``s, and the default alignment of text when the application runs in *Middle Eastern* locales. + + The application's ``BiDiMode`` is used in the ``ShowMessage()`` procedure and the `MessageBox <Vcl.Forms.TApplication.MessageBox.htm>`__ method. It also serves as the ``ParentBiDiMode`` for forms and for ``PopupMenu``\ s that are not activated by a control. + ''' + BiDiKeyboard: str + ''' + Specifies the name of the keyboard map that should be used in middle-east locales when text reads from right to left. + + This name is a string composed of the hexadecimal value of the language identifier (low word) and a device identifier (high word). For example, Saudi Arabian Arabic has a language identifier of 0x0401, so its primary layout is named "00000401". + + This keyboard layout is only used when the application runs in a middle eastern locale and the value of `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ indicates that text should read from right to left. + ''' + NonBiDiKeyboard: str + ''' + Specifies the name of the keyboard map that should be used unless text reads from right to left. + + Use ``NonBiDiKeyboard`` to specify the keyboard map that should be used. This name is a string composed of the hexadecimal value of the language identifier (low word) and a device identifier (high word). For example, *U.S. English* has a language identifier of 0x0409, so the primary *U.S. English* layout is named "00000409". Variants of *U.S. English* layout (such as the Dvorak layout) are named "00010409", "00020409", and so on. + + If the application is running in a middle eastern locale and the value of `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ indicates that text should read from right to left, the application uses `BiDiKeyboard <Vcl.Forms.TApplication.BiDiKeyboard.htm>`__ instead. + ''' + ShowHint: bool + ''' + Determines whether *Help Hints* are enabled or disabled for the entire application. + + Use ``ShowHint`` to choose whether to display *Help Hints*. If ``ShowHint`` is ``True``, *Help Hints* are enabled; if ``ShowHint`` is ``False``, *Help Hints* are disabled. The default value is ``True``. *Help Hints* are specified in the `Hint <Vcl.Forms.TApplication.Hint.htm>`__ property. + + Setting ``ShowHint`` for the application to ``False`` disables all *Help Hints*, regardless of the value of the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ properties for individual controls. + + .. tip:: You can customize the hint window by creating a custom descendant of `HintWindow <Vcl.Controls.THintWindow.htm>`__ and assigning it to the `HintWindowClass <Vcl.Forms.HintWindowClass.htm>`__ global variable. + ''' + ShowMainForm: bool + ''' + Determines whether the application shows its main form on startup. + + Use ``ShowMainForm`` to control whether and when the application shows its main form. + + The default value of ``True`` is set in the constructor. When ``ShowMainForm`` is ``True``, the main window shows automatically when the application starts. The ``MainForm`` property specifies which form is the main form. To hide the main form at startup, set ``ShowMainForm`` to ``False`` in the main project file before the call to the ``Run()`` method. Make sure that the ``Visible`` property of the ``Form`` is also false. + ''' + Terminated: bool + ''' + Reports whether the application is in the process of shutting down. + + ``Terminated`` is used when calling the ``ProcessMessages()`` method so that the application doesn't perform unnecessary actions after the shut-down process has been triggered. ``ProcessMessages()`` sets ``Terminated`` to ``True`` when it receives a ``WM_QUIT`` message. + + An application usually receives a ``WM_QUIT`` message because the main window of the application has closed, or because the ``Terminate()`` method has been called. + + .. note:: For applications using calculation-intensive loops, call ``ProcessMessages()`` periodically, and also check ``Terminated`` to determine whether to abort the calculation and allow the application to terminate. + ''' + Title: str + ''' + Contains the text that appears below the icon representing the application when it is minimized. + + Use the ``Title`` property to modify the name of the text string appearing below the icon of the application. The default value is taken from the DLL or EXE file name at run time. + + Set the ``Title`` at run time, or enter the value of the ``Title`` property on the ``Application`` page of the *Project* > *Options* dialog box. + ''' + UpdateFormatSettings: bool + ''' + Specifies whether format settings are updated automatically when the user alters the system configuration. + + Use ``UpdateFormatSettings`` to control automatic updating of format settings. The default of ``True`` is set in the constructor. ``UpdateFormatSettings`` is checked when the application receives a ``WM_WININICHANGE`` message. + + Using the default format settings is recommended. These settings are initialized to the Windows local settings. + ''' + UpdateMetricSettings: bool + ''' + Specifies whether the settings used for the hint window font and the icon title font are updated. + + Use ``UpdateMetricSettings`` to specify whether or not the hint window font and the icon title font on the desk top should be updated to reflect the system settings when those settings are changed. + + The initial value of ``True`` is set in the constructor. + ''' + Handle: HWnd + ''' + Provides access to the window handle of the main form (window) of the application. + + Use ``Handle`` when calling *Windows API Functions* that require a parent window handle. For example, a DLL that displays its own top-level pop-up windows needs a parent window to display its windows in the application. Using the ``Handle`` property makes such windows part of the application, so that they are minimized, restored, enabled, and disabled with the application. + + .. note:: When writing a DLL that uses VCL forms, assign the window handle of the host EXE's main window to the ``Handle`` property of the DLL's global `Application <Vcl.Forms.Application.htm>`__ variable. This makes the DLL's form part of the host application. Never assign to the ``Handle`` property in an *EXE*. + ''' + PopupControlWnd: HWND + ''' + Gives the handle to the popup control handler routine. + + ``PopupControlWnd`` is a read-only property that gives the handle to the popup control handler routine. + + .. note:: When the application starts, the value of ``PopupControlWnd`` is set to a particular private method in `Application <Vcl.Forms.TApplication.htm>`__. + ''' + def Idle(self, Msg: Msg) -> None: + ''' + Processes messages in the ``Message`` queue for certain events. + + ``Idle()`` triggers the event `OnIdle <Vcl.Forms.TApplication.OnIdle.htm>`__, processes the events `OnMouseEnter <Vcl.Controls.TControl.OnMouseEnter.htm>`__ and `OnMouseLeave <Vcl.Controls.TControl.OnMouseLeave.htm>`__ and updates the hints. + ''' + def IsDlgMsg(self, Msg: Msg) -> bool: + ''' + returns ``True`` if ``Msg`` is a dialog message, or ``False`` otherwise. + + ``IsDlgMsg()`` returns ``True`` if the message given in ``Msg`` is a dialog message, or ``False`` otherwise. + ''' + def IsHintMsg(self, Msg: Msg) -> bool: + ''' + returns ``True`` if ``Msg`` is a hint message, or ``False`` otherwise. ``IsHintMsg()`` returns ``True`` if the message given in ``Msg`` is a hint message, or ``False`` otherwise. + ''' + def IsKeyMsg(self, Msg: Msg) -> bool: + ''' + returns ``True`` if ``Msg`` is a key message, or ``False`` otherwise. ``IsKeyMsg()`` returns ``True`` if the message given in ``Msg`` is a key message, or ``False`` otherwise. + ''' + def IsMDIMsg(self, Msg: Msg) -> bool: + ''' + returns ``True`` if ``Msg`` is a *MDI* message, or ``False`` otherwise. ``IsMDIMsg()`` returns ``True`` if the message given in ``Msg`` is a *MDI* message, or ``False`` otherwise. + ''' + def IsShortCut(self, Message: WMKey) -> bool: + ''' + Evaluates an input key combination to determine whether it is a shortcut. + + ``IsShortCut()`` returns ``True`` if the key combination given in ``Message`` is a shortcut, or ``False`` otherwise. + ''' + def IsPreProcessMessage(self, Msg: Msg) -> bool: + ''' + returns ``True`` if ``Msg`` is a preprocess message, or ``False`` otherwise. ``IsPreProcessMessage()`` returns ``True`` if the message given in ``Msg`` is a preprocess message, or ``False`` otherwise. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` a new application. + + Do not call ``Create()`` directly. Each GUI application automatically creates an instance of an ``Application`` object. + + For `Application <Vcl.Forms.TApplication.htm>`__, the ``Create()`` method initializes default values for some of its properties. It also prepares the application to run by setting up objects such as hint windows, the application icon, the main window handle, the instance handle, lists for managing child windows of the main window (form), and so on. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the application instance and all of its associated memory. + + Never call ``Application.Destroy`` or ``Application.Free()``. Instead, use the application's ``Terminate()`` method to end the application. + + ``Destroy()`` signals that the application has been deactivated before calling the inherited destructor. It then frees memory for hooked windows, the application instance, other object instances and lists that were created at application startup or that accumulated during execution + + Since the ``Application`` owns all forms (usually), it destroys these forms in its destructor. + ''' + def ActivateHint(self, CursorPos: Point) -> None: + ''' + Displays a hint window for the control at a specified position. + + ``ActivateHint`` locates the control or menu item at the position specified by ``CursorPos``, where ``CursorPos`` represents a screen coordinates in pixels. After locating the control, ``ActivateHint`` displays the control's ``Hint`` in a hint window. + ''' + def ApplyBiDiKeyboardLayout(self) -> None: + ''' + No have docs. + ''' + def ApplyNonBiDiKeyboardLayout(self) -> None: + ''' + No have docs. + ''' + def AddPopupForm(self, APopupForm: CustomForm) -> int: + ''' + Adds a ``PopupForm`` to the current form. + + ``AddPopupForm`` adds a `CustomForm <Vcl.Forms.TCustomForm.htm>`__, that acts as a popup, in the current form. Popup handling is done by using an `PopupFormArray <Vcl.Forms.TPopupFormArray.htm>`__. + + The method returns the popup form id representing the order number of the currently added popup element. + + .. note:: The popup form id is different that the `PopupFormArray <Vcl.Forms.TPopupFormArray.htm>`__ index. + ''' + def BringToFront(self) -> None: + ''' + Sets the last active window as the topmost window on the desktop above all other applications. + + Use ``BringToFront()`` to find the window owned by the ``MainForm`` that was last active and bring it to the foreground. ``BringToFront()`` also tests to see if the window is visible and enabled before making it the topmost window. + ''' + def ControlDestroyed(self, Control: Control) -> None: + ''' + Notifies the application when a control is destroyed. + + ``ControlDestroyed`` is for internal use and is called automatically by ``Control``. Do not call it directly. + + ``ControlDestroyed`` notifies the application that the control passed as the ``Control`` parameter has been destroyed, so that the properties which refer to controls, such as ``MainForm`` and ``ActiveCustomForm``, can be updated to specify a valid object or ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def CancelHint(self) -> None: + ''' + Cancels the display of a hint for a control. + + ``Application``\ s rarely, if ever, call ``CancelHint`` directly. ``CancelHint`` is used internally to cancel the display of hints at appropriate times, such as when a window is not valid or when the application closes. ``CancelHint`` calls a series of routines that clean up the display and timing issues of the hint window for a control. + ''' + def CreateForm(self, InstanceClass: ComponentClass, Reference) -> None: + ''' + Creates a new form. + + Call ``CreateForm`` to dynamically create a form at runtime. Developers do not need to add code for creating most forms, because typically one or more calls to ``CreateForm`` are added automatically to the project's source when using the *Form Designer*. + + ``CreateForm`` creates a new form of the type specified by the ``FormClass`` parameter and assigns it to the variable given by the ``Reference`` parameter. The owner of the new form is the ``Application`` object. + + .. note:: By default, the form created by the first call to ``CreateForm`` in a project becomes the application's main form. + ''' + def CreateHandle(self) -> None: + ''' + Generates a main window for the application if it does not already have one. + + Do not call ``CreateHandle()`` directly. In EXEs, the application's constructor calls ``CreateHandle()``. In DLLs it does not. + + ``CreateHandle()`` encapsulates much of what traditional Windows programs write in WinMain. For example, ``CreateHandle()`` registers the Window Class, creates the application window and determines how the application window is shown. + ''' + def DoApplicationIdle(self) -> None: + ''' + Processes messages in the ``Message`` queue for certain events. + + The ``DoApplicationIdle()`` method forces a call to the protected method ``Application.Idle``. Idle triggers the event `OnIdle <Vcl.Forms.TApplication.OnIdle.htm>`__, processes the events `OnMouseEnter <Vcl.Controls.TControl.OnMouseEnter.htm>`__ and `OnMouseLeave <Vcl.Controls.TControl.OnMouseLeave.htm>`__, and updates the hints. + ''' + def ExecuteAction(self, Action: BasicAction) -> bool: + ''' + Generates an ``OnActionExecute`` event. + + When the user invokes an action, a series of calls ensues to respond to that action. First, the ``ActionList`` that contains the action generates an ``OnExecute`` event. If the ``ActionList`` does not handle the ``OnExecute`` event, then the action is routed to the ``Application`` object's ``ExecuteAction()`` method, which invokes the ``OnActionExecute`` event handler. (The application's ``ExecuteAction()`` method responds to all unhandled actions in the application.) If the ``OnActionExecute`` event handler does not handle the action, then it is routed to the action's ``OnExecute`` event handler. If that does not handle the action, the active control's ``ExecuteAction()`` method is called, followed (if necessary) by the active form's ``ExecuteAction()`` method. + + Do not call ``ExecuteAction()``. It is called automatically when the user invokes an action. The ``Action`` parameter specifies the action that was invoked. ``ExecuteAction()`` checks whether the application knows how to perform its function, and if so, executes the action and returns ``True``. Otherwise, ``ExecuteAction()`` returns ``False``, and the default processing for the action continues. + ''' + def HandleException(self, Sender: Object) -> None: + ''' + Provides default handling of exceptions for the application. + + If an exception passes through all the ``try`` blocks in the application code, the application automatically calls ``HandleException``, which displays a dialog box indicating an error occurred. Unless the exception object is ``EAbort``, ``HandleException`` calls the ``OnException`` event handler, if one exists. Otherwise, it calls ``ShowException`` to display a message dialog box indicating an error occurred. To assign other exception handling code for the application, use the ``OnException`` event handler. + ''' + def HandleMessage(self) -> None: + ''' + Interrupts the execution of an application while Windows processes a message in the *Windows Message* queue. + + ``HandleMessage()`` interrupts the execution of the application so that Windows can process a single message from the *Windows Message* queue before returning control to the application. If the message queue is empty, ``HandleMessage()`` generates an OnIdle event and starts the process of updating the actions in the application. + + .. note:: If the application goes idle, ``HandleMessage()`` may take a long time to return. Therefore, do not call ``HandleMessage()`` when waiting for something message-based while priority actions are also being processed. Instead, call ``ProcessMessages()`` when processing more than just messages. + ''' + def HelpCommand(self, Command: int, Data: int) -> bool: + ''' + The ``WinHelpTester`` variable stores the created object of the type `IWinHelpTester <Vcl.WinHelpViewer.IWinHelpTester.htm>`__. + + The ``WinHelpViewer`` unit is deprecated. Use `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ instead. + + The ``WinHelpViewer`` unit implements the wrapper for the Windows ``WinHelp()`` function API. Microsoft has deprecated ``WinHelp``. + ''' + def HelpContext(self, Context: HelpContext) -> bool: + ''' + Displays the ``Help`` topic specified by the numeric context identifier. + + Use ``HelpContext()`` to show the ``Help`` topic specified by the numeric context identifier ``Context`` and which is from the file specified in the `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ property. ``HelpContext()`` generates an `OnHelp <Vcl.Forms.TApplication.OnHelp.htm>`__ event (either on the active form or on the ``Application`` object itself). If there is no `OnHelp <Vcl.Forms.TApplication.OnHelp.htm>`__ event handler, or if the event handler indicates that ``HTMLHelp`` should be called, then ``HelpContext()`` invokes the *HTMLHelp Windows* help engine, passing it the context ``ID`` specified in the ``Context`` parameter. + + For example, if the ``Context`` value is ``714``, the ``HelpContext()`` method displays the help topic with the ``714`` context ``ID`` in the ``Help`` file specified by `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__. In case of a ``.chm`` help file, you must map symbolic *Context IDs* of Help topics to numeric ``Context`` values in the ``[MAP]`` section of your project (``.hhp``) file. + + ``HelpContext()`` returns ``False`` if `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ is an empty string, meaning the application has no Help file assigned. In all other cases, ``HelpContext()`` returns ``True``. + + In order for the ``Help`` to work properly, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header files. + + For information about the native ``Help`` handling functions (``HTMLHelp`` or other) and about the data passed to them, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + ''' + def HelpJump(self, JumpID: str) -> bool: + ''' + Displays the ``Help`` topic specified by the symbolic name. + + Call ``HelpJump()`` to bring up a topic identified by its ``JumpID`` symbolic name and which is from the ``Help`` file specified in the `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ property. + + ``HelpJump()`` generates an `OnHelp <Vcl.Forms.TApplication.OnHelp.htm>`__ event (either on the active form or on the ``Application`` object itself). If there is no `OnHelp <Vcl.Forms.TApplication.OnHelp.htm>`__ event handler or if the event handler indicates that native ``Help`` handling function should be called, then ``HelpJump()`` invokes the native ``HTMLHelp`` (or ``WinHelp``) ``Help`` handling function, passing to it the ``JumpID`` symbolic name. In case of a ``.chm`` help file, ``JumpID`` should be the name of the source ``.htm`` file containing the topic. + + ``HelpJump()`` returns ``False`` if `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ is an empty string, meaning the application has no Help file assigned. In all other cases, ``HelpJump()`` returns ``True``. + + In order for ``HelpJump()`` to work and to call the proper native ``Help`` handling function, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the header files. + + For information about the native ``Help`` handling functions (``HTMLHelp`` or other) and about the data passed to them, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + ''' + def HelpKeyword(self, Keyword: str) -> bool: + ''' + Displays the ``Help`` topic specified by the keyword. + + Use ``HelpKeyword()`` to show the ``Help`` topic, which has the ``Keyword`` parameter and which is from the file specified in the `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ property. ``HelpKeyword()`` invokes the current *Help* system, passing it the string specified by ``Keyword``. If the current *Help* system is ``HTMLHelp`` (or ``WinHelp``), this displays the ``Help`` topic having an ``Alink`` tag equal to ``Keyword``. + + ``HelpKeyword()`` returns ``False`` if the current *Help* system does not support keyword lookups. + + In order for the ``Help`` to work properly, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header files. + + For information about the native ``Help`` handling functions (``HTMLHelp`` or other) and about the data passed to them, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + ''' + def HelpShowTableOfContents(self) -> bool: + ''' + Shows the table of contents within the ``Help`` system. + + Use ``HelpShowTableOfContents()`` to bring up the table of contents for the ``Help`` system specified in the `CurrentHelpFile <Vcl.Forms.TApplication.CurrentHelpFile.htm>`__ property. This method is preferred to calling `System.HelpIntfs.ICustomHelpViewer.ShowTableOfContents <System.HelpIntfs.ICustomHelpViewer.ShowTableOfContents.htm>`__, which cannot be used as the first call into the help system. + + In order for ``HelpShowTableOfContents()`` to work and to call the proper native ``Help`` handling function, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the ``HTMLHelp`` Windows native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header files. + + For information about the native *Help* handling functions (``HTMLHelp`` or other) and about the data passed to them, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + ''' + def HideHint(self) -> None: + ''' + Hides the current hint. + + Applications rarely, if ever, call ``HideHint()`` directly. ``HideHint()`` is used internally to hide the hint window at the appropriate times according to predetermined conditions and timer values. For example, CancelHint calls ``HideHint()``. + ''' + def HintMouseMessage(self, Control: Control, Message: Message) -> None: + ''' + Regulates the display of hint windows. + + This method is called automatically when the mouse passes over a control with a ``Hint``. ``Application``\ s rarely, if ever, call ``HintMouseMessage()`` directly. ``HintMouseMessage()`` is used internally to manage the display of the hint windows. + ''' + def HookMainWindow(self, Hook: WindowHook) -> None: + ''' + Enables a native Windows dialog box to receive messages sent to the application's main window. + + Use ``HookMainWindow()`` to ensure that a native Windows dialog box behaves correctly as a child of the application, not as a stand-alone window. For example, switching among applications with Alt+Tab treats the application as a single task after calling ``HookMainWindow()``, rather than treating the native Windows dialog box as a separate task. + + When the window identified by the `Handle <Vcl.Forms.TApplication.Handle.htm>`__ property receives relevant dialog messages, it passes them to the dialog procedure passed as the ``Hook`` parameter. + + There is no problem with leaving a dialog box hooked into the main window, even for extended periods. However, should the dialog box close, call the `UnhookMainWindow <Vcl.Forms.TApplication.UnhookMainWindow.htm>`__ method to release the hook. + ''' + def HookSynchronizeWakeup(self) -> None: + ''' + Assigns a method to the ``WakeMainThread`` variable. + + Applications rarely, if ever, call ``HookSynchronizeWakeup()`` directly. ``HookSynchronizeWakeup()`` is called from the `Application <Vcl.Forms.TApplication.htm>`__ constructor to initialize the method that gets called when a thread initially synchronizes with the application's main thread. + ''' + def Initialize(self) -> None: + ''' + Provides an opportunity to initialize subsystems. + + ``Initialize()`` is the first method called boy the project source file. It calls the ``InitProc()`` procedure pointer. By default, the call to ``Initialize()`` for the application does nothing because the default ``InitProc()`` pointer is ``nil`` (Delphi) or ``NULL`` (C++) . To use ``Initialize()``, the ``InitProc()`` pointer must be predefined. This can be accomplished in one of two ways: + + In Delphi, you can include a unit that assigns a procedure to ``InitProc()`` in its initialization section, such as the ``ComObj`` unit. You can make this assignment in the initialization section of any of your units. + + In both Delphi and C++, you can create a custom initialization procedure that assigns a value to the ``InitProc()`` pointer, and add a call to this procedure to the project source prior to the call to ``Initialize()``. (In Delphi, you can add it to the initialization section of the unit in which it is declared. In C++, you can use the pragma startup directive in that unit.) + + .. warning:: Only one instance of ``InitProc()`` can be defined in an application. If more than one unit assigns a value to ``InitProc()``, only the last assignment will work. You can, however, call the previous value of ``InitProc()`` from an initialization procedure, so that all initialization procedures are executed. + + For projects that do not assign a value to ``InitProc()``, the call to ``Initialize()`` can be safely deleted from the project source. + + .. note:: Although ``Initialize()`` is the first method called in the main project source code, it is not the first code that is executed in a GUI application. For example, in Delphi, the application first executes the initialization section of all the units used by the application. + ''' + def IsRightToLeft(self) -> bool: + ''' + Specifies whether the application adjusts its interface for *Middle Eastern* locales. + + Use ``IsRightToLeft()`` to determine whether the application makes any adjustments of control alignment, text direction, or ``ScrollBar`` placement. ``IsRightToLeft()`` returns ``True`` if the application's `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ indicates that any of these should be reversed and the application is running on a system with a *Middle Eastern* locale. + ''' + def Minimize(self) -> None: + ''' + Shrinks an application to the Windows task bar. + + Call ``Minimize()`` to minimize the application. When the user minimizes the application, the ``Minimize()`` method is automatically called. + + .. note:: Don't confuse the ``Minimize()`` method, which minimizes an entire application, with minimizing a form or window. To minimize, maximize, or restore a window or form, change the value of its WindowState property. + ''' + def ModalStarted(self) -> None: + ''' + Track opening of modal form. + + Call ``ModalStarted()`` to indicate that a modal form is being opened. ``ModalStarted()`` is called by the ``ShowModal()`` method of ``CustomForm``. + + ``ModalStarted()`` calls the ``OnModalStart`` event handler, if defined. + ''' + def NormalizeAllTopMosts(self) -> None: + ''' + Track closing of modal form. + + Call ``ModalFinished`` to indicate that a modal form is being closed. ``ModalFinished()`` is called by the ``ShowModal()`` method of ``CustomForm``. + + ``ModalFinished`` calls the ``OnModalEnd`` event handler, if defined. + ''' + def NormalizeAllTopMosts(self) -> None: + ''' + Makes forms that have been designated as topmost forms (their `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ is ``fsStayOnTop``) behave as if they were not topmost forms. + + Use ``NormalizeAllTopMosts()`` to allow other windows appear on top of a topmost form. Normally, topmost forms remain on top of other windows, and so may obscure other windows. + + ``NormalizeAllTopMosts()`` behaves like the `NormalizeTopMosts <Vcl.Forms.TApplication.NormalizeTopMosts.htm>`__ method, except that it also includes the application's *Main Window*. + ''' + def NormalizeTopMosts(self) -> None: + ''' + Makes forms that have been designated as topmost forms (their ``FormStyle`` is ``fsStayOnTop``) behave as if they were not topmost forms. + + Use ``NormalizeTopMosts()`` to allow a ``MessageBox()`` or dialog box that is displayed using the *Windows API Functions* (such as ``MessageBox()`` and ``MessageDlg``) directly, appear on top of a topmost form. Otherwise the topmost form remains on top, and may obscure the ``MessageBox()``. + + Calling ``NormalizeTopMosts()`` is not necessary when using functions to display ``MessageBox()``\ es. To return the forms designated as ``fsStayOnTop`` to be topmost again, call ``RestoreTopMosts``. + ''' + def ProcessMessages(self) -> None: + ''' + Interrupts the execution of an application so that it can process the message queue. + + Call ``ProcessMessages()`` to permit the application to process messages that are currently in the message queue. ``ProcessMessages()`` cycles the *Windows Message* loop until it is empty, and then returns control to the application. + + .. note:: Neglecting message processing affects only the application calling ``ProcessMessages()``, not other applications. In lengthy operations, calling ``ProcessMessages()`` periodically allows the application to respond to paint and other messages. + + .. note:: ``ProcessMessages()`` does not allow the application to go idle, whereas ``HandleMessage`` does. + ''' + def Restore(self) -> None: + ''' + ``Restores`` a minimized application to its normal size. + + Use ``Restore()`` to restore the application to its previous size before it was minimized. When the user restores the application to normal size, ``Restore()`` is automatically called. + + .. note:: Don't confuse the ``Restore()`` method, which restores the entire application, with restoring a form or window to its original size. To minimize, maximize, and restore a window or form, change the value of its WindowState property. + ''' + def RestoreTopMosts(self) -> None: + ''' + Restores forms designated as ``fsStayOnTop`` to be topmost again. + + Use ``RestoreTopMosts()`` to return forms that were originally designated as topmost forms (``FormStyle`` is ``fsStayOnTop``), then temporarily changed to be non-topmost forms with the ``NormalizeTopMosts()`` or ``NormalizeAllTopMosts()`` method, to a topmost position. + ''' + def Run(self) -> None: + ''' + Executes the application. + + Do not call ``Run()``. When creating a new project, The *IDE* automatically creates a main program block in the project file that calls the ``Run()`` method. When the application is executed, the application's ``Run()`` method is called. + + ``Run()`` contains the application's main message loop. The call to ``Run()`` does not return until the application's message loop terminates. + ''' + def Terminate(self) -> None: + ''' + Ends application execution. + + Call ``Terminate()`` to end the application programmatically. By calling ``Terminate`` rather than freeing the ``Application`` object, you allow the application to shut down in an orderly fashion. + + ``Terminate`` calls the *Windows API PostQuitMessage Function* to perform an orderly shutdown of the application. ``Terminate`` is not immediate. + + ``Terminate()`` is called automatically on a ``WM_QUIT`` message and when the main form closes. + ''' + def ShowException(self, E: Exception) -> None: + ''' + Displays a ``MessageBox()`` for exceptions that are not caught by application code. + + The ``HandleException()`` method calls ``ShowException`` by default if no handler is specified for the ``OnException`` event. If an exception handler filters exceptions, ``ShowException()`` is called for those exceptions that are not filtered out. To specify how exceptions are handled for an application, write a handler for the ``OnException`` event. + + .. note:: Calling ``ShowException`` is rarely necessary in a component-based application, since the default exception handler calls ``ShowException`` automatically. + ''' + def RemovePopupForm(self, APopupForm: CustomForm) -> None: + ''' + Removes a ``PopupForm`` from the current form. + + ``RemovePopupForm`` removes a formerly added popup form. + ''' + def UnhookMainWindow(self, Hook: WindowHook) -> None: + ''' + Releases a dialog procedure previously hooked by a call to the `HookMainWindow <Vcl.Forms.TApplication.HookMainWindow.htm>`__ method. + + Use ``UnhookMainWindow`` to release the hooked window. Specify the dialog procedure as the value of the ``Hook`` parameter. + + The ``WindowHook`` type is the parameter type used for ``UnhookMainWindow``. It is a method-pointer type used for the dialog-procedures of non-VCL dialog boxes. The dialog procedure is similar to a window procedure for a window, in that it processes messages for the dialog box, but its syntax is somewhat different. + + For more information about Windows hooks see the ``SetWindowsEx`` and ``UnhookWindowsEx()`` functions in the Windows *Help File*. + ''' + def UnhookSynchronizeWakeup(self) -> None: + ''' + Removes the method that was assigned to the ``WakeMainThread`` variable by ``HookSynchronizeWakeup()``. + + Applications rarely, if ever, call ``UnhookSynchronizeWakeup`` directly. ``UnhookSynchronizeWakeup()`` is called from the `Application <Vcl.Forms.TApplication.htm>`__ destructor. It resets the ``WakeMainThread`` variable to ``nil`` (Delphi) or ``NULL`` (C++) if that variable was set by the ``HookSynchronizeWakeup()`` method. + + .. warning:: You should not modify ``WakeMainThread`` for GUI applications because a working handler has been assigned. Console applications may assign a handler to WakeMainThread if the application needs to be notified of a thread synchronization call. If your console application assigns a handler, this is an optimization that only accelerates deliver of notification that a synchronization request is available. You must use CheckSynchronize to perform the synchronization itself. + ''' + def UpdateAction(self, Action: BasicAction) -> bool: + ''' + Generates an ``OnActionUpdate`` event. + + When the application is idle, it makes a series of calls to update the properties (such as whether it is enabled, checked, and so on) of every action that is linked to a visible control or menu item. First, that ``ActionList`` that contains the action generates an ``OnUpdate`` event. If the ``ActionList`` does not handle the ``OnUpdate`` event, then the action is routed to the ``Application`` object's ``UpdateAction()`` method, which invokes the ``OnActionUpdate`` event handler. (The application's ``UpdateAction()`` method responds to all unhandled actions in the application.) If the ``OnActionUpdate`` event handler does not update the action, then it is routed to the action's ``OnUpdate`` event handler. If that does not update the action, the active control's ``UpdateAction()`` method is called, followed (if necessary) by the active form's ``UpdateAction()`` method. + + Do not call ``UpdateAction``. It is called automatically when the application is idle. The ``Action`` parameter specifies the action to be updated. ``UpdateAction()`` returns ``True`` if the action's properties are updated and require no further processing. Otherwise, ``UpdateAction()`` returns ``False``, and the default action processing continues. + ''' + def UseRightToLeftAlignment(self) -> bool: + ''' + Specifies whether the ``Application`` object is in a right-to-left alignment mode. + + Use ``UseRightToLeftAlignment()`` to determine whether the application's controls alignment is reversed so that they are aligned from right to left. ``UseRightToLeftAlignment()`` returns ``True`` for *Middle Eastern* locales if the `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ property is ``bdRightToLeft``. Otherwise, it returns ``False``. + ''' + def UseRightToLeftReading(self) -> bool: + ''' + Specifies whether the ``Application`` object is in a right-to-left text mode. + + Call ``UseRightToLeftReading()`` to determine which style and text drawing flags (used in ``ExTextOut`` or ``DrawText``) to set for the application's controls. + + ``UseRightToLeftReading()`` returns ``True`` for for *Middle Eastern* locales if the `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ property is not ``bdLeftToRight``. Otherwise, it returns ``False``. + ''' + def UseRightToLeftScrollBar(self) -> bool: + ''' + Specifies whether the vertical ``ScrollBar`` appears on the left side controls. + + Call ``UseRightToLeftScrollBar()`` to determine whether the vertical ``ScrollBar``\ s appear on the left sides of the application's controls. When ``UseRightToLeftScrollBar()`` returns ``True``, the vertical ``ScrollBar``\ s appear on the left sides of the controls. When ``UseRightToLeftScrollBar()`` returns ``False``, the vertical ``ScrollBar``\ s appear on the right. + + ``UseRightToLeftScrollBar()`` returns ``True`` for *Middle Eastern* locales if `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ is bdRightToLeft or bdRightToLeftNoAlign. + ''' + def UseMetropolisUI(self) -> None: + ''' + No have docs. + ''' + def MessageBox(self, Text, Caption: str, Flags: int) -> int: + ''' + Displays a specified message to the user. + + Use ``MessageBox()`` to display a generic dialog box containing a message and one or more buttons. The ``Caption`` parameter specifies the caption of the dialog box and is optional. + + ``MessageBox()`` is an encapsulation of the *Windows API MessageBox Function*, which is `described at <http://msdn.microsoft.com/ms645505(v=vs.85).aspx>`__. + + The `Application <Vcl.Forms.TApplication.htm>`__ encapsulation of ``MessageBox()`` automatically supplies the missing window handle parameter needed for the *Windows API* function. + + The value of the ``Text`` parameter is the message, which can be longer than 255 characters if necessary. Long messages are automatically wrapped in the ``MessageBox()``. + + The value of the ``Caption`` parameter is the caption that appears in the title bar of the dialog box. ``Caption``\ s can be longer than 255 characters, but do not wrap. A long caption results in a wide ``MessageBox()``. + + The ``Flags`` parameter specifies what buttons appear on the ``MessageBox()`` and the behavior (possible return values). The following table lists the possible values. These values can be combined to obtain the desired effect. + + =============================== ============================================================================== + **Value** **Meaning** + =============================== ============================================================================== + ``MB_ABORTRETRYIGNORE`` The ``MessageBox()`` contains three push buttons: *Abort*, *Retry*, and *Ignore*. + ``MB_OK`` The ``MessageBox()`` contains one push button: *OK*. This is the default. + ``MB_OKCANCEL`` The ``MessageBox()`` contains two push buttons: *OK* and *Cancel*. + ``MB_RETRYCANCEL`` The ``MessageBox()`` contains two push buttons: *Retry* and *Cancel*. + ``MB_YESNO`` The ``MessageBox()`` contains two push buttons: *Yes* and *No*. + ``MB_YESNOCANCEL`` The ``MessageBox()`` contains three push buttons: *Yes*, *No*, and *Cancel*. + =============================== ============================================================================== + + ``MessageBox()`` returns 0 if there is not enough memory to create the ``MessageBox()``. Otherwise it returns one of the following values: + + ===================== ================= ===================================== + **Value** **Numeric Value** **Meaning** + ===================== ================= ===================================== + ``IDOK`` 1 The user chose the *OK* button. + ``IDCANCEL`` 2 The user chose the *Cancel* button. + ``IDABORT`` 3 The user chose the *Abort* button. + ``IDRETRY`` 4 The user chose the *Retry* button. + ``IDIGNORE`` 5 The user chose the *Ignore* button. + ``IDYES`` 6 The user chose the *Yes* button. + ``IDNO`` 7 The user chose the *No* button. + ===================== ================= ===================================== + ''' + def OnGetActiveFormHandle(self, Handle: HWND) -> None: + ''' + # OnGetActiveFormHandle: GetHandleEvent + ``OnGetActiveFormHandle`` is the event triggered when reading the value of the `ActiveFormHandle <Vcl.Forms.TApplication.ActiveFormHandle.htm>`__ property. + ''' + def OnGetMainFormHandle(self, Handle: HWND) -> None: + ''' + # OnGetMainFormHandle: GetHandleEvent + ``OnGetMainFormHandle`` is the event triggered when reading the value of the `MainFormHandle <Vcl.Forms.TApplication.MainFormHandle.htm>`__ property. + ''' + def OnModalEnd(self, Sender: Object) -> None: + ''' + # OnShutDown: NotifyEvent + No have docs. + ''' + def OnActionExecute(self, Action: BasicAction, Handled: bool) -> None: + ''' + # OnActionExecute: ActionEvent + Occurs when an action's ``Execute()`` method is called and its ``ActionList`` has not already handled it. + + Use the ``OnActionExecute`` event handler to respond when a user invokes actions whose ``ActionList``\ s do not have ``OnExecute`` event handlers. + + If the ``ActionList`` that contains the action does not handle it in an ``OnExecute`` event handler, then the action is routed to the ``Application`` object's `ExecuteAction <Vcl.Forms.TApplication.ExecuteAction.htm>`__ method, which invokes the ``OnActionExecute`` event handler. (The application's `ExecuteAction <Vcl.Forms.TApplication.ExecuteAction.htm>`__ method applies to all actions in the application.) + + The ``Handled`` parameter of the event handler returns ``False`` by default. If the handler handles the event, it should change ``Handled`` to ``True``, thereby preventing further attempts to handle the action. When the event handler exits with ``Handled`` set to ``False``, the action's `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event occurs. If the action remains unhandled after that, the active control's `ExecuteAction <Vcl.Forms.TApplication.ExecuteAction.htm>`__ method is called to allow the action to execute with an identified target. Finally, the active form's `ExecuteAction <Vcl.Forms.TApplication.ExecuteAction.htm>`__ method is called if all other handlers do not handle the action. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnActionUpdate(self, Action: BasicAction, Handled: bool) -> None: + ''' + # OnActionUpdate: ActionEvent + Occurs when an action's ``Update()`` method is called and its ``ActionList`` has not already handled it. + + Use the ``OnActionUpdate`` event handler to update the properties of an action when the application is idle if the action's ``ActionList`` does not handle it in an `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event handler. + + If the ``ActionList`` that contains the action does not update it in an ``OnUpdate`` event handler, the action is routed to the ``Application`` object's `UpdateAction <Vcl.Forms.TApplication.UpdateAction.htm>`__ method, which invokes the ``OnActionUpdate`` event handler. (The application's `UpdateAction <Vcl.Forms.TApplication.UpdateAction.htm>`__ method applies to all actions in the application.) + + The ``Handled`` parameter of the event handler returns ``False`` by default. If the handler updates the event, it should change ``Handled`` to ``True``, thereby ending the processing of the action. When the event handler exits with ``Handled`` set to ``False``, the action's `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event occurs. If the action is not updated after that, the active control's ``UpdateAction()`` method is called to allow the target to update the action. Finally, the active form's `UpdateAction <Vcl.Forms.TApplication.UpdateAction.htm>`__ method is called if all other handlers do not handle the action. + + .. note:: ``OnActionUpdate`` occurs after the application's `OnIdle <Vcl.Forms.TApplication.OnIdle.htm>`__ event. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnActivate(self, Sender: Object) -> None: + ''' + # OnActivate: NotifyEvent + Occurs when an application becomes active. + + Write an ``OnActivate`` event handler to perform special processing when the application becomes active. + + An application becomes active when it is initially run or when focus moves from another Windows application back to any window of the application. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnDeactivate(self, Sender: Object) -> None: + ''' + # OnDeactivate: NotifyEvent + Occurs when an application becomes inactive. + + Write an ``OnDeactivate`` event handler to perform any special processing that should occur immediately before the application is deactivated. The ``OnDeactivate`` event occurs when the user switches from the application to another Windows application. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnException(self, Sender: Object, E: Exception) -> None: + ''' + # OnException: ExceptionEvent + Occurs when an unhandled exception occurs in the application. + + Use ``OnException`` to change the default behavior that occurs when an exception is not handled by application code. The ``OnException`` event handler is called automatically in the `HandleException <Vcl.Forms.TApplication.HandleException.htm>`__ method. + + ``OnException`` only handles exceptions that occur during message processing. Exceptions that occur before or after the execution of the application's ``Run()`` method do not generate ``OnException`` events. + + If an exception passes through the ``try`` blocks in the application code, the application automatically calls the `HandleException <Vcl.Forms.TApplication.HandleException.htm>`__ method. Unless the exception object is `EAbort <System.SysUtils.EAbort.htm>`__, `HandleException <Vcl.Forms.TApplication.HandleException.htm>`__ calls the ``OnException`` handler, if one exists. Otherwise, it calls `ShowException <Vcl.Forms.TApplication.ShowException.htm>`__ to display a ``MessageBox()`` indicating that an error occurred. + + ``ExceptionEvent`` is the type of the ``OnException`` event. It points to a method that handles exceptions in the application. The ``Sender`` parameter is the object that raised the exception, and ``'E'`` is the exception object. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnIdle(self, Sender: Object, Done: bool) -> None: + ''' + # OnIdle: IdleEvent + Occurs when an application becomes idle. + + Write an ``OnIdle`` event handler to perform special processing when an application is idle. An application is idle when it is not processing code. For example, an application is idle when it is waiting for input from the user. + + ``OnIdle()`` is called only once, as the application transitions into an idle state. It is not called continuously unless the ``Done`` parameter is set to ``False``. Applications that set ``Done`` to ``False`` consume an inordinate amount of CPU time, which affects overall system performance. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnHelp(self, Command: int, Data: int, CallHelp: bool) -> bool: + ''' + # OnHelp: HelpEvent + Occurs when the application receives a request for Help. + + Write an ``OnHelp`` event handler to perform special processing when the user requests Help. The `HelpContext <Vcl.Forms.TApplication.HelpContext.htm>`__ and `HelpJump <Vcl.Forms.TApplication.HelpJump.htm>`__ methods automatically trigger the ``OnHelp`` event. + + The `HelpEvent <Vcl.Forms.THelpEvent.htm>`__ type has the following parameters: ``CallHelp``, ``Command``, and ``Data``. + + Set ``CallHelp`` to ``True`` if the application should still invoke the ``Help`` system after the event. Set ``CallHelp`` to ``False`` to prevent the default response given by the ``Help`` system. All application ``Help()`` methods go through ``OnHelp``. The application calls the ``Help`` system only if ``OnHelp``\ s. ``CallHelp`` parameter is ``True`` or if no ``OnHelp`` event handler is assigned. + + The event handler returns ``True`` if it succeeds, ``False`` if it fails. + + The possible values for the ``Data`` parameter depend upon the value of the ``Command`` parameter. To find the possible values of the ``Command`` and ``Data`` parameters, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + + In order for the ``OnHelp`` event handler to work properly, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnHint(self, Sender: Object) -> None: + ''' + # OnHint: NotifyEvent + Occurs when the mouse pointer moves over a control or menu item that can display a *Help Hint*. + + Write an ``OnHint`` event handler to perform special processing when the mouse pauses over a control or menu item whose `Hint <Vcl.Controls.TControl.Hint.htm>`__ property is not an empty string. + + A common use of the ``OnHint`` event is to display the value of a control or menu item's ``Hint`` property in another control. Note that it is not necessary to use an ``OnHint`` event handler to display hints on a ``StatusBar``. The ``StatusBar`` will automatically display hints if you set its `AutoHint <Vcl.ComCtrls.TCustomStatusBar.AutoHint.htm>`__ property to ``True``. + + The ``Hint`` property of a control can specify both a short hint (`GetShortHint <Vcl.Controls.GetShortHint.htm>`__) and a long hint (`GetLongHint <Vcl.Controls.GetLongHint.htm>`__) that appear elsewhere because of the code in an ``OnHint`` event handler. See `Vcl.Controls.TControl.Hint <Vcl.Controls.TControl.Hint.htm>`__. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + + .. tip:: ``Component`` writers can respond to the automatically fired `HintAction <Vcl.StdActns.THintAction.htm>`__ action in a component's `ExecuteAction <Vcl.Forms.TApplication.ExecuteAction.htm>`__ method rather than relying on an ``OnHint`` event handler. + ''' + def OnMessage(self, Msg: tagMSG, Handled: bool) -> None: + ''' + # OnMessage: MessageEvent + Occurs when the application receives a *Windows Message*. + + Use ``OnMessage`` to trap any or all *Windows Messages* posted to all windows in the application. The ``OnMessage`` event occurs when an application receives a *Windows Message*. An ``OnMessage`` event handler allows an application to respond to messages other than those declared in the events for `Application <Vcl.Forms.TApplication.htm>`__. If the application does not have a specific handler for an incoming message, the message is dispatched to the window for which it was intended, and *Windows* handles the message. + + .. note:: ``OnMessage`` only receives messages that are posted to the message queue, not those sent directly with the *Windows API SendMessage Function*. + + .. caution:: Thousands of messages per second flow though this event. Be careful when coding the handler, because it can affect the performance of the entire application. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnMinimize(self, Sender: Object) -> None: + ''' + # OnMinimize: NotifyEvent + Occurs when an application is minimized. + + Write an ``OnMinimize`` event handler to perform special processing when the application is minimized. The application is minimized either because the user minimizes the main window or because of a call to the `Minimize <Vcl.Forms.TApplication.Minimize.htm>`__ method. The `Icon <Vcl.Forms.TApplication.Icon.htm>`__ property determines the icon that represents the minimized application. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnModalBegin(self, Sender: Object) -> None: + ''' + # OnModalBegin: NotifyEvent + Occurs when a modal form is opened. + + Write an ``OnModalBegin`` event handler to perform special processing when a modal form is opened. + ''' + def OnModalEnd(self, Sender: Object) -> None: + ''' + # OnModalEnd: NotifyEvent + Occurs when a modal form is closed. + + Write an ``OnModalEnd`` event handler to perform special processing when a modal form is closed. + ''' + def OnRestore(self, Sender: Object) -> None: + ''' + # OnRestore: NotifyEvent + Occurs when the previously minimized application is restored to its normal size. + + Write an ``OnRestore`` event handler to perform special processing when the application is restored from the minimized state, in which it appears as an icon. An application is restored either because the user restores the application or because the application calls the `Restore <Vcl.Forms.TApplication.Restore.htm>`__ method. + + .. note:: Do not confuse restoring an application with restoring a form or window to its original size. To minimize, maximize, and restore a window or form, change the value of the `WindowState <Vcl.Forms.TCustomForm.WindowState.htm>`__ property. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnShowHint(HintStr: str, CanShow: bool, HintInfo: HintInfo) -> None: + ''' + # OnShowHint: ShowHintEvent + Occurs when the application is about to display the ``Hint`` window for a *Help Hint*. + + Write an ``OnShowHint`` event handler to change the appearance and behavior of *Help Hints*. + + In the event handler, set the ``HintStr`` parameter to change the text of the *Help Hint*. To obtain the text of a ``Hint`` for a particular control, call the `GetLongHint <Vcl.Controls.GetLongHint.htm>`__ or `GetShortHint <Vcl.Controls.GetShortHint.htm>`__ function, and assign the result to ``HintStr``. + + Use the ``CanShow`` parameter to permit or prevent the *Help Hint* from displaying. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnShortCut(self, Msg: WMKey, Handled: bool) -> None: + ''' + # OnShortCut: ShortCutEvent + Occurs when the user presses a key (before the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event). + + Use ``OnShortCut`` to dispatch shortcut keystrokes before the ``Form`` or its controls handle them. When the user presses a key, the application can dispatch it as a shortcut key instead of allowing the standard keystroke processing (``OnKeyDown``, ``OnKeyPress``, and ``OnKeyUp``). Built-in shortcut processing is provided for menu shortcuts and actions associated with the ``Form``. ``OnShortCut`` lets the application implement additional shortcuts. + + If the ``OnShortCut`` event handler responds to the keystroke, set its ``Handled`` parameter to ``True``. This prevents the keystroke from being passed on to menus or actions associated with the application. It also prevents the standard keystroke processing in the same way that a menu or action shortcut does. + + .. note:: You can also respond to this event using the `ApplicationEvents <Vcl.AppEvnts.TApplicationEvents.htm>`__ component, which allows you to assign an event handler using the *IDE*. + ''' + def OnSettingChange(self, Sender: Object, Flag: int, Section: str, Result: int) -> None: + ''' + # OnSettingChange: SettingChangeEvent + Occurs when Windows notifies the application that a system-wide setting has changed. + + Use ``OnSettingChange`` to respond when Windows informs the application that a system-wide setting or policy has changed. + ''' + +class AbstractStyleServices: + ''' + ================================= + Vcl.Themes.TAbstractStyleServices + ================================= + + No have docs. + ''' + + __hash__: ClassVar[None] = ... + + def DoColorToRGB(self, Color: Color, Details: PThemedElementDetails) -> ColorRef: ... + + def DoDrawEdge(self, DC: HDC, Details: ThemedElementDetails, R: Rect, Edges: ElementEdges, Flags: ElementEdgeFlags, ContentRect: PRect, DPI: int) -> bool: ... + + def DoDrawElement(self, DC: HDC, Details: ThemedElementDetails, R: Rect, ClipRect: PRect, DPI: int) -> bool: ... + + def DoDrawIcon(self, DC: HDC, Details: ThemedElementDetails, R: Rect, himl: HIMAGELIST, Index: int, DPI: int) -> bool: ... + + def DoDrawParentBackground(self, Window: HWND, Target: HDC, Details: PThemedElementDetails, OnlyIfTransparent: bool, Bounds: PRect) -> bool: ... + + def DoDrawText(self, DC: HDC, Details: ThemedElementDetails, S: str, R: Rect, Flags: TextFormat, Options: StyleTextOptions, DPI: int) -> bool: ... + + def DoGetElementColor(self, Details: ThemedElementDetails, ElementColor: ElementColor, Color: Color) -> bool: ... + + def DoGetElementContentRect(self, DC: HDC, Details: ThemedElementDetails, BoundingRect: Rect, ContentRect: Rect, DPI: int) -> bool: ... + + def DoGetElementMargins(self, DC: HDC, Details: ThemedElementDetails, Rect: PRect, ElementMargin: ElementMargin, Margins: ElementMargins, DPI: int) -> bool: ... + + def DoGetElementRegion(self, DC: HDC, Details: ThemedElementDetails, Rect: Rect, Region: HRGN, DPI: int) -> bool: ... + + def DoGetElementSize(self, DC: HDC, Details: ThemedElementDetails, Rect: PRect, ElementSize: ElementSize, Size: Size, DPI: int) -> bool: ... + + def DoGetStyleColor(self, Color: StyleColor) -> Color: ... + + def DoGetStyleFontColor(self, Font: StyleFont) -> Color: ... + + def DoGetSystemColor(self, Color: Color) -> Color: ... + + def DoGetTextExtent(self, DC: HDC, Details: ThemedElementDetails, Text: str, Flags: TextFormat, BoundingRect: PRect, ExtentRect: Rect, DPI: int) -> bool: ... + + def DoHasElementFixedPosition(self, Details: ThemedElementDetails) -> bool: ... + + def DoHasTransparentParts(self, Details: ThemedElementDetails) -> bool: ... + + def DoIsValidStyle(self, Stream: Stream, StyleInfo: PStyleInfo) -> bool: ... + + def GetAvailable(self) -> bool: ... + + def GetElementDetails(self, Detail: ThemedWindow) -> ThemedElementDetails: ... + + def GetEnabled(self) -> bool: ... + + def GetName(self) -> bool: ... + + def GetTheme(self, Element: ThemedElement) -> Handle: ... + + def GetThemeForDPI(self, Element: ThemedElement, DPI: int) -> Handle: ... + + def LoadFromStream(self, Stream: Stream) -> CustomStyleServices: ... + + def PaintBorder(self, Control: WinControl, EraseLRCorner: bool) -> None: ... + + def SaveToStream(self, Stream: Stream) -> None: ... + + def UnloadThemeData(self) -> bool: ... + + def UnloadThemeDataForDPI(self) -> bool: ... + + def UpdateThemes(self) -> None: ... + + @overload + def GetElementDetails(self, Detail: ThemedButton) -> ThemedElementDetails: + ''' + No have docs. + ''' + + @overload + def GetElementDetails(self, Detail: ThemedCategoryButtons) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedCategoryPanelGroup) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedCheckListBox) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedClock) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedComboBox) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedControlBar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedDataNavButtons) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedMPlayerButtons) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedDatePicker) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedEdit) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedExplorerBar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedFlyOut) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedGrid) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedHeader) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedHint) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedLink) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedListView) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedMenu) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedMenuBand) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedMonthCal) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedNavigation) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedPage) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedPanel) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedProgress) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedRebar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedScrollBar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedSearchIndicators) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedSpin) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedStartPanel) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedStatus) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTab) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTabSet) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTaskBand) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTaskBar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTaskDialog) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTextLabel) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTextStyle) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedToggleSwitch) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedToolBar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedToolTip) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTrackBar) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTrayNotify) -> ThemedElementDetails: ... + + @overload + def GetElementDetails(self, Detail: ThemedTreeview) -> ThemedElementDetails: ... + + +# ================================================ +# Here begins the definition of classes following +# the same order of declaration present in the +# official delphivcl stub +# ================================================ + +class Action(CustomAction): + ''' + ==================== + Vcl.ActnList.TAction + ==================== + + ``Action`` is the base class for VCL ``Action`` objects. ``Action`` implements actions to be used with ``MenuItems`` and controls. The ``published`` properties and events of ``Action`` actions can be managed in the `Object Inspector <Object_Inspector.htm>`__ at design time. + + The ``Action`` class is almost the same as `CustomAction <Vcl.ActnList.TCustomAction.htm>`__. ``Action`` extends only the following features of `CustomAction <Vcl.ActnList.TCustomAction.htm>`__: + + - Changes the ``public`` scope to ``published`` for the `AutoCheck <Vcl.ActnList.TAction.AutoCheck.htm>`__, `Caption <Vcl.ActnList.TAction.Caption.htm>`__, `Checked <Vcl.ActnList.TAction.Checked.htm>`__, `Enabled <Vcl.ActnList.TAction.Enabled.htm>`__, `GroupIndex <Vcl.ActnList.TAction.GroupIndex.htm>`__, `HelpType <Vcl.ActnList.TAction.HelpType.htm>`__, `HelpContext <Vcl.ActnList.TAction.HelpContext.htm>`__, `HelpKeyword <Vcl.ActnList.TAction.HelpKeyword.htm>`__, `Hint <Vcl.ActnList.TAction.Hint.htm>`__, `ImageIndex <Vcl.ActnList.TAction.ImageIndex.htm>`__, `SecondaryShortCuts <Vcl.ActnList.TAction.SecondaryShortCuts.htm>`__, `ShortCut <Vcl.ActnList.TAction.ShortCut.htm>`__, and `Visible <Vcl.ActnList.TAction.Visible.htm>`__ properties. + - Sets the ``published`` scope for the `OnExecute <Vcl.ActnList.TAction.OnExecute.htm>`__, `OnUpdate <Vcl.ActnList.TAction.OnUpdate.htm>`__, and `OnHint <Vcl.ActnList.TAction.OnHint.htm>`__ events. + + The ``published`` scope of these properties and events provides the possibility to use the `Object Inspector <Object_Inspector.htm>`__ assistance for editing values of these properties and events. + + - The `DisableIfNoHandler <System.Actions.TContainedAction.DisableIfNoHandler.htm>`__ property is set to ``True`` while an action is created, that is, the ``Action`` is inaccessible if it does not have an `OnExecute <Vcl.ActnList.TAction.OnExecute.htm>`__ event handler. + + ``Action`` is a generic action component. It can be added to ``ActionList``\ s when there is no predefined action class that implements the desired response to user commands. Unlike predefined ``Action`` classes, which have built-in methods that respond when users click the client controls, ``Action`` has no built-in response to user commands. Instead, when using ``Action``, you can provide the response when the ``Action`` "fires" by writing (using the `Object Inspector <Object_Inspector.htm>`__'s assistance) an `OnExecute <Vcl.ActnList.TAction.OnExecute.htm>`__ event handler, and configure the properties of ``Action`` to reflect the current conditions by writing an `OnUpdate <Vcl.ActnList.TAction.OnUpdate.htm>`__ event handler. + + ``Action`` objects are used to centralize the response to user commands (actions) and to represent user interface elements in applications that use ``ActionList``\ s or action bands. + + ``Action`` can also act as a base class for predefined ``Action`` classes. You can derive from ``Action`` if you want to retain the ``published`` scope of the supported properties and events. If you want to use the ``public`` scope to some of the supported properties and events, you can derive from `CustomAction <Vcl.ActnList.TCustomAction.htm>`__. + + For predefined actions that augment the behavior of ``Action``, see the ``Action`` classes in the `Vcl.StdActns <Vcl.StdActns.htm>`__, `Vcl.DBActns <Vcl.DBActns.htm>`__, and `Vcl.ExtActns <Vcl.ExtActns.htm>`__ units. + ''' + + __hash__: ClassVar[None] = ... + + AutoCheck: bool + ''' + Controls whether the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property toggles when the ``Action`` executes. + + ``Vcl.ActnList.TAction.AutoCheck`` inherits from `System.Actions.TContainedAction.AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__. All content below this line refers to `System.Actions.TContainedAction.AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__. + + Controls whether the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property toggles when the ``Action`` executes. + + `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ causes the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property to toggle when the ``Action`` `executes <System.Classes.TBasicAction.Execute.htm>`__. This allows the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of the ``Action`` to remain in sync with the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of the client (or an equivalent). + + If the client has an ``AutoCheck`` property of its own, the `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ property of the ``Action`` is propagated to the ``AutoCheck`` property of the client. + ''' + Caption: str + ''' + Represents the ``Caption`` of the ``Action``. + + ``Vcl.ActnList.TAction.Caption`` inherits from `System.Actions.TContainedAction.Caption <System.Actions.TContainedAction.Caption.htm>`__. All content below this line refers to `System.Actions.TContainedAction.Caption <System.Actions.TContainedAction.Caption.htm>`__. + + `Caption <System.Actions.TContainedAction.Caption.htm>`__ holds the string that is used as the ``Caption`` of the ``Action``, when it is set. The value of `Caption <System.Actions.TContainedAction.Caption.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsCaptionLinked.htm>`__. + ''' + Checked: bool + ''' + Indicates whether client controls and ``MenuItems`` appear checked. + + ``Vcl.ActnList.TAction.Checked`` inherits from `System.Actions.TContainedAction.Checked <System.Actions.TContainedAction.Checked.htm>`__. All content below this line refers to `System.Actions.TContainedAction.Checked <System.Actions.TContainedAction.Checked.htm>`__. + + `Checked <System.Actions.TContainedAction.Checked.htm>`__ specifies the checked state for the ``Action``. The value of `Checked <System.Actions.TContainedAction.Checked.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsCheckedLinked.htm>`__. + + .. note:: If the ``Action`` has a `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ value greater than 0, then setting `Checked <System.Actions.TContainedAction.Checked.htm>`__ to ``True`` sets to ``False`` the ``Checked`` properties of all other actions in the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ group. + + .. tip:: Use the `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ property to ensure that the ``Action``\ s. `Checked <System.Actions.TContainedAction.Checked.htm>`__ property toggles when the ``Action`` executes. + ''' + Enabled: bool + ''' + Specifies the enabled state for the ``Action``. + + ``VCL.ActnList.TAction.Enabled`` inherits from `System.Actions.TContainedAction.Enabled <System.Actions.TContainedAction.Enabled.htm>`__. All content below this line refers to `System.Actions.TContainedAction.Enabled <System.Actions.TContainedAction.Enabled.htm>`__. + + The value of `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsEnabledLinked.htm>`__. + ''' + GroupIndex: int + ''' + Indicates a group of ``Action``\ s in one ``ActionList``. Actions in this group act like the group of ``RadioButton``\ s.. + + ``Vcl.ActnList.TAction.GroupIndex`` inherits from `System.Actions.TContainedAction.GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__. All content below this line refers to `System.Actions.TContainedAction.GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__. + + The value of `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ is used to define groups of ``Action``\ s. Actions in each group act like groups of ``RadioButton``\ s.. When `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ is greater than 0, this value identifies the group to which some actions belong. The value of `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsGroupIndexLinked.htm>`__. + + When the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of any action in that group is set to ``True``, the `Checked <System.Actions.TContainedAction.Checked.htm>`__ properties of all other actions in the group are set to ``False``. That is, only one action in the group can be checked at a time. + + .. note:: All actions in a group must be listed by the same ``ActionList``. + ''' + HelpContext: HelpContext + ''' + Keeps the integer context ``ID`` that identifies the ``Help`` topic for the ``Action``. + + ``Vcl.ActnList.TAction.HelpContext`` inherits from `System.Actions.TContainedAction.HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__. All content below this line refers to `System.Actions.TContainedAction.HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__. + + `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ specifies the integer context ``ID`` to identify the ``Help`` topic to show when invoking ``Help`` for the ``Action``. The value of `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsHelpContextLinked.htm>`__. See also `IsHelpLinked <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__. + + `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ is only used when ``htContext`` is selected in the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + + .. note:: To use *Help*, you need to `enable Help in your application <Enabling_Help_in_Applications.htm>`__. When your application supports usage of the appropriate *Help* system, then it can show ``Help`` topics from the associated *Help* file. When a client control has focus and the user presses the *F1* key, the control uses the value of the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property to invoke the online Help that shows the topic with this context ``ID``. The target topic is uniquely identified by a `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ context ``ID`` value. + ''' + HelpKeyword: str + ''' + Contains the keyword string that identifies the ``Help`` topic for the ``Action``. + + ``Vcl.ActnList.TAction.HelpKeyword`` inherits from `System.Actions.TContainedAction.HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__. All content below this line refers to `System.Actions.TContainedAction.HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__. + + The value of `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__. + + `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ is only used when ``htKeyword`` is selected in the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + + .. note:: To use *Help*, you need to `enable Help in your application <Enabling_Help_in_Applications.htm>`__. When your application supports usage of the appropriate *Help* system, then it can show ``Help`` topics from the associated *Help* file. When a client control has focus and the user presses the *F1* key, the control uses the `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property's value to invoke the online Help showing the topic with this keyword. + ''' + HelpType: HelpType + ''' + Keeps whether to use the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ or `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property to identify the ``Help`` topic. + + ``Vcl.ActnList.TAction.HelpType`` inherits from `System.Actions.TContainedAction.HelpType <System.Actions.TContainedAction.HelpType.htm>`__. All content below this line refers to `System.Actions.TContainedAction.HelpType <System.Actions.TContainedAction.HelpType.htm>`__. + + The value of `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__. + + `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ can keep one of the following constants: + + - ``htContext`` - instructs to use the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property to identify the ``Help`` topic to show when invoking *Help*. + - ``htKeyword`` - instructs to use the `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property to identify the ``Help`` topic to show when invoking *Help*. + ''' + Hint: str + ''' + Stores the ``Help`` hint text. + + `Hint <System.Actions.TContainedAction.Hint.htm>`__ holds the hint string indicating the hint text for the ``Action``. + + `Hint <System.Actions.TContainedAction.Hint.htm>`__ contains the text strings that appear in a pop-up box (or in a ``StatusBar``) when the user moves the mouse over screen elements. + + This hint string `can be propagated to clients of the `Action <System.Actions.TContainedActionLink.IsHintLinked.htm>`__ - to controls, ``MenuItems``, and other GUI elements. + + .. note:: *VCL Controls* support hint strings containing three parts that can be shown in separate locations (see `Vcl.Controls.TControl.Hint <Vcl.Controls.TControl.Hint.htm>`__). + ''' + ImageIndex: ImageIndex + ''' + Stores an index in a list of images. + + ``VCL.ActnList.TAction.ImageIndex`` inherits from `System.Actions.TContainedAction.ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__. All content below this line refers to `System.Actions.TContainedAction.ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__. + + `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ is a zero-based index in a list of images. `ContainedAction <System.Actions.TContainedAction.htm>`__ does not provide the actual list of images, only implementations of ``Action``\ s in GUI application frameworks provide such a property. In general, this list of images contains images that are associated with controls and ``MenuItems`` that use this action. + + The value of `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__. + + .. note:: When `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ is ``-1``, this means that the list does not contain any images. In typical implementations of controls, an image is drawn at the leftmost position in the control, and a control's text is drawn to the right of the image. If `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ is ``-1``, then a control does not offset the text to the right to reserve a placeholder for the image. Otherwise, if `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ is not ``-1``, then the control's text is always drawn with the offset to the right to reserve a place for drawing an image. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + SecondaryShortCuts: CustomShortCutList + ''' + Stores shortcuts (in addition to `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__) for triggering the ``Action``. + + ``Vcl.ActnList.TAction.SecondaryShortCuts`` inherits from `System.Actions.TContainedAction.SecondaryShortCuts <System.Actions.TContainedAction.SecondaryShortCuts.htm>`__. All content below this line refers to `System.Actions.TContainedAction.SecondaryShortCuts <System.Actions.TContainedAction.SecondaryShortCuts.htm>`__. + + Actions can execute in response to multiple shortcut key combinations. `SecondaryShortCuts <System.Actions.TContainedAction.SecondaryShortCuts.htm>`__ lists all the shortcut key combinations (other than the one specified by the `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property) that can trigger the ``Action``. This lets you provide additional, secondary shortcuts. + + When the user types one of the key combinations listed in `SecondaryShortCuts <System.Actions.TContainedAction.SecondaryShortCuts.htm>`__, the ``Action``\ s. `Execute <System.Classes.TBasicAction.Execute.htm>`__ method is called. + ''' + ShortCut: ShortCut + ''' + `Shortcut <System.Actions.TContainedAction.ShortCut.htm>`__ that triggers the ``Action``. + + ``Vcl.ActnList.TAction.ShortCut`` inherits from `System.Actions.TContainedAction.ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__. All content below this line refers to `System.Actions.TContainedAction.ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__. + + The value of `Shortcut <System.Actions.TContainedAction.ShortCut.htm>`__ can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsShortCutLinked.htm>`__. + ''' + Visible: bool + ''' + Stores whether the ``Action`` representation is visible. + + ``Vcl.ActnList.TAction.Visible`` inherits from `System.Actions.TContainedAction.Visible <System.Actions.TContainedAction.Visible.htm>`__. All content below this line refers to `System.Actions.TContainedAction.Visible <System.Actions.TContainedAction.Visible.htm>`__. + + `Visible <System.Actions.TContainedAction.Visible.htm>`__ specifies the visible state for the ``Action`` (``True`` means visible, ``False`` means invisible). + + This `Visible <System.Actions.TContainedAction.Visible.htm>`__ ``Value`` is propagated to a client of the ``Action`` if `IsVisibleLinked <System.Actions.TContainedActionLink.IsVisibleLinked.htm>`__ method of the `ActionLink <FMX.ActnList.TActionLink.htm>`__ linking the client to the ``Action()`` returns ``True``. If the ``Visible`` of an action is ``False`` and ``IsVisibleLinked()`` of an ``ActionLink()`` returns ``True``, then the ``Visible`` of the client (a control, ``MenuItem``, or others) is also set ``False`` and this client is also invisible. Typically, ``IsVisibleLinked()`` of an ``ActionLink()`` returns ``False`` if the ``Action`` belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__. Otherwise, when the ``Action`` belongs to `Action <FMX.ActnList.TAction.htm>`__, then ``IsVisibleLinked()`` of an ``ActionLink()`` returns ``True``. That is, `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ is used when one need to provide visible representation of clients of ``Action``\ s that have ``Visible`` set ``True``. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `Action <Vcl.ActnList.TAction.htm>`__ object. + + Applications do not usually create ``Action`` objects explicitly. Actions are created automatically when you add them to an ``ActionManager`` or ``ActionList`` component at design time. When instantiating `Action <Vcl.ActnList.TAction.htm>`__ at run time, assign a `ActionList <Vcl.ActnList.TActionList.htm>`__ or `ActionManager <Vcl.ActnMan.TActionManager.htm>`__ component to the new action's `ActionList <Vcl.ActnList.TCustomAction.ActionList.htm>`__ property after calling ``Create()``. + + ``Create()`` sets the `DisableIfNoHandler <System.Actions.TContainedAction.DisableIfNoHandler.htm>`__ to ``True``, that is, the ``Action`` is inaccessible if it does not have an `OnExecute <Vcl.ActnList.TAction.OnExecute.htm>`__ event handler. + ''' + def OnExecute(self, Sender: Object) -> None: + ''' + OnExecute: Callable[[Object],None] + Callable[[Object], None]: + + # OnExecute: NotifyEvent + Occurs when the execute event, of a client linked to the ``Action``, fires. + + Write an `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler when you want to respond when the user triggers the client object's default event (typically an ``OnClick`` event). + + For most target clients, `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ is associated with the `OnClick <FMX.Controls.TControl.OnClick.htm>`__ event. The `Click <FMX.Controls.TControl.Click.htm>`__ method triggers the associated `Action <FMX.Types.TFmxObject.Action.htm>`__ if `EnableExecuteAction <FMX.Controls.TControl.EnableExecuteAction.htm>`__ is ``True`` and the `OnClick <FMX.Controls.TControl.OnClick.htm>`__ event handler is not assigned (or is equal to `Action.OnExecute <FMX.ActnList.TAction.OnExecute.htm>`__). + + `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ is called in the `Execute <System.Classes.TBasicAction.Execute.htm>`__ method. + + `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ also occurs when the user types the shortcut (or one of the secondary shortcuts) associated with the ``Action`` or its client. + + .. warning:: If you assign an `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler to a predefined action, the default behavior of that action will not occur. + ''' + def OnHint(self, Sender: Object, Node: TreeNode, Hint: str) -> None: + ''' + OnHint: Callable[[str,bool],None] + Callable[[str, bool], None]: + + # OnHint: HintEvent + Occurs when the mouse pauses over a client control or ``MenuItem``. + + Use `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ to override the default hint that appears when the user pauses the mouse over a client control or ``MenuItem``. The `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ event handler can change the hint that appears (by changing the string stored in the client's ``Hint`` property), or display the hint in an application-specific way. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnUpdate: NotifyEvent + Occurs when the application is idle or when the ``ActionList`` updates. + + Write an `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event handler to execute centralized code while an application is idle. For example, actions may want to update enabling and disabling, or checking and unchecking of client targets. + ''' + + # todo: No have OnClick in the oficial stub + # OnUpdate: Callable[[Object],None] + # '''Callable[[Object], None]:''' + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ActionList(CustomActionList): + ''' + ======================== + Vcl.ActnList.TActionList + ======================== + + ``ActionList`` maintains a list of actions that can be used by components and controls such as menu items and buttons. + + Use ``Action`` lists to centralize the response to user commands (actions). ``ActionList`` components maintain a list of actions that are available to the client controls in an application. Add ``ActionList`` components to your form or data module from the standard page of the component palette. Double-click the ``ActionList`` to display the `Action List editor <Action_List_editor.htm>`__, from which you can add, delete, and rearrange actions. + + .. note:: While it is possible to maintain the actions for an application using ``ActionList``, it can be simpler to use `Vcl.ActnMan.TActionManager <Vcl.ActnMan.TActionManager.htm>`__ instead. + ''' + + __hash__: ClassVar[None] = ... + Images: CustomImageList + ''' + Lists the images available for actions in the ``ActionList``. + + `Images <Vcl.ActnList.TCustomActionList.Images.htm>`__ is a list of bitmaps that can be displayed to the left of any action in the ``ActionList``. An action is associated with an image from this ``ImageList`` by its ``ImageIndex`` property. This image can then appear on client controls such as ``MenuItems``, ``ToolButton``s, and so on. + ''' + State: ActionListState + ''' + Indicates whether the actions in the ``ActionList`` respond when the user triggers a client object. + + ``Vcl.ActnList.TActionList.State`` inherits from `System.Actions.TContainedActionList.State <System.Actions.TContainedActionList.State.htm>`__. All content below this line refers to `System.Actions.TContainedActionList.State <System.Actions.TContainedActionList.State.htm>`__. + + `State <System.Actions.TContainedActionList.State.htm>`__ can be one of the constants defined in the `ActionListState <System.Actions.TActionListState.htm>`__ type: ``asNormal``, ``asSuspended``, and ``asSuspendedEnabled``. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when a change occurs in the ``ActionList``. + + ``VCL.ActnList.TActionList.OnChange`` inherits from `System.Actions.TContainedActionList.OnChange <System.Actions.TContainedActionList.OnChange.htm>`__. All content below this line refers to `System.Actions.TContainedActionList.OnChange <System.Actions.TContainedActionList.OnChange.htm>`__. + + Write an `OnChange <System.Actions.TContainedActionList.OnChange.htm>`__ event handler to update your application in response to changes in the ``ActionList``. Changes to the ``ActionList`` that trigger an `OnChange <System.Actions.TContainedActionList.OnChange.htm>`__ event include changes to an action category or to the ``ActionList``\ s. ``ImageList``. + + .. note:: The ``ActionList`` automatically informs the actions in the list when an `OnChange <System.Actions.TContainedActionList.OnChange.htm>`__ event occurs. You need only provide an `OnChange <System.Actions.TContainedActionList.OnChange.htm>`__ event handler for application-specific responses. + + ``OnChange`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExecute(self, Action: BasicAction, Handled: bool) -> None: + ''' + # OnExecute: ActionEvent + Occurs when a client object triggers an action in the list. + + ``VCL.ActnList.TActionList.OnExecute`` inherits from `System.Actions.TContainedActionList.OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__. All content below this line refers to `System.Actions.TContainedActionList.OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__. + + Write an `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event handler to respond when an action in the list fires. + + When the user invokes a client object, the ``ActionList``\ s. `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event is the first event to occur in response. If the `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event handler sets its ``Handled`` parameter to ``True``, the action is considered handled, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class in response to the user action. + + If the `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event handler does not set its ``Handled`` parameter to ``True``, the application's ``OnActionExecute`` event occurs next. If the ``OnActionExecute`` event does not respond to the user input, the ``Action`` object's `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event occurs. Finally, if the action does not have an `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event handler, the application locates a target object and executes any predefined response implemented by the ``Action`` object. + ''' + def OnStateChange(self, Sender: Object) -> None: + ''' + # OnStateChange: NotifyEvent + Occurs after the `State <System.Actions.TContainedActionList.State.htm>`__ property's ``Value`` is changed. + + ``Vcl.ActnList.TActionList.OnStateChange`` inherits from `System.Actions.TContainedActionList.OnStateChange <System.Actions.TContainedActionList.OnStateChange.htm>`__. All content below this line refers to `System.Actions.TContainedActionList.OnStateChange <System.Actions.TContainedActionList.OnStateChange.htm>`__. + + Write an `OnStateChange <System.Actions.TContainedActionList.OnStateChange.htm>`__ event handler to respond after the `State <System.Actions.TContainedActionList.State.htm>`__ property's ``Value`` is changed. + ''' + def OnUpdate(self, Action: BasicAction, Handled: bool) -> None: + ''' + # OnUpdate: ActionEvent + Occurs when the application is idle so that the ``ActionList`` can update a specific action in the list. + + ``Vcl.ActnList.TActionList.OnUpdate`` inherits from `System.Actions.TContainedActionList.OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__. All content below this line refers to `System.Actions.TContainedActionList.OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__. + + Write an `OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__ event handler to configure the properties of a specified action in the list so that it reflects current conditions. + + When the application is idle, it cycles through every action in turn, giving it a chance to update itself to reflect current conditions. For each action, the first event to occur in this sequence is the ``ActionList``\ s. `OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__ event. If the `OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__ event handler sets its ``Handled`` parameter to ``True``, the action is considered updated, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class. + + If the `OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__ event handler does not set its ``Handled`` parameter to ``True``, the application's ``OnActionUpdate`` event occurs next. If the ``OnActionUpdate`` event does not update the action, the ``Action`` object's `OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__ event occurs. Finally, if the action does not have an `OnUpdate <System.Actions.TContainedActionList.OnUpdate.htm>`__ event handler, the application executes any predefined update method implemented by the ``Action`` object. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ActivityIndicator(CustomActivityIndicator): + ''' + ================================ + Vcl.WinXCtrls.TActivityIndicator + ================================ + + An animated rotating display indicating that the application is performing some activity. + + `Create <Vcl.WinXCtrls.TActivityIndicator.Create.htm>`__ the activity indicator, set the `color <Vcl.WinXCtrls.TActivityIndicator.IndicatorColor.htm>`__, `size <Vcl.WinXCtrls.TActivityIndicator.IndicatorSize.htm>`__ and `type <Vcl.WinXCtrls.TActivityIndicator.IndicatorType.htm>`__, and set the `Animate <Vcl.WinXCtrls.TActivityIndicator.Animate.htm>`__ property to ``True`` to start the animation. You can modify the speed of the animation with the `FrameDelay <Vcl.WinXCtrls.TActivityIndicator.FrameDelay.htm>`__ property. + ''' + + __hash__: ClassVar[None] = ... + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + Animate: bool + ''' + Specifies whether the activity indicator is currently animated. + + ``Vcl.WinXCtrls.TActivityIndicator.Animate`` inherits from `Vcl.WinXCtrls.TCustomActivityIndicator.Animate <Vcl.WinXCtrls.TCustomActivityIndicator.Animate.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomActivityIndicator.Animate <Vcl.WinXCtrls.TCustomActivityIndicator.Animate.htm>`__. + + Default is ``False``. + ''' + FrameDelay: int + ''' + Specifies how fast the activity indicator displays its animation sequence. + + ``Vcl.WinXCtrls.TActivityIndicator.FrameDelay`` inherits from `Vcl.WinXCtrls.TCustomActivityIndicator.FrameDelay <Vcl.WinXCtrls.TCustomActivityIndicator.FrameDelay.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomActivityIndicator.FrameDelay <Vcl.WinXCtrls.TCustomActivityIndicator.FrameDelay.htm>`__. + + Set this property to a lower value to speed up the animation. + ''' + IndicatorColor: ActivityIndicatorColor + ''' + The color of the activity indicator. + + ``Vcl.WinXCtrls.TActivityIndicator.IndicatorColor`` inherits from `Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorColor <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorColor.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorColor <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorColor.htm>`__. + + Possible values are: + + - ``aicBlack``: Default. The elements of the indicator are black. + - ``aicWhite``: The elements of the indicator are white. + ''' + IndicatorSize: ActivityIndicatorSize + ''' + The size of the activity indicator. + + ``Vcl.WinXCtrls.TActivityIndicator.IndicatorSize`` inherits from `Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorSize <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorSize.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorSize <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorSize.htm>`__. + + Possible values are: + + - ``aisSmall``: 24 x 24 pixels. + - ``aisMedium``: Default. 32 x 32 pixels. + - ``aisLarge``: 48 x 48 pixels. + - ``aisXLarge``: 64 x 64 pixels. + ''' + IndicatorType: ActivityIndicatorType + ''' + The type of the activity indicator. + + ``Vcl.WinXCtrls.TActivityIndicator.IndicatorType`` inherits from `Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorType <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorType.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorType <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorType.htm>`__. + + Possible values are: + + - ``aitMomentumDots``: Default. Traditional Windows 8/10 rotating sequence of dots, accelerating and deccelerating in a circular pattern. + - ``aitRotatingSector``: Alternating sectors of a segmented ring are highlighted in sequence to indicate activity. + - ``aitSectorRing``: Sectors of a segmented ring are highlighted in sequence until the ring is completely highlighted. On the next pass, each sector is displayed in a dimmed state. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BaseBindScopeComponent(Component, IScopeComponent, IScopeExpressions, IScopeLocks): + ''' + ============================================ + Data.Bind.Components.TBaseBindScopeComponent + ============================================ + + Base class for the binding scope component. ``BaseBindScopeComponent`` is the ancestor for the `CustomBindScope <Data.Bind.Components.TCustomBindScope.htm>`__ component. ``BaseBindScopeComponent`` provides functionality for adding scope mappings, getting scope members and values, returning the scope itself or the scope of a member. It also provides properties for accessing the binding expressions in this scope and the scope mappings. + ''' + + __hash__: ClassVar[None] = ... + Expressions: List[BasicBindComponent] + ''' + Specifies a list of binding components that are using this source component. + ''' + ScopeMappings: ScopeMappings + ''' + Specifies an owned collection of scope mappings. + + The ``ScopeMappings`` property specifies an owned collection whose elements are scope mappings. ``ScopeMappings`` are used to add name/value pairs that can be referenced by expressions that reference this source component. + ''' + + def SetScopeMappings(self, Value: ScopeMappings) -> None: + ''' + Protected setter implementation for the `ScopeMappings <Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings.htm>`__ property. + ''' + def AddScopeMappings(self, AScope: IScope) -> IScope: + ''' + Adds the given scope mapping to the `ScopeMappings <Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings.htm>`__ list. The scope mapping to be added is given through the ``AScope`` parameter. + ''' + def GetMember(self, AMemberName: str) -> Object: + ''' + Returns the member for the given member name. + + The ``GetMember()`` method returns the scope member, as a `Object <System.TObject.htm>`__, for the member name given through the ``AMemberName`` parameter. This member is later used in the generated bindings expressions. + + .. tip:: This member object or its properties may be referenced by bindings expressions. + ''' + def GetValue(self) -> Object: + ''' + No have docs. + ''' + def GetScope(self) -> IScope: + ''' + Returns the binding scope for this source component. + + The ``GetScope()`` method returns the `binding scope <System.Bindings.EvalProtocol.IScope.htm>`__ for this source component. This binding scope allows expressions to access properties and methods of the source component, as opposed to `GetMemberScope <Data.Bind.Components.TBaseBindScopeComponent.GetMemberScope.htm>`__, which allows expressions to access properties and methods of a member of the source component, such as a field. + ''' + def GetMemberScope(self, AMemberName: str) -> IScope: + ''' + Returns the binding scope for the given member name. + + The ``GetMemberScope()`` method returns the `binding scope <System.Bindings.EvalProtocol.IScope.htm>`__ for the member name given through the ``AMemberName`` parameter. + ''' + def GetScopeObject(self) -> Object: + ''' + No have docs. + ''' + def PosLockEnter(self) -> None: + ''' + No have docs. + ''' + def PosLockLeave(self) -> None: + ''' + No have docs. + ''' + def GetPosLock(self) -> bool: + ''' + No have docs. + ''' + def AddExpression(self, AExpression: BasicBindComponent) -> None: + ''' + Adds the given bind component to the `Expressions <Data.Bind.Components.TBaseBindScopeComponent.Expressions.htm>`__ list. The binding component is given through the ``AExpression`` parameter. + ''' + def RemoveExpression(self, AExpression: BasicBindComponent) -> None: + ''' + Removes the given binding component from the `Expressions <Data.Bind.Components.TBaseBindScopeComponent.Expressions.htm>`__ list. The binding component to be removed is given through the ``AExpression`` parameter. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Data.Bind.Components.TBaseBindScopeComponent.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Forwards notification messages to all owned components. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def ActivateExpressions(self, AValue: bool) -> None: + ''' + Activates or deactivates all the binding expressions of this binding scope component at once. + + The ``ActivateExpressions()`` method activates or deactivates, depending on the value of the ``AValue`` parameter, all the binding expressions contained by this binding scope component at once. + + .. tip:: If one or more of the binding expressions does not support one of the `IBindLink <Data.Bind.Components.IBindLink.htm>`__, `IBindPosition <Data.Bind.Components.IBindPosition.htm>`__, or `IBindActivate <Data.Bind.Components.IBindActivate.htm>`__ interfaces, then ``ActivateExpressions`` does nothing for that particular binding expression. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Allocates memory and constructs a safely initialized instance of a component. + + ``Data.Bind.Components.TBaseBindScopeComponent.Create`` inherits from `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. All content below this line refers to `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. + + All objects have a `Create <System.Classes.TComponent.Create.htm>`__ method that constructs the object. `Component <System.Classes.TComponent.htm>`__ redefines `Create <System.Classes.TComponent.Create.htm>`__ so that, for components, `Create <System.Classes.TComponent.Create.htm>`__ also: + + - Establishes the relationship of a component and its `Owner <System.Classes.TComponent.Owner.htm>`__, as indicated by the ``AOwner`` parameter. + + - Sets the `ComponentStyle <System.Classes.TComponent.ComponentStyle.htm>`__ property to `csInheritable <System.Classes.TComponentStyle.htm>`__, meaning that the component can be inherited by a descendent form type. + + It is not necessary to explicitly create components added in the *Form Designer*. These components are created automatically when the application is run, and they are destroyed when the application is closed. + + For components created programmatically, that is, not created in the *Form Designer*, call `Create <System.Classes.TComponent.Create.htm>`__ and pass in an owner component as the ``AOwner`` parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use ``Free()`` when it needs to be destroyed. + + .. tip:: When passing in ``Self`` as the `Owner <System.Classes.TComponent.Owner.htm>`__ parameter, consider what ``Self`` references. If a component creates another component in one of its methods, then ``Self`` refers to the first component and not the component being created, which is then owned by the first component. + + .. note:: The `Component <System.Classes.TComponent.htm>`__ constructor is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the *Form Designer*. Do not forget to use the override directive when declaring a new component's `Create <System.Classes.TComponent.Create.htm>`__ constructor. + ''' + def Destroy(self) -> None: + ''' + Disposes of the component and its owned components. + + ``Data.Bind.Components.TBaseBindScopeComponent.Destroy`` inherits from `System.Classes.TComponent.Destroy <System.Classes.TComponent.Destroy.htm>`__. All content below this line refers to `System.Classes.TComponent.Destroy <System.Classes.TComponent.Destroy.htm>`__. + + Disposes of the component and its owned components. + + Do not call `Destroy <System.Classes.TComponent.Destroy.htm>`__ directly. Call ``Free()`` instead. ``Free()`` verifies that the component is not ``nil``, and only then calls `Destroy <System.Classes.TComponent.Destroy.htm>`__. + + Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains. To destroy a form, call its ``Release()`` method. ``Release()`` waits for all the ``Form``\ s. event handlers and the event handlers of the ``Form``\ s. components to finish executing before destroying the ``Form``. + + .. note:: A form owns all the controls and nonvisual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well. By default, all forms are owned by the global ``Application`` object. When an application terminates, it frees the global ``Application`` object, which frees all forms. For objects that are not components, and for components created with a nil owner, be sure to call ``Free()`` after finishing with the object; otherwise the memory allocated for the object will be lost until the application terminates. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BaseImageList(Component): + '''Wrapper for Delphi TBaseImageList''' + __hash__: ClassVar[None] = ... + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + Count: int + '''int:''' + Owner: Any + '''Returns the Component Owner''' + + def BeforeDestruction(self, *args, **kwargs) -> Any: + '''Performs any necessary actions before the first destructor is called. + BeforeDestruction is called automatically immediately before the component's first destructor executes. Do not call it explicitly in your applications. + As implemented in TComponent, BeforeDestruction checks whether the Destroying method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place.''' + def BeginUpdate(self, *args, **kwargs) -> Any: ... + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def Change(self, *args, **kwargs) -> Any: ... + def EndUpdate(self, *args, **kwargs) -> Any: ... + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BaseLinkingBindSource(BaseBindScopeComponent): + ''' + =========================================== + Data.Bind.Components.TBaseLinkingBindSource + =========================================== + + Base class for the binding scope components that support linking. ``BaseLinkingBindScope`` derives directly from `BaseBindScopeComponent <Data.Bind.Components.TBaseBindScopeComponent.htm>`__, thus it inherits all functionality such as adding scope mappings, getting scope members and values, returning the scope itself or the scope of a member. It also provides properties for accessing the bindings expressions in this scope and the scope mappings. + + IMPORTANT: This class no have members + ''' + + __hash__: ClassVar[None] = ... + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + Owner: Any + '''Returns the Component Owner''' + + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BaseObjectBindSource(BaseLinkingBindSource, IScopeEditLink, IScopeRecordEnumerable, IScopeNavigator, IScopeState, IScopeEditor, IScopeMemberNames, IScopeCurrentRecord, IScopeActive, IScopeMemberScripting, IScopeGetRecord, IScopeLookup, IScopeNavigatorUpdates, IScopeLocate): + ''' + =========================================== + Data.Bind.ObjectScope.TBaseObjectBindSource + =========================================== + + Is a bind source that supports adapters to connect to different types of data. + + The ``BaseObjectBindSource`` class implements a bind source that supports adapters to connect to different types of data. The adapter can be provided by setting a property (`InternalAdapter <Data.Bind.ObjectScope.TBaseObjectBindSource.InternalAdapter.htm>`__) or by implementing the `OnCreateAdapter <Data.Bind.ObjectScope.TBaseObjectBindSource.OnCreateAdapter.htm>`__ event. + ''' + + __hash__: ClassVar[None] = ... + Eof: bool + ''' + Indicates whether the bind source adapter is positioned in the last record. + + Read ``EOF`` (end of file) to determine if `ItemIndex <Data.Bind.ObjectScope.TBaseObjectBindSource.ItemIndex.htm>`__ is located in the last record. If ``EOF`` is ``True``, the bind source has an adapter and the active record is the last one or there are no records. ``EOF`` is ``False`` if the `ItemIndex <Data.Bind.ObjectScope.TBaseObjectBindSource.ItemIndex.htm>`__ is located in any other position. + ''' + BOF: bool + ''' + Indicates whether the bind source adapter is positioned in the first record. + + Read ``BOF`` (beginning of file) to determine if `ItemIndex <Data.Bind.ObjectScope.TBaseObjectBindSource.ItemIndex.htm>`__ is located in the first record. If ``BOF`` is ``True``, the bind source has an adapter and the active record is the first one. ``BOF`` is also ``True`` if there is no active record. ``BOF`` is ``False`` in all other cases. + ''' + CanModify: bool + ''' + Specifies whether the bind source has permission to modify the data. + + Check ``CanModify`` to determine if data can be edited. When ``CanModify`` is set to ``True``, the bind source can edit the data. When ``CanModify`` is set to ``False``, the bind source cannot edit the data. + ''' + Active: bool + ''' + Specifies whether the bind source adapter is active. + + Read ``Active`` to determine whether the bind source adapter is active. By default, the ``Active`` property is set to ``True``. + + When ``Active`` is ``False``, the bind source does not have an adapter or its adapter is not active. When ``Active`` is ``True``, the bind source has an active adapter. + ''' + AutoActivate: bool + ''' + Specifies whether the bind source is automatically activated. Set ``AutoActive`` to ``True`` for automatic activation. + ''' + ItemIndex: int + ''' + Specifies the ``Index`` of the current record. + + ``ItemIndex`` holds the ``Index`` of the current record of the dataset the bind source adapter is currently on. The first item has the ``Index`` ``'0'``, the second item has the ``Index`` ``'1'``, and so on. If no item is selected, the value of ``ItemIndex`` is ``-1``. + ''' + Editing: bool + ''' + Indicates whether the data is in edit mode. + + Read ``Editing`` to determine whether the bind source adapter can currently edit the data. If the ``Editing`` property is ``True``, the data provided by the bind source adapter is in editing mode. Otherwise, it is ``False``. + ''' + Members: list[Object] + ''' + Returns the field of a given member name. + + The ``Members`` property uses the `GetMember <Data.Bind.ObjectScope.TBaseObjectBindSource.GetMember.htm>`__ method that returns the field for a given member name. + ''' + InternalAdapter: BindSourceAdapter + ''' + Returns the internal adapter of the bind source. + + The ``InternalAdapter`` property holds the internal adapter of the bind source. ``InternalAdapter`` uses the `GetInternalAdapter <Data.Bind.ObjectScope.TBaseObjectBindSource.GetInternalAdapter.htm>`__ method to return the internal adapter of the bind source. + + .. note:: The `GetInternalAdapter <Data.Bind.ObjectScope.TBaseObjectBindSource.GetInternalAdapter.htm>`__ method always returns ``nil``. Descendant classes must override this method to return the internal adapter. + ''' + + def UpdateAdapterChanged(self) -> None: + ''' + No have docs. + ''' + def UpdateAdapterChanging(self) -> None: + ''' + No have docs. + ''' + def SetInternalAdapter(self, Value: BindSourceAdapter, AAssignProc: Proc[BindSourceAdapter]) -> None: + ''' + No have docs. + ''' + def CheckRuntimeAdapter(self) -> bool: + ''' + No have docs. + ''' + def GetRuntimeAdapter(self) -> BindSourceAdapter: + ''' + No have docs. + ''' + def ConnectAdapter(self, AAdapter: BindSourceAdapter) -> None: + ''' + No have docs. + ''' + def DisconnectAdapter(self, AAdapter: BindSourceAdapter) -> None: + ''' + No have docs. + ''' + def DoMemberRenamed(self, CurName: str, PrevName: str) -> None: + ''' + No have docs. + ''' + def DoMemberRenaming(self, CurName: str, NewName: str) -> None: + ''' + No have docs. + ''' + def OnAdapterUpdateState(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def OnAdapterDataSetChanged(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def OnAdapterDataSetScrolled(self, Sender: Object, ADistance: int) -> None: + ''' + No have docs. + ''' + def OnAdapterEdit(self, Sender: Object, Allow: bool) -> None: + ''' + No have docs. + ''' + def OnAdapterEditingChanged(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def OnAdapterLayoutChanged(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def OnAdapterUpdateRecord(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def OnAdapterRecordChanged(self, Sender: Object, AField: BindSourceAdapterField) -> None: + ''' + No have docs. + ''' + def SetActive(self, Value: bool) -> None: + ''' + No have docs. + ''' + def CheckAdapter(self) -> bool: + ''' + No have docs. + ''' + def GetInternalAdapter(self) -> BindSourceAdapter: + ''' + No have docs. + ''' + def SetRuntimeAdapter(self, AAdapter: BindSourceAdapter) -> None: + ''' + No have docs. + ''' + def GetValue(self) -> Object: + ''' + No have docs. + ''' + def GetMember(self, AMemberName: str) -> Object: + ''' + Returns the member for the given member name. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.GetMember`` inherits from `Data.Bind.Components.TBaseBindScopeComponent.GetMember <Data.Bind.Components.TBaseBindScopeComponent.GetMember.htm>`__. All content below this line refers to `Data.Bind.Components.TBaseBindScopeComponent.GetMember <Data.Bind.Components.TBaseBindScopeComponent.GetMember.htm>`__. + + The `GetMember <Data.Bind.Components.TBaseBindScopeComponent.GetMember.htm>`__ method returns the scope member, as a `Object <System.TObject.htm>`__, for the member name given through the ``AMemberName`` parameter. This member is later used in the generated bindings expressions. + + .. tip:: This member object or its properties may be referenced by bindings expressions. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Forwards notification messages to all owned components. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.Loaded`` inherits from `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. All content below this line refers to `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. + + Do not call the protected `Loaded <System.Classes.TComponent.Loaded.htm>`__ method. The streaming system calls this method after it loads the component's form from a *Stream*. + + When the streaming system loads a form or data module from its form file, it first constructs the ``Form`` component by calling its constructor, then reads its property values from the ``Form`` file. After reading all the property values for all the components, the streaming system calls the `Loaded <System.Classes.TComponent.Loaded.htm>`__ methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time `Loaded <System.Classes.TComponent.Loaded.htm>`__ is called. `Loaded <System.Classes.TComponent.Loaded.htm>`__ is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, `Loaded <System.Classes.TComponent.Loaded.htm>`__ clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: `Loaded <System.Classes.TComponent.Loaded.htm>`__ may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden `Loaded <System.Classes.TComponent.Loaded.htm>`__ method without first checking that the memory has not been allocated in a previous call. + ''' + def AddExpression(self, AExpression: BasicBindComponent) -> None: + ''' + Adds the given bind component to the `Expressions <Data.Bind.Components.TBaseBindScopeComponent.Expressions.htm>`__ list. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.AddExpression`` inherits from `Data.Bind.Components.TBaseBindScopeComponent.AddExpression <Data.Bind.Components.TBaseBindScopeComponent.AddExpression.htm>`__. All content below this line refers to `Data.Bind.Components.TBaseBindScopeComponent.AddExpression <Data.Bind.Components.TBaseBindScopeComponent.AddExpression.htm>`__. + + The binding component is given through the ``AExpression`` parameter. + ''' + def RemoveExpression(self, AExpression: BasicBindComponent) -> None: + ''' + Removes the given binding component from the `Expressions <Data.Bind.Components.TBaseBindScopeComponent.Expressions.htm>`__ list. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.RemoveExpression`` inherits from `Data.Bind.Components.TBaseBindScopeComponent.RemoveExpression <Data.Bind.Components.TBaseBindScopeComponent.RemoveExpression.htm>`__. All content below this line refers to `Data.Bind.Components.TBaseBindScopeComponent.RemoveExpression <Data.Bind.Components.TBaseBindScopeComponent.RemoveExpression.htm>`__. + + The binding component to be removed is given through the ``AExpression`` parameter. + ''' + def Edit(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def GetIsEditing(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def SetModified(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def GetIsModified(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def GetCanModify(self, ABindComp: BasicBindComponent) -> bool: + ''' + No have docs. + ''' + def UpdateRecord(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def Reset(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def SetField(self, ABindComp: BasicBindComponent, FieldName: str) -> None: + ''' + No have docs. + ''' + def SetReadOnly(self, ABindComp: BasicBindComponent, Value: bool) -> None: + ''' + No have docs. + ''' + def ClearModified(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def PosChanging(self, ABindComp: BasicBindComponent) -> None: + ''' + No have docs. + ''' + def GetEnumerator(self, AMemberName: str, ABufferCount: int) -> IScopeRecordEnumerator: + ''' + Returns a ``Component`` enumerator. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.GetEnumerator`` inherits from `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. All content below this line refers to `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. + + `GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__ returns a `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ reference, which enumerates the components contained within a specified containing component. To process all these subcomponents, call the `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ `GetCurrent <System.Classes.TComponentEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TComponentEnumerator.MoveNext.htm>`__ do loop. + ''' + def GetBOF(self) -> bool: + ''' + No have docs. + ''' + def GetEOF(self) -> bool: + ''' + No have docs. + ''' + def GetSelected(self) -> bool: + ''' + No have docs. + ''' + def GetActive(self) -> bool: + ''' + No have docs. + ''' + def GetCanModify(self) -> bool: + ''' + No have docs. + ''' + def GetCanInsert(self) -> bool: + ''' + No have docs. + ''' + def GetEditing(self) -> bool: + ''' + No have docs. + ''' + def GetCanRefresh(self) -> bool: + ''' + No have docs. + ''' + def AddActiveChanged(self, LNotify: NotifyEvent) -> None: + ''' + No have docs. + ''' + def RemoveActiveChanged(self, LNotify: NotifyEvent) -> None: + ''' + No have docs. + ''' + def AddEditingChanged(self, LNotify: NotifyEvent) -> None: + ''' + No have docs. + ''' + def RemoveEditingChanged(self, LNotify: NotifyEvent) -> None: + ''' + No have docs. + ''' + def AddDataSetScrolled(self, LNotify: NotifyDistanceEvent) -> None: + ''' + No have docs. + ''' + def RemoveDataSetScrolled(self, LNotify: NotifyDistanceEvent) -> None: + ''' + No have docs. + ''' + def AddDataSetChanged(self, LNotify: NotifyEvent) -> None: + ''' + No have docs. + ''' + def RemoveDataSetChanged(self, LNotify: NotifyEvent) -> None: + ''' + No have docs. + ''' + def GetMemberNames(self, AList: Strings) -> None: + ''' + No have docs. + ''' + def GetCurrentRecord(self, AMemberName: str) -> IScope: + ''' + No have docs. + ''' + def GetMemberGetter(self, AMemberName: str, AGetter: str) -> bool: + ''' + No have docs. + ''' + def GetMemberSetter(self, AMemberName: str, ASetter: str) -> bool: + ''' + No have docs. + ''' + def GetMemberType(self, AMemberName: str, AType: ScopeMemberType) -> bool: + ''' + No have docs. + ''' + def GetPositionGetter(self, AGetter: str, ABase: int) -> bool: + ''' + No have docs. + ''' + def GetPositionSetter(self, ASetter: str, ABase: int) -> bool: + ''' + No have docs. + ''' + def GetRecord(self, ARow: int, AMemberName: str, ACallback: Proc[IScope]) -> None: + ''' + No have docs. + ''' + def DoCreateAdapter(self, ADataObject: BindSourceAdapter) -> None: + ''' + No have docs. + ''' + def GetLookupMemberNames(self, AList: Strings) -> None: + ''' + No have docs. + ''' + def GetCanApplyUpdates(self) -> bool: + ''' + No have docs. + ''' + def GetCanCancelUpdates(self) -> bool: + ''' + No have docs. + ''' + def Locate(self, KeyFields: str, KeyValues: Value) -> bool: + ''' + No have docs. + ''' + def Lookup(self, KeyFields: str, KeyValues: Value, ResultFields: str) -> Value: + ''' + No have docs. + ''' + def ApplyUpdates(self) -> None: + ''' + No have docs. + ''' + def CancelUpdates(self) -> None: + ''' + No have docs. + ''' + def Next(self) -> None: + ''' + No have docs. + ''' + def Prior(self) -> None: + ''' + No have docs. + ''' + def First(self) -> None: + ''' + No have docs. + ''' + def Last(self) -> None: + ''' + No have docs. + ''' + def Insert(self) -> None: + ''' + No have docs. + ''' + def Delete(self) -> None: + ''' + No have docs. + ''' + def Cancel(self) -> None: + ''' + No have docs. + ''' + def Post(self) -> None: + ''' + No have docs. + ''' + def Edit(self) -> None: + ''' + No have docs. + ''' + def Refresh(self) -> None: + ''' + No have docs. + ''' + def IsValidChar(self, AFieldName: str, AChar: str) -> bool: + ''' + No have docs. + ''' + def IsRequired(self, AFieldName: str) -> bool: + ''' + No have docs. + ''' + def GetFormatLink(self, AFieldName: str) -> IEditFormatLink: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Allocates memory and constructs a safely initialized instance of a component. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.Create`` inherits from `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. All content below this line refers to `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. + + All objects have a `Create <System.Classes.TComponent.Create.htm>`__ method that constructs the object. `Component <System.Classes.TComponent.htm>`__ redefines `Create <System.Classes.TComponent.Create.htm>`__ so that, for components, `Create <System.Classes.TComponent.Create.htm>`__ also: + + - Establishes the relationship of a component and its `Owner <System.Classes.TComponent.Owner.htm>`__, as indicated by the ``AOwner`` parameter. + + - Sets the `ComponentStyle <System.Classes.TComponent.ComponentStyle.htm>`__ property to `csInheritable <System.Classes.TComponentStyle.htm>`__, meaning that the component can be inherited by a descendent form type. + + It is not necessary to explicitly create components added in the *Form Designer*. These components are created automatically when the application is run, and they are destroyed when the application is closed. + + For components created programmatically, that is, not created in the *Form Designer*, call `Create <System.Classes.TComponent.Create.htm>`__ and pass in an owner component as the ``AOwner`` parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use ``Free()`` when it needs to be destroyed. + + .. tip:: When passing in ``Self`` as the `Owner <System.Classes.TComponent.Owner.htm>`__ parameter, consider what ``Self`` references. If a component creates another component in one of its methods, then ``Self`` refers to the first component and not the component being created, which is then owned by the first component. + + .. note:: The `Component <System.Classes.TComponent.htm>`__ constructor is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the *Form Designer*. Do not forget to use the override directive when declaring a new component's `Create <System.Classes.TComponent.Create.htm>`__ constructor. + ''' + def Destroy(self) -> None: + ''' + Disposes of the component and its owned components. + + ``Data.Bind.ObjectScope.TBaseObjectBindSource.Destroy`` inherits from `System.Classes.TComponent.Destroy <System.Classes.TComponent.Destroy.htm>`__. All content below this line refers to `System.Classes.TComponent.Destroy <System.Classes.TComponent.Destroy.htm>`__. + + Disposes of the component and its owned components. + + Do not call `Destroy <System.Classes.TComponent.Destroy.htm>`__ directly. Call ``Free()`` instead. ``Free()`` verifies that the component is not ``nil``, and only then calls `Destroy <System.Classes.TComponent.Destroy.htm>`__. + + Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains. To destroy a form, call its ``Release()`` method. ``Release()`` waits for all the ``Form``\ s. event handlers and the event handlers of the ``Form``\ s. components to finish executing before destroying the ``Form``. + + .. note:: A form owns all the controls and nonvisual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well. By default, all forms are owned by the global ``Application`` object. When an application terminates, it frees the global ``Application`` object, which frees all forms. For objects that are not components, and for components created with a nil owner, be sure to call ``Free()`` after finishing with the object; otherwise the memory allocated for the object will be lost until the application terminates. + ''' + + def OnCreateAdapter(self, Sender: Object, ABindSourceAdapter: BindSourceAdapter) -> None: + ''' + # OnCreateAdapter: CreateAdapterEvent + + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BasicAction(Component): + ''' + =========================== + System.Classes.TBasicAction + =========================== + + ``BasicAction`` is the ancestor class for all ``Action`` objects. + + ``BasicAction`` introduces the fundamental behavior for an action. Descendants of ``BasicAction`` add functionality for containment in an ``ActionList``, for being categorized, and for specializing their behavior tailored to particular clients such as controls or ``MenuItems``. Use ``BasicAction`` if you want to create an action for an object that is neither a ``MenuItem`` nor a control. + ''' + + __hash__: ClassVar[None] = ... + ClientCount: int + ''' + Stores the number of elements in the `Clients <System.Classes.TBasicAction.Clients.htm>`__ list of ``ActionLink``\ s associated with the ``Action``. + ''' + Clients: list[BasicActionLink] + ''' + Specifies the list of ``ActionLink``\ s associated with the ``Action``. + + The ``Clients`` property provides the ordered list of ``ActionLink``\ s associated with the ``Action``. Elements of the list are accessible by the zero-based ``Index``. ``Action`` links specify the clients linked with the ``Action``. `ClientCount <System.Classes.TBasicAction.ClientCount.htm>`__ stores the number of elements in the list. + ''' + ActionComponent: Component + ''' + Stores the client component that caused this action to execute. + + Use ``ActionComponent`` to discern which client component caused this action to execute. For example, examine ``ActionComponent`` from an `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler if you need to know what user action triggered this action. + + When the user clicks a client control, that client sets ``ActionComponent`` before calling the ``Action``\ s. `Execute <System.Classes.TBasicAction.Execute.htm>`__ method. After the ``Action`` executes, the ``Action`` resets ``ActionComponent`` to ``nil`` (Delphi) or ``NULL`` (C++). + ''' + + def Change(self) -> None: + ''' + Generates an `OnChange <System.Classes.TBasicAction.OnChange.htm>`__ event. + + ``Change()`` is called automatically when the ``Action``\ s. properties change. This method calls the `OnChange <System.Classes.TBasicAction.OnChange.htm>`__ event handler, if one is assigned. + ''' + def SetOnExecute(self, Value: NotifyEvent) -> None: + ''' + Assigns an `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler for the ``Action`` and for all clients. + + ``SetOnExecute()`` is the property write method for the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event. + + In addition to assigning the specified ``Value`` event handler to the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event, ``SetOnExecute()`` propagates the assignment of this event handler to all clients linked to the ``Action`` and generates an `OnChange <System.Classes.TBasicAction.OnChange.htm>`__ event. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds when components are created or destroyed. + + Do not call the ``Notification()`` method in an application. ``Notification()`` is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. + + `BasicAction <System.Classes.TBasicAction.htm>`__ overrides the `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__ method. ``Notification()`` checks whether the component specified by ``AComponent`` is the same as the component stored in the `ActionComponent <System.Classes.TBasicAction.ActionComponent.htm>`__ property and whether it is about to be freed. If so, ``Notification()`` sets the `ActionComponent <System.Classes.TBasicAction.ActionComponent.htm>`__ property to ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def RegisterChanges(self, Value: BasicActionLink) -> None: + ''' + Associates the ``Action`` with an ``ActionLink``. + + ``RegisterChanges()`` is called when the ``Action`` and ``ActionLink`` are connected, for example, when a new ``ActionLink`` is set to an action. ``Value`` is the ``ActionLink`` with which the ``Action`` associates itself. The link is added to the ``Action``\ s. client list. + ''' + def UnRegisterChanges(self, Value: BasicActionLink) -> None: + ''' + Breaks the association between the ``Action`` and the ``ActionLink``. + + ``UnRegisterChanges()`` is called when the ``Action`` and the ``ActionLink`` should no longer be associated. ``UnRegisterChanges()`` is called, for example, in the `action destructor <System.Classes.TBasicAction.Destroy.htm>`__ or when the ``ActionLink`` is unassociated from the ``Action``. ``Value`` is the ``ActionLink`` with which the association is broken. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Instantiates and initializes a `BasicAction <System.Classes.TBasicAction.htm>`__ object. + + Applications do not need to instantiate `BasicAction <System.Classes.TBasicAction.htm>`__ directly. Actions are created automatically when you choose *New Action* in the `Action List editor <Action_List_editor.htm>`__. + + If you want to create an action at run time, you should call the ``Create()`` constructor of a *FireMonkey* action (`FMX.ActnList.TAction <FMX.ActnList.TAction.htm>`__) or VCL action (`Vcl.ActnList.TAction <Vcl.ActnList.TAction.htm>`__), or any of their subclasses. The ``Create()`` constructors assign a ``ActionList`` component to the ``ActionList`` property of the created action. + + ``Create()`` calls the inherited constructor and then creates a list of clients of the created action. + ''' + def Destroy(self) -> None: + ''' + Disposes of an instance of a `BasicAction <System.Classes.TBasicAction.htm>`__ object. + + You do not need to call the destructor for an action. An action is a component and is automatically destroyed by its owner, which was passed to the constructor when it is created. If you must destroy an action manually, call ``Free()`` instead, which safely invokes the destructor. + ''' + def Suspended(self) -> bool: + ''' + No have docs. + ''' + def HandlesTarget(self, Target: Object) -> bool: + ''' + Introduces an interface for verifying that the type and state of a target component or control are appropriate for the ``Action``. + + ``HandlesTarget`` does nothing in `BasicAction <System.Classes.TBasicAction.htm>`__. ``HandlesTarget`` was introduced in `BasicAction <System.Classes.TBasicAction.htm>`__ so that descendants can override it to check the type and state of a target. ``HandlesTarget`` can verify any information about a target that is relevant for the ``Action``. ``HandlesTarget()`` returns ``True`` if the target meets the specified criteria, ``False`` otherwise. + ''' + def UpdateTarget(self, Target: Object) -> None: + ''' + Introduces an interface for a method of notifying a client when the ``Action`` updates itself. + + ``UpdateTarget`` does nothing in `BasicAction <System.Classes.TBasicAction.htm>`__. ``UpdateTarget`` was introduced in `BasicAction <System.Classes.TBasicAction.htm>`__ so that descendants can override it to correspondingly update a target when the ``Action`` updates. + ''' + def ExecuteTarget(self, Target: Object) -> None: + ''' + Introduces an interface for invoking an action on a target client component or control. + + ``ExecuteTarget`` does nothing in `BasicAction <System.Classes.TBasicAction.htm>`__. ``ExecuteTarget`` was introduced in `BasicAction <System.Classes.TBasicAction.htm>`__ so that descendants can override it to initiate the ``Action`` on the target. For example, an edit action that performs copying might copy the contents of an ``Edit`` control to the clipboard. + ''' + def Execute(self) -> bool: + ''' + Generates an `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event. + + ``Execute()`` calls the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler, if one is assigned. ``Execute()`` returns ``True`` if an event handler is called, ``False`` otherwise. + ''' + def Update(self) -> bool: + ''' + Provides an opportunity to execute centralized code when an application is idle. + + ``Update()`` triggers the `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event handler. ``Update()`` returns ``True`` if an event handler was found, ``False`` otherwise. When the application is idle, the `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event occurs for every action. This provides an opportunity for applications to execute centralized code for enabling and disabling, checking and unchecking, and so on. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when one of the ``Action``\ s. properties changes. + + Applications cannot use the protected ``OnChange`` event. It is used internally to manage the relationship between the properties of the ``Action`` and the corresponding properties of the ``Action``\ s. clients. + + Component writers can use ``OnChange`` in descendent objects to respond when the ``Action``\ s. properties change. + ''' + def OnExecute(self, Sender: Object) -> None: + ''' + # OnExecute: NotifyEvent + Occurs when the execute event, of a client linked to the ``Action``, fires. + + Write an ``OnExecute`` event handler when you want to respond when the user triggers the client object's default event (typically an ``OnClick`` event). + + For most target clients, ``OnExecute`` is associated with the `OnClick <FMX.Controls.TControl.OnClick.htm>`__ event. The `Click <FMX.Controls.TControl.Click.htm>`__ method triggers the associated `Action <FMX.Types.TFmxObject.Action.htm>`__ if `EnableExecuteAction <FMX.Controls.TControl.EnableExecuteAction.htm>`__ is ``True`` and the `OnClick <FMX.Controls.TControl.OnClick.htm>`__ event handler is not assigned (or is equal to `Action.OnExecute <FMX.ActnList.TAction.OnExecute.htm>`__). + + ``OnExecute()`` is called in the `Execute <System.Classes.TBasicAction.Execute.htm>`__ method. + + ``OnExecute`` also occurs when the user types the shortcut (or one of the secondary shortcuts) associated with the ``Action`` or its client. + + .. warning:: If you assign an ``OnExecute`` event handler to a predefined action, the default behavior of that action will not occur. + ''' + def OnUpdate(self, Sender: Object) -> None: + ''' + # OnUpdate: NotifyEvent + Occurs when the application is idle or when the ``ActionList`` updates. + + Write an ``OnUpdate`` event handler to execute centralized code while an application is idle. For example, actions may want to update enabling and disabling, or checking and unchecking of client targets. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BasicBindComponent(Component): + ''' + ======================================== + Data.Bind.Components.TBasicBindComponent + ======================================== + + Base class for all contained binding components descending from it. All binding components eventually have ``BasicBindComponent`` as ancestor. + ''' + __hash__: ClassVar[None] = ... + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + Owner: Any + '''Returns the Component Owner''' + + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Bevel(GraphicControl): + ''' + =================== + Vcl.ExtCtrls.TBevel + =================== + + ``Bevel`` represents a beveled outline. + + Use ``Bevel`` to create beveled boxes, frames, or lines. The bevel can appear raised or lowered. + + + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the top, bottom, left, or right of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum width and height of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + Shape: BevelShape + ''' + Determines the shape of the bevel. + + Set ``Shape`` to specify whether the bevel appears as a *Line*, *Box*, *Frame*, or *Space*. For shapes that can appear either raised or lowered, the ``Style`` property indicates which effect is used. + + The default value for ``Shape`` is ``bsBox``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Style: BevelStyle + ''' + Determines whether the bevel appears raised or lowered. + + Set ``Style`` to indicate whether the bevel should create a raised or a lowered effect. When the ``Shape`` property is ``bsBox``, the entire client area appears raised or lowered. For all other values of ``Shape``, the bevel displays a raised or lowered line along the edge or edges of the client area. The default value of ``Style`` is ``bsLowered``. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def Paint(self) -> None: + ''' + Renders the control's surface. + + The `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method is called automatically when a lightweight control needs to update its display area. Code in the `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method uses the `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property to render the control surface. + + As implemented in `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__, `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ does nothing. Specific rendering logic is provided by `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ methods in descendent control classes. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `Bevel <Vcl.ExtCtrls.TBevel.htm>`__. + + Call ``Create()`` to instantiate a bevel at runtime. Bevels placed on forms at design time are created automatically. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BindComponentDelegate(ContainedBindComponent): + '''' + =========================================== + Data.Bind.Components.TBindComponentDelegate + =========================================== + + Is a binding component that wraps one or more other binding components. + ''' + + __hash__: ClassVar[None] = ... + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + OnActivated: Callable[[Object],None] + '''Callable[[Object], None]:''' + OnActivating: Callable[[Object],None] + '''Callable[[Object], None]:''' + OnAssignedValue: Callable[[Object,BindingAssignValueRec,Value],None] + '''Callable[[Object, BindingAssignValueRec, Value], None]:''' + OnAssigningValue: Callable[[Object,BindingAssignValueRec,Value,bool],None] + '''Callable[[Object, BindingAssignValueRec, Value, bool], None]:''' + OnEvalError: Callable[[Object,Exception],None] + '''Callable[[Object, Exception], None]:''' + Owner: Any + '''Returns the Component Owner''' + + def Reactivate(self) -> None: + ''' + No have docs. + ''' + def GetActive(self) -> bool: + ''' + No have docs. + ''' + def GenerateExpressions(self, Sender: Component) -> None: + ''' + Automatically generates the bindings expressions for the quick binding component this delegate wraps onto. For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the ``Quick Binding Components Reference`` section. + ''' + def ClearGeneratedExpressions(self, Sender: Component) -> None: + ''' + Clears all the generated bindings expressions, at once, for the quick binding component this delegate wraps onto. For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + def Activated(self, Sender: Component) -> None: + ''' + Informs the wrapper binding component that a delegate (or contained) binding component has been activated. + ''' + def CanActivate(self, Sender: Component) -> bool: + ''' + Lets the wrapper binding component indicate whether a delegate (or contained) binding component may be activated. + + The ``CanActivate()`` method returns ``True`` if the delegate (or contained) binding component can be activated, ``False`` otherwise. + ''' + def RequiresControlHandler(self) -> bool: + ''' + Used internally for observing purposes. + ''' + def GetSourceScopes(self, Sender: Component, AScopes: list[IScope]) -> list[IScope]: + ''' + Returns an array of scopes for the source component. + ''' + def MemberRenaming(self, Sender: Component, AComponent: Component, ACurMemberName: str, ANewMemberName: str) -> None: + ''' + Used for renaming a member of this binding component. + + ``MemberRenaming`` is used for renaming component members. The old member name is given through the ``ACurMemberName`` parameter, while the new member name is given through the ``ANewMemberName`` parameter. + ''' + def GetUseEvalShortcuts(self) -> bool: + ''' + returns ``True`` if this binding component delegate supports `evaluation shortcuts <LiveBindings_in_RAD_Studio.htm#Using_Evaluation_Shortcuts>`__ or ``False`` otherwise. + + Subclasses of `BindComponentDelegate <Data.Bind.Components.TBindComponentDelegate.htm>`__ that support evaluation shortcuts must reimplement ``GetUseEvalShortcuts()`` to return ``True``. + ''' + def GetDelegates(self) -> list[CommonBindComponent]: + ''' + Gets the delegate (or contained) binding components that this wrapper binding component uses to execute expressions and respond to user input. + ''' + def OnAssigningValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value, Handled: bool) -> None: + ''' + # OnAssigningValue: BindCompAssigningValueEvent + Event that occurs as an expression is evaluated and is assigning to a value of an object member. Event handlers can intercede in the assignment operation. + ''' + def OnAssignedValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value) -> None: + ''' + # OnAssignedValue: BindCompAssignedValueEvent + Event that occurs after an expression has been evaluated and has assigned a value to an object member. + ''' + def OnEvalError(self, Sender: Object, AException: Exception) -> None: + ''' + # OnEvalError: BindCompEvalErrorEvent + Event that occurs when an exception is raised while evaluating an expression, such as a conversion error. Event handlers can intercede and raise a different exception. + ''' + def OnActivating(self, Sender: Object) -> None: + ''' + # OnActivating: NotifyEvent + Event that occurs when activating the binding expressions of this delegate wrapper. + ''' + def OnActivated(self, Sender: Object) -> None: + ''' + # OnActivated: NotifyEvent + Event that occurs when the binding expressions of this delegate wrapper have been activated. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BindingsList(CustomBindingsList): + ''' + ======================================== + Data.Bind.Components.TCustomBindingsList + ======================================== + + Implements the ``BindingsList`` component. ``BindingsList`` is built on the `CustomBindingsList <Data.Bind.Components.TCustomBindingsList.htm>`__ component and publishes additional properties that can be accessed from within the *Object Inspector*. + ''' + + __hash__: ClassVar[None] = ... + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + Methods: Methods + '''Methods: Specifies a list of available methods. For more information about these methods, read the LiveBindings Methods topic.''' + OutputConverters: OutputConverters + '''OutputConverters: Specifies a list of available output converters. For more information about output converters, read the LiveBindings Output Converters help topic.''' + Owner: Any + '''Returns the Component Owner''' + PromptDeleteUnused: bool + '''bool: Embarcadero Technologies does not currently have any additional information.''' + UseAppManager: bool + '''bool: Specifies whether the bindings list uses the global application manager for managed bindings.''' + Methods: Methods + ''' + Specifies a list of available methods. + + ``Data.Bind.Components.TBindingsList.Methods`` inherits from `Data.Bind.Components.TCustomBindingsList.Methods <Data.Bind.Components.TCustomBindingsList.Methods.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomBindingsList.Methods <Data.Bind.Components.TCustomBindingsList.Methods.htm>`__. + + For more information about these methods, read the `LiveBindings Methods <LiveBindings_Methods.htm>`__ topic. + ''' + OutputConverters: OutputConverters + ''' + Specifies a list of available output converters. + + ``Data.Bind.Components.TBindingsList.OutputConverters`` inherits from `Data.Bind.Components.TCustomBindingsList.OutputConverters <Data.Bind.Components.TCustomBindingsList.OutputConverters.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomBindingsList.OutputConverters <Data.Bind.Components.TCustomBindingsList.OutputConverters.htm>`__. + + For more information about output converters, read the `LiveBindings Output Converters <LiveBindings_Output_Converters.htm>`__ help topic. + ''' + UseAppManager: bool + ''' + Specifies whether the ``BindingsList`` uses the global application manager for managed bindings. + + ``Data.Bind.Components.TBindingsList.UseAppManager`` inherits from `Data.Bind.Components.TCustomBindingsList.UseAppManager <Data.Bind.Components.TCustomBindingsList.UseAppManager.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomBindingsList.UseAppManager <Data.Bind.Components.TCustomBindingsList.UseAppManager.htm>`__. + ''' + PromptDeleteUnused: bool + ''' + No have docs. + ''' + + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BitBtn(CustomButton): + ''' + =================== + Vcl.Buttons.TBitBtn + =================== + + ``BitBtn`` is a push button control that can include a bitmap on its face. + + ``Bitmap`` buttons exhibit the same behavior as button controls. Use them to initiate actions from forms and dialog boxes. + + ``Bitmap`` buttons implement properties that specify the bitmap images, along with their appearance and placement on the button. You can choose from predefined bitmap buttons styles or use your own customized bitmap for the button. Although the button can be associated with only one bitmap, the bitmap (``Glyph`` property') can be subdivided into four equal-sized portions, which are displayed based on the state of the button: ``up``, ``down``, ``disabled``, and ``clicked``. + + The ``Kind`` property of ``BitBtn`` provides commonly used buttons, such as *OK*, *Cancel*, *Help*, and so on. These predefined button types have corresponding graphical images and default behaviors, so you can easily add them to your application with little or no coding necessary. + + The recommended way to implement the response of other button kinds to user clicks is to assign an action from an ``ActionList`` as the value of the ``Action`` property. By setting the ``Action`` property, you make the button a client of the action, and the action handles updating the button's properties and responding when the user clicks the button. + + If you are not using the built-in response to a specific kind of button or an action to respond when the user clicks the button, then you can specify the button's response by writing an ``OnClick`` event handler. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Cancel: bool + ''' + Determines whether the button's ``OnClick`` event handler executes when the *Escape* key is pressed. + + If `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ is ``True``, the button's ``OnClick`` event handler executes when the user presses *Esc*. Although an application can have more than one `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ button, the ``Form`` calls the ``OnClick`` event handler only for the first ``Visible`` button in the tab order. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Default: bool + ''' + Determines whether the button's ``OnClick`` event handler executes when the *Enter* key is pressed. + + If `Default <Vcl.StdCtrls.TCustomButton.Default.htm>`__ is ``True``, the button's ``OnClick`` event handler executes when the user presses *Enter*. + + Although an application can have more than one `Default <Vcl.StdCtrls.TCustomButton.Default.htm>`__ button, the ``Form`` calls the ``OnClick`` event handler only for the first ``Visible`` button in the tab order. Moreover, any button that has focus becomes the `Default <Vcl.StdCtrls.TCustomButton.Default.htm>`__ button temporarily; hence, if the user selects another button before pressing *Enter*, the selected button's ``OnClick`` event handler executes instead. + ''' + DisabledImageIndex: ImageIndex + ''' + ``ImageIndex`` for disabled ``ButtonState``. + + `DisabledImageIndex <Vcl.StdCtrls.TCustomButton.DisabledImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the disabled ``ButtonState``. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + DisabledImageName: ImageName + ''' + The name of the image is used when the UI is disabled. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HotImageIndex: ImageIndex + ''' + ``ImageIndex`` for the hot ``ButtonState``. + + `HotImageIndex <Vcl.StdCtrls.TCustomButton.HotImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the hot ``ButtonState`` (for example, the cursor hovering over the button). If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + HotImageName: ImageName + ''' + The name of the image is used when the cursor hovers over the UI. + ''' + ImageIndex: int + ''' + ``ImageIndex`` for the normal ``ButtonState``. + + `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the normal ``ButtonState``. If the ``Index`` ``Value`` is -1, no image is used. + + In Vista or later *Windows* operating systems, a standard green arrow is used when the index is -1 and the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsCommandLink`` for a *Command Link* button. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + Images: CustomImageList + ''' + List of images for a ``Button``. + + `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ is a `CustomImageList <Vcl.ImgList.TCustomImageList.htm>`__ object listing the various images that can be placed on a ``Button``. + + The button's image depends on the ``ButtonState``. These images are determined by the value of the image state properties that index `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__: `DisabledImageIndex <Vcl.StdCtrls.TCustomButton.DisabledImageIndex.htm>`__, `HotImageIndex <Vcl.StdCtrls.TCustomButton.HotImageIndex.htm>`__, `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__, `PressedImageIndex <Vcl.StdCtrls.TCustomButton.PressedImageIndex.htm>`__, and `SelectedImageIndex <Vcl.StdCtrls.TCustomButton.SelectedImageIndex.htm>`__. When the `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__ index is -1, it generally means that no image is used for the normal state. For the other state ``ImageIndex``\ es, -1 means to use the same image as the normal state. + + The `ImageMargins <Vcl.StdCtrls.TCustomButton.ImageMargins.htm>`__ and `ImageAlignment <Vcl.StdCtrls.TCustomButton.ImageAlignment.htm>`__ properties orient the image inside the button. The image is not sized to fit the button, and the button is not stretched. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + Glyph: Bitmap + ''' + Specifies the bitmap that appears on the bitmap button. + + Use the ``OpenDialog`` box that appears as an editor in the *Object Inspector* to choose a bitmap file (with a ``.bmp`` extension) to use on the button, or specify a TBitmap object at runtime. + + You can provide up to four images within a single bitmap. All images must be the same size and next to each other in a row. Bit buttons display one of these images depending on their state. + + +--------------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Image_position** | **Button_state** | *``Description``* | + +====================+==================+================================================================================================================================================================================================================================================================+ + | First | Up | This image appears when the button is up (unselected). This image is also used when the button has focus (for example, if the user tabs to it); in this case, a focus rectangle is drawn around the button. If no other images exist in the bitmap, bit | + | | | buttons also use this image for all other states. | + +--------------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Second | Disabled | This image usually appears dimmed to indicate that the button can't be selected. | + +--------------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Third | Clicked | This image appears when the button is clicked. The Up image reappears when the user releases the mouse button. | + +--------------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Fourth | Down | This image appears when the button stays down (indicating that it remains selected). | + +--------------------+------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + If only one image is present, bit buttons attempt to represent the other states by altering the image slightly for the different states, although the *Down* state is always the same as the *Up* state. If you aren't satisfied with the results, you can provide additional images in the bitmap. + + If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the ``NumGlyphs`` property. + + .. note:: The lower left pixel of the bitmap is reserved for the "transparent" color. Any pixel in the bitmap which matches that lower left pixel will be transparent. + ''' + Kind: BitBtnKind + ''' + Specifies the kind of bitmap button. + + Use ``Kind`` to specify the appearance of the `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ control and its response when the user clicks the button. A standard set of buttons are included and operate as expected without the addition of code. However, you can write additional code in the button events, if you want to. This does not include the Custom button kind, which can be programmed in any way you like. + + The images (such as the green check mark on the *OK* button) appear on the button when using this version of `BitBtn <Vcl.Buttons.TBitBtn.htm>`__. + ''' + Layout: ButtonLayout + ''' + Specifies where the image appears on the bitmap button. + + ``Layout`` indicates whether the text appears on the *left* of the button (``blGlyphLeft``), the right of the button (``blGlyphRight``), the top (``blGlyphTop``) or the bottom (``blGlyphBottom``). + ''' + Margin: int + ''' + Specifies the number of pixels between the edge of the image (specified in the ``Glyph`` property') and the edge of the button. + + The margin is the space between the image edge and the button edge. the format of the edges depends on the layout of the image and text (specified in the ``Layout`` property). For example, if ``Layout`` is ``blGlyphLeft``, the margin appears between the left edge of the image and the left edge of the button. If ``Margin`` is 3, three pixels separate the image and the button edges. If ``Margin`` is 0, there is no space between the image and the button edges. + + If ``Margin`` is -1 (the default value), the image and text (specified in the ``Caption`` property) are centered. The number of pixels between the image and button edge is equal to the number of pixels between the opposite edge of the button and the text. + ''' + ModalResult: ModalResult + ''' + Determines whether and how the button closes its (modal) parent form. + + Setting the button component's `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property is an easy way to make clicking the button close a modal form. When a ``Button`` is clicked, the `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property of its parent form is set to the same value as the button's `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property. + + For example, if a dialog box has *OK* and `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ buttons, their `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ properties could be set at design time to ``mrOk`` and ``mrCancel``, respectively. At run time, clicking the *OK* button then changes the dialog's `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property to ``mrOk``, and clicking the `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ button changes the dialog's `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property to ``mrCancel``. Unless further processing is required, no ``OnClick`` event handlers are required for the buttons. + + Changes to ModalResult Values at XE2 Release + ============================================ + + The *XE2* release introduced three new `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ values: ``mrContinue``, ``mrHelp``, and ``mrTryAgain``. + + In addition, four of the existing `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ values changed at *XE2*. If your applications use any of the following four `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ values for ``Button``, you need to make code changes: ``mrClose``, ``mrAll``, ``mrNoToAll`` and ``mrYesToAll``. Since these values are stored as numbers in ``.dfm`` files, the values change when you migrate a project to *XE2*. The values have changed as follows: + + - Before *XE2*: + + - ``mrClose=11`` + - ``mrAll=8`` + - ``mrNoToAll=9`` + - ``mrYesToAll=10`` + + - In *XE2*: + + - ``mrClose=8`` + - ``mrAll=12`` + - ``mrNoToAll=13`` + - ``mrYesToAll=14`` + + The following table lists the constants of type `ModalResult <Vcl.Controls.TModalResult.htm>`__ that are defined for the `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property, along with their values in the *XE2* release and *XE* release (that is, any release before *XE2*): + + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | **Constant** | **Value** | **Meaning** | **Supported Releases** | + +===================+======================================+=======================================================+===========================+ + | ``mrNone`` | ``'0'`` | None ed as a default value before the user exits. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrOk`` | ``idOK = 1`` | The user exited with *OK* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrCancel`` | ``idCancel = 2`` | The user exited with the *CANCEL* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrAbort`` | ``idAbort = 3`` | The user exited with the *ABORT* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrRetry`` | ``idRetry = 4`` | The user exited with the *RETRY* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrIgnore`` | ``idIgnore = 5`` | The user exited with the *IGNORE* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrYes`` | ``idYes = 6`` | The user exited with the *YES* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrNo`` | ``idNo = 7`` | The user exited with the *NO* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrClose`` | ``idClose = 8`` | The user exited with the *CLOSE* button. | - In *XE = 11* | + | | | | - In *XE2 = 8* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrHelp`` | ``idHelp = 9`` | The user exited with the *HELP* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrTryAgain`` | ``idTryAgain = 10`` | The user exited with the *TRY AGAIN* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrContinue`` | ``idContinue = 11`` | The user exited with the *CONTINUE* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrAll`` | ``mrContinue + 1`` (12 or ``$C``) | The user exited with the *ALL* button. | - In *XE = 8* | + | | | | - In *XE2 = 12* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrNoToAll`` | ``mrAll +1`` (13 or ``$D``) | The user exited with the *NO TO ALL* button. | - In *XE = 9* | + | | | | - In *XE2 = 13* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrYesToAll`` | ``mrNoToAll +1`` or ``$E``) | The user exited with the *YES TO ALL* button. | - In *XE = 10* | + | | | | - In *XE2 = 14* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + + For complete information and solutions, see "XE2 values of ``mrAll``, ``mrNoToAll``, ``mrYesToAll`` and ``mrClose``" at ``http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:5029`` + ''' + NumGlyphs: NumGlyphs + ''' + Indicates the number of images that are in the graphic specified in the ``Glyph`` property'. + + If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the ``NumGlyphs`` property. The default ``Value`` is 1. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PressedImageIndex: ImageIndex + ''' + ``ImageIndex`` for the pressed ``ButtonState``. + + `PressedImageIndex <Vcl.StdCtrls.TCustomButton.PressedImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the pressed ``ButtonState``. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + PressedImageName: ImageName + ''' + The name of the image is used when pressing the UI. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + SelectedImageIndex: ImageIndex + ''' + ``ImageIndex`` for the selected ``ButtonState``. + + `SelectedImageIndex <Vcl.StdCtrls.TCustomButton.SelectedImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the selected ``ButtonState``. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + SelectedImageName: ImageName + ''' + The name of the image is used when selecting the UI. + ''' + Style: ButtonStyle + ''' + Determines the appearance of a bitmap button. + + ``Style`` indicates whether the `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ control uses the modern button look, or reflects the look of a 16-bit Windows pushbutton. + ''' + Spacing: int + ''' + Determines where the image and text appear on a bitmap or speed button. + + ``Spacing`` determines the number of pixels between the image (specified in the ``Glyph`` property') and the text (specified in the ``Caption`` property). The default ``Value`` is 4 pixels. + + If ``Spacing`` is a positive number, its ``Value`` is the number of pixels between the image and text. If ``Spacing`` is 0, no pixels will be between the image and text. If ``Spacing`` is -1, the text appears centered between the image and the button edge. The number of pixels between the image and text is equal to the number of pixels between the text and the button edge opposite the glyph. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the button ``Text`` wraps to fit the width of the control. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``True`` to allow the display of multiple lines of text. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``True``, text that is too wide for the control wraps at the right margin. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``False`` to limit the text to a single line. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``False``, text that is too wide for the control appears truncated. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Updates the button control to reflect changes in its associated action. + + `ActionChange <Vcl.StdCtrls.TButtonControl.ActionChange.htm>`__ is called automatically when the associated action changes. It updates the button control to reflect the action's current `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ state. Then it calls the inherited method, which checks the associated properties for that client type. + + The ``Sender`` parameter is the associated action. The ``CheckDefaults`` parameter specifies whether properties and event handlers should be changed if they differ from the default values. When ``CheckDefaults`` is ``True``, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When ``CheckDefaults`` is ``False``, properties and event handlers are changed, regardless of their current values. + ''' + def CopyImage(self, ImageList: CustomImageList, Index: int) -> None: + ''' + Copy any ``Graphic`` from a ``ImageList`` into the ``Glyph`` property' of a ``BitBtn``. + + ``CopyImage()`` can be used to display any ``Graphic`` on a ``BitBtn``. You can use any image that can be loaded into an ``ImageList`` using an `ImageList Editor <Image_List_Editor.htm>`__. + ''' + def CreateHandle(self) -> None: + ''' + Creates underlying screen object. + + `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__ creates the *Microsoft Windows* *Screen* object that underlies the control. if it does not already exist. The new window handle becomes the value of the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property. + + `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__ creates or locates the parent control's window before it creates a window for the control itself. + + .. note:: If the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property is ``nil`` (Delphi) or ``NULL`` (C++), `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__ raises an exception. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the appropriate ``ActionLink`` class that is associated with button controls. + + `GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__ is used to get the appropriate class type for the ``ActionLink`` used with button controls. `GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__ is used internally to create ``ActionLink`` objects for clients when a ``Button`` control has an associated action. The ``ActionLink`` is used to link the action to the button control client. Each ``Action`` link class type is designed to link specific actions to clients based upon the types of properties the client supports. For button controls, `GetActionLinkClass <Vcl.StdCtrls.TButtonControl.GetActionLinkClass.htm>`__ returns the `ButtonActionLink <Vcl.StdCtrls.TButtonActionLink.htm>`__ class type. + ''' + def GetPalette(self) -> HPALETTE: + ''' + Returns the handle to a palette for use by the control. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ returns a null handle, indicating that the control does not have a palette. Override `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ to implement derived objects that use a palette. Create a palette handle for the control by a call to the *Windows API* function ``CreatePalette``. `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ should return the palette handle for the control. + + Specifying the palette for a control tells the application that the control's palette needs to be realized and designates the palette to use for realization. + + `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ is called only if the run-time video mode requires color palette support, for example, in 256-color mode. + ''' + def SetButtonStyle(self, ADefault: bool) -> None: + ''' + Sets the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property for a ``Button``. + + The `SetButtonStyle <Vcl.StdCtrls.TCustomButton.SetButtonStyle.htm>`__ method is called to change the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property according to the button's state, whenever a ``Button`` changes its focus state. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def UpdateImageList(self) -> None: + ''' + Rebuilds the ``ImageList`` associated with the button. + + The `UpdateImageList <Vcl.StdCtrls.TCustomButton.UpdateImageList.htm>`__ method is called to update the ``ImageList`` associated with the button control. + ''' + def UpdateImages(self) -> None: + ''' + Updates the ``ImageList`` associated with the button. + + The `UpdateImages <Vcl.StdCtrls.TCustomButton.UpdateImages.htm>`__ method is called to add images to the ``ImageList`` associated with the button control. + ''' + def UpdateImage(self) -> None: + ''' + No have docs. + ''' + def SetImageList(self, AHandle: HIMAGELIST) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Constructs an instance of the button control and initializes its values. + + Use ``Create()`` to programmatically instantiate a ``Button``. Buttons added using the *Form Designer* are created automatically. + + The ``AOwner`` parameter specifies the component, typically a form, that is responsible for freeing the button. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the bitmap button object. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` checks that the bitmap button is not ``nil``, and only then calls ``Destroy()``. + ''' + def Click(self) -> None: + ''' + Simulates a mouse click, as if the user had clicked the button. + + Use ``Click()`` to simulate a mouse click. ``Click()`` performs the following tasks: + + - If the value of the ``Kind`` property is ``bkClose``, ``Click()`` closes the ``Form``. + - If the value of ``Kind`` is ``bkHelp``, ``Click()`` displays the ``Help`` screen assigned with the ``HelpContext()`` property. + - Any associated action fires, or, if there is no associated action, any code attached to the ``Click()`` event is executed. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Bitmap(Graphic): + ''' + ==================== + Vcl.Graphics.TBitmap + ==================== + + ``Bitmap`` is an encapsulation of a *Windows* bitmap (HBITMAP), including its palette (HPALETTE). + + A bitmap is a powerful graphics object used to create, manipulate and store images in memory and as files on a disk. + + ``Bitmap`` contains an internal image of the bitmap graphic and automatically manages realization of the palette when drawn. To draw a bitmap on a canvas, call the ``Draw()`` or ``StretchDraw()`` methods of a ``Canvas`` object, passing a ``Bitmap`` as a parameter. + + Creating copies of a ``Bitmap`` is very fast since the handle is copied rather than the image. If the image is modified and the handle is shared by more than one ``Bitmap`` object, the image is copied before the modification is performed (that is, copy on write). + ''' + + __hash__: ClassVar[None] = ... + FImage: BitmapImage + ''' + No have docs. + ''' + FAlphaFormat: AlphaFormat + ''' + No have docs. + ''' + Canvas: Canvas + ''' + Provides access to a drawing surface that represents the bitmap. + + ``Canvas`` allows drawing on the bitmap by providing a ``Canvas`` object for this purpose. Drawing on the canvas effectively modifies the underlying bitmap image pixels. Any canvas operation is valid on a bitmap (not just Draw and StretchDraw) including line drawing, rectangles, and circles. The ``Bitmap`` object is passed as a parameter to these methods. + + A ``Canvas`` object is created automatically for the bitmap and the property is read-only. + ''' + Handle: HBITMAP + ''' + Provides access to the *Windows GDI Bitmap* handle for accessing the *GDI* ``Bitmap`` object. + + Use ``Handle`` to call a *Windows API* function that requires the handle of a ``Bitmap`` object (``HBITMAP``). Pass ``Handle`` as the bitmap handle parameter to these functions. + + ``Handle`` is the ``HBITMAP`` encapsulated by the ``Bitmap`` object. Avoid grabbing the handle directly since it causes the ``HBITMAP`` to be copied if more than one `Bitmap <Vcl.Graphics.TBitmap.htm>`__ shares the handle. + + .. warning:: Be careful when giving the handle to an object or routine. If the receiver takes ownership (and destroys) the bitmap handle, call `ReleaseHandle <Vcl.Graphics.TBitmap.ReleaseHandle.htm>`__. + ''' + HandleType: BitmapHandleType + ''' + Indicates whether the bitmap is a *Device-Dependent Bitmap*, or a *Device-Independent Bitmap*. + + ``HandleType`` is used to find or modify the type of the bitmap. *Device-Dependent Bitmaps* (DDB) may be faster to draw on the *Screen*, but may be stored in memory in a *Device-Specific Format*. *Device-Independent Bitmaps* (DIB) are stored in memory in a standard format supported by all devices (including printers). + ''' + IgnorePalette: bool + ''' + Determines whether the bitmap realizes its palette when drawing its image. + + Use ``IgnorePalette`` when speed of drawing is a priority. When ``IgnorePalette`` is ``True``, the bitmap does not realize its palette when drawing itself, resulting in lower picture quality on 256-color video drivers, but faster drawing of the bitmap image. + ''' + MaskHandle: HBITMAP + ''' + Provides access to the *Windows GDI Bitmap* handle for accessing the *GDI* ``Bitmap`` object. + + Use ``MaskHandle`` to call a *Windows API* function that requires the handle of a ``Bitmap`` object. Pass ``MaskHandle`` as the bitmap handle parameter to these functions. ``MaskHandle`` is the ``HBITMAP`` encapsulated by the ``Bitmap`` object's mask. + ''' + Monochrome: bool + ''' + Determines whether the bitmap displays its image in monochrome. + + If ``Monochrome`` is ``True`` if the bitmap displays as a monochrome bitmap. ``Monochrome`` is ``False`` if the bitmap displays in color, that is, if it contains more than one bit per pixel. + ''' + PixelFormat: PixelFormat + ''' + Indicates the bit format of the bitmap image, specifying how the image is displayed and how the pixels of the bitmap image are stored in memory. + + Use ``PixelFormat`` to change a `Bitmap <Vcl.Graphics.TBitmap.htm>`__'s internal image to a particular memory format and color depth, or to find out what memory format and color depth a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ is using. The possible formats are specified in PixelFormat <Vcl.Graphics.TPixelFormat.htm>`__. + + For example, ``PixelFormat`` can be used to set the pixel format of the bitmap image to 8-bit for video drivers that cannot display the native format of a bitmap image. + + .. note:: The ``PixelFormat`` of a JPEG image object applies to the bitmap if the JPEG image is copied to it. + + Changing the pixel format is most commonly used with ScanLine, because your code must decode the pixel data accessed by ScanLine. Image-editing tools usually use one pixel for all internal image operations and copy the results to the *Screen* (in whatever format) as the last step. + ''' + TransparentColor: Color + ''' + An example of *TBitmap Color*, *TGraphic Transparent*, *TBitmap TransparentMode*, *TBitmap TransparentColor*, and *TCanvas Draw* + + .. code-block:: python + :caption: C++ + + #include <memory> //For STL auto_ptr class + + void __fastcall TForm1::Button1Click(TObject *Sender) + { + std::auto_ptr<Graphics::TBitmap> bitmap(new Graphics::TBitmap); + try + { + bitmap->LoadFromFile("..\\FACTORY.BMP "); + bitmap->Transparent = true; + bitmap->TransparentColor = bitmap->Canvas->Pixels[50][50]; + Form1->Canvas->Draw( 0, 0, bitmap.get()); + bitmap->TransparentMode = tmAuto; + Form1->Canvas->Draw(50, 50, bitmap.get()); + } + catch (...) + { + ShowMessage("Could not load or display bitmap"); + } + } + ''' + TransparentMode: TransparentMode + ''' + Determines whether the ``TransparentColor`` property's ``Value`` is automatically calculated or stored with the ``Bitmap`` object. + + When ``TransparentMode`` is set to ``tmAuto`` (the default), the ``TransparentColor`` property returns the color of the bottom-leftmost pixel of the bitmap image. When ``TransparentMode`` is set to ``tmFixed``, the ``TransparentColor`` property refers to the color stored in the ``Bitmap`` object. + ''' + ScanLine: list[IntPtr] + ''' + Provides indexed access to each line of pixels. + + ``ScanLine`` is used only with *DIB*s (*Device Independent Bitmaps*) for image editing tools that do *Low-Level Pixel* work. + ''' + ImageFormat: ImageFormat + ''' + No have docs. + ''' + AlphaFormat: AlphaFormat + ''' + Indicates how reserved byte of each pixel is used in 32 bit bitmaps. + + Use ``AlphaFormat`` to change the way a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ uses the reserved byte of each pixel in a 32bit Bitmap. + ''' + + def GetSupportsPartialTransparency(self) -> bool: + ''' + Indicate whether graphic supports partial transparency. + + ``Vcl.Graphics.TBitmap.GetSupportsPartialTransparency`` inherits from `Vcl.Graphics.TGraphic.GetSupportsPartialTransparency <Vcl.Graphics.TGraphic.GetSupportsPartialTransparency.htm>`__. All content below this line refers to `Vcl.Graphics.TGraphic.GetSupportsPartialTransparency <Vcl.Graphics.TGraphic.GetSupportsPartialTransparency.htm>`__. + + `GetSupportsPartialTransparency <Vcl.Graphics.TGraphic.GetSupportsPartialTransparency.htm>`__ indicates whether the graphic supports partial transparency. + + `Graphic <Vcl.Graphics.TGraphic.htm>`__ descendants should override `GetSupportsPartialTransparency <Vcl.Graphics.TGraphic.GetSupportsPartialTransparency.htm>`__ if they are capable of having partially transparent pixels. + ''' + def Change(self) -> None: + ''' + Called when graphic has changed. + + `Changed <Vcl.Graphics.TGraphic.Changed.htm>`__ is called automatically whenever the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object is modified. It sets the `Modified <Vcl.Graphics.TGraphic.Modified.htm>`__ property to ``True`` and triggers the `OnChange <Vcl.Graphics.TGraphic.OnChange.htm>`__ event. + ''' + def Draw(self, ACanvas: Canvas, Rect: Rect) -> None: + ''' + Render graphic onto canvas at rectangle. + + `Canvas <Vcl.Graphics.TCanvas.htm>`__. `Draw <Vcl.Graphics.TCanvas.Draw.htm>`__ calls this function to render the graphic onto its canvas at the coordinates specified by the ``Rect`` parameter. Descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ should override this function with a specific rendering implementation. + ''' + def DrawTransparent(self, ACanvas: Canvas, Rect: Rect, Opacity: Byte) -> None: + ''' + Render graphic onto canvas at rectangle, blending with canvas's background. + + `DrawTransparent <Vcl.Graphics.TGraphic.DrawTransparent.htm>`__ renders the graphic onto a canvas at the coordinates specified by the ``Rect`` parameter, blending it with the canvas's background. + ''' + def GetEmpty(self) -> bool: + ''' + Indicates whether graphics object contains graphic. + + `GetEmpty <Vcl.Graphics.TGraphic.GetEmpty.htm>`__ indicates whether the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object contains a graphic. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class should override the `GetEmpty <Vcl.Graphics.TGraphic.GetEmpty.htm>`__ method to indicate whether a given `Graphic <Vcl.Graphics.TGraphic.htm>`__ object is bound to an image. + ''' + def GetHeight(self) -> int: + ''' + Get vertical size of graphic in pixels. + + `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ gets the vertical size of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object in pixels. + + Each descendant of `Graphic <Vcl.Graphics.TGraphic.htm>`__ defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def GetPalette(self) -> HPALETTE: + ''' + Get color palette of graphical image. + + `GetPalette <Vcl.Graphics.TGraphic.GetPalette.htm>`__ gets the color palette of the graphical image. You can also use the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property to get the color palette of a graphical image. If the graphic does not need or use a palette, the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property is zero. + ''' + def GetWidth(self) -> int: + ''' + Get horizontal size of graphic in pixels. + + `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ gets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ and `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def HandleNeeded(self) -> None: + ''' + Create *GDI* bitmap for `Bitmap <Vcl.Graphics.TBitmap.htm>`__ if it doesn't already exist. + + ``HandleNeeded()`` creates a *GDI* bitmap for the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ if it doesn't already exist. + ''' + def MaskHandleNeeded(self) -> None: + ''' + Create *GDI* bitmap for `Bitmap <Vcl.Graphics.TBitmap.htm>`__'s mask if it doesn't already exist. + + ``MaskHandleNeeded()`` is called to create a *GDI* bitmap for the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object's mask if it doesn't already exist. + ''' + def PaletteNeeded(self) -> None: + ''' + Create color palette for `Bitmap <Vcl.Graphics.TBitmap.htm>`__'s mask if it doesn't already exist. + + ``PaletteNeeded()`` is called to create a color palette for the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object if it doesn't already exist. A palette is not created if `IgnorePalette <Vcl.Graphics.TBitmap.IgnorePalette.htm>`__ is ``True``. `IgnorePalette <Vcl.Graphics.TBitmap.IgnorePalette.htm>`__ is set to ``True`` if a palette can't be created. + ''' + def ReadData(self, Stream: Stream) -> None: + ''' + Read graphic data from `Stream <System.Classes.TStream.htm>`__. + + `ReadData <Vcl.Graphics.TGraphic.ReadData.htm>`__ is used to read the binary graphic from the virtual property ``Data`` (created by `DefineProperties <Vcl.Graphics.TGraphic.DefineProperties.htm>`__) when streaming in a `Graphic <Vcl.Graphics.TGraphic.htm>`__ from the `Stream <System.Classes.TStream.htm>`__ ``Stream``. + ''' + def SetHeight(self, Value: int) -> None: + ''' + Set vertical size of graphic in pixels. + + `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ sets the vertical size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def SetPalette(self, Value: HPALETTE) -> None: + ''' + Set color palette of graphical image. + + `SetPalette <Vcl.Graphics.TGraphic.SetPalette.htm>`__ sets the color palette of the graphical image. + + Use the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property to get the color palette of a graphical image. If the graphic does not need or does not use a palette, the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property is zero. + ''' + def SetWidth(self, Value: int) -> None: + ''' + Set color palette of graphical image. + + `SetPalette <Vcl.Graphics.TGraphic.SetPalette.htm>`__ sets the color palette of the graphical image. + + Use the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property to get the color palette of a graphical image. If the graphic does not need or does not use a palette, the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property is zero. + ''' + def WriteData(self, Stream: Stream) -> None: + ''' + Write graphic data to `Stream <System.Classes.TStream.htm>`__. + + `WriteData <Vcl.Graphics.TGraphic.WriteData.htm>`__ is used to write the binary graphic to the virtual property ``Data`` (created by `DefineProperties <Vcl.Graphics.TGraphic.DefineProperties.htm>`__) when streaming a `Graphic <Vcl.Graphics.TGraphic.htm>`__ out to the `Stream <System.Classes.TStream.htm>`__ ``Stream``. + ''' + @overload + def Create(self) -> None: + ''' + Instantiates a ``Bitmap`` object. + + Call ``Create()`` to instantiate a ``Bitmap`` object at runtime. ``Create()`` is also called automatically when a bitmap image is loaded into a ``Image``. + + ``Create()`` allocates memory for a ``Bitmap`` object, and calls the inherited ``Create()``. Then it creates a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ ``Image`` as the internal image that represents the bitmap. + ''' + @overload + def Create(self, AWidth: int, AHeight: int) -> None: ... + def Destroy(self) -> None: + ''' + Disposes of the instance of the ``Bitmap`` object. + + ``Destroy()`` is the destructor for a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. + + Do not call the destructor directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the ``Bitmap`` object is not ``nil`` before it calls ``Destroy()``. + + ``Destroy()`` releases the internal bitmap image (`TBitmap <Vcl.Graphics.TBitmap.htm>`__ ``Image`` object) and frees the canvas before calling the inherited destructor. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies a new bitmap image to the ``Bitmap`` object. + + ``Assign()`` copies the bitmap image contained in ``Source`` to the ``Bitmap`` object. If ``Source`` is not a bitmap, ``Assign()`` calls the inherited ``Assign()`` method, which can copy an image from any class that knows how to copy to a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. If the bitmap needs to be changed, the actual bitmap image is copied before the changes are made (copy on write). + + .. note:: An object of one type can always be assigned to another object of the same type. Also, the ``Source`` can be of type ``Picture`` if the ``Graphic`` property of the picture is a bitmap. + ''' + def Dormant(self) -> None: + ''' + Creates a memory bitmap image in order to release the bitmap handle, forcing the image into *DIB* format to save resources. + + Use ``Dormant`` to change the format of the bitmap in memory thereby reducing the amount of *GDI* resources used by the application. + + ``Dormant`` creates a bitmap image in memory using a memory stream object. This preserves the image so that the bitmap can then free the ``HBITMAP`` (accessed through the ``Handle`` property) that was assigned to it. + + *DIB* handles may use fewer *Win95 GDI* resources than *DDB*, but *DIBs* may also use more memory than *DDB*s, depending on the current video driver and mode. + ''' + def FreeImage(self) -> None: + ''' + Frees the cached file image stored in memory by the bitmap. + + Use ``FreeImage`` to reduce the memory requirements of an application when color depth and pixel format are not an issue. Freeing the image releases the memory allocated for the bitmap image when it was originally loaded to disk. Consequently, some of the original pixel format of the bitmap is lost (for example, if you changed its format to a DIB) as well as the color depth of the bitmap. + + When a bitmap is loaded into a bitmap object, the bitmap object creates an image of the loaded bitmap in memory. If the bitmap isn't changed, the memory image is used when saving the bitmap, to verify that the bitmap has not lost color depth or changed the pixel format. + ''' + def HandleAllocated(self) -> bool: + ''' + Indicates whether the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object has acquired a handle to the underlying *GDI* object. + + Use ``HandleAllocated()`` to determine whether the `Handle <Vcl.Graphics.TBitmap.Handle.htm>`__ property is set to an ``HBITMAP`` value. ``HandleAllocated()`` indicates whether the underlying *GDI* object has already been created. Use ``HandleAllocated()`` rather than reading the `Handle <Vcl.Graphics.TBitmap.Handle.htm>`__ property. When an application reads the `Handle <Vcl.Graphics.TBitmap.Handle.htm>`__ property, it automatically creates a bitmap and returns its handle if the underlying *GDI* object does not already exist. + ''' + def LoadFromClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETTE) -> None: + ''' + Loads a bitmap from the ``Clipboard`` into the bitmap object. + + ``LoadFromClipboardFormat()`` is called if the bitmap is registered with the ``Picture`` object using the `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method. + + ``LoadFromClipboardFormat()`` replaces the current image with the data pointed to by the ``AData`` parameter. The palette for the bitmap is specified by the ``APalette`` parameter. + + The following code snippet shows how to load a bitmap from the clipboard and use that picture to draw on the `canvas <Vcl.Graphics.TCanvas.htm>`__ of the ``Form``. + + .. note:: To load a bitmap into the clipboard, you can use the code snippet for the `SaveToClipboardFormat <Vcl.Graphics.TBitmap.SaveToClipboardFormat.htm>`__ method. + ''' + def CanLoadFromStream(self, Stream: Stream) -> bool: + ''' + No have docs. + ''' + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Loads the bitmap from a stream into the bitmap object. + + Use ``LoadFromStream()`` to load the bitmap image from a stream. The ``Stream`` parameter specifies the stream from which to read the bitmap image. For example, use ``LoadFromStream()()`` to load a bitmap image from a BLOB stream that reads from a graphic field in a dataset. + ''' + def Mask(self, TransparentColor: Color) -> None: + ''' + Converts the current bitmap image into a monochrome mask, replacing ``TransparentColor`` with white and every other color with black. + + Use ``Mask()`` to produce a monochrome mask bitmap based on a given transparent color. ``Mask`` produces the same image that `MaskHandle <Vcl.Graphics.TBitmap.MaskHandle.htm>`__ does, except that the resulting mask image replaces the image in the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object, so it only makes sense to call ``Mask()`` once. Use `MaskHandle <Vcl.Graphics.TBitmap.MaskHandle.htm>`__ when only a bitmap handle of the mask image is needed. + ''' + def ReleaseHandle(self) -> HBITMAP: + ''' + Returns the handle to the bitmap so that the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object no longer knows about the handle. + + Use ``ReleaseHandle()`` to disassociate the bitmap from the bitmap handle. Use it when you need to give a bitmap handle to a routine or object that will assume ownership (or destroy) the bitmap handle. + ''' + def ReleaseMaskHandle(self) -> HBITMAP: + ''' + Returns the handle to the bitmap's mask so that the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object no longer knows about the mask handle. + + Use ``ReleaseMaskHandle()`` to disassociate the bitmap object from the bitmap mask handle. + ''' + def ReleasePalette(self) -> HPALETTE: + ''' + Returns the handle to the bitmap's palette and disassociates the palette from the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. + + Use ``ReleasePalette()`` to disassociate the palette from the bitmap image. + ''' + def SaveToClipboardFormat(self, Format: int, Data: Handle, APalette: HPALETTE) -> None: + ''' + Creates a local copy of the bitmap in ``Clipboard`` format. + + Use ``SaveToClipboardFormat()`` to copy the bitmap to a ``Clipboard`` format. The bitmap's palette is returned in the ``APalette`` parameter, the format in the A``Format`` parameter, and a handle to the data in the ``AData`` parameter. Before the bitmap can be saved, an application must have registered the format with the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object using the `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method. + + The following code snippet shows how to save a bitmap to the clipboard. + + .. note:: To load a bitmap from the clipboard, you can use the code snippet for the `LoadFromClipboardFormat <Vcl.Graphics.TBitmap.LoadFromClipboardFormat.htm>`__ method. + + + .. code-block:: python + :caption: Delphi + + uses + Vcl.Clipbrd; + + procedure TForm1.Button1Click(self, Sender: Object); + var + MyFormat : int; + Bitmap : BitMap; + AData : Handle; + APalette : HPALETTE; + begin + Bitmap := TBitmap.Create; + try + Bitmap.LoadFromFile('C:\\Users\\Public\\Pictures\\Sample Pictures\\desert.bmp'); + Bitmap.SaveToClipBoardFormat(MyFormat, AData, APalette); + ClipBoard.SetAsHandle(MyFormat,AData); + finally + Bitmap.Free; + end; + end; + + + .. code-block:: python + :caption: C++ + + #include <Vcl.Clipbrd.hpp> + + void __fastcall TForm1::Button1Click(TObject *Sender){ + TClipboard* cb = Clipboard(); + unsigned short MyFormat; + TBitmap* Bitmap; + unsigned int AData; + HPALETTE APalette; + + Bitmap = new TBitmap(); + try{ + Bitmap->LoadFromFile("C:\\Users\\Public\\Pictures\\Sample Pictures\\desert.bmp"); + Bitmap->SaveToClipboardFormat(MyFormat, AData, APalette); + cb->SetAsHandle(MyFormat, AData); + } + __finally{ + delete Bitmap; + } + } + ''' + def SaveToStream(self, Stream: Stream) -> None: + ''' + Saves the bitmap to a stream. + + Use ``SaveToStream()`` to write the bitmap image to the stream specified by the ``Stream`` parameter. For example, specify a ``BlobStream`` object as the ``Stream`` parameter to save the bitmap image to a graphic field in a dataset. + ''' + def SetSize(self, AWidth: int, AHeight: int) -> None: + ''' + Specifies the size of the bitmap. + + Use the ``SetSize()`` method to set both the height and width of the bitmap. This results in better performance than setting the height and width separately. + ''' + def GetHashCode(self) -> int: + ''' + No have docs. + ''' + def LoadFromBitmap(self, Bitmap: Bitmap) -> None: + ''' + No have docs. + ''' + @overload + def LoadFromResourceName(self, ResName: str, BaseName: str, ResourceAssembly: Assembly, Culture: CultureInfo) -> None: + ''' + Loads a bitmap resource into the bitmap object. + + ``LoadFromResourceName`` loads the specified bitmap resource along with palette information from a module's executable file. + + ``Instance`` is the handle of the module that contains the resource. + + ``ResName`` is the name of the resource to load. + + .. note:: Use this routine to load bitmaps from RES files instead of the *LoadBitmap API*. ``LoadBitmap`` does not support 256-color images. + ''' + @overload + def LoadFromResourceName(self, ResName: str, BaseName: str, ResourceAssembly: Assembly, ResourceSet: Type, Culture: CultureInfo) -> None: ... + @overload + def LoadFromResourceName(self, ResName: str, AType: Type, Culture: CultureInfo) -> None: ... + @overload + def LoadFromResourceName(self, Instance: Handle, ResName: str) -> None: ... + def LoadFromResourceID(self, Instance: Handle, ResID: int) -> None: + ''' + Loads a bitmap from a resource into the bitmap object. + + Use ``LoadFromResourceID()`` to load a specified bitmap resource along with palette information from a module's executable file. + + ``Instance`` is the handle of the module that contains the resource. + + ``ResID`` is the resource ``ID`` for the bitmap. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BoundLabel(CustomLabel): + ''' + ======================== + Vcl.ExtCtrls.TBoundLabel + ======================== + + ``BoundLabel`` implements the ``Label`` of a ``LabeledEdit`` control. Unlike other label controls such as ``Label``, ``BoundLabel`` "belongs" to the ``LabeledEdit`` control (it is a subcomponent of the edit control). This means that the ``BoundLabel``\ s. ``Owner()`` is the edit control rather than the ``Form``, and the edit control is responsible for loading and saving the ``BoundLabel``. + + Use the properties of ``BoundLabel`` to specify how you want the ``LabeledEdit`` control's label to appear. For example, you can use the ``Caption`` property to specify the text that appears in the ``Label``. You can use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ and ``Layout`` properties to specify the placement of that caption within the ``Label``. + ''' + + __hash__: ClassVar[None] = ... + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Left: int + ''' + Specifies the horizontal coordinate of the left edge of a component relative to its parent. + + Use the `Left <Vcl.Controls.TControl.Left.htm>`__ property to determine where the left side of the control begins or to reposition the left side of the control. + + If the control is contained in another control, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the parent control. If the control is contained directly by the ``Form``, the property values are relative to the ``Form``. For forms, the value of the `Left <Vcl.Controls.TControl.Left.htm>`__ property is relative to the *Screen* in pixels. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowAccelChar: bool + ''' + Determines how an ampersand in the ``Label`` text is displayed. + + Set `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ to ``True`` to allow the ``Label`` to display an underlined accelerator key value. When `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``True``, any character preceded by an ampersand (``'&'``) appears underlined. If the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is set, the windowed control specified by the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property receives input focus when the user types that underlined character. To display an ampersand when `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``True``, use two ampersands (``'&&'``) to stand for the single ampersand that is displayed. + + Set `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ to ``False`` to display the ``Label`` ``Text`` with all ampersands appearing as ampersands. When `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``False``, the value of the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is not used. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Top: int + ''' + Specifies the ``'Y'`` coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. + + Use `Top <Vcl.Controls.TControl.Top.htm>`__ to locate the ``Top`` of the control or reposition the control to a different ``'Y'`` coordinate. The `Top <Vcl.Controls.TControl.Top.htm>`__ property, like the `Left <Vcl.Controls.TControl.Left.htm>`__ property, is the position of the control relative to its container. Thus, if a control is contained in a `Panel <Vcl.ExtCtrls.TPanel.htm>`__, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the panel. If the control is contained directly by the ``Form``, it is relative to the ``Form``. For forms, the value of the `Top <Vcl.Controls.TControl.Top.htm>`__ property is relative to the *Screen* in pixels. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether controls that sit below the ``Label`` on a form can be seen through the ``Label``. + + Set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``True`` to prevent the ``Label`` from obscuring other controls on the ``Form``. For example, if the ``Label`` is used to add text to a graphic, set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``True`` so that the ``Label`` does not stand out as a separate object. + + When `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``True``, the ``Label`` always displays in the background color, and any `Color <Vcl.Controls.TControl-Color.htm>`__ setting is ignored. Also, when `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``True``, writing text is slower than writing text when `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``False``. If the ``Label`` is not obscuring a complicated image, you might choose to optimize performance by doing both of the following things: + + - Set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``, and + - Set the `background color <Vcl.Controls.TControl-Color.htm>`__ of the ``Label`` to match the object beneath it. + ''' + Layout: TextLayout + ''' + Specifies the vertical placement of the text within the ``Label``. + + Set `Layout <Vcl.StdCtrls.TCustomLabel.Layout.htm>`__ to specify how the text of the ``Label`` is placed within the ``ClientRect`` of the ``Label`` control. `Layout <Vcl.StdCtrls.TCustomLabel.Layout.htm>`__ is the vertical analog to the `Alignment <Vcl.StdCtrls.TCustomLabel.Alignment.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the ``Label`` text wraps when it is too long for the width of the ``Label``. + + Set `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ to ``True`` to allow the ``Label`` to display multiple line of text. When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, text that is too wide for the ``Label`` control wraps at the right margin and continues in additional lines. + + Set `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ to ``False`` to limit the ``Label`` to a single line. When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, text that is too wide for the ``Label`` appears truncated. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` a new `BoundLabel <Vcl.ExtCtrls.TBoundLabel.htm>`__ object. + + Do not create instances of `BoundLabel <Vcl.ExtCtrls.TBoundLabel.htm>`__. ``BoundLabel``\ s are instantiated by the ``Label``ed ``Edit`` controls to which they belong. + + ``AOwner`` specifies the ``Label``ed ``Edit`` control that acts as the ``BoundLabel``\ s. ``Owner()``. + ''' + def AdjustBounds(self) -> None: + ''' + Resizes the ``Label`` when the text changes. + + When the text in the ``Label`` or the font changes, `AdjustBounds <Vcl.StdCtrls.TCustomLabel.AdjustBounds.htm>`__ is implicitly called. It redraws the text in the client area, and then resizes the ``Label`` if the `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ property is ``True``. + + When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, the width of the ``Label`` is fixed. If `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is also ``True``, changes to the text cause the ``Label`` to change in height. When `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is ``True`` and `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, the height of the ``Label`` is determined by the font, and changes to the text cause the ``Label`` to change in width. + + Override `AdjustBounds <Vcl.StdCtrls.TCustomLabel.AdjustBounds.htm>`__ to make additional adjustments when the text changes. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BufferedFileStream(FileStream): + '''TBufferedFileStream adds buffering support to TFileStream. + TBufferedFileStream optimizes multiple consecutive small reads or writes. However, TBufferedFileStream can be used as a drop-in replacement for TFileStream, enabling applications to read from and write to a file on a disk. + + Note: TBufferedFileStream will not give performance gain for random position reads or writes, or large reads or writes.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Create(self, AFileName: str, Mode: int, BufferSize: int) -> None: + ''' + Creates an instance of ``TBufferedFileStream``. Call Create to instantiate a file stream for reading from or writing to the named file. Specify the name of the file and the way the file should be opened as parameters. The Mode parameter indicates how the file is to be opened. The Mode parameter consists of an open mode and (possibly) a share mode or'ed together. The open mode must be one of the following values: + + - ``Value`` + - ``Meaning`` + - ``Declared In`` + - ``fmCreate`` + + Create a file with the given name. If a file with the given name exists, override the existing file and open it in write mode. + + - ``System.Classes`` + - ``fmOpenRead`` + + Open the file for reading only. + + - ``System.SysUtils`` + - ``fmOpenWrite`` + + Open the file for writing only. Writing to the file completely replaces the current contents. + + - ``System.SysUtils`` + - ``fmOpenReadWrite`` + + Open the file to modify the current contents rather than replace them. + + - ``System.SysUtils`` + + The share mode must be one of the following values: + + - ``Value`` + - ``Meaning`` + - ``Declared In`` + - ``fmShareCompat`` + + Sharing is compatible with the way FCBs are opened. + + - ``System.SysUtils`` + - ``fmShareExclusive`` + + Other applications cannot open the file for any reason. + + - ``System.SysUtils`` + - ``fmShareDenyWrite`` + + Other applications can open the file for reading but not for writing. + + - ``System.SysUtils`` + - ``fmShareDenyRead`` + + Other applications can open the file for writing but not for reading. + + - ``System.SysUtils`` + - ``fmShareDenyNone`` + + No attempt is made to prevent other applications from reading from or writing to the file. + + ``System.SysUtils`` + + + .. note:: On Windows, the Rights parameter is ignored. The ``BufferSize`` parameter determines the size of the buffer used to read from or write to the file. If the file cannot be opened, ``Create`` raises an exception. + Creates an instance of ``TBufferedFileStream``. Call Create to instantiate a file stream for reading from or writing to the named file. Specify the name of the file and the way the file should be opened as parameters. The ``Mode`` parameter indicates how the file is to be opened. The ``Mode`` parameter consists of an open mode and (possibly) a share mode or'ed together. The open mode must be one of the following values: + + - ``Value`` + - ``Meaning`` + - ``Declared In`` + - ``fmCreate`` + + Create a file with the given name. If a file with the given name exists, override the existing file and open it in write mode. + + - ``System.Classes`` + - ``fmOpenRead`` + + Open the file for reading only. + + - ``System.SysUtils`` + - ``fmOpenWrite`` + + Open the file for writing only. Writing to the file completely replaces the current contents. + + - ``System.SysUtils`` + - ``fmOpenReadWrite`` + + Open the file to modify the current contents rather than replace them. + + - ``System.SysUtils`` + + The share mode must be one of the following values: + + - ``Value`` + - ``Meaning`` + - ``Declared In`` + - ``fmShareCompat`` + + Sharing is compatible with the way FCBs are opened. + + - ``System.SysUtils`` + - ``fmShareExclusive`` + + Other applications cannot open the file for any reason. + + - ``System.SysUtils`` + - ``fmShareDenyWrite`` + + Other applications can open the file for reading but not for writing. + + - ``System.SysUtils`` + - ``fmShareDenyRead`` + + Other applications can open the file for writing but not for reading. + + - ``System.SysUtils`` + - ``fmShareDenyNone`` + + No attempt is made to prevent other applications from reading from or writing to the file. + + System.SysUtils + + .. note:: On Windows, the Rights parameter is ignored. The BufferSize parameter determines the size of the buffer used to read from or write to the file. If the file cannot be opened, Create raises an exception.''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys this instance of TBufferedFileStream.''' + def FlushBuffer(self, *args, **kwargs) -> Any: + '''Writes the buffered data that have not yet been written to the file. + When using a buffered file stream, call FlushBuffer to write to the file the data from the buffer that are still not written. + Once you call FlushBuffer, the buffer will remain empty until the next read or write operation.''' + def Free(self) -> Any: + '''Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''Returns True if Delphi Object is or inherits from ClassName''' + def Read(self, Buffer, Count: int) -> int: + '''Reads up to Count bytes of data from the resource associated with the handle stream into Buffer. + System.Classes.TBufferedFileStream.Read inherits from System.Classes.THandleStream.Read. All content below this line refers to System.Classes.THandleStream.Read. + Reads up to Count bytes of data from the resource associated with the handle stream into Buffer. + Use Read to read data from the resource associated with the handle stream when the number of bytes in the file is not known. Read transfers up to Count bytes from the resource, starting at the current position, and then advances the current position in the resource by the number of bytes actually transferred. Read returns the number of bytes actually transferred, which may be less than Count if the end of file marker is encountered. + All other data-reading methods of a handle stream (ReadBuffer, ReadComponent) call Read to do the actual reading.''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def Seek(self, Offset: int, Origin: SeekOrigin) -> int: + '''TBufferedFileStream.Seek(Offset: int, Origin: SeekOrigin) -> int + Resets the current position of the handle stream. + System.Classes.TBufferedFileStream.Seek inherits from System.Classes.THandleStream.Seek. All content below this line refers to System.Classes.THandleStream.Seek. + Resets the current position of the handle stream. + Use Seek to move the current position within the resource associated with the handle stream by the indicated offset. Seek allows an application to read from or write to a particular location within the resource. + The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values: + + + + Value + + Meaning + + + + soFromBeginning + + + + Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0. + + + + + soFromCurrent + + + + Offset is from the current position in the resource. Seek moves to Position + Offset. + + + + + soFromEnd + + + + Offset is from the end of the resource. Offset must be <= 0 to indicate a number of bytes before the end of the file. + + + Or you can also use TSeekOrigin and its values to indicate where to start a seek operation. + Seek returns the new value of the Position property, the new current position in the resource.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def Write(self, Buffer, Count: int) -> int: + '''TBufferedFileStream.Write(Buffer, Count: int) -> int + Writes Count bytes from the Buffer to the current position in the resource. + System.Classes.TBufferedFileStream.Write inherits from System.Classes.THandleStream.Write. All content below this line refers to System.Classes.THandleStream.Write. + Writes Count bytes from the Buffer to the current position in the resource. + Use Write to write Count bytes to the resource associated with the handle stream, starting at the current position. After writing to the resource, Write advances the current position by the number bytes written, and returns the number of bytes written. + All other data-writing methods of a handle stream (WriteBuffer, WriteComponent) call Write to do the actual writing.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Button(CustomButton): + ''' + ==================== + Vcl.StdCtrls.TButton + ==================== + + ``Button`` is a push button control. + + Use ``Button`` to put a standard push button on a form. ``Button`` introduces several properties to control its behavior in a dialog box setting. Users choose button controls to initiate actions. To use a ``Button`` that displays a bitmap instead of a ``Label``, use `BitBtn <Vcl.Buttons.TBitBtn.htm>`__. To use a ``Button`` that can remain in a pressed position, use `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__. + + The `Caption <Vcl.StdCtrls.TButton.Caption.htm>`__ property can be used `to define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to a control. + + .. note:: Because the ``Button`` caption is always centered, changing the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ alignment has no effect. + + .. note:: Changing the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for ``Button``. Instead, use a ``Button`` type whose ``Caption`` color can be changed using the `Font <Vcl.Controls.TControl.Font.htm>`__ property, such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Cancel: bool + ''' + Determines whether the button's ``OnClick`` event handler executes when the *Escape* key is pressed. + + If `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ is ``True``, the button's ``OnClick`` event handler executes when the user presses *Esc*. Although an application can have more than one `Cancel <Vcl.StdCtrls.TCustomButton.Cancel.htm>`__ button, the ``Form`` calls the ``OnClick`` event handler only for the first ``Visible`` button in the tab order. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + CommandLinkHint: str + ''' + ``Text`` displayed as hint below the button ``Caption`` for *Command Link*. + + `CommandLinkHint <Vcl.StdCtrls.TCustomButton.CommandLinkHint.htm>`__ is the ``Text`` displayed as a hint below the button ``Caption`` when the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsCommandLink`` to specify a *Command Link* button. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Default: bool + ''' + Determines whether the button's ``OnClick`` event handler executes when the *Enter* key is pressed. + + If `Default <Vcl.StdCtrls.TCustomButton.Default.htm>`__ is ``True``, the button's ``OnClick`` event handler executes when the user presses *Enter*. + + Although an application can have more than one `Default <Vcl.StdCtrls.TCustomButton.Default.htm>`__ button, the ``Form`` calls the ``OnClick`` event handler only for the first ``Visible`` button in the tab order. Moreover, any button that has focus becomes the `Default <Vcl.StdCtrls.TCustomButton.Default.htm>`__ button temporarily; hence, if the user selects another button before pressing *Enter*, the selected button's ``OnClick`` event handler executes instead. + ''' + DisabledImageIndex: ImageIndex + ''' + ``ImageIndex`` for disabled ``ButtonState``. + + `DisabledImageIndex <Vcl.StdCtrls.TCustomButton.DisabledImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the disabled ``ButtonState``. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + DisabledImageName: ImageName + ''' + The name of the image is used when the UI is disabled. + ''' + DisabledImages: CustomImageList + ''' + No have docs. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + DropDownMenu: PopupMenu + ''' + Split button drop-down menu. + + When the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsSplitButton``, the button is a *Vista* style split button with a drop-down menu. `DropDownMenu <Vcl.StdCtrls.TCustomButton.DropDownMenu.htm>`__ specifies the drop-down menu for the down arrow button part. The `OnDropDownClick <Vcl.StdCtrls.TCustomButton.OnDropDownClick.htm>`__ event also occurs when the down arrow button part is clicked. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + ElevationRequired: bool + ''' + Puts a shield icon on a ``Button``, indicating that elevated access rights are required. + + When `ElevationRequired <Vcl.StdCtrls.TCustomButton.ElevationRequired.htm>`__ is ``True``, the button has a shield icon, indicating that elevated access rights are required. Vista or later UI guidelines specify that when there is a ``Button`` that performs an operation requiring elevated access rights, it should have this shield icon. + + This icon overrides any of the properties specifying a ``Button`` image for various ``ButtonState``s, as in `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HotImageIndex: ImageIndex + ''' + ``ImageIndex`` for the hot ``ButtonState``. + + `HotImageIndex <Vcl.StdCtrls.TCustomButton.HotImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the hot ``ButtonState`` (for example, the cursor hovering over the button). If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + HotImageName: ImageName + ''' + The name of the image is used when the cursor hovers over the UI. + ''' + ImageAlignment: ImageAlignment + ''' + Alignment of image on button. + + `ImageAlignment <Vcl.StdCtrls.TImageAlignment.htm>`__ indicates the alignment of an image on a ``Button``. It is a `ImageAlignment <Vcl.StdCtrls.TImageAlignment.htm>`__ type. + ''' + ImageIndex: int + ''' + ``ImageIndex`` for the normal ``ButtonState``. + + `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the normal ``ButtonState``. If the ``Index`` ``Value`` is -1, no image is used. + + In Vista or later *Windows* operating systems, a standard green arrow is used when the index is -1 and the `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsCommandLink`` for a *Command Link* button. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + ImageMargins: ImageMargins + ''' + Margins of image on button. + + A ``Button`` be positioned using margins. `ImageMargins <Vcl.StdCtrls.TCustomButton.ImageMargins.htm>`__ holds a\ `ImageMargins <Vcl.StdCtrls.TImageMargins.htm>`__ object containing the margins of an image on a ``Button``. The `ImageMargins <Vcl.StdCtrls.TImageMargins.htm>`__. `OnChange <Vcl.StdCtrls.TImageMargins.OnChange.htm>`__ event is triggered when a margin changes. + ''' + Images: CustomImageList + ''' + List of images for a ``Button``. + + `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ is a `CustomImageList <Vcl.ImgList.TCustomImageList.htm>`__ object listing the various images that can be placed on a ``Button``. + + The button's image depends on the ``ButtonState``. These images are determined by the value of the image state properties that index `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__: `DisabledImageIndex <Vcl.StdCtrls.TCustomButton.DisabledImageIndex.htm>`__, `HotImageIndex <Vcl.StdCtrls.TCustomButton.HotImageIndex.htm>`__, `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__, `PressedImageIndex <Vcl.StdCtrls.TCustomButton.PressedImageIndex.htm>`__, and `SelectedImageIndex <Vcl.StdCtrls.TCustomButton.SelectedImageIndex.htm>`__. When the `ImageIndex <Vcl.StdCtrls.TCustomButton.ImageIndex.htm>`__ index is -1, it generally means that no image is used for the normal state. For the other state ``ImageIndex``\ es, -1 means to use the same image as the normal state. + + The `ImageMargins <Vcl.StdCtrls.TCustomButton.ImageMargins.htm>`__ and `ImageAlignment <Vcl.StdCtrls.TCustomButton.ImageAlignment.htm>`__ properties orient the image inside the button. The image is not sized to fit the button, and the button is not stretched. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + ModalResult: ModalResult + ''' + The *XE2* release introduced three new `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ values: ``mrContinue``, ``mrHelp``, and ``mrTryAgain``. + + In addition, four of the existing `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ values changed at *XE2*. If your applications use any of the following four `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ values for ``Button``, you need to make code changes: ``mrClose``, ``mrAll``, ``mrNoToAll`` and ``mrYesToAll``. Since these values are stored as numbers in ``.dfm`` files, the values change when you migrate a project to *XE2*. The values have changed as follows: + + - Before *XE2*: + + - ``mrClose=11`` + - ``mrAll=8`` + - ``mrNoToAll=9`` + - ``mrYesToAll=10`` + + - In *XE2*: + + - ``mrClose=8`` + - ``mrAll=12`` + - ``mrNoToAll=13`` + - ``mrYesToAll=14`` + + The following table lists the constants of type `ModalResult <Vcl.Controls.TModalResult.htm>`__ that are defined for the `ModalResult <Vcl.StdCtrls.TCustomButton.ModalResult.htm>`__ property, along with their values in the *XE2* release and *XE* release (that is, any release before *XE2*): + + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | **Constant** | **Value** | **Meaning** | ..Supported Releases.. | + +===================+======================================+=======================================================+===========================+ + | ``mrNone`` | ``'0'`` | None ed as a default value before the user exits. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrOk`` | ``idOK = 1`` | The user exited with *OK* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrCancel`` | ``idCancel = 2`` | The user exited with the *CANCEL* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrAbort`` | ``idAbort = 3`` | The user exited with the *ABORT* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrRetry`` | ``idRetry = 4`` | The user exited with the *RETRY* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrIgnore`` | ``idIgnore = 5`` | The user exited with the *IGNORE* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrYes`` | ``idYes = 6`` | The user exited with the *YES* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrNo`` | ``idNo = 7`` | The user exited with the *NO* button. | All releases | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrClose`` | ``idClose = 8`` | The user exited with the *CLOSE* button. | - In *XE = 11* | + | | | | - In *XE2 = 8* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrHelp`` | ``idHelp = 9`` | The user exited with the *HELP* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrTryAgain`` | ``idTryAgain = 10`` | The user exited with the *TRY AGAIN* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrContinue`` | ``idContinue = 11`` | The user exited with the *CONTINUE* button. | New in *XE2* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrAll`` | ``mrContinue + 1`` (12 or ``$C``) | The user exited with the *ALL* button. | - In *XE = 8* | + | | | | - In *XE2 = 12* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrNoToAll`` | ``mrAll +1`` (13 or ``$D``) | The user exited with the *NO TO ALL* button. | - In *XE = 9* | + | | | | - In *XE2 = 13* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + | ``mrYesToAll`` | ``mrNoToAll +1`` or ``$E``) | The user exited with the *YES TO ALL* button. | - In *XE = 10* | + | | | | - In *XE2 = 14* | + +-------------------+--------------------------------------+-------------------------------------------------------+---------------------------+ + + For complete information and solutions, see "XE2 values of ``mrAll``, ``mrNoToAll``, ``mrYesToAll`` and ``mrClose``" at ``http://www.bobswart.nl/Weblog/Blog.aspx?RootId=5:5029`` + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + PressedImageIndex: ImageIndex + ''' + ``ImageIndex`` for the pressed ``ButtonState``. + + `PressedImageIndex <Vcl.StdCtrls.TCustomButton.PressedImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the pressed ``ButtonState``. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + PressedImageName: ImageName + ''' + The name of the image is used when pressing the UI. + ''' + SelectedImageIndex: ImageIndex + ''' + ``ImageIndex`` for the selected ``ButtonState``. + + `SelectedImageIndex <Vcl.StdCtrls.TCustomButton.SelectedImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for the selected ``ButtonState``. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This is available only for *Windows XP*, *Vista*, *Windows 7*, or later *Windows* operating systems. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + SelectedImageName: ImageName + ''' + The name of the image is used when selecting the UI. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Style: TabStyle + ''' + ``Style`` of a ``Button``. + + `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ indicates a ``Button``\ s. style, which is a `ButtonStyle <Vcl.StdCtrls.TCustomButton.TButtonStyle.htm>`__ type. + ''' + StylusHotImageIndex: ImageIndex + ''' + ``ImageIndex`` for a hot ``ButtonState``. + + ``VCL.StdCtrls.TButton.StylusHotImageIndex`` inherits from `Vcl.StdCtrls.TCustomButton.StylusHotImageIndex <Vcl.StdCtrls.TCustomButton.StylusHotImageIndex.htm>`__. All content below this line refers to `Vcl.StdCtrls.TCustomButton.StylusHotImageIndex <Vcl.StdCtrls.TCustomButton.StylusHotImageIndex.htm>`__. + + ``ImageIndex`` for a hot ``ButtonState``. + + `StylusHotImageIndex <Vcl.StdCtrls.TCustomButton.StylusHotImageIndex.htm>`__ is an ``ImageIndex`` into the `Images <Vcl.StdCtrls.TCustomButton.Images.htm>`__ property for a hot ``ButtonState``, for example, the stylus hovering over the button. If the ``Index`` ``Value`` is -1, the same image is used as in the normal ``ButtonState``. + + This property is only available on *Windows XP* and more recent releases of *Windows*. + ''' + StylusHotImageName: ImageName + ''' + No have docs. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the button ``Text`` wraps to fit the width of the control. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``True`` to allow the display of multiple lines of text. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``True``, text that is too wide for the control wraps at the right margin. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``False`` to limit the text to a single line. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``False``, text that is too wide for the control appears truncated. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDropDownClick(self, Sender: Object) -> None: + ''' + Down arrow part of a *Vista* or later style split button is clicked. + + `OnDropDownClick <Vcl.StdCtrls.TCustomButton.OnDropDownClick.htm>`__ occurs when the down arrow part of a *Vista* or later style split button is clicked. This only applies when the button's `Style <Vcl.StdCtrls.TCustomButton.Style.htm>`__ property is ``bsSplitButton``. + + This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class BytesStream(MemoryStream): + '''TBytesStream is a stream that stores its data in bytes. + Use TBytesStream to store data as bytes in a memory buffer. + Memory streams are useful as intermediary objects that can hold information as well as read it from or write it to another storage medium. They provide a useful format for comparing the contents of streams, or for manipulating data that is stored in a less accessible medium.''' + __hash__: ClassVar[None] = ... + Bytes: tuple + '''tuple: Specifies the stored data. + The Bytes property returns the buffer in which the data is stored. Use the Size property to find the actual amount of data in the buffer.''' + ClassName: Any + '''Returns the TObject.ClassName''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def Create(self, ABytes: tuple) -> None: + '''TBytesStream.Create(ABytes: tuple) -> None + Constructs an object and initializes its data before the object is first used. + System.Classes.TBytesStream.Create inherits from System.TObject.Create. All content below this line refers to System.TObject.Create. + Constructs an object and initializes its data before the object is first used. + Create constructs an object. The purpose, size, and behavior of objects differ greatly. The Create constructor defined by TObject allocates memory but does not initialize data. + Descendant objects usually define a constructor that creates the particular kind of object and initializes its data. + + Note: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Canvas(CustomCanvas): + ''' + ==================== + Vcl.Graphics.TCanvas + ==================== + + ``Canvas`` provides an abstract drawing space for objects that must render their own images. + + Use ``Canvas`` as a drawing surface for objects that draw an image of themselves. Standard window controls such as ``Edit`` controls or ``ListBox``\ es do not require a canvas, as they are drawn by the system. + + ``Canvas`` provides properties, events, and methods that assist in creating an image by: + + - Specifying the type of brush, pen, and font to use. + - Drawing and filling a variety of shapes and lines. + - Writing text. + - Rendering graphic images. + - Enabling a response to changes in the current image. + + ``Canvas`` has two descendants, `ControlCanvas <Vcl.Controls.TControlCanvas.htm>`__ and `MetafileCanvas <Vcl.Graphics.TMetafileCanvas.htm>`__, which assist in drawing images of controls and in creating metafile images for objects. + ''' + + __hash__: ClassVar[None] = ... + Handle: HDC + ''' + The ``Handle`` property specifies the *Windows GDI* handle to the device context for this ``Canvas``. + + Set ``Handle`` to the ``HDC`` for the device context the ``Canvas`` must draw into. When a windowed control responds to a *Windows* paint message, the ``HDC`` for drawing is passed in to the ``PaintWindow`` method. In other cases, an ``HDC`` can be obtained for a window by calling the ``GetDeviceContext`` method of a control. Additionally, Windows provides API calls to obtain an ``HDC`` for a printer or for a memory image. + + Read the ``Handle`` property to supplement the drawing services provided by the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object with API calls that require a handle to a device context. Most of the *Windows GDI* calls require an ``HDC``. + + `Canvas <Vcl.Graphics.TCanvas.htm>`__ does not own the ``HDC``. Applications must create an ``HDC`` and set the ``Handle`` property. Applications must release the ``HDC`` when the ``Canvas`` no longer needs it. Setting the ``Handle`` property of a ``Canvas`` that already has a valid ``HDC`` will not automatically release the initial ``HDC``. + + .. note:: Some descendants of `Canvas <Vcl.Graphics.TCanvas.htm>`__, such as `ControlCanvas <Vcl.Controls.TControlCanvas.htm>`__, do own the ``HDC``. Do not set the ``Handle`` property for these objects. They fetch and free their own ``Handle``. + ''' + Brush: Brush + ''' + Determines the color and pattern for filling graphical shapes and backgrounds. + + Set the ``Brush`` property to specify the color and pattern to use when drawing the background or filling in graphical shapes. The value of ``Brush`` is a `Brush <Vcl.Graphics.TBrush.htm>`__ object. Set the properties of the `Brush <Vcl.Graphics.TBrush.htm>`__ object to specify the color and pattern or bitmap to use when filling in spaces on the ``Canvas``. + + .. note:: Setting the ``Brush`` property assigns the specified `Brush <Vcl.Graphics.TBrush.htm>`__ object, rather than replacing the current `Brush <Vcl.Graphics.TBrush.htm>`__ object. + ''' + CopyMode: CopyMode + ''' + Specifies how a graphical image is copied onto the ``Canvas``. + + Set ``CopyMode`` to affect the way graphical images are drawn onto the ``Canvas``. The ``CopyMode`` is used when copying an image from another ``Canvas`` using the CopyRect method. ``CopyMode`` is also used by TBitmap objects when they draw themselves to a ``Canvas``. + + Use ``CopyMode`` to achieve a variety of affects when rendering an image. Achieve special effects like merged images and making parts of a bitmap transparent by combining multiple images with different ``CopyModes``. + ''' + Font: Font + ''' + Specifies the font to use when writing text on the image. + + Set ``Font`` to specify the font to use for writing text on the image. The value of ``Font`` is a ``Font`` object. Set the properties of the ``Font`` object to specify the font face, color, size, style, and any other aspects of the font. + + The Canvas.``TFont`` property is only guaranteed to equal the ``Font`` property if you have an owner-drawn ``ListBox`` (where you are expected to use the ``Canvas``). Even in that case, it is only guaranteed to equal the ``Font`` property once the first paint message is underway. If you use a ``Canvas`` inside an ownerdraw event, everything should work as expected. Using the ``Canvas`` for a reason outside the scope of its intended usage may give unpredictable results. + + .. note:: Setting the ``Font`` property assigns the specified ``Font`` object, rather than replacing the current ``Font`` object. + ''' + Pen: Pen + ''' + Specifies the kind of pen the ``Canvas`` uses for drawing lines and outlining shapes. + + Set ``Pen`` to specify the pen to use for drawing lines and outlining shapes in the image. The value of ``Pen`` is a `Pen <Vcl.Graphics.TPen.htm>`__ object. Set the properties of the `Pen <Vcl.Graphics.TPen.htm>`__ object to specify the color, style, width, and mode of the pen. + + .. note:: Setting the ``Pen`` property assigns the specified `Pen <Vcl.Graphics.TPen.htm>`__ object, rather than replacing the current `Pen <Vcl.Graphics.TPen.htm>`__ object. + ''' + + def Create(self) -> None: + ''' + ``Creates`` an instance of `Canvas <Vcl.Graphics.TCanvas.htm>`__. + + Call ``Create()`` to instantiate a `Canvas <Vcl.Graphics.TCanvas.htm>`__ object at runtime. ``Create()`` allocates memory for the instance of `Canvas <Vcl.Graphics.TCanvas.htm>`__ and creates the ``Font``, ``Brush`` and ``Pen`` objects for the ``Font``, ``Brush``, and ``Pen`` properties. ``Create()`` also initializes the ``CopyMode`` to ``cmSrcCopy``. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `Canvas <Vcl.Graphics.TCanvas.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object is not ``nil`` and only then calls ``Destroy()``. + ''' + def Arc(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws an ``Arc()`` on the image along the perimeter of the ellipse bounded by the specified rectangle. + + Use ``Arc()`` to draw an elliptically curved line with the current ``Pen``. the ``Arc()`` traverses the perimeter of an ellipse that is bounded by the points ``(X1,Y1)`` and ``(X2,Y2)``. the ``Arc()`` is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X3,Y3)``. The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X4, Y4)``. + + .. note:: On *Windows 9x* or *Windows ME*, the sums ``X1 + X2`` and ``Y1 + Y2`` cannot exceed 32768. Also, the sum ``X1 + X2 + Y1 + Y2`` cannot exceed 32768. + + On *NT* or *Windows 2000*, the drawing direction can be changed to clockwise using the *Windows API* call ``SetArcDirection``. + ''' + def GetCanvasOrientation(self) -> CanvasOrientation: + ''' + Represents the getter method for the `CanvasOrientation <Vcl.Graphics.TCustomCanvas.CanvasOrientation.htm>`__ property. + + ``GetCanvasOrientation()`` is called each time the value of the `CanvasOrientation <Vcl.Graphics.TCustomCanvas.CanvasOrientation.htm>`__ is read. + ''' + def GetClipRect(self) -> Rect: + ''' + Represents the getter method for the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property. + + ``GetClipRect()`` is called each time the value of `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ is read. + ''' + def GetPenPos(self) -> Point: + ''' + Represents the getter method for the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property. + + ``GetPenPos()`` is called each time the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ is read. + ''' + def GetPixel(self, X: int, Y: int) -> Color: + ''' + Represents the getter method for the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property. + + ``GetPixel()`` is called each time the color of a pixel in the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property is read. + ''' + def GetHandle(self) -> HDC: + ''' + Represents the getter method for the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property. + + ``GetHandle()`` is called each time the value of the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property is read. ``GetHandle()`` uses the `RequiredState <Vcl.Graphics.TCanvas.RequiredState.htm>`__ method to make sure that the ``Canvas`` has a valid handle allocated. + ''' + def SetBrush(self, Value: Brush) -> None: + ''' + Represents the setter method for the `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ property. + + ``SetBrush()`` is called each time the value of the `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ property is changed. + ''' + def SetFont(self, Value: Font) -> None: + ''' + Represents the setter method for the `Font <Vcl.Graphics.TCanvas.Font.htm>`__ property. + + ``SetFont()`` is called each time the value of the `Font <Vcl.Graphics.TCanvas.Font.htm>`__ property is changed. + ''' + def SetHandle(self, Value: HDC) -> None: + ''' + Represents the setter method for the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property. + + ``SetHandle()`` is called each time the value of the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property is changed. ``SetHandle`` makes sure to deallocate all associated graphical objects before changing the handle. + ''' + def SetPen(self, Value: Pen) -> None: + ''' + Represents the setter method for the `Pen <Vcl.Graphics.TCanvas.Pen.htm>`__ property. + + ``SetPen()`` is called each time the value of the `Pen <Vcl.Graphics.TCanvas.Pen.htm>`__ property is changed. + ''' + def SetPenPos(self, Value: Point) -> None: + ''' + Represents the setter method for the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property. + + ``SetPenPos()`` is called each time the value of the `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ property is changed. + ''' + def SetPixel(self, X: int, Y: int, Value: Color) -> None: + ''' + Represents the setter method for the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property. + + ``SetPixel()`` is called each time the color of a pixel in the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property is changed. + ''' + def CreateHandle(self) -> None: + ''' + Allocates a new handle for the ``Canvas``. + + ``CreateHandle()`` is called automatically by the ``Canvas`` when a handle is required. In `Canvas <Vcl.Graphics.TCanvas.htm>`__, ``CreateHandle()`` simply returns without allocating a handle. ``CreateHandle()`` is supposed to be overridden in descending classes, which, in certain conditions, allocate handles. + + For example, `ControlCanvas <Vcl.Controls.TControlCanvas.htm>`__ returns the ``HDC`` (*Windows Device Context* handle) for the control the ``Canvas`` is associated to. + ''' + def RequiredState(self, ReqState: CanvasState) -> None: + ''' + Changes the current state of the ``Canvas`` to meet the given requirements. + + ``RequiredState()`` ensures that a ``Canvas`` meets a set of given requirements. If the requirements are not met, the ``Canvas`` initializes its internal structures so that the requirements are met after the call to ``RequiredState()`` is completed. + + ``RequiredState()`` verifies that the `Pen <Vcl.Graphics.TCanvas.Pen.htm>`__, `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ and `Font <Vcl.Graphics.TCanvas.Font.htm>`__ objects are created and initialized. ``RequiredState()`` also makes sure that the ``Canvas`` has a handle allocated. + ''' + def ArcTo(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws an arc on the image along the perimeter of the ellipse bounded by the specified rectangle. + + Override the `ArcTo <Vcl.Graphics.TCustomCanvas.ArcTo.htm>`__ method (or just use Arcto from descendant classes) to implement drawing of an elliptically curved line with the current Pen. The arc traverses the perimeter of an ellipse that is bounded by the points ``(X1,Y1)`` and ``(X2,Y2)``. The arc is drawn following the perimeter of the ellipse, counterclockwise, from the starting point to the ending point. The starting point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X3,Y3)``. The ending point is defined by the intersection of the ellipse and a line defined by the center of the ellipse and ``(X4, Y4)``. + + This procedure draws lines by using the current pen and updates the value of `PenPos <Vcl.Graphics.TCustomCanvas.PenPos.htm>`__ to the value of the last endpoint. + ''' + def AngleArc(self, X: int, Y: int, Radius: int, StartAngle: float, SweepAngle: float) -> None: + ''' + Draws an arc on the image along the perimeter of the circle defined by the parameters. + + The ``AngleArc()`` method draws a line from the current position to the starting point of the arc and then a counterclockwise circular arc to the arc endpoint. The arc traverses the perimeter of a circle whose center lies at (``'X'``, ``'Y'``) and whose radius is ``Radius``. The arc is drawn following the perimeter of the circle, counterclockwise, from the ``StartAngle`` with a sweep angle of ``SweepAngle``. + + If the sweep angle is greater than 360 degrees, the entire circle is drawn and part of the arc is drawn multiple times. + + The current position is updated to the arc endpoint. + ''' + def BrushCopy(self, Dest: Rect, Bitmap: Bitmap, Source: Rect, Color: Color) -> None: + ''' + Copies a portion of a bitmap onto a rectangle on the ``Canvas``, replacing one of the colors of the bitmap with the brush of the ``Canvas``. + + Use ``BrushCopy()`` to achieve special effects such as making the copied image partially transparent. ``BrushCopy()`` is provided mainly for backward compatibility. Use a ``ImageList`` instead of ``BrushCopy()``. + + ``Dest`` specifies the rectangular portion of the ``Canvas`` that will receive the copy of the bitmap. ``Bitmap`` specifies the graphic to copy from. ``Source`` specifies the rectangular area of ``Bitmap`` to copy. ``Color`` specifies the color in ``Bitmap`` to replace with the `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ of the ``Canvas``. To use ``BrushCopy()`` to make the copied image partially transparent, specify the color of the surface of the ``Canvas`` (clBackground for example) as the ``Color`` of the `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ property, then call ``BrushCopy()``. + ''' + def Chord(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws a closed figure represented by the intersection of a line and an ellipse. + + Use ``Chord()`` to create a shape that is defined by an ``Arc()`` and a line that joins the endpoints of the ``Arc()``. The chord consists of a portion of an ellipse that is bounded by the points ``(X1,Y1)`` and ``(X2,Y2)``. The ellipse is bisected by a line that runs between the points ``(X3,Y3)`` and ``(X4,Y4)``. + + The perimeter of the chord runs counter clockwise from ``(X3, Y3)``, counterclockwise along the ellipse to ``(X4,Y4)``, and straight back to ``(X3,Y3)``. If ``(X3,Y3)`` and ``(X4,Y4)`` are not on the surface of the ellipse, the corresponding corners on the chord are the closest points on the perimeter that intersect the line. The outline of the chord is drawn using the value of Pen, and the shape is filled using the value of Brush. + + .. note:: On *Windows 9x* or *Windows ME*, the sums ``X1 + X2`` and ``Y1 + Y2`` cannot exceed 32768. Also, the sum ``X1 + X2 + Y1 + Y2`` cannot exceed 32768. + + On NT, the drawing direction can be changed to clockwise using the *Windows API* call ``SetArcDirection``. + ''' + def CopyRect(self, Dest: Rect, Canvas: Canvas, Source: Rect) -> None: + ''' + Copies part of an image from another ``Canvas`` into the ``Canvas``. + + Use ``CopyRect()`` to transfer part of the image on another ``Canvas`` to the image of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object. ``Dest`` specifies the rectangle on the ``Canvas`` where the source image will be copied. The ``Canvas`` parameter specifies the ``Canvas`` with the source image. ``Source`` specifies a rectangle bounding the portion of the source ``Canvas`` that will be copied. + + The portion of the source ``Canvas`` is copied using the mode specified by CopyMode. + ''' + @overload + def Draw(self, X: int, Y: int, Graphic: Graphic) -> None: + ''' + Renders the graphic specified by the ``Graphic`` parameter on the ``Canvas`` at the location given by the coordinates ``(X, Y)``. + + Call ``Draw()`` to draw a graphic on the ``Canvas``. ``Draw()`` calls the ``Draw()`` method of the graphic. The image is rendered into a rectangle determined by the size of the graphic, with the upper left corner at the point ``(X, Y)``. + + Graphics can be bitmaps, icons, or metafiles. If the graphic is a ``Bitmap`` object, the bitmap is rendered using the value of ``CopyMode``. + ''' + @overload + def Draw(self, X: int, Y: int, Graphic: Graphic, Opacity: Byte) -> None: ... + def DrawFocusRect(self, Rect: Rect) -> None: + ''' + Draws a rectangle in the style used to indicate that the object inside the rectangle has focus. + + Call ``DrawFocusRect()`` for the perimeter of the image of a control when the control gets or loses input focus. Because ``DrawFocusRect()`` uses an XOR function, calling it a second time while specifying the same rectangle removes the rectangle from the *Screen*. + + The rectangle this function draws cannot be scrolled. To scroll an area containing a rectangle drawn by ``DrawFocusRect()``, call ``DrawFocusRect()`` to remove the rectangle from the *Screen*, scroll the area, and then call ``DrawFocusRect()()`` to draw the rectangle in the new position. + ''' + def Ellipse(self, X1: int, Y1: int, X2: int, Y2: int) -> None: + ''' + Draws the ellipse defined by a bounding rectangle on the ``Canvas``. + + Call ``Ellipse()`` to draw a circle or ellipse on the ``Canvas``. Specify the bounding rectangle either by giving: + + - The top left point at pixel coordinates (X1, Y1) and the bottom right point at ``(X2, Y2)``. + + - A ``Rect`` value.If the bounding rectangle is a square, a circle is drawn.The ellipse is outlined using the value of Pen, and filled using the value of Brush. + + .. note:: On *Windows 9x* or *Windows ME*, the sums ``X1 + X2`` and ``Y1 + Y2`` cannot exceed 32768. Also, the sum ``X1 + X2 + Y1 + Y2`` cannot exceed 32768. + ''' + def FillRect(self, Rect: Rect) -> None: + ''' + Fills the specified rectangle on the ``Canvas`` using the current ``Brush``. + + Use ``FillRect()`` to fill a rectangular region using the current ``Brush``. The region is filled including the top and left sides of the rectangle, but excluding the bottom and right edges. + ''' + def FloodFill(self, X: int, Y: int, Color: Color, FillStyle: FillStyle) -> None: + ''' + Fills an area of the ``Canvas`` using the current ``Brush``. + + Use ``FloodFill()`` to fill a possibly non-rectangular region of the image with the value of `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__. The boundaries of the region to be filled are determined by moving outward from the point ``(X, Y)`` until a color boundary involving the ``Color`` parameter is encountered. + + ``'X'`` and ``'X'`` are the coordinates on the ``Canvas`` where filling starts. + + ``Color`` is the color that defines the boundary of the region to fill. Its interpretation depends on the value of FillStyle. + + ``FillStyle`` specifies whether the region is defined by all pixels with the same value as ``Color``, or all points with a different value. + + .. tip:: Use the `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ property to get the exact value of the color at the point ``(X, Y)`` when using a ``FillStyle`` of ``fsSurface``. Similarly, when ``FillStyle`` is ``fsBorder``, use `Pixels <Vcl.Graphics.TCustomCanvas.Pixels.htm>`__ to get the exact value of the boundary color if a point on the boundary is known. + ''' + def FrameRect(self, Rect: Rect) -> None: + ''' + Draws a rectangle using the `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ of the ``Canvas()`` to draw the border. + + Use ``FrameRect()`` to draw a 1 pixel wide border around a rectangular region. ``FrameRect()`` does not fill the interior of the rectangle with the `Brush <Vcl.Graphics.TCanvas.Brush.htm>`__ pattern. To draw a boundary using the `Pen <Vcl.Graphics.TCanvas.Pen.htm>`__ instead, use the `Polygon <Vcl.Graphics.TCanvas.Polygon.htm>`__ method. + ''' + def HandleAllocated(self) -> bool: + ''' + Indicates whether the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object has acquired a handle to a device context. + + Use ``HandleAllocated()`` to determine whether the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property is set to an ``HDC`` value. ``HandleAllocated()`` indicates whether the ``Canvas`` has acquired a device context. Use ``HandleAllocated()`` rather than reading the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property. When an application reads the `Handle <Vcl.Graphics.TCanvas.Handle.htm>`__ property, `Canvas <Vcl.Graphics.TCanvas.htm>`__ automatically allocates a new device context and returns its handle if the property had not been previously set. + ''' + def LineTo(self, X: int, Y: int) -> None: + ''' + Draws a line on the ``Canvas`` from PenPos to the point specified by ``'X'`` and ``'Y'``, and sets the pen position to ``(X, Y)``. + + Use ``LineTo()`` to draw a line from PenPos up to, but not including the point ``(X, Y)``. ``LineTo()`` changes the value of PenPos to ``(X, Y)``. + + The line is drawn using ``Pen``. + + .. note:: If the current ``Pen`` does not have a style of psSolid, the line is drawn with a background specified by the current ``Brush``. + ''' + def MoveTo(self, X: int, Y: int) -> None: + ''' + Changes the current drawing position to the point ``(X, Y)``. + + Use ``MoveTo()`` to set the value of PenPos before calling LineTo. Calling ``MoveTo()`` is equivalent to setting the PenPos property. + ''' + def Pie(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int, X4: int, Y4: int) -> None: + ''' + Draws a pie-shaped section of the ellipse bounded by the rectangle ``(X1, Y1)`` and ``(X2, Y2)`` on the ``Canvas``. + + Use ``Pie()`` to draw a pie-shaped wedge on the image. The wedge is defined by the ellipse bounded by the rectangle determined by the points ``(X1, Y1)`` and ``(X2, Y2)``. The section drawn is determined by two lines radiating from the center of the ellipse through the points ``(X3, Y3)`` and ``(X4, Y4)``. + + The wedge is outlined using Pen, and filled using Brush. + + .. note:: On *Windows 9x* or *Windows ME*, the sums ``X1 + X2`` and ``Y1 + Y2`` cannot exceed 32768. Also, the sum ``X1 + X2 + Y1 + Y2`` cannot exceed 32768. + ''' + def Polygon(self, Points: list) -> None: + ''' + Draws a series of lines on the ``Canvas`` connecting the points passed in and closing the shape by drawing a line from the last point to the first point. + + Use ``Polygon()`` to draw a closed, many-sided shape on the ``Canvas``, using the value of ``Pen``. After drawing the complete shape, ``Polygon()`` fills the shape using the value of Brush. + + The ``Points`` parameter is an array of points that give the vertices of the polygon. + + .. note:: The ``Points_Size`` parameter is the index of the last point in the array (one less than the total number of points). + + The first point is always connected to the last point. + + .. note:: In Delphi, you can use the Slice function to pass a portion of an array of points to the ``Polygon()`` method. For example, to form a polygon using the first ten points from an array of 100 points, use the Slice function as follows: + + .. code-block:: python + + Canvas.Polygon(Slice(PointArray, 10)); + + To draw a polygon on the ``Canvas``, without filling it, use the ``Polyline()`` method, specifying the first point a second time at the end. + ''' + def Polyline(self, Points: list) -> None: + ''' + Draws a series of lines on the ``Canvas`` with the current ``Pen``, connecting each of the points passed to it in Points. + + Use ``Polyline()`` to connect a set of points on the ``Canvas``. If you specify only two points, ``Polyline()`` draws a single line. + + The ``Points`` parameter is an array of points to be connected. + + .. note:: The ``Points_Size`` parameter is the index of the last point in the array (one less than the total number of points). + + .. note:: In Delphi, you can use the Slice function to pass a portion of an array of points to the ``Polyline()`` method. For example, to form a line connecting the first ten points from an array of 100 points, use the Slice function as follows: + + .. code-block:: python + + Canvas.Polyline(Slice(PointArray, 10)); + + Calling the ``MoveTo()`` function with the value of the first point, and then repeatedly calling ``LineTo()`` with all subsequent points will draw the same image on the ``Canvas``. However, unlike ``LineTo()``, ``Polyline()`` does not change the value of ``PenPos``. + ''' + def PolyBezier(self, Points: list) -> None: + ''' + Draws a set of ``Bezier`` curves. + + Use ``PolyBezier()`` to draw cubic ``Bezier`` curves using the endpoints and control points specified by the ``Points`` parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third is the ending point. + + The ``Points`` parameter gives the endpoints to use when generating the ``Bezier`` curves. + + .. note:: The ``Points_Size`` parameter is the index of the last point in the array (one less than the total number of points). + + This procedure draws lines by using the current ``Pen``. + + .. note:: In Delphi, you can use the Slice function to pass a portion of an array of points to the ``PolyBezier()`` method. For example, to form a ``Bezier`` curve using the first ten points from an array of 100 points, use the Slice function as follows: + + .. code-block:: python + + Canvas.PolyBezier(Slice(PointArray, 10)); + + ``Control`` points after ``a[Index+3]`` are ignored. Nothing happens if there aren't enough control points. + ''' + def PolyBezierTo(self, Points: list) -> None: + ''' + Draws a set of ``Bezier`` curves and updates the value of PenPos. + + Use ``PolyBezierTo()`` to draw cubic ``Bezier`` curves using the endpoints and control points specified by the ``Points`` parameter. The first curve is drawn from the first point to the fourth point, using the second and third points as control points. Each subsequent curve in the sequence needs exactly three more points: the ending point of the previous curve is used as the starting point, the next two points in the sequence are control points, and the third is the ending point. + + The ``Points`` parameter gives the endpoints to use when generating the ``Bezier`` curves. + + .. note:: The ``Points_Size`` parameter is the index of the last point in the array (one less than the total number of points). + + This procedure draws lines by using the current ``Pen`` and updates the value of PenPos to the value of the last endpoint. + + .. note:: In Delphi, you can use the Slice function to pass a portion of an array of points to the ``PolyBezierTo()`` method. For example, to form a ``Bezier`` curve using the first ten points from an array of 100 points, use the Slice function as follows: + + .. code-block:: python + + Canvas.PolyBezierTo(Slice(PointArray, 10)); + ''' + def Rectangle(self, X1: int, Y1: int, X2: int, Y2: int) -> None: + ''' + Draws a rectangle on the ``Canvas``. + + Use ``Rectangle()`` to draw a rectangle using Pen and fill it with Brush. Specify the rectangle's coordinates in one of two ways: + + Giving four coordinates that define the upper left corner at the point ``(X1, Y1)`` and the lower right corner at the point ``(X2, Y2)``. + + Using a ``Rect`` type. To fill a rectangular region without drawing the boundary in the current ``Pen``, use FillRect. To outline a rectangular region without filling it, use FrameRect or Polygon. To draw a rectangle with rounded corners, use RoundRect. + ''' + def Refresh(self) -> None: + ''' + Deselects the ``Pen``, ``Brush``, and ``Font`` from the device context. + + Call ``Refresh()()()`` to return the ``HDC`` used by the ``Canvas`` to a default state. ``Refresh()`` does not change the values of the ``Font``, ``Brush``, or ``Pen`` properties. Calling any of the drawing methods of the ``Canvas`` after calling ``Refresh()`` will reselect the ``Font``, ``Brush``, or ``Pen`` into the ``HDC`` if it is used by the drawing method. + ''' + def RoundRect(self, X1: int, Y1: int, X2: int, Y2: int, X3: int, Y3: int) -> None: + ''' + Draws a rectangle with rounded corners on the ``Canvas``. + + Use ``RoundRect()`` to draw a rounded rectangle using ``Pen`` and fill it with Brush. The rectangle will have edges defined by the points ``(X1,Y1)``, ``(X2,Y1)``, ``(X2,Y2)``, ``(X1,Y2)``, but the corners will be shaved to create a rounded appearance. The curve of the rounded corners matches the curvature of an ellipse with width X3 and height Y3. To draw an ellipse instead, use Ellipse. To draw a ``True`` rectangle, use Rectangle. + ''' + def StretchDraw(self, Rect: Rect, Graphic: Graphic) -> None: + ''' + Draws the graphic specified by the ``Graphic`` parameter in the rectangle specified by the ``Rect`` parameter. + + Call ``StretchDraw()`` to draw a graphic on the ``Canvas`` so that the image fits in the specified rectangle. ``StretchDraw()`` calls the Draw method of the graphic. The graphic object determines how to fit into the rectangle. This may involve changing magnification and/or aspect ratio. To render the graphic in its natural size, use the Draw method, instead. + + If the graphic is a ``Bitmap`` object, the bitmap is rendered using the value of ``CopyMode``. + + .. note:: If the graphic is an icon, it is not stretched. + ''' + def TextExtent(self, Text: str) -> Size: + ''' + Returns the ``Width`` and ``Height``, in pixels, of a string rendered in the current font. + + Use ``TextExtent()`` to determine the space a string will occupy in the image. Other elements in the image such as lines, boxes, or additional lines of text can be positioned to accommodate the size of the text. ``TextExtent()`` returns the ``Width`` and ``Height`` of the rectangle that bounds the text on the ``Canvas``. To check only the height, call TextHeight. To check only the width, call TextWidth. + ''' + def TextOut(self, X: int, Y: int, Text: str) -> None: + ''' + Writes a string on the ``Canvas``, starting at the point ``(X, Y)``, and then updates the ``PenPos`` to the end of the string. + + Use ``TextOut()`` to write a string onto the ``Canvas``. The string will be written using the current value of Font. Use the TextExtent method to determine the space occupied by the text in the image. To write only the text that fits within a clipping rectangle, use TextRect instead. + + After a call to ``TextOut()``, the ``PenPos`` property indicates the point at the top right of the text on the ``Canvas``. + ''' + @overload + def TextRect(self, Rect: Rect, Text: str, TextFormat: TextFormat) -> None: + ''' + Writes a string inside a clipping rectangle. + + Use ``TextRect()`` to write a string within a limited rectangular region. Any portions of the string that fall outside the rectangle passed in the ``Rect`` parameter are clipped and don't appear. The upper left corner of the text is placed at the point ``(X, Y)``. + ''' + @overload + def TextRect(self, Rect: Rect, X: int, Y: int, Text: str) -> None: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CheckBox(CustomCheckBox): + ''' + ====================== + Vcl.StdCtrls.TCheckBox + ====================== + ``CheckBox`` represents a ``CheckBox`` that can be on (checked) or off (unchecked). + + A ``CheckBox`` component presents an option for the user. The user can check the box to select the option, or uncheck it to deselect the option. + + The `Caption <Vcl.StdCtrls.TCheckBox.Caption.htm>`__ property can be used `to define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to a control. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Controls the position of the ``CheckBox``\ s. caption. + + If `Alignment <Vcl.StdCtrls.TCustomCheckBox.Alignment.htm>`__ is set to ``taRightJustify``, the caption appears to the right of the ``CheckBox``. If `Alignment <Vcl.StdCtrls.TCustomCheckBox.Alignment.htm>`__ is set to ``taLeftJustify``, the caption appears to the left of the ``CheckBox``. + ''' + AllowGrayed: bool + ''' + Determines whether a ``CheckBox`` can be in a dimmed state. + + If `AllowGrayed <Vcl.StdCtrls.TCustomCheckBox.AllowGrayed.htm>`__ is set to ``True``, the ``CheckBox`` has three possible states: selected, cleared, and dimmed. If `AllowGrayed <Vcl.StdCtrls.TCustomCheckBox.AllowGrayed.htm>`__ is set to ``False``, the ``CheckBox`` has only two possible states: selected and cleared. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Checked: bool + ''' + Specifies whether the ``CheckBox`` control is checked. + + .. note:: When you change the value of the ``Checked`` property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the ``Checked`` property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.StdCtrls.TCheckBox.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + State: ToggleSwitchState + ''' + Indicates whether the ``CheckBox`` is selected, cleared, or dimmed. + + Use `State <Vcl.StdCtrls.TCustomCheckBox.State.htm>`__ to determine whether the ``CheckBox`` is selected (``cbChecked``), cleared (``cbUnchecked``), or dimmed (``cbGrayed``). + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the button ``Text`` wraps to fit the width of the control. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``True`` to allow the display of multiple lines of text. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``True``, text that is too wide for the control wraps at the right margin. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``False`` to limit the text to a single line. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``False``, text that is too wide for the control appears truncated. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Collection(Persistent): + ''' + ========================== + System.Classes.TCollection + ========================== + + ``Collection`` is a container for `CollectionItem <System.Classes.TCollectionItem.htm>`__ objects. + + Each ``Collection`` holds a group of `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendants. ``Collection`` maintains an index of the collection items in its `Items <System.Classes.TCollection.Items.htm>`__ array. The `Count <System.Classes.TCollection.Count.htm>`__ property contains the number of items in the collection. Use the `Add <System.Classes.TCollection.Add.htm>`__ and `Delete <System.Classes.TCollection.Delete.htm>`__ methods to add items to the collection and delete items from the collection. + + Objects descended from ``Collection`` can contain objects descended from `CollectionItem <System.Classes.TCollectionItem.htm>`__. Thus, for each ``Collection`` descendant, there is a corresponding `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant. + + The following table lists some typical descendants of ``Collection`` with the corresponding `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendant and the component that uses each pair: + + ================================================================================ ======================================================================== =================================================================================== + **Collection Descendant** **CollectionItem Descendant** **Component** + ================================================================================ ======================================================================== =================================================================================== + `BitmapLinks <FMX.Styles.Objects.TBitmapLinks.htm>`__ `BitmapLink <FMX.Styles.Objects.TBitmapLink.htm>`__ `CustomStyleObject <FMX.Styles.Objects.TCustomStyleObject.htm>`__ + `Aggregates <Datasnap.DBClient.TAggregates.htm>`__ `Aggregate <Datasnap.DBClient.TAggregate.htm>`__ `ClientDataSet <Datasnap.DBClient.TClientDataSet.htm>`__ + `CookieCollection <Web.HTTPApp.TCookieCollection.htm>`__ `Cookie <Web.HTTPApp.TCookie.htm>`__ `WebResponse <Web.HTTPApp.TWebResponse.htm>`__ + `CoolBands <Vcl.ComCtrls.TCoolBands.htm>`__ `CoolBand <Vcl.ComCtrls.TCoolBand.htm>`__ `CoolBar <Vcl.ComCtrls.TCoolBar.htm>`__ + `DBGridColumns <Vcl.DBGrids.TDBGridColumns.htm>`__ `Column <Vcl.DBGrids.TColumn.htm>`__ `DBGrid <Vcl.DBGrids.TDBGrid.htm>`__ + `Dependencies <Vcl.SvcMgr.TDependencies.htm>`__ `Dependency <Vcl.SvcMgr.TDependency.htm>`__ `Service <Vcl.SvcMgr.TService.htm>`__ + `HeaderSections <Vcl.ComCtrls.THeaderSections.htm>`__ `HeaderSection <Vcl.ComCtrls.THeaderSection.htm>`__ `HeaderControl <Vcl.ComCtrls.THeaderControl.htm>`__ + `ListColumns <Vcl.ComCtrls.TListColumns.htm>`__ `ListColumn <Vcl.ComCtrls.TListColumn.htm>`__ `ListView <Vcl.ComCtrls.TListView.htm>`__ + `Params <Data.DB.TParams.htm>`__ `Param <Data.DB.TParam.htm>`__ many datasets + `StatusPanels <Vcl.ComCtrls.TStatusPanels.htm>`__ `StatusPanel <Vcl.ComCtrls.TStatusPanel.htm>`__ `StatusBar <Vcl.ComCtrls.TStatusBar.htm>`__ + ================================================================================ ======================================================================== =================================================================================== + + The controls that use ``Collection`` and `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendants have a published property that holds a collection. (For example, the `Panels <Vcl.ComCtrls.TStatusBar.Panels.htm>`__ property of StatusBar <Vcl.ComCtrls.TStatusBar.htm>`__ holds a `StatusPanels <Vcl.ComCtrls.TStatusPanels.htm>`__.) A standard property editor, referred to generically as the *Collection Editor*, can be invoked from the `Object Inspector <Object_Inspector.htm>`__ to edit the items in the collection. + + .. note:: When writing a ``Collection`` descendant that is used by another control, be sure to override the protected `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ method of the collection so that the descendant class instances can appear in the `Object Inspector <Object_Inspector.htm>`__. + + .. note:: ``Collection`` has the `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ descendant that maintains information about its owner. `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ implements the `GetOwner <System.Classes.TOwnedCollection.GetOwner.htm>`__ method. Therefore, classes derived from `OwnedCollection <System.Classes.TOwnedCollection.htm>`__ do not need to add anything in order to appear in the `Object Inspector <Object_Inspector.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + PropName: str + ''' + Specifies the name of the property that the collection implements. + + The `GetNamePath <System.Classes.TCollection.GetNamePath.htm>`__ method uses this protected property to assemble the name of the collection as it appears in the *Object Inspector*. It identifies the name of the property in the object returned by the protected `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ method that is implemented using this collection object. + ''' + UpdateCount: int + ''' + Counts the number of times `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ was called without a corresponding call to `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__. + + ``UpdateCount`` keeps track of calls to `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ and `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__ so that they can be nested. Every call to `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ increments ``UpdateCount``. Every call to `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__ decrements it. When ``UpdateCount()`` returns to 0, the collection updates itself to reflect all changes that occurred since the first call to `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__. + ''' + NextID: int + ''' + Specifies a unique ``ID`` that can be assigned to the next added collection item. + + `Collection <System.Classes.TCollection.htm>`__ uses ``NextID`` internally to assign unique identifiers to collection items. When a new item is added to the collection, its ``ID`` property is given the value of ``NextID`` and ``NextID`` is incremented. + ''' + Capacity: int + ''' + Provides access to the internal `List.Capacity <System.Classes.TList.Capacity.htm>`__ property. + + The ``Capacity`` property specifies the allocated size of the array of pointers maintained by the `List <System.Classes.TList.htm>`__ object. This ``Value`` is set to the number of pointers the list will need to contain. + ''' + Count: int + ''' + Returns the number of items in the collection. + + ``Count()`` contains the number of items in the `Items <System.Classes.TCollection.Items.htm>`__ array. Since `Items <System.Classes.TCollection.Items.htm>`__ is indexed starting with 0, the value of ``Count()`` is always one greater than the index of the last member of `Items <System.Classes.TCollection.Items.htm>`__. + ''' + ItemClass: CollectionItemClass + ''' + Indicates the class to which the collection's items belong. + + ``ItemClass`` is the class (descended from `CollectionItem <System.Classes.TCollectionItem.htm>`__) to which the items in the collection belong. For example, in an instance of the `Collection <System.Classes.TCollection.htm>`__ descendant THeaderSections, the value of the ``ItemClass`` property is THeaderSection. + ''' + Items: list + ''' + Lists the items in the collection. + + Use ``Items`` to access individual items in the collection. The value of the ``Index`` parameter corresponds to the ``Index`` property of `CollectionItem <System.Classes.TCollectionItem.htm>`__. It represents the position of the item in the collection. + ''' + + def Added(self, Item: CollectionItem) -> None: + ''' + .. warning:: ``Added()`` is deprecated. + + Responds when items are added to the collection. + + Applications cannot call the protected ``Added()`` method. It is called automatically immediately after items are added to the collection. + + ``Item`` is the item that was just added to the collection. + + ``Added()`` is a deprecated method. Descendent classes should override the `Notify <System.Classes.TCollection.Notify.htm>`__ method instead when responding to changes in the list of items. + ''' + def Deleting(self, Item: CollectionItem) -> None: + ''' + .. warning:: ``Deleting()`` is deprecated. + + Responds when items are deleted from the collection. + + Applications cannot call the protected ``Deleting()`` method. The `Delete <System.Classes.TCollection.Delete.htm>`__ method calls ``Deleting()`` immediately before it removes an item from the collection. + + ``Item`` is the item that is about to be removed. + + ``Deleting()`` is a deprecated method. Descendent classes should override the `Notify <System.Classes.TCollection.Notify.htm>`__ method instead when responding to changes in the list of items. + ''' + def Notify(self, Item: CollectionItem, Action: CollectionNotification) -> None: + ''' + Responds when items are added to or removed from the collection. + + ``Notify()`` is called automatically when the items in the collection change. + + ``Item`` is the item that was just added to or that is about to be removed from the collection. + + ``Action`` indicates whether the item was added, is about to be extracted or is about to be deleted. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, ``Notify()`` calls `Added <System.Classes.TCollection.Added.htm>`__ when + + ``Action`` is `cnAdded <System.Classes.TCollectionNotification.htm>`__ and calls `Deleting <System.Classes.TCollection.Deleting.htm>`__ when + + ``Action`` is ``cnDeleting``. `Collection <System.Classes.TCollection.htm>`__ ignores the ``cnExtracting`` action. Descendant classes can override ``Notify()`` to modify this behavior. + ''' + def GetAttrCount(self) -> int: + ''' + Returns the number of custom attributes associated with items in the collection. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. ``GetAttrCount()`` returns the number of distinct attributes assigned to each item in the collection. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, ``GetAttrCount()`` always returns 0, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def GetAttr(self, Index: int) -> str: + ''' + Returns the name of a custom attribute that can be retrieved using the `GetItemAttr <System.Classes.TCollection.GetItemAttr.htm>`__ method. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and, for each item in the collection, a value that is a string. The ``GetAttr()`` method returns the name of an attribute. + + ``Index`` identifies the attribute whose name is requested. This is a value between 0 and n-1, where n is the value returned by `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + As implemented by `Collection <System.Classes.TCollection.htm>`__, ``GetAttr()`` always returns an empty string, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def GetItemAttr(self, Index: int, ItemIndex: int) -> str: + ''' + Returns the value of a custom attribute assigned to one of the collection's items. + + `Collection <System.Classes.TCollection.htm>`__ descendants can associate user-defined attributes with the items in the collection. Each attribute has a name and -- for each item in the collection -- a value, which is a string. ``GetItemAttr()`` returns the value of one of these attributes for a specified item in the collection. + + ``Index`` identifies which of the attribute's values is desired. This is a value between 0 and ``n-1``, where n is the value returned by `GetAttrCount <System.Classes.TCollection.GetAttrCount.htm>`__. + + ``ItemIndex`` identifies the item whose attribute ``Value`` is desired. This is an index into the `Items <System.Classes.TCollection.Items.htm>`__ property array. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, ``GetItemAttr()`` always returns an empty string, because `Collection <System.Classes.TCollection.htm>`__ defines no custom attributes. + ''' + def Changed(self) -> None: + ''' + Responds when the collection or any of its items changes. + + ``Changed()`` is called automatically when items in the collection change or when the `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__ method signals that an update is complete. It checks the value of `UpdateCount <System.Classes.TCollection.UpdateCount.htm>`__, and if it is 0, calls the `Update <System.Classes.TCollection.Update.htm>`__ method, which performs any necessary updates. + + When writing a `Collection <System.Classes.TCollection.htm>`__ descendant, there is no need to call ``Changed()``. Instead, bracket any changes by calls to `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ and `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__. + ''' + def GetItem(self, Index: int) -> CollectionItem: + ''' + Returns a specified item in the collection. + + ``GetItem()`` is the protected read implementation of the `Items <System.Classes.TCollection.Items.htm>`__ property. + ''' + def SetItem(self, Index: int, Value: CollectionItem) -> None: + ''' + Copies the properties of another item to a specified item in the collection. + + ``SetItem()`` is the protected write implementation of the `Items <System.Classes.TCollection.Items.htm>`__ property. It calls the `Assign <System.Classes.TCollection.Assign.htm>`__ method of the item specified by ``Index``, so that the properties of the item specified by ``Value`` are copied to that item. + ''' + def GetItemAttrGetItemAttr(self, Item: CollectionItem) -> None: + ''' + Initializes the name of a newly inserted collection item. + + The `Insert <System.Classes.TCollection.Insert.htm>`__ method calls ``SetItemName()`` to initialize the + + ``Name`` property of items when it inserts them into the collection. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, ``SetItemName()`` does nothing. Some `Collection <System.Classes.TCollection.htm>`__ descendants override this method to provide collection items with default names. + ''' + def Update(self, Item: CollectionItem) -> None: + ''' + ``Updates()`` the collection to reflect changes to its items. + + Override ``Update()`` in a descendent class to make any necessary changes when the items in the collection change. This method is called automatically when an update is complete. + + ``Item`` identifies the item that changed. If the ``Item`` parameter is ``nil`` (Delphi) or ``NULL`` (C++), then the change affects more than one item in the collection. + + As implemented in `Collection <System.Classes.TCollection.htm>`__, ``Update()`` does nothing. Descendent classes override this method to make any necessary adjustments. + ''' + def Create(self, ItemClass: CollectionItemClass) -> None: + ''' + ``Creates`` and initializes a collection. + + Call ``Create()`` to instantiate a `Collection <System.Classes.TCollection.htm>`__ object at run time. Typically, `Collection <System.Classes.TCollection.htm>`__ descendants are created by a component that uses the collection to implement a property. + + ``ItemClass`` identifies the `CollectionItem <System.Classes.TCollectionItem.htm>`__ descendants that must be used to represent the items in the collection. The `Add <System.Classes.TCollection.Add.htm>`__ method uses this class to create items of the appropriate type. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the collection and each item in it. + + ``Destroy()`` uses the `Clear <System.Classes.TCollection.Clear.htm>`__ method to free each item referenced in the `Items <System.Classes.TCollection.Items.htm>`__ array, then destroys the collection itself. + ''' + def Owner(self) -> Persistent: + ''' + Returns the ``Owner()`` of the collection. + + Call ``Owner()`` to obtain a reference to the object that owns this collection. Typically, the owner uses the collection to implement one of its properties. + ''' + def Add(self) -> CollectionItem: + ''' + Creates a new `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance and adds it to the `Items <System.Classes.TCollection.Items.htm>`__ array. + + Call ``Add()`` to create an item in the collection. The new item is placed at the end of the `Items <System.Classes.TCollection.Items.htm>`__ array. + + ``Add()`` returns the new collection item. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies the contents of another similar object. + ``Assign()`` copies properties and other attributes of the specified ``Source`` object to the current object. The standard form of a call to ``Assign()`` is: + + .. code-block:: python + Destination.Assign(Source); {Delphi} + + .. code-block:: python + Destination->Assign(Source); // C++ + + which tells the current object to copy the contents of the ``Source`` object to itself. + Most objects override ``Assign()`` to handle the assignment of properties from similar objects. When overriding ``Assign()``, call the inherited method if the destination object cannot handle the assignment of properties from the class of the ``Source`` parameter. + If no overridden ``Assign()`` method can handle the assignment of properties from ``Source``, the method implemented in `Persistent <System.Classes.TPersistent.htm>`__ calls the source object's `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. This allows the source object to handle the assignment. If the ``Source`` object is ``nil`` (Delphi) or ``NULL`` (C++), ``Assign()`` raises an `EConvertError <System.SysUtils.EConvertError.htm>`__ exception. + In general, the statement + + .. code-block:: python + Destination := Source; {Delphi} + + .. code-block:: python + Destination = Source; // C++ + + is not the same as the statement + + .. code-block:: python + Destination.Assign(Source); {Delphi} + + .. code-block:: python + Destination->Assign(Source); // C++ + + The assignment operator makes ``Destination`` reference the same object as ``Source``, whereas the ``Assign()`` method copies the contents of the object referenced by ``Source`` into the object referenced by ``Destination``. + + .. note:: The types of some properties are also objects. If these properties have written methods that use ``Assign()`` to set the value of the property, then in these cases the assignment operator does the same thing as the ``Assign()`` method. + ''' + def BeginUpdate(self) -> None: + ''' + Signals the start of an update operation. + + Call ``BeginUpdate()`` before starting an operation that performs changes to `Collection <System.Classes.TCollection.htm>`__. After completing all the changes, call `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__ to signal the end of the operation. Every call to ``BeginUpdate()`` must be matched by a corresponding call to the `EndUpdate <System.Classes.TCollection.EndUpdate.htm>`__ method. + + For example, the method is used to suspend screen repainting until changes to a component that involves `Collection <System.Classes.TCollection.htm>`__ are completed. + ''' + def Clear(self) -> None: + ''' + Deletes all items from the collection. + + ``Clear()`` empties the `Items <System.Classes.TCollection.Items.htm>`__ array and destroys each `CollectionItem <System.Classes.TCollectionItem.htm>`__. + ''' + def ClearAndResetID(self) -> None: + ''' + No have docs. + ''' + def Delete(self, Index: int) -> None: + ''' + ``Deletes`` a single item from the collection. + + ``Delete()`` removes the specified collection item, moving up any items that come after that item in the `Items <System.Classes.TCollection.Items.htm>`__ property array. + + ``Index`` identifies the item to delete. This is the index of the item in the `Items <System.Classes.TCollection.Items.htm>`__ property array. 0 specifies the first item, 1 specifies the second item, and so on. + ''' + def EndUpdate(self) -> None: + ''' + Signals the end of an update operation. + + Call ``EndUpdate()`` after completing an operation that was preceded by a call to the `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ method. Every call to `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ must be matched by a corresponding call to the ``EndUpdate()`` method. + + For example, use ``EndUpdate()`` to re-enable screen repainting that was turned off with the `BeginUpdate <System.Classes.TCollection.BeginUpdate.htm>`__ method for the components that involve `Collection <System.Classes.TCollection.htm>`__. + ''' + def Sort(self, AComparer: IComparer) -> None: + ''' + No have docs. + ''' + def FindItemID(self, ID: int) -> CollectionItem: + ''' + Returns the item with the specified ``ID``. + + The ``FindItemID()`` method returns the item in the collection whose ``ID`` property is passed to it as a parameter. If no item has the specified ``ID``, ``FindItemID()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def GetEnumerator(self) -> CollectionEnumerator: + ''' + Returns a ``Collection`` enumerator. + + ``GetEnumerator()`` returns a `CollectionEnumerator <System.Classes.TCollectionEnumerator.htm>`__ reference, which enumerates all items in the collection. To do so, call the `CollectionEnumerator <System.Classes.TCollectionEnumerator.htm>`__ `GetCurrent <System.Classes.TCollectionEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TCollectionEnumerator.MoveNext.htm>`__ do loop. + ''' + def GetNamePath(self) -> str: + ''' + Returns a string used by the *Object Inspector*. + + If the collection has no owner, ``GetNamePath()`` returns the name of the collection's actual (runtime) type. If the collection is owned, ``GetNamePath()`` returns the owner's name followed, if applicable, by a dot and the name of the owner's property that holds the collection. For example, ``GetNamePath()`` might return "TreeView1.Items". + + .. note:: For a collection to have an owner, it must override the `GetOwner <System.Classes.TPersistent.GetOwner.htm>`__ method. + ''' + def Insert(self, Index: int) -> CollectionItem: + ''' + Creates a new `CollectionItem <System.Classes.TCollectionItem.htm>`__ instance and adds it to the `Items <System.Classes.TCollection.Items.htm>`__ array. + + Call ``Insert()`` to add a new item at a specified position in the collection. Existing items (starting from the specified position) are moved up in the `Items <System.Classes.TCollection.Items.htm>`__ array. + + ``Insert()`` returns the new collection item. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ColorBox(CustomColorBox): + ''' + ====================== + Vcl.ExtCtrls.TColorBox + ====================== + + ``ColorBox`` represents a ``ComboBox`` that lets users select a color. + + Use ``ColorBox`` to provide the user with a drop-down ``ComboBox`` from which to select a color. Use the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property to specify which colors the ``ColorBox`` should list. Each color is displayed next to a small square that is drawn in the corresponding color. + + Use the `Selected <Vcl.ExtCtrls.TCustomColorBox.Selected.htm>`__ property to access the color that the user selects. The `Colors <Vcl.ExtCtrls.TCustomColorBox-Colors.htm>`__ property provides access to the entire list of colors, while the `ColorNames <Vcl.ExtCtrls.TCustomColorBox-ColorNames.htm>`__ property lists their names. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AutoComplete: bool + ''' + Positions to matching list items as you type. + + `AutoComplete <Vcl.StdCtrls.TCustomComboBox.AutoComplete.htm>`__ will position to matching list values as you type, saving you keystrokes. + + As you type, the ``ItemIndex`` property is updated with the list entry that matches the characters you have entered. As you type, different list entries may match, and ``ItemIndex`` changes accordingly. + + There is a delay of `AutoCompleteDelay <Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay.htm>`__ milliseconds between the characters typed and the autocomplete operation. + ''' + AutoDropDown: bool + ''' + Specifies whether the drop-down list drops down automatically in response to user keystrokes. + + When `AutoDropDown <Vcl.StdCtrls.TCustomComboBox.AutoDropDown.htm>`__ is ``True``, the ``ComboBox`` automatically drops down its list when the user starts typing a string while the ``ComboBox`` has focus. + + When `AutoDropDown <Vcl.StdCtrls.TCustomComboBox.AutoDropDown.htm>`__ is ``False``, the user must explicitly use the drop-down button to drop down the ``ComboBox`` list. + ''' + DefaulColorColor: Color + ''' + No have docs. + ''' + NoneColorColor: Color + ''' + Specifies the color displayed in the ``ColorBox`` for ``clNone``. + + Set `NoneColorColor <Vcl.ExtCtrls.TCustomColorBox.NoneColorColor.htm>`__ to indicate what color the ``ColorBox`` should use when drawing the icon for ``clNone``. This property only affects the ``ColorBox`` if the `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ property includes ``cbSystemColors`` and ``cbIncludeNone``. + + .. note:: `NoneColorColor <Vcl.ExtCtrls.TCustomColorBox.NoneColorColor.htm>`__ only affects the way ``clNone`` appears in the ``ColorBox``. When you assign ``clNone`` to a control, the control determines how to interpret ``clNone``. + ''' + Selected: Color + ''' + Specifies the currently selected color. + + Use `Selected <Vcl.ExtCtrls.TCustomColorBox.Selected.htm>`__ to ``get`` or ``set`` the selected color as a ``Color`` value. + ''' + Style: ColorBoxStyle + ''' + Controls what colors are listed and how their names are formatted. + + Use `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ to configure what colors appear in the list and how the names appear. `Style <Vcl.ExtCtrls.TCustomColorBox.Style.htm>`__ is a set that includes 0 or more of the `ColorBoxStyles <Vcl.ExtCtrls.TColorBoxStyles.htm>`__ flags. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner *Bevel*. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner *Bevel* has a *raised*, *lowered*, or *flat* look. + + The inner *Bevel* appears immediately inside the outer *Bevel*. If there is no outer *Bevel* (``BevelOuter`` is ``bvNone``), the inner *Bevel* appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer *Bevel*. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer *Bevel* has a *raised*, *lowered*, or *flat* look. + + The outer *Bevel* appears immediately inside the border and outside the inner *Bevel*. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DropDownCount: int + ''' + Specifies the maximum number of items displayed in the drop-down list. + + By default, the drop-down list is long enough to contain eight items without requiring the user to scroll to see them all. To make the drop-down list smaller or larger, specify a number larger or smaller than eight as the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ value. + + If the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ ``Value`` is larger than the number of items in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property, the drop-down list will be just large enough to hold all the possible choices and no more. If the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ ``Value`` is smaller then the number of item in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property, the drop down list will display a ``ScrollBar``. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ItemHeight: int + ''' + Specifies the height, in pixels, of the items in the drop-down list. + + Read `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ to determine the height of the items in the drop-down list. + + The effect of setting `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ varies, depending on the type of ``ComboBox`` and the style. For example, `ComboBox <Vcl.StdCtrls.TComboBox.htm>`__ lets you set the item height only when `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``. If `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawVariable``, `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ is the default height for drawing list items, but this value can be overridden by an `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event handler. + + ``ComboBoxEx`` does not let you change the value of `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__. + + .. note:: ``ComboBox``\ es that do not support changes to `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ do not raise an exception when you attempt to change `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__; they simply ignore the attempt. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TColorBox.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes false automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the user changes the ``Text`` displayed in the edit region. + + Write an `OnChange <Vcl.StdCtrls.TCustomCombo.OnChange.htm>`__ event handler to take specific action immediately after the user edits the text in the edit region or selects an item from the list. The ``Text`` property gives the new value in the edit region. + + .. note:: `OnChange <Vcl.StdCtrls.TCustomCombo.OnChange.htm>`__ only occurs in response to user actions. Changing the ``Text`` property programmatically does not trigger an `OnChange <Vcl.StdCtrls.TCustomCombo.OnChange.htm>`__ event. + ''' + def OnCloseUp(self, Sender: Object) -> None: + ''' + # OnCloseUp: NotifyEvent + Occurs when the drop-down list closes up due to some user action. + + The `OnCloseUp <Vcl.StdCtrls.TCustomCombo.OnCloseUp.htm>`__ event occurs when the drop-down list is closed. This happens when a user selects a value from the drop-down list or when a mouse click occurs outside of the list. Write an `OnCloseUp <Vcl.StdCtrls.TCustomCombo.OnCloseUp.htm>`__ event handler to implement special processing that needs to occur when the drop-down list closes up. + + .. note:: An item is selected after the drop-down list is closed. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetColors(self, Sender: CustomColorBox, Items: list) -> None: + ''' + # OnGetColors: GetColorsEvent + Occurs when the control is populated with a customized list of colors. + + Use ``OnGetColors`` to populate a customized list of colors to be placed in the TColorBox colors list. + + The ``OnGetColors`` event is only called when `Style <Vcl.ExtCtrls.TColorBox.Style.htm>`__ includes the ``cbCustomColors`` property. + + - ``Sender`` is the instance of the `ColorBox <Vcl.ExtCtrls.TColorBox.htm>`__. + - ``Items`` is a ``String``\ s containing a list of colors displayed in the `ColorBox <Vcl.ExtCtrls.TColorBox.htm>`__. + + - ``Items.Strings`` contains the list of display strings for the ``ColorBox``. + - ``Items.Objects`` contains the list of ``Color`` values corresponding to each display name (``Items.Strings``), cast as a ``Object``. + + .. note:: When this event is raised, Items contains all of the colors that are specified in the `Style <Vcl.ExtCtrls.TColorBox.Style.htm>`__ property, such as ``cbStandard``. Colors are added, moved, or removed from the `ColorBox <Vcl.ExtCtrls.TColorBox.htm>`__ by manipulating this ``Items`` list. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnSelect(self, Sender: Object) -> None: + ''' + # OnSelect: NotifyEvent + Occurs when the user selects a string in the drop-down list. + + Write an `OnSelect <Vcl.StdCtrls.TCustomCombo.OnSelect.htm>`__ event handler to respond when the user changes the selected item in the drop-down list. `OnSelect <Vcl.StdCtrls.TCustomCombo.OnSelect.htm>`__ occurs after the selection has changed and the ``Text`` property reflects the new item. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ComboBox(CustomComboBox): + ''' + ====================== + Vcl.StdCtrls.TComboBox + ====================== + + ``ComboBox`` combines an edit box with a scrollable list. + + A ``ComboBox`` component is an edit box with a scrollable drop-down list attached to it. Users can select an item from the list or type directly into the edit box. + + .. note:: The width of the button in a ``ComboBox`` is equal to the width that Windows uses for ``ScrollBar``\ s. This width depends on the color scheme that the user has chosen (by right-clicking the desktop, selecting *Properties*, and choosing *Appearance*). If you carefully size your ``ComboBox`` so all the text is visible, then a user running under a different color scheme may find that the text is obscured by the button. One solution is to set the ``ScrollBar`` wide when developing the application. Most color schemes use a ``ScrollBar`` that is at most 21 pixels wide. + + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AutoComplete: bool + ''' + Positions to matching list items as you type. + + `AutoComplete <Vcl.StdCtrls.TCustomComboBox.AutoComplete.htm>`__ will position to matching list values as you type, saving you keystrokes. + + As you type, the ``ItemIndex`` property is updated with the list entry that matches the characters you have entered. As you type, different list entries may match, and ``ItemIndex`` changes accordingly. + + There is a delay of `AutoCompleteDelay <Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay.htm>`__ milliseconds between the characters typed and the autocomplete operation. + ''' + AutoCompleteDelay: int + ''' + Specifies the delay between a key press and an attempt to autocomplete the field. + + ``Vcl.StdCtrls.TComboBox.AutoCompleteDelay`` inherits from `Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay <Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay.htm>`__. All content below this line refers to `Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay <Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay.htm>`__. + + Specifies the delay, in milliseconds, between a key press and an attempt to autocomplete the field. Autocomplete will position to matching list values as you type, sometimes saving you keystrokes. + + `AutoCompleteDelay <Vcl.StdCtrls.TCustomComboBox.AutoCompleteDelay.htm>`__ is only in effect when `AutoComplete <Vcl.StdCtrls.TCustomComboBox.AutoComplete.htm>`__ is ``True``. + ''' + AutoDropDown: bool + ''' + Specifies whether the drop-down list drops down automatically in response to user keystrokes. + + When `AutoDropDown <Vcl.StdCtrls.TCustomComboBox.AutoDropDown.htm>`__ is ``True``, the ``ComboBox`` automatically drops down its list when the user starts typing a string while the ``ComboBox`` has focus. + + When `AutoDropDown <Vcl.StdCtrls.TCustomComboBox.AutoDropDown.htm>`__ is ``False``, the user must explicitly use the drop-down button to drop down the ``ComboBox`` list. + ''' + AutoCloseUp: bool + ''' + Specifies whether the drop-down closes up automatically when the user selects an item. + + When `AutoCloseUp <Vcl.StdCtrls.TCustomComboBox.AutoCloseUp.htm>`__ is ``True``, the drop-down closes up automatically when the user selects an item. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + Style: ComboBoxStyle + ''' + Determines the display style of the ``ComboBox``. + + Set `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ to specify how the list and edit region of the ``ComboBox`` should appear. + + When `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``, the `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ event occurs when the list items need to be drawn. If `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawVariable``, an `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event occurs as well. + + The possible values of `ComboBoxStyle <Vcl.StdCtrls.TComboBoxStyle.htm>`__ are: + + ======================= ==================================================================================================================================================== + **Value** **Meaning** + ======================= ==================================================================================================================================================== + ``csDropDown`` Defines a drop-down list with an ``Edit`` box for manually entered text. All items are strings of the same height. + ``csSimple`` Defines an ``Edit`` box with a fixed list (``ListBox``) below it. The length of the list is determined by the ``Height`` of the ``ComboBox``. + ``csDropDownList`` Defines a drop-down list with no ``Edit`` box; the user cannot enter text manually. All items are strings of the same height. + ``csOwnerDrawFixed`` Defines an owner-drawn drop-down list with no ``Edit`` box. Each item in the list has the height specified by the ``ItemHeight`` property. + ``csOwnerDrawVariable`` Defines an owner-draw drop-down list with no ``Edit`` box. List items can have varying heights. + ======================= ==================================================================================================================================================== + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text in the ``ComboBox``. + + Use `CharCase <Vcl.StdCtrls.TCustomComboBox.CharCase.htm>`__ to force the contents of the ``ComboBox`` into upper or lower case. + + When `CharCase <Vcl.StdCtrls.TCustomComboBox.CharCase.htm>`__ is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types into the ``ComboBox``. Changing the `CharCase <Vcl.StdCtrls.TCustomComboBox.CharCase.htm>`__ property changes the actual text, not just its appearance; case information is lost and cannot be recaptured by changing `CharCase <Vcl.StdCtrls.TCustomComboBox.CharCase.htm>`__ back to ``ecNormal``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + DropDownCount: int + ''' + Specifies the maximum number of items displayed in the drop-down list. + + By default, the drop-down list is long enough to contain eight items without requiring the user to scroll to see them all. To make the drop-down list smaller or larger, specify a number larger or smaller than eight as the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ value. + + If the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ ``Value`` is larger than the number of items in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property, the drop-down list will be just large enough to hold all the possible choices and no more. If the `DropDownCount <Vcl.StdCtrls.TCustomCombo.DropDownCount.htm>`__ ``Value`` is smaller then the number of item in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ property, the drop down list will display a ``ScrollBar``. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + ExtendedUI: bool + ''' + No have docs. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an IME processes user keystrokes. An IME is a front-end input processor for Asian language characters. The IME hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the IME so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ItemHeight: int + ''' + Specifies the height, in pixels, of the items in the drop-down list. + + Read `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ to determine the height of the items in the drop-down list. + + The effect of setting `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ varies, depending on the type of ``ComboBox`` and the style. For example, `ComboBox <Vcl.StdCtrls.TComboBox.htm>`__ lets you set the item height only when `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``. If `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is ``csOwnerDrawVariable``, `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ is the default height for drawing list items, but this value can be overridden by an `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event handler. + + ``ComboBoxEx`` does not let you change the value of `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__. + + .. note:: ``ComboBox``\ es that do not support changes to `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__ do not raise an exception when you attempt to change `ItemHeight <Vcl.StdCtrls.TCustomCombo.ItemHeight.htm>`__; they simply ignore the attempt. + ''' + ItemIndex: int + ''' + Specifies the index of the selected item. + + Read `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ to determine which item is selected. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ is -1. If the ``ListControl`` supports multiple selected items, `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ is the index of the selected item that has focus. + + Set `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ programmatically to select an item by passing in the ``Index`` value. + + .. note:: To implement the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property in a `CustomListControl <Vcl.Controls.TCustomListControl.htm>`__ descendant, override the protected `GetItemIndex <Vcl.Controls.TCustomListControl.GetItemIndex.htm>`__ and `SetItemIndex <Vcl.Controls.TCustomListControl.SetItemIndex.htm>`__ methods. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can type into the edit portion of the ``ComboBox``. + + Use `MaxLength <Vcl.StdCtrls.TCustomCombo.MaxLength.htm>`__ to limit the number of characters that the user can enter into the edit portion of the ``ComboBox``. A value of 0 indicates that there is no application-defined limit on the length. + + .. note:: Setting `MaxLength <Vcl.StdCtrls.TCustomCombo.MaxLength.htm>`__ will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of `MaxLength <Vcl.StdCtrls.TCustomCombo.MaxLength.htm>`__ characters. + + .. note:: Even when `MaxLength <Vcl.StdCtrls.TCustomCombo.MaxLength.htm>`__ is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``VCL.StdCtrls.TComboBox.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Sorted: bool + ''' + Determines whether the list portion of the ``ComboBox`` is alphabetized. + + Set `Sorted <Vcl.StdCtrls.TCustomComboBox.Sorted.htm>`__ to ``True`` to sort the items in the `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ list alphabetically. New items added to the list while `Sorted <Vcl.StdCtrls.TCustomComboBox.Sorted.htm>`__ is ``True`` are inserted in the correct alphabetical position. + + When `Sorted <Vcl.StdCtrls.TCustomComboBox.Sorted.htm>`__ is changed from ``False`` to ``True``, the original order of the items is lost. Setting `Sorted <Vcl.StdCtrls.TCustomComboBox.Sorted.htm>`__ back to ``False`` does not restore the original order. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Text: Caption + ''' + Contains a text string associated with the control. + + Use the `Text <Vcl.Controls.TControl.Text.htm>`__ property to read the `Text <Vcl.Controls.TControl.Text.htm>`__ of the control or to specify a new string for the `Text <Vcl.Controls.TControl.Text.htm>`__ value. By default, `Text <Vcl.Controls.TControl.Text.htm>`__ is the control name. For ``Edit`` controls and memos, the `Text <Vcl.Controls.TControl.Text.htm>`__ appears within the control. For ``ComboBox``\ es, the `Text <Vcl.Controls.TControl.Text.htm>`__ is the content of the edit control portion of the ``ComboBox``. + + .. note:: Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. Which property is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + ''' + TextHint: str + ''' + Specifies the text that is displayed as a text watermark in the ``Edit`` box of the ``ComboBox`` control. + + Use `TextHint <Vcl.StdCtrls.TCustomComboBox.TextHint.htm>`__ to ``get`` or ``set`` the watermark text that is shown in the ``Edit`` box of the ``ComboBox`` control. + + The disabled watermark is displayed as long as you do not modify the `Text <Vcl.Controls.TControl.Text.htm>`__ property of the ``ComboBox``. + + .. note:: This feature is only available for *Vista*, *Windows 7*, or later *Windows* operating systems. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + Items: Strings + ''' + Provides access to the list of items (``Strings``) in the list portion of the ``ComboBox``. + + Read `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ to access the list of items that appears in the ``ComboBox``. Use the methods of `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ to add, insert, delete and move items. Set the value of `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ to copy the items from another ``StringList``. + + For example, for `Vcl.DBCtrls.TDBComboBox <Vcl.DBCtrls.TDBComboBox.htm>`__, use `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ to supply the values in the list from which the user can choose. Because `Items <Vcl.StdCtrls.TCustomCombo.Items.htm>`__ is an object of type ``Strings``, you can add, delete, insert, and move items using the ``Add()``, ``Delete()``, ``Insert()``, ``Exchange()``, and ``Move()`` methods of the ``Strings`` object. For example, to add each string to the ``ComboBox`` list, write code such as the following: + + .. code-block:: python + :caption: Delphi + + while not CountryTbl.Eof do begin + DBComboBox1.Items.Add(CountryTbl.FieldByName('Country').AsString); + CountryTbl.Next; + end; + + .. code-block:: python + :caption: C++ + + while (!CountryTbl->Eof) + { + DBComboBox1->Items->Add(CountryTbl->FieldByName("Country")->AsString); + CountryTbl->Next(); + } + + The `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property determines which item is selected, if any. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the user changes the ``Text`` displayed in the edit region. + + Write an `OnChange <Vcl.StdCtrls.TCustomCombo.OnChange.htm>`__ event handler to take specific action immediately after the user edits the text in the edit region or selects an item from the list. The ``Text`` property gives the new value in the edit region. + + .. note:: `OnChange <Vcl.StdCtrls.TCustomCombo.OnChange.htm>`__ only occurs in response to user actions. Changing the ``Text`` property programmatically does not trigger an `OnChange <Vcl.StdCtrls.TCustomCombo.OnChange.htm>`__ event. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnCloseUp(self, Sender: Object) -> None: + ''' + # OnCloseUp: NotifyEvent + Occurs when the drop-down list closes up due to some user action. + + The `OnCloseUp <Vcl.StdCtrls.TCustomCombo.OnCloseUp.htm>`__ event occurs when the drop-down list is closed. This happens when a user selects a value from the drop-down list or when a mouse click occurs outside of the list. Write an `OnCloseUp <Vcl.StdCtrls.TCustomCombo.OnCloseUp.htm>`__ event handler to implement special processing that needs to occur when the drop-down list closes up. + + .. note:: An item is selected after the drop-down list is closed. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDrawItem(self, Control: WinControl, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + # OnDrawItem: DrawItemEvent + Occurs when an item in an owner-draw ``ComboBox`` needs to be displayed. + + Write an `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ event handler to draw the items in the drop-down list of an owner-draw ``ComboBox``. An `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ event handler can add graphic elements to the list items, or replace the list item text by graphics. + + raw the items on the `Canvas <Vcl.StdCtrls.TCustomCombo.Canvas.htm>`__ using the coordinates provided by the ``Rect`` parameter. `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ occurs only if `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawFixed`` or ``csOwnerDrawVariable``. + + If an `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__ event handler is not provided, the ``ComboBox`` fills the ``Rect`` parameter with the current brush and writes the text value of the item specified by the ``Index`` parameter. + + ``OnDrawItem`` is an event handler of type `Vcl.StdCtrls.TDrawItemEvent <Vcl.StdCtrls.TDrawItemEvent.htm>`__. + ''' + def OnDropDown(self, Sender: Object) -> None: + ''' + # OnDropDown: NotifyEvent + Occurs when the user opens the drop-down list. + + Write an `OnDropDown <Vcl.StdCtrls.TCustomCombo.OnDropDown.htm>`__ event handler to implement special processing that needs to occur only when the drop-down list is activated. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMeasureItem(self, Control: WinControl, Index: int, Height: int) -> None: + ''' + # OnMeasureItem: MeasureItemEvent + Occurs when an item in a ``csOwnerDrawVariable`` ``ComboBox`` needs to be redisplayed. + + When `Style <Vcl.StdCtrls.TCustomComboBox.Style.htm>`__ is set to ``csOwnerDrawVariable``, the `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event precedes `OnDrawItem <Vcl.StdCtrls.TCustomComboBox.OnDrawItem.htm>`__. Write an `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ event handler to specify the height, in pixels, needed to draw an item in the drop-down list. + + `OnMeasureItem <Vcl.StdCtrls.TCustomComboBox.OnMeasureItem.htm>`__ is of type `Vcl.StdCtrls.TMeasureItemEvent <Vcl.StdCtrls.TMeasureItemEvent.htm>`__ which contains three parameters describing the item to measure. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnSelect(self, Sender: Object) -> None: + ''' + # OnSelect: NotifyEvent + Occurs when the user selects a string in the drop-down list. + + Write an `OnSelect <Vcl.StdCtrls.TCustomCombo.OnSelect.htm>`__ event handler to respond when the user changes the selected item in the drop-down list. `OnSelect <Vcl.StdCtrls.TCustomCombo.OnSelect.htm>`__ occurs after the selection has changed and the ``Text`` property reflects the new item. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Component(Persistent, IInterface, IInterfaceComponentReference): + ''' + ========================= + System.Classes.TComponent + ========================= + + .. code-block:: python + + class procedure TPyDelphiComponent.RegisterGetSets( + PythonType: PythonType); + begin + inherited; + with PythonType do + begin + AddGetSet('ComponentCount', @TPyDelphiComponent.Get_ComponentCount, nil, + 'Returns the owned component count', nil); + AddGetSet('Owner', @TPyDelphiComponent.Get_Owner, nil, + 'Returns the Component Owner', nil); + AddGetSet('Components', @TPyDelphiComponent.Get_Components, nil, + 'Returns an iterator over the owned components', nil); + end; + end; + + class procedure TPyDelphiComponent.RegisterMethods( + PythonType: PythonType); + begin + inherited; + PythonType.AddMethod('GetParentComponent', @TPyDelphiComponent.GetParentComponent_Wrapper, + 'TComponent.GetParentComponent()'#10 + + 'Returns the parent of a component.'); + PythonType.AddMethod('HasParent', @TPyDelphiComponent.HasParent_Wrapper, + 'TComponent.HasParent()'#10 + + 'Indicates whether the component has a parent to handle its filing.'); + PythonType.AddMethod('BindMethodsToEvents', @TPyDelphiComponent.BindMethodsToEvents, + 'TComponent.BindMethodsToEvents(prefix)'#10 + + 'Connects methods to component events if they are named using the following patter: Prefix_ComponentName_EventName.'+#10+ + 'Example: def handle_button1_OnClick(Sender): pass'+#10+ + 'The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event.'+#10+ + 'Note that the prefix parameter is optional and will default to "handle_".'); + end; + + + ``Component`` is the common ancestor of all component classes. + + ``Component`` is the base class for all components. Components are persistent objects that have the following capabilities: + + - *IDE* integration. The ability to appear on an *IDE Palette* and be manipulated in a **Form Designer**. + - Ownership. The ability to manage other components. If component ``'A'`` owns component ``'B'``, then ``'A'`` is responsible for destroying ``'B'`` when ``'A'`` is destroyed. + - Streaming and filing. Enhancements of the persistence features inherited from `Persistent <System.Classes.TPersistent.htm>`__. + - *COM* support. Components can be converted into *ActiveX* controls or other *COM* objects using wizards provided with Windows products. Components can serve as wrappers for *COM* objects. + + .. note:: *COM* features are present in all implementations of ``Component``, including those provided for compatibility with *OS X*. However, *COM* features are **Windows only** and cannot be used in multi-device (cross-platform) applications. + + ``Component`` does not provide any user interface or display features. These features are provided by two classes that directly descend from ``Component``: + + - ``Control``, in the `FMX.Types <FMX.Types.htm>`__ unit, is the base class for **visual components** in applications built with the *FireMonkey (FMX) Framework*. + - ``Control``, in the `Vcl.Controls <Vcl.Controls.htm>`__ unit, is the base class for **visual components** in Windows-only (VCL) applications. + + .. note:: Only the `FMX.Types <FMX.Types.htm>`__ unit and other *FireMonkey*-specific units can be used with *OS X* applications. That is, you cannot use *VCL* units in multi-device applications. + + Components that can be visible at run time are sometimes called **visual components**. Other components, which are never visible at run time, are sometimes called **non-visual components**. However it is more common to refer to **visual components** as **controls** and **non-visual components** simply as **components**. + + Do not create instances of ``Component``. Use ``Component`` as a base class when declaring non-visual components that can appear on the component palette and be used in the **Form Designer**. Properties and methods of ``Component`` provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior. + ''' + + __hash__: ClassVar[None] = ... + ComObject: IUnknown + ''' + Specifies the interface reference implemented by the component. + + Use ``ComObject`` to assign a *COM* interface implemented by a component to an interface reference. This property is used by components that support *COM* interfaces. + + If the component is not a wrapper for a *COM* component, trying to read ``ComObject`` causes `Component <System.Classes.TComponent.htm>`__ to raise an ``EComponentError`` exception. + ''' + Components: list + ''' + :type list + + .. code-block:: python + + for c in self.Components: + print(c) + + Lists all components owned by the component. + + Use ``Components`` to access any of the components owned by this component, such as the components owned by a form. The ``Components`` property is most useful when referring to owned components by number rather than name. It is also used internally for iterative processing of all owned components. + + ``Index`` ranges from 0 to `ComponentCount <System.Classes.TComponent.ComponentCount.htm>`__ minus 1. + ''' + ComponentCount: int + ''' + Indicates the number of components owned by the component. + + Use the ``ComponentCount`` property to determine the number of components owned by a component, for example, when iterating through the components list to perform an action on all owned components. The ``ComponentCount`` property equals the number of items in the components list. This value is one more than the highest `Components <System.Classes.TComponent.Components.htm>`__ index, because the first components index is 0. + ''' + ComponentIndex: int + ''' + Indicates the position of the component in its owner's `Components <System.Classes.TComponent.Components.htm>`__ property array. + + Use ``ComponentIndex`` when iterating through the `Components <System.Classes.TComponent.Components.htm>`__ list of the component's owner to perform an action on owned components. It can be used in conjunction with `ComponentCount <System.Classes.TComponent.ComponentCount.htm>`__. ``ComponentIndex`` is used internally for iterative assignment procedures. + + .. note:: The first component in the list has a ``ComponentIndex`` value of 0, the second has a value of 1, and so on. Therefore, when using ``ComponentIndex`` with `ComponentCount <System.Classes.TComponent.ComponentCount.htm>`__, note that `ComponentCount <System.Classes.TComponent.ComponentCount.htm>`__ is always 1 more than the highest `Components <System.Classes.TComponent.Components.htm>`__ index. + ''' + ComponentState: ComponentState + ''' + Describes the current state of the component, indicating when a component needs to avoid certain actions. + + ``ComponentState`` is a set of constants defined in the `ComponentState <System.Classes.TComponentState.htm>`__ type. + + Components use the ``ComponentState`` property to detect states in which certain kinds of actions are allowed or disallowed. For example, if a component needs to avoid certain behaviors at design time that it performs at run time, it can check for the ``csDesigning`` flag. + + ``ComponentState`` is read-only and its flags are set automatically when appropriate. + ''' + DesignInfo: DesignInfo + ''' + Contains information used by the *Form Designer*. + + ``DesignInfo`` is used internally. Do not use this property in applications. + ''' + Owner: Component + ''' + Indicates the component that is responsible for streaming and freeing this component. + + Use ``Owner()`` to find the owner of a component. The ``Owner()`` of a component is responsible for two things: + + The memory for the owned component is freed when its owner's memory is freed. This means that when a form is destroyed, all the components on the form are also destroyed. + + The ``Owner()`` is responsible for loading and saving the published properties of its owned controls. + + By default, a form owns all components that are on it. In turn, the form is owned by the application. Thus, when the application shuts down and its memory is freed, the memory for all forms (and all their owned components) is also freed. When a form is loaded into memory, it loads all of the components that are on it. + + The owner of a component is determined by the parameter passed to the constructor when the component is created. For components created in the *Form Designer*, the form is automatically assigned as the ``Owner()``. + + .. warning:: If a component has an ``Owner()`` other than a form or data module, it will not be saved or loaded with its ``Owner()`` unless you identify it as a subcomponent. To identify a component as a subcomponent, call the `SetSubComponent <System.Classes.TComponent.SetSubComponent.htm>`__ method. + ''' + VCLComObject: Pointer + ''' + Represents information used internally by components that support *COM*. + + ``VCLComObject`` is for internal use only. + ''' + Observers: Observers + ''' + Indicates the `Observers <System.Classes.TObservers.htm>`__ object added to the ``Component``. + + ``Observers`` is a read-only property that returns the Observers <System.Classes.TObservers.htm>`__ added to the ``Component``, in order to use the notifications provided by the observers either with `LiveBindings <LiveBindings_in_RAD_Studio.htm>`__ or for the developers' own purposes. + ''' + Name: ComponentName + ''' + Specifies the name of the component as referenced in code. + + Use ``Name`` to change the name of a component to reflect its purpose in the current application. By default, the *IDE* assigns sequential names based on the type of the component, such as 'Button1', 'Button2', and so on. + + Use ``Name`` to refer to the component in code. + + .. warning:: Changing ``Name`` at run time causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception. + ''' + Tag: int + ''' + Stores a int integral value as a part of a component. + + Tag has no predefined meaning. The ``Tag`` property can store any additional int value for the convenience of developers. Often, ``Tag`` stores a pointer. A ``Tag`` value can be typecast to the appropriate pointer type. Notice that on 64-bit platforms, all `pointer types are 8 bytes in size <64-bit_Windows_Data_Types_Compared_to_32-bit_Windows_Data_Types.htm>`__, while on 32-bit platforms, pointer types are 4 bytes. These pointer sizes correspond to sizes of `int <System.int.htm>`__ integral values on 64-bit and 32-bit platforms. + ''' + ComponentStyle: ComponentStyle + ''' + Governs the behavior of the component. + + ``ComponentStyle`` governs how the component interacts with the streaming system and the *Object Inspector*. ``ComponentStyle`` is a read-only property. Typically, the value of the various component style flags are part of a component definition, specified in a component constructor. The one exception to this is the ``csSubComponent`` style, which can be set by calling the `SetSubComponent <System.Classes.TComponent.SetSubComponent.htm>`__ method. + ''' + + def AsyncSchedule(self, ASyncResult: BaseAsyncResult) -> None: + ''' + Schedules asynch method calls. + + By default, ``AsyncSchedule()`` uses `Queue <System.Classes.TThread.Queue.htm>`__ in order to queue the asynch method call with the main thread. + + Override ``AsyncSchedule()`` in descendant components in order to modify the management of the asynchronous scheduling. + ''' + def ChangeName(self, NewName: ComponentName) -> None: + ''' + Sets the private, internal storage for the `Name <System.Classes.TComponent.Name.htm>`__ property to the string passed in ``NewName``. + + Do not use ``ChangeName`` directly in an application. Instead, use the `Name <System.Classes.TComponent.Name.htm>`__ property. + + .. note:: he property setter for `Name <System.Classes.TComponent.Name.htm>`__ -- `SetName <System.Classes.TComponent.SetName.htm>`__-- uses ``ChangeName`` to change the component's name. ``ChangeName`` is not virtual; do not override it. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Designates methods for storing an object's unpublished data on a stream such as a form file. + + `Component <System.Classes.TComponent.htm>`__ overrides the ``DefineProperties()`` method defined in `Persistent <System.Classes.TPersistent.htm>`__ to define "fake" ``Top`` and Left`` properties. These are defined so that components that are not controls can be manipulated at design time. However, the ``Top`` and Left`` properties are hidden, that is, they are not published, because only controls appear at run time. + + ``DefineProperties()`` is virtual; descendent classes can override it. When overriding ``DefineProperties()``, be aware that the `Ancestor <System.Classes.TFiler.Ancestor.htm>`__ property of ``Filer`` might be set, and that this property can determine whether or not it is appropriate to write properties. + + ``DefineProperties()`` is called automatically as part of the component streaming system; do not call it directly. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Enumerates all child components. + + ``GetChildren()`` is used internally in the component streaming system. It is not necessary to call it directly. + + ``GetChildren()`` expects a `GetChildProc <System.Classes.TGetChildProc.htm>`__ routine that receives all enumerated components. + + Root represents the owner of the components that will be enumerated. + + This method does nothing in `Component <System.Classes.TComponent.htm>`__ and is expected to be overridden in descendants. + ''' + def GetChildOwner(self) -> Component: + ''' + Returns the owner of a child component being read from a stream. + + ``GetChildOwner()`` is used internally by the component streaming system. It is rarely necessary to call it directly. + + In `Component <System.Classes.TComponent.htm>`__, ``GetChildOwner()`` always returns ``nil`` (Delphi) or ``NULL`` (C++), indicating that the owner is the root component currently being read (usually a form or data module). The `Owner <System.Classes.TComponent.Owner.htm>`__ of a component is responsible for destroying it. + ''' + def GetChildParent(self) -> Component: + ''' + Returns the parent or, if there is no parent, returns the owner of a child component being read from a stream. + + ``GetChildParent()`` is used internally in the component streaming system. It is not necessary to call it directly. + + As implemented in `Component <System.Classes.TComponent.htm>`__, ``GetChildParent()`` returns ``Self`` (Delphi) or ``this`` (C++). If ``GetChildParent()`` returns ``nil`` (Delphi) or ``NULL`` (C++), the parent is assumed to be the root component currently being read (usually a form). + ''' + def GetOwner(self) -> Persistent: + ''' + Returns the owner of a component. + + ``GetOwner()`` is called by `GetNamePath <System.Classes.TComponent.GetNamePath.htm>`__ to find the owner of a component. GetNamePath and ``GetOwner()`` are introduced in `Persistent <System.Classes.TPersistent.htm>`__ so descendants such as collections can appear in the *Object Inspector*. For `Component <System.Classes.TComponent.htm>`__, ``GetOwner()`` returns the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the form file has been read into memory. + + Do not call the protected ``Loaded()`` method. The streaming system calls this method after it loads the component's form from a stream. + + When the streaming system loads a form or data module from its form file, it first constructs the form component by calling its constructor, then reads its property values from the form file. After reading all the property values for all the components, the streaming system calls the ``Loaded()`` methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time ``Loaded()`` is called. ``Loaded()`` is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, ``Loaded()`` clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: ``Loaded()`` may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden ``Loaded()`` method without first checking that the memory has not been allocated in a previous call. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + Do not call the ``Notification()`` method in an application. ``Notification()`` is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: ``Notification()`` is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def GetDeltaStreams(self, Proc: GetStreamProc) -> None: + ''' + No have docs. + ''' + def PaletteCreated(self) -> None: + ''' + No have docs. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Reads the state of the component. + + ``ReadState()`` is used internally in the component streaming system. It is not necessary to call it directly. + + ``ReadState()`` expects a Reader <System.Classes.TReader.htm>`__ object, which is used for reading the state of the component. + ''' + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def ObserverAdded(self, ID: int, Observer: IObserver) -> None: + ''' + No have docs. + ''' + def GetObservers(self) -> Observers: + ''' + Getter of `Observers <System.Classes.TComponent.Observers.htm>`__. + ''' + def SetAncestor(self, Value: bool) -> None: + ''' + Clears or sets ``csAncestor`` state in the component's `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property. + + ``SetAncestor()`` is used internally in the component streaming system. It is not necessary to call it directly. + + If ``Value`` is set to ``True``, the ``csAncestor`` flag is included into the component state; otherwise, it is excluded. + ''' + def SetDesigning(self, Value: bool, SetChildren: bool) -> None: + ''' + Ensures that components inserted at design time have their design-mode flag set. + + ``SetDesigning()`` is used internally by the *Form Designer*. Do not call ``SetDesigning()`` directly. + + ``SetDesigning()`` sets the ``csDesigning`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property if ``Value`` is ``True``; otherwise, it removes ``csDesigning``. + + If the ``SetChildren`` parameter is ``True``, ``SetDesigning()`` then calls the ``SetDesigning()`` methods of any owned components, passing ``Value``, so that the owned components' `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ properties are synchronized with the owner's. + + The `InsertComponent <System.Classes.TComponent.InsertComponent.htm>`__ and `RemoveComponent <System.Classes.TComponent.RemoveComponent.htm>`__ methods call ``SetDesigning()`` for inserted or removed components to ensure that their design-mode flags are set properly. + ''' + def SetInline(self, Value: bool) -> None: + ''' + Sets the ``csInline`` bit of the component's `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property. + + ``SetInline()`` is used internally to indicate whether the component can act as a root component in the designer but also be embedded in a form. + + ``SetInline()`` sets the ``csInline`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property if ``Value`` is ``True``; otherwise, it removes ``csInline``. + ''' + def SetDesignInstance(self, Value: bool) -> None: + ''' + Ensures that components inserted at design time have their design-mode flag set. + + ``SetDesignInstance()`` is used internally by the *Form Designer* to identify objects that act as a design surface. Do not call ``SetDesignInstance()`` directly. + + ``SetDesignInstance()`` sets the ``csDesignInstance`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property if ``Value`` is ``True``; otherwise, it removes ``csDesignInstance``. + ''' + def SetName(self, NewName: ComponentName) -> None: + ''' + Sets the value of the `Name <System.Classes.TComponent.Name.htm>`__ property. + + ``SetName()`` is the virtual property setter for the `Name <System.Classes.TComponent.Name.htm>`__ property. It calls the `ChangeName <System.Classes.TComponent.ChangeName.htm>`__ method, which performs the actual name change. + + `ChangeName <System.Classes.TComponent.ChangeName.htm>`__ is not virtual; override ``SetName()`` instead when modifying the behavior of the `Name <System.Classes.TComponent.Name.htm>`__ property. + + .. warning:: Using ``SetName()`` to change the name of a component at run time causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception. + ''' + def SetChildOrder(self, Child: Component, Order: int) -> None: + ''' + Sets the visual ordering of a child control. + + ``SetChildOrder()`` is used internally in the component streaming system. It is not necessary to call it directly. + + Derived classes override this method to actually implement the ordering. `WinControl <Vcl.Controls.TWinControl.htm>`__ uses this ordering information to Z-align the controls. + ''' + def SetParentComponent(self, Value: Component) -> None: + ''' + Sets the parent component. + + ``SetParentComponent()`` is used internally in the component streaming system. It is not necessary to call it directly. + + Derived classes override this method to implement proper handling for parenting. + ''' + def Updating(self) -> None: + ''' + Sets the `csUpdating <System.Classes.TComponentState.htm>`__ state in the component's `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property. + + Do not call ``Updating()`` directly. It is used internally to indicate that the component is about to be updated. A call to ``Updating()``, which sets the ``csUpdating`` flag, is always followed by a call to `Updated <System.Classes.TComponent.Updated.htm>`__, which clears the flag. + ''' + def Updated(self) -> None: + ''' + Clears the ``csUpdating`` state in the component's `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property when the component finishes updating. + + Do not call ``Updated()`` directly. It is used internally to clear the ``csUpdating`` flag of the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property. A call to ``Updated()`` always follows a call to `Updating <System.Classes.TComponent.Updating.htm>`__, which sets the flag. + ''' + def UpdateRegistry(self, Register: bool, ClassID: str, ProgID: str) -> None: + ''' + Provides the interface for a method that adds type library and version information to the Registry on components that implement *COM* interfaces. + + Do not call ``UpdateRegistry()`` directly. It is for internal use only. + ''' + def ValidateRename(self, AComponent: Component, CurName: str, NewName: str) -> None: + ''' + Ensures that renaming an owned component does not create a name conflict. + + ``ValidateRename()`` checks whether a component can rename one of its owned components, passed in ``AComponent``, from its current name (CurName) to the string passed in NewName. If ``AComponent`` is ``nil`` (Delphi) or ``NULL`` (C++) or NewName is already the name of a component in the `Components <System.Classes.TComponent.Components.htm>`__ list, ``ValidateRename()`` raises an ``EComponentError`` exception. + + ``ValidateRename()`` is used internally when the `Name <System.Classes.TComponent.Name.htm>`__ property is modified. It is not necessary to call it directly. + ''' + def ValidateContainer(self, AComponent: Component) -> None: + ''' + Determines whether an object can be inserted into a container. + + ``ValidateContainer()`` is called by a component when it is about to be inserted into a container object. By default, ``ValidateContainer()`` calls the `ValidateInsert <System.Classes.TComponent.ValidateInsert.htm>`__ method of the component specified by the ``AComponent`` parameter. + + Descendent components can override ``ValidateContainer()`` to disallow a component from being inserted into specific containers. To disallow an insertion, raise an exception in the derived method. + ''' + def ValidateInsert(self, AComponent: Component) -> None: + ''' + Provides the interface for a method that validates a child component before it is inserted. + + ``ValidateInsert()`` does nothing in `Component <System.Classes.TComponent.htm>`__. Descendent classes can override it to disallow a component from accepting an object as a child. By default, ``ValidateInsert()`` allows any object to be inserted into the component. + + If a component needs to validate only certain objects, descendent classes can override ``ValidateInsert()`` to filter out those objects. To disallow an insertion, raise an exception in the derived method. + ''' + def WriteState(self, Writer: Writer) -> None: + ''' + Writes the state of the component. + + ``WriteState()`` is used internally in the component streaming system. It is not necessary to call it directly. + + This method expects a `Writer <System.Classes.TWriter.htm>`__ object that is used for storing the state of the component. + ''' + def RemoveFreeNotifications(self) -> None: + ''' + Notifies all owned components of the owner component's imminent destruction. + + The ``RemoveFreeNotifications()`` method notifies all owned components of the owner component's imminent destruction. ``RemoveFreeNotifications()`` is called automatically when the component is destroyed. + ''' + def QueryInterface(self, IID: GUID, Obj) -> HResult: + ''' + .. code-block:: python + :caption: Delphi + + function QueryInterface(const IID: *GUID*; out Obj): HResult; virtual; stdcall; + + Returns a reference to a specified interface if the current component supports that interface. + + ``QueryInterface()`` checks whether the component supports the interface specified by ``IID`` and, if so, returns a reference to that interface as the ``Obj`` parameter. If the component does not support the interface, the ``Obj`` parameter returns ``nil`` (Delphi) or ``NULL`` (C++). + + ``QueryInterface()`` returns the ``S_OK`` execution code on success. `HResult <System.HResult.htm>`__ type defines the following execution codes: ``S_OK``, ``S_FALSE``, ``E_NOINTERFACE``, ``E_UNEXPECTED``, and ``E_NOTIMPL``. + + .. note:: For components that act as *COM* object wrappers, ``QueryInterface()`` calls the ``QueryInterface()`` method of the internal *COM* object. + ''' + def _AddRef(self) -> int: + ''' + .. code-block:: python + :caption: Delphi + + function _AddRef: int; stdcall; + + Called when an application uses a component interface. + + ``_AddRef()`` is a basic implementation of the ``IInterface()`` method, `_AddRef <System.IInterface._AddRef.htm>`__. + + .. note:: If the component is a wrapper for a *COM* object, ``_AddRef()`` calls the `_AddRef <System.IInterface._AddRef.htm>`__ method of that *COM* object, and returns the resulting reference count. + + In all other cases, ``_AddRef()`` simply returns -1 and takes no action. This allows the component to implement interfaces where reference counting is not required. More sophisticated components should override ``_AddRef()`` to implement reference counting. + ''' + def _Release(self) -> int: + ''' + .. code-block:: python + :caption: Delphi + + function _Release: int; stdcall; + + Called when an application releases a component interface. + + ``_Release()`` is a basic implementation of the ``IInterface()`` method, `_Release <System.IInterface._Release.htm>`__. + + ``_Release()`` returns the resulting value of the reference count for the component's interface. + + .. note:: In all other cases, ``_Release()`` simply returns -1 and takes no action. This allows the component to implement interfaces where reference counting is not required. More sophisticated components should override ``_Release()`` to implement reference counting. + ''' + def GetTypeInfo(self, Index, LocaleID: int, TypeInfo) -> HResult: + ''' + Retrieves the type information for an object. + + ``GetTypeInfo()`` implements the ``IDispatch`` interface ``GetTypeInfo()`` method. For components that support interfaces, ``GetTypeInfo()`` calls the ``GetTypeInfo()`` method for the interface supported by the component, passing it the specified parameters. Use the returned value to get the type information for an interface implemented by the component. + ''' + def GetTypeInfoCount(self, Count: int) -> HResult: + ''' + Returns the number of type information interfaces that an object provides (either 0 or 1). + + ``GetTypeInfoCount()`` implements the ``IDispatch`` interface ``GetTypeInfoCount()`` method. For components that support interfaces, ``GetTypeInfoCount()`` calls this method for the interface supported by the component. The + + ``Count`` parameter points to a location that receives the number of type information interfaces provided by the object. If the object provides type information, this number is 1; otherwise the number is 0. + ''' + def GetIDsOfNames(self, IID: GUID, Names: Pointer, NameCount, LocaleID: int, DispIDs: Pointer) -> HResult: + ''' + Maps a single member and an optional set of argument names to a corresponding set of integer dispatch identifiers (dispIDs). + + ``GetIDsOfNames()`` implements the ``IDispatch`` interface ``GetIDsOfNames()`` method. For components that support interfaces, ``GetIDsOfNames()`` calls this method for the interface supported by the component, passing the specified parameters. The returned value can be used on subsequent calls to the `Invoke <System.Classes.TComponent.Invoke.htm>`__ method. + ''' + def Invoke(self, DispID: int, IID: GUID, LocaleID: int, Flags: int, Params, VarResult, ExcepInfo, ArgErr: Pointer) -> HResult: + ''' + Provides access to ``Automation`` properties and methods when the component wraps an ``Automation`` object. + + ``Invoke()`` is the standard mechanism for accessing the exposed properties and methods of an ``Automation`` object. For components that wrap the ``IDispatch`` interface of an ``Automation`` object, ``Invoke()`` calls the ``Invoke()`` method for the interface supported by the component, passing it the parameters specified by the function. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Allocates memory and constructs a safely initialized instance of a component. + + All objects have a ``Create()`` method that constructs the object. `Component <System.Classes.TComponent.htm>`__ redefines ``Create()`` so that, for components, ``Create()`` also: + + - Establishes the relationship of a component and its `Owner <System.Classes.TComponent.Owner.htm>`__, as indicated by the ``AOwner`` parameter. + + - Sets the `ComponentStyle <System.Classes.TComponent.ComponentStyle.htm>`__ property to `csInheritable <System.Classes.TComponentStyle.htm>`__, meaning that the component can be inherited by a descendent form type. + + It is not necessary to explicitly create components added in the **Form Designer**. These components are created automatically when the application is run, and they are destroyed when the application is closed. + + For components created programmatically, that is, not created in the **Form Designer**, call ``Create()`` and pass in an owner component as the ``AOwner`` parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use Free when it needs to be destroyed. + + .. tip:: When passing in ``Self`` as the `Owner <System.Classes.TComponent.Owner.htm>`__ parameter, consider what ``Self`` references. If a component creates another component in one of its methods, then ``Self`` refers to the first component and not the component being created, which is then owned by the first component. + + .. note:: The `Component <System.Classes.TComponent.htm>`__ constructor is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the **Form Designer**. Do not forget to use the override directive when declaring a new component's ``Create()`` constructor. + ''' + def Destroy(self) -> None: + ''' + Disposes of the component and its owned components. + + Do not call ``Destroy()`` directly. Call Free instead. Free verifies that the component is not nil, and only then calls ``Destroy()``. + + Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains. + + To destroy a form, call its Release method. Release waits for all the form's event handlers and the event handlers of the form's components to finish executing before destroying the form. + + .. note:: A form owns all the controls and nonvisual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well. By default, all forms are owned by the global Application object. When an application terminates, it frees the global Application object, which frees all forms. For objects that are not components, and for components created with a nil owner, be sure to call Free after finishing with the object; otherwise the memory allocated for the object will be lost until the application terminates. + ''' + def BeforeDestruction(self) -> None: + ''' + Performs any necessary actions before the first destructor is called. + + ``BeforeDestruction()`` is called automatically immediately before the component's first destructor executes. Do not call it explicitly in your applications. + + As implemented in `Component <System.Classes.TComponent.htm>`__, ``BeforeDestruction()`` checks whether the `Destroying <System.Classes.TComponent.Destroying.htm>`__ method has been called, and if not, calls it. Descendants that override this method to perform other actions before a component is destroyed should call the inherited method first to ensure that this check takes place. + ''' + @overload + def BeginInvoke(self, AProc: Proc, AContext: Object) -> IAsyncResult: + ''' + Performs an asynchronous call to the method specified by either ``AProc`` or ``AFunc``. + + The ``AContext`` parameter specifies the context where the method executes in. This context corresponds to the main thread. In case of a `Tcontrol <Vcl.Controls.TControl.htm>`__ descendant, it executes in the context of the thread on which the closest window handle was created. + + ``BeginInvoke()`` returns the results of the asynchronous execution in an interface `IAsyncResult <System.Types.IAsyncResult.htm>`__ used as a return type. + ''' + @overload + def BeginInvoke(self, AProc: ASyncProcedureEvent, AContext: Object) -> IAsyncResult: ... + # def BeginInvoke<TResult>(self, AFunc: Func<TResult>, AContext: Object): IAsyncResult, overload; + @overload + def BeginInvoke(self, AProc: AsyncConstArrayProc, Params: list, AContext: Object) -> IAsyncResult: ... + # def BeginInvoke<TResult>(self, AFunc: AsyncConstArrayFunc<TResult>, Params: array of const, AContext: Object): IAsyncResult, overload; + @overload + def BeginInvoke(self, AProc: AsyncConstArrayProcedureEvent, Params: list, AContext: Object) -> IAsyncResult: ... + @overload + def BeginInvoke(self, AFunc: AsyncConstArrayFunctionEvent, Params: list, AContext: Object) -> IAsyncResult: ... + @overload + def BeginInvoke(self, AFunc: AsyncFunctionEvent, AContext: Object) -> IAsyncResult: ... + def EndInvoke(self, ASyncResult: IAsyncResult) -> None: + ''' + Blocks the caller until the specified ``ASyncResult`` completes. + + Returns the result from the method that `BeginInvoke <System.Classes.TComponent.BeginInvoke.htm>`__ asynchronously executes. This result is immediately returned after the given `IAsyncResult <System.Types.IAsyncResult.htm>`__ finishes. + + ``EndInvoke()`` raises any exception that may occur while the asynchronous method executes. + ''' + # def EndInvoke<TResult>(self, AsyncResult: IAsyncResult) -> Result: + def EndFunctionInvoke(self, AsyncResult: IAsyncResult) -> Object: + ''' + Blocks the caller until the specified ``ASyncResult`` completes. + + Returns the result from the method that `BeginInvoke <System.Classes.TComponent.BeginInvoke.htm>`__ asynchronously executes. This result is immediately returned after the given `IAsyncResult <System.Types.IAsyncResult.htm>`__ finishes. The result type corresponds to a `Object <System.TObject.htm>`__ class type. + + ``EndInvoke()`` raises any exception that may occur while the asynchronous method executes. + ''' + def DestroyComponents(self) -> None: + ''' + Destroys all owned components. + + ``DestroyComponents()`` iterates through the components owned by the component, removing each from the list of owned components and destroying it. + + It is not necessary to call ``DestroyComponents()`` directly. ``DestroyComponents()`` is automatically called when the component is destroyed. + ''' + def Destroying(self) -> None: + ''' + Indicates that the component and its owned components are about to be destroyed. + + ``Destroying()`` sets the `csDestroying <System.Classes.TComponentState.htm>`__ flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property. It then calls the ``Destroying()`` method for each owned component so that its `csDestroying <System.Classes.TComponentState.htm>`__ flag is also set. If `csDestroying <System.Classes.TComponentState.htm>`__ is already set, ``Destroying()`` does nothing. + + It is not necessary to call ``Destroying()`` directly. ``Destroying()`` is automatically called when the component is destroyed. + ''' + def ExecuteAction(self, Action: BasicAction) -> bool: + ''' + Executes an action. + + ``ExecuteAction()`` executes an action for the component. + + ``Action`` is a `BasicAction <System.Classes.TBasicAction.htm>`__ or any descendant of `BasicAction <System.Classes.TBasicAction.htm>`__. + + ``ExecuteAction()`` first checks whether the provided action is compatible with the component and then executes the action. The return value is a ``Boolean``. A value of ``True`` is returned if the action was executed; otherwise, ``False`` is returned. + + Derived classes can override this method to implement a distinct way of handling actions. + ''' + def FindComponent(self, AName: str) -> Component: + ''' + Indicates whether a given component is owned by the component. + + ``FindComponent()`` returns the component in the `Components <System.Classes.TComponent.Components.htm>`__ property array with the name that matches the string in the ``AName`` parameter. Use ``FindComponent()`` to determine whether a given component is owned by another. + + Component name matches are not case sensitive. + ''' + def FreeNotification(self, AComponent: Component) -> None: + ''' + Ensures that ``AComponent`` is notified that the component is going to be destroyed. + + Use ``FreeNotification`` to register ``AComponent`` as a component that should be notified when the component is about to be destroyed. It is only necessary to register components this way when they are in a different form or have a different owner. For example, if ``AComponent`` is in another form and uses the component to implement a property, it must call ``FreeNotification`` so that its `Notification <System.Classes.TComponent.Notification.htm>`__ method is called when the component is destroyed. + + For components with the same owner, the `Notification <System.Classes.TComponent.Notification.htm>`__ method is called automatically when an application explicitly frees the component. This notification is not sent out when components are freed implicitly, because the `Owner <System.Classes.TComponent.Owner.htm>`__ is already being freed. + ''' + def RemoveFreeNotification(self, AComponent: Component) -> None: + ''' + Disables the destruction notification that was enabled by `FreeNotification <System.Classes.TComponent.FreeNotification.htm>`__. + + ``RemoveFreeNotification`` removes the component specified by the ``AComponent`` parameter from the internal list of objects to be notified that the component is about to be destroyed. ``AComponent`` is added to this list by a previous call to the `FreeNotification <System.Classes.TComponent.FreeNotification.htm>`__ method. + + Most applications have no need to call ``RemoveFreeNotification``. It is used by `Component <System.Classes.TComponent.htm>`__ to detect loops where two components are notifying each other of their impending destruction. + ''' + def FreeOnRelease(self) -> None: + ''' + Frees the interface reference for components that were created from *COM* classes. + + ``FreeOnRelease()`` is called when an interface implemented by the component is released. ``FreeOnRelease`` is used internally and calls the corresponding interface method. It should not be necessary to call ``FreeOnRelease`` directly. + ''' + def GetEnumerator(self) -> ComponentEnumerator: + ''' + Returns a TComponent enumerator. + + ``GetEnumerator()`` returns a `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ reference, which enumerates the components contained within a specified containing component. + + To process all these subcomponents, call the `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ `GetCurrent <System.Classes.TComponentEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TComponentEnumerator.MoveNext.htm>`__ do loop. + ''' + def GetParentComponent(self) -> Component: + ''' + Returns the containing component. + + ``GetParentComponent()`` returns a reference to the component that contains the current component, or nil if there is no container. Use `HasParent <System.Classes.TComponent.HasParent.htm>`__ to determine whether a component has a containing component. + + For example, a button on a panel on a form returns the panel, the panel returns the form, and the form returns ``nil``. + ''' + def GetNamePath(self) -> str: + ''' + Returns a string used by the *Object Inspector*. + + ``GetNamePath()`` is used to determine the text to display in the *Object Inspector* for the name of the object being edited. ``GetNamePath()`` is introduced in `Persistent <System.Classes.TPersistent.htm>`__ so descendants such as collections can appear in the *Object Inspector*. `Component <System.Classes.TComponent.htm>`__ overrides ``GetNamePath()()`` to return the component's name. Do not call ``GetNamePath()`` directly. + ''' + def HasParent(self) -> bool: + ''' + Verifies whether the component has a parent. + + Call ``HasParent()`` to determine whether a specific component has a parent. + + Derived classes override this method to implement proper handling for parenting. + + Use `GetParentComponent <System.Classes.TComponent.GetParentComponent.htm>`__ to retrieve the component reference. + ''' + def InsertComponent(self, AComponent: Component) -> None: + ''' + Establishes the component as the owner of a specified component. + + ``InsertComponent()`` adds the component passed in the ``AComponent`` parameter to the end of the `Components <System.Classes.TComponent.Components.htm>`__ array property. The inserted component must have no name (no specified `Name <System.Classes.TComponent.Name.htm>`__ property value), or the name must be unique among all others in the `Components <System.Classes.TComponent.Components.htm>`__ list. + + When the owning component is destroyed, ``AComponent`` is also destroyed. + + Components are automatically inserted and removed when visually manipulating them in the *Form Designer*. Use ``InsertComponent()`` when manually adding components to another `Owner <System.Classes.TComponent.Owner.htm>`__ component's `Components <System.Classes.TComponent.Components.htm>`__ list. + ''' + def RemoveComponent(self, AComponent: Component) -> None: + ''' + Removes a specified component specified from the component's `Components <System.Classes.TComponent.Components.htm>`__ list. + + Components are automatically inserted and removed when visually manipulating them in the *Form Designer*. Use ``RemoveComponent`` to programmatically delete the component specified by ``AComponent`` from its `Owner <System.Classes.TComponent.Owner.htm>`__ component. + ''' + def SetSubComponent(self, IsSubComponent: bool) -> None: + ''' + Identifies whether the component is a subcomponent. + + Call ``SetSubComponent`` to indicate whether this component is a subcomponent. A subcomponent is a component whose `Owner <System.Classes.TComponent.Owner.htm>`__ is a component other than the form or data module in which it resides. Unless such a component calls ``SetSubComponent`` with ``IsSubComponent`` set to ``True``, its published properties will not be saved to the form file. + + ``IsSubComponent`` indicates whether the component is a subcomponent (``True``) or not (``False``). + + ``SetSubComponent()`` is called at design time: + + - Either from the constructor of a component that always acts as a subcomponent. In this case, the component calls its own ``SetSubComponent()`` method from the constructor with ``IsSubComponent`` set to ``True``. + + - Or immediately after constructing an instance of the subcomponent. In this case, the `Owner <System.Classes.TComponent.Owner.htm>`__ calls the ``SetSubComponent()`` method of a component it has just instantiated, with ``IsSubComponent`` set to ``True``. + ''' + def SafeCallException(self, ExceptObject: Object, ExceptAddr: Pointer) -> HResult: + ''' + Handles exceptions in methods declared using the safecall calling convention. + + ``SafeCallException()`` handles exceptions in methods that use the safecall calling convention. Some classes that implement interfaces override this method to handle errors that might occur. `Component <System.Classes.TComponent.htm>`__ calls the implementation of this method for the interface supported by the component, if it exists. If the component does not support interfaces, this method calls the ``SafeCallException()`` method inherited from Object, which returns E_UNEXPECTED. This is a default return value that is appropriate for classes that do not support any interfaces. + ''' + def UpdateAction(self, Action: BasicAction) -> bool: + ''' + Updates the state of an action. + + ``UpdateAction`` is used to update the state of an action. + + ``Action`` is a `BasicAction <System.Classes.TBasicAction.htm>`__ or any descendant. + + ``UpdateAction`` first checks whether the provided action is compatible with the component and then updates it. The return value is a ``Boolean``. A value of ``True`` is returned if the action was updated, and a value of ``False``, otherwise. + + Derived classes can override this method to implement a distinct way of handling action updates. + ''' + def IsImplementorOf(self, I: IInterface) -> bool: + ''' + Indicates whether the component implements a specified interface. + + Call ``IsImplementorOf`` to determine whether the component (or, if the component aggregates its interface with other components, whether the controlling component) supports the interface specified by ``'I'``. ``IsImplementorOf`` is similar to the `QueryInterface <System.Classes.TComponent.QueryInterface.htm>`__ method, but it can handle a request for a ``nil`` (Delphi) or ``NULL`` (C++) interface, and it does not return an interface pointer. + + The streaming system that loads and saves components uses ``IsImplementorOf`` to resolve property values that are interfaces. + ''' + def ReferenceInterface(self, I: IInterface, Operation: Operation) -> bool: + ''' + Establishes or removes internal links that cause this component to be notified when the implementer of a specified interface is destroyed. + + Component writers use ``ReferenceInterface`` to ensure that properties whose values are interfaces are informed when the objects that implement those interfaces are destroyed. This notification must be in place for a property whose value is an interface to be saved with the component in a form file (that is, for such a property to persist as a published property). + + ``'I'`` is an interface pointer that is the value of the published property of interest. + + ``Operation`` indicates whether the notification link to the implementer of the interface should be established (opInsert) or removed (opRemove). + + ``ReferenceInterface()`` returns ``True`` if it is successful in establishing or removing the notification link. If ``ReferenceInterface()`` returns ``False`` when called with ``Operation`` set to opInsert, the specified interface cannot be stored as the value of a published property. + + .. note:: A result of ``False`` does not necessarily indicate an error, merely that the interface cannot be stored by the property streaming system. For example, ``ReferenceInterface()`` returns ``False`` when the specified interface employs true reference counting, independent of component lifetimes. + ''' + def OnGetDeltaStreams(self, Sender: Object, Proc: GetStreamProc, Handled: bool) -> None: + ''' + # OnGetDeltaStreams: GetDeltaStreamsEvent + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ContainedAction(BasicAction): + ''' + =============================== + System.Actions.TContainedAction + =============================== + + ``ContainedAction()`` is the base class for actions that can be grouped by category and that can appear in ``ActionList``\ s. + + ``ContainedAction()`` introduces properties and methods that enable actions to appear in an ``ActionList``. The properties of ``ContainedAction()`` contain information about the relationship between the action and its ``ActionList``. Methods of ``ContainedAction()`` override those of the base class to take into account the ``ActionList`` that owns the action. + + ``ContainedAction()`` defines the ``published`` `Category <System.Actions.TContainedAction.Category.htm>`__ property. + + Objects of type ``ContainedAction()`` can be associated with a `Category <System.Actions.TContainedAction.Category.htm>`__ of actions. This category is used at design time to organize the actions in an ``ActionList`` using the `Action List editor <Action_List_editor.htm>`__ or the `Action Manager editor <Action_Manager_editor.htm>`__ (only available for VCL). + ''' + + __hash__: ClassVar[None] = ... + SavedEnabledState: bool + ''' + Stores the value of the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property when the action is suspended. + + The `System.Actions.TContainedActionList.SetState <System.Actions.TContainedActionList.SetState.htm>`__ method uses ``SavedEnabledState`` internally: + + - When `System.Actions.TContainedActionList.SetState <System.Actions.TContainedActionList.SetState.htm>`__ changes `State <System.Actions.TContainedActionList.State.htm>`__ from ``asSuspendedEnabled`` to ``asNormal``, then the value stored in ``SavedEnabledState`` is used to set the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property. + - When `System.Actions.TContainedActionList.SetState <System.Actions.TContainedActionList.SetState.htm>`__ sets `State <System.Actions.TContainedActionList.State.htm>`__ to ``asSuspendedEnabled``, then the value of the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property is saved in ``SavedEnabledState`` and `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ is set to ``True``. + ''' + ActionList: ContainedActionList + ''' + Holds the ``ActionList`` to which the action belongs. + ''' + Index: int + ''' + Specifies the ``Index`` of the ``Action`` in its `ActionList <System.Actions.TContainedAction.ActionList.htm>`__. + + ``Index`` indicates the position of the ``Action`` in its ``ActionList``. You can change the ``Action``\ s. ``Index`` at design time using one of the *IDE* editors to handle actions. + + The ``Index`` of ``Action``\ s determines the order in which they appear in user interface elements such as menus and *ToolBars*. + + ``Index`` is zero-based. When ``Index`` is ``-1``, this means that the `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ property does not contain any list. + ''' + DisableIfNoHandler: bool + ''' + Indicates whether the action's clients should be disabled if no `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler is found. + + ``DisableIfNoHandler`` defines whether to set the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property of the action to ``False`` if no `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler is set for the action. Setting `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ to ``False`` disables all the action's clients. + + See, for example, how `FMX.Forms.TApplication.UpdateAction <FMX.Forms.TApplication.UpdateAction.htm>`__ uses ``DisableIfNoHandler`` to define whether to set `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ to ``False`` if the `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ event handler is not defined to the action. + + For example, setting ``DisableIfNoHandler`` to ``False`` can be useful when managing submenus. In this case, pointing to a command on the ``MainMenu``, which causes the submenu to open, does not need any ``OnExecute`` event handler. Then, if ``DisableIfNoHandler`` is ``True``, this ``MainMenu`` command becomes disabled and the submenu cannot be opened. In such cases it can be convenient to use actions of types `FMX.Controls.TControlAction <FMX.Controls.TControlAction.htm>`__ and `Vcl.Controls.TControlAction <Vcl.Controls.TControlAction.htm>`__. Objects of these classes have the value of ``DisableIfNoHandler`` set to ``False``, by default. + ''' + AutoCheck: bool + ''' + Controls whether the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property toggles when the action executes. + + ``AutoCheck`` causes the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property to toggle when the action `executes <System.Classes.TBasicAction.Execute.htm>`__. This allows the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of the action to remain in sync with the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of the client (or an equivalent). + + If the client has an ``AutoCheck`` property of its own, the ``AutoCheck`` property of the action is propagated to the ``AutoCheck`` property of the client. + ''' + Caption: str + ''' + Represents the ``Caption`` of the action. + + ``Caption`` holds the string that is used as the ``Caption`` of the action, when it is set. The value of ``Caption`` can be propagated to all client controls and client ``MenuItems`` `linked to the action <System.Actions.TContainedActionLink.IsCaptionLinked.htm>`__. + ''' + Checked: bool + ''' + Indicates whether client controls and ``MenuItems`` appear checked. + + ``Checked`` specifies the checked state for the action. The value of ``Checked`` can be propagated to all client controls and client ``MenuItems`` `linked to the action <System.Actions.TContainedActionLink.IsCheckedLinked.htm>`__. + + .. note:: If the action has a `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ value greater than 0, then setting ``Checked`` to ``True`` sets to ``False`` the ``Checked`` properties of all other actions in the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ group. + + .. tip:: Use the `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ property to ensure that the action's ``Checked`` property toggles when the action executes. + ''' + Enabled: bool + ''' + Specifies the enabled state for the action. + + The value of ``Enabled`` can be propagated to all client controls and client ``MenuItems`` `linked to the action <System.Actions.TContainedActionLink.IsEnabledLinked.htm>`__. + ''' + GroupIndex: int + ''' + Indicates a group of actions in one ``ActionList``. Actions in this group act like the group of ``RadioButton``\ s.. + + The value of ``GroupIndex`` is used to define groups of actions. Actions in each group act like groups of ``RadioButton``\ s.. When ``GroupIndex`` is greater than 0, this value identifies the group to which some actions belong. The value of ``GroupIndex`` can be propagated to all client controls and client ``MenuItems`` `linked to the action <System.Actions.TContainedActionLink.IsGroupIndexLinked.htm>`__. + + When the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of any action in that group is set to ``True``, the `Checked <System.Actions.TContainedAction.Checked.htm>`__ properties of all other actions in the group are set to ``False``. That is, only one action in the group can be checked at a time. + + .. note:: All actions in a group must be listed by the same ``ActionList``. + ''' + HelpContext: HelpContext + ''' + Keeps the integer context ``ID`` that identifies the ``Help`` topic for the action. + + ``HelpContext()`` specifies the integer context ``ID`` to identify the ``Help`` topic to show when invoking ``Help`` for the action. The value of ``HelpContext()`` can be propagated to all client controls and client ``MenuItems`` `linked to the action <System.Actions.TContainedActionLink.IsHelpContextLinked.htm>`__. + + See also `IsHelpLinked <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__. + + ``HelpContext()`` is only used when ``htContext`` is selected in the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + + .. note:: To use *Help*, you need to `enable Help in your application <Enabling_Help_in_Applications.htm>`__. When your application supports usage of the appropriate *Help* system, then it can show ``Help`` topics from the associated *Help* file. When a client control has focus and the user presses the *F1* key, the control uses the value of the ``HelpContext()`` property to invoke the online Help that shows the topic with this context ``ID``. The target topic is uniquely identified by a ``HelpContext()`` context ``ID`` value. + ''' + HelpKeyword: str + ''' + Contains the keyword string that identifies the ``Help`` topic for the ``Action``. + + The value of ``HelpKeyword()`` can be propagated to all client controls and client ``MenuItems`` `linked to the Action <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__. + + ``HelpKeyword()`` is only used when ``htKeyword`` is selected in the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + + .. note:: To use *Help*, you need to `enable Help in your application <Enabling_Help_in_Applications.htm>`__. When your application supports usage of the appropriate *Help* system, then it can show ``Help`` topics from the associated *Help* file. When a client control has focus and the user presses the *F1* key, the control uses the ``HelpKeyword()`` property's value to invoke the online Help showing the topic with this keyword. + ''' + HelpType: HelpType + ''' + Keeps whether to use the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ or `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property to identify the ``Help`` topic. + + The value of ``HelpType`` can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsHelpLinked.htm>`__. + + ``HelpType`` can keep one of the following constants: + + - ``htContext`` - instructs to use the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property to identify the ``Help`` topic to show when invoking ``Help()``. + - ``htKeyword`` - instructs to use the `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property to identify the ``Help`` topic to show when invoking ``Help()``. + ''' + Hint: str + ''' + Stores the ``Help`` hint text. + + ``Hint`` holds the hint string indicating the hint text for the ``Action``. + + ``Hint`` contains the text strings that appear in a pop-up box (or in a ``StatusBar``) when the user moves the mouse over screen elements. + + This hint string `can be propagated to clients of the `Action <System.Actions.TContainedActionLink.IsHintLinked.htm>`__ - to controls, ``MenuItems``, and other GUI elements. + + .. note:: *VCL Controls* support hint strings containing three parts that can be shown in separate locations (see `Vcl.Controls.TControl.Hint <Vcl.Controls.TControl.Hint.htm>`__). + ''' + Visible: bool + ''' + Stores whether the action representation is visible. + + ``Visible`` specifies the visible state for the action (``True`` means visible, ``False`` means invisible). + + This ``Visible`` ``Value`` is propagated to a client of the action if `IsVisibleLinked <System.Actions.TContainedActionLink.IsVisibleLinked.htm>`__ method of the `ActionLink <FMX.ActnList.TActionLink.htm>`__ linking the client to the action returns ``True``. + + If the ``Visible`` of an action is ``False`` and ``IsVisibleLinked()`` of an ``ActionLink()`` returns ``True``, then the ``Visible`` of the client (a control, ``MenuItem``, or others) is also set ``False`` and this client is also invisible. Typically, ``IsVisibleLinked()`` of an ``ActionLink()`` returns ``False`` if the action belongs to `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__. Otherwise, when the action belongs to `Action <FMX.ActnList.TAction.htm>`__, then ``IsVisibleLinked()`` of an ``ActionLink()`` returns ``True``. That is, `CustomViewAction <FMX.ActnList.TCustomViewAction.htm>`__ is used when one need to provide visible representation of clients of actions that have ``Visible`` set ``True``. + ''' + ShortCut: ShortCut + ''' + ``ShortCut`` that triggers the ``Action``. + + The value of ``ShortCut`` can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsShortCutLinked.htm>`__. + ''' + SecondaryShortCuts: CustomShortCutList + ''' + Stores shortcuts (in addition to `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__) for triggering the ``Action``. + + Actions can execute in response to multiple shortcut key combinations. ``SecondaryShortCuts`` lists all the shortcut key combinations (other than the one specified by the `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property) that can trigger the ``Action``. This lets you provide additional, secondary shortcuts. + + When the user types one of the key combinations listed in ``SecondaryShortCuts``, the ``Action``\ s. `Execute <System.Classes.TBasicAction.Execute.htm>`__ method is called. + ''' + ImageIndex: ImageIndex + ''' + Stores an index in a list of images. + + ``ImageIndex`` is a zero-based index in a list of images. `ContainedAction <System.Actions.TContainedAction.htm>`__ does not provide the actual list of images, only implementations of ``Action``\ s in GUI application frameworks provide such a property. In general, this list of images contains images that are associated with controls and ``MenuItems`` that use this action. + + The value of ``ImageIndex`` can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsImageIndexLinked.htm>`__. + + .. note:: When ``ImageIndex`` is ``-1``, this means that the list does not contain any images. In typical implementations of controls, an image is drawn at the leftmost position in the control, and a control's text is drawn to the right of the image. If ``ImageIndex`` is ``-1``, then a control does not offset the text to the right to reserve a placeholder for the image. Otherwise, if ``ImageIndex`` is not ``-1``, then the control's text is always drawn with the offset to the right to reserve a place for drawing an image. + ''' + StatusAction: StatusAction + ''' + Stores the status for an input field in an action. + + ``StatusAction`` holds the status for an input field in the ``Action``, when it is set. + + The value of ``StatusAction`` can be propagated to all client controls and client ``MenuItems`` linked to the `Action <System.Actions.TContainedActionLink.IsStatusActionLinked.htm>`__. + ''' + Category: str + ''' + ``Group`` or ``Category`` where the action belongs. + + *IDE* editors for actions group together actions that share the same category. In the VCL, if you are `using an ``ActionManager`` <Handling_VCL_Actions_Using_an_Action_Manager.htm>`__, you can generate user interface elements that correspond to action categories. + + ``Action`` categories group actions by similarities, usually of behavior or functionality. Standard categories are ``Edit``, ``Format``, *Help*, *Windows*, and others. At design time you can modify or set the *Category* for an action by selecting the action from the ``ActionList`` or object ``TreeView``, and choosing *Category* in the `Object Inspector <Object_Inspector.htm>`__. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Reads the state of the ``Action``. + + ``ReadState()`` is used internally in the ``Action``\ s system. It is not necessary to call it directly. + + ``ReadState()`` calls the inherited `System.Classes.TComponent.ReadState <System.Classes.TComponent.ReadState.htm>`__ procedure. Then ``ReadState()`` checks whether the `Parent <System.Classes.TReader.Parent.htm>`__ of ``Reader`` (``Reader.Parent``) is an ``ActionList``, then ``ReadState()`` sets that the ``Action`` belongs to this ``ActionList`` (`ActionList <System.Actions.TContainedAction.ActionList.htm>`__). + ''' + def SecondaryShortCutsCreated(self) -> bool: + ''' + Retrieves whether the list stored in the `SecondaryShortCuts <System.Actions.TContainedAction.SecondaryShortCuts.htm>`__ property is created. + + ``SecondaryShortCutsCreated()`` returns ``True`` if the `SecondaryShortCuts <System.Actions.TContainedAction.SecondaryShortCuts.htm>`__ list is created. + ''' + def CreateShortCutList(self) -> CustomShortCutList: + ''' + Introduces an interface for creating the `ShortCutList <System.Actions.TCustomShortCutList.htm>`__ object for the action. + + As implemented in `ContainedAction <System.Actions.TContainedAction.htm>`__, ``CreateShortCutList()`` does not create any shortcut list object and just returns ``nil``. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of this action to a destination action. + + ``Dest`` specifies the destination action. ``AssignTo()`` ensures the correct assignment of property values. + + If ``Dest`` is ``nil`` or ``Dest`` is not of the `ContainedAction <System.Actions.TContainedAction.htm>`__ type, then an error is raised. + ''' + def HandleShortCut(self) -> bool: + ''' + Executes the action when the user types one of its shortcuts. + + ``HandleShortCut()`` calls `System.Classes.TBasicAction.Execute <System.Classes.TBasicAction.Execute.htm>`__ to cause the action to perform its function. ``HandleShortCut()`` returns the value that `System.Classes.TBasicAction.Execute <System.Classes.TBasicAction.Execute.htm>`__ returns. + + Descendant classes can override ``HandleShortCut()`` to respond in other ways when the user types the action's shortcut keys. + ''' + def SetAutoCheck(self, Value: bool) -> None: + ''' + Sets the specified ``Value`` to the `AutoCheck <System.Actions.TContainedAction.AutoCheck.htm>`__ property of the ``Action``, and propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetCaption(self, Value: str) -> None: + ''' + Sets the specified ``Value`` to the `Caption <System.Actions.TContainedAction.Caption.htm>`__ property of the ``Action``, and propagates this ``Value`` to all the clients of the ``Action``. + ''' + def SetName(self, Value: ComponentName) -> None: + ''' + Sets the `Name <System.Classes.TComponent.Name.htm>`__ and `Caption <System.Actions.TContainedAction.Caption.htm>`__ properties of the ``Action``. + + ``SetName()`` calls the inherited `System.Classes.TComponent.SetName <System.Classes.TComponent.SetName.htm>`__ method to set the specified ``Value`` to the `Name <System.Classes.TComponent.Name.htm>`__ property of the ``Action``. If the ``Action`` does not have any clients and the current values of the `Name <System.Classes.TComponent.Name.htm>`__ and `Caption <System.Actions.TContainedAction.Caption.htm>`__ properties of the ``Action`` are equal, then ``SetName()`` sets ``Value`` to the `Caption <System.Actions.TContainedAction.Caption.htm>`__ property of the ``Action`` also. + + .. warning:: Using ``SetName()`` to change the name of an action at run time causes any references to the old name to become undefined. Any subsequent code that uses the old name will cause an exception. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + Sets the specified ``Value`` to the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of the ``Action``, and propagates this ``Value`` to all clients of the ``Action``. + + If the ``Action`` has a `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ value greater than 0, then setting `Checked <System.Actions.TContainedAction.Checked.htm>`__ to ``True`` causes all other actions in the group to have their `Checked <System.Actions.TContainedAction.Checked.htm>`__ property set to ``False``. + ''' + def SetEnabled(self, Value: bool) -> None: + ''' + Sets the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property of the ``Action`` to the specified ``Value`` and propagates this ``Value`` to all clients of the ``Action``. + + The behavior of ``SetEnabled()`` depends upon the `State <System.Actions.TContainedActionList.State.htm>`__ of the `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ ``ActionList``: + + - If the value of `State <System.Actions.TContainedActionList.State.htm>`__ is ``asSuspended``, then ``SetEnabled()`` sets to the specified ``Value`` only the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property of the ``Action``. + - If the value of `State <System.Actions.TContainedActionList.State.htm>`__ is ``asSuspendedEnabled``, then ``SetEnabled()`` sets to ``True`` the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property of the ``Action`` and of all clients of the ``Action``. + - Otherwise, ``SetEnabled()`` sets to the specified ``Value`` the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property of the ``Action`` and propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetGroupIndex(self, Value: int) -> None: + ''' + Sets the specified ``Value`` to the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property of the ``Action`` and properly handles the ON or OFF state of the `Checked <System.Actions.TContainedAction.Checked.htm>`__ properties of all actions in the group specified by ``Value``. + + ``SetGroupIndex()`` sets the specified ``Value`` to the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property of the ``Action``. If the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of this action is ``True``, then ``SetGroupIndex()`` sets the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property to ``False`` for all the other actions in the group defined by the specified ``Value``. + + When ``Value`` is greater than 0, the group of ``Action``\ s with the `GroupIndex <System.Actions.TContainedAction.GroupIndex.htm>`__ property having this ``Value`` forms a group of ``Action``\ s that act like a group of ``RadioButton``\ s.. When the `Checked <System.Actions.TContainedAction.Checked.htm>`__ property of any action in this group is ``True``, the `Checked <System.Actions.TContainedAction.Checked.htm>`__ properties of all other actions in the group are ``False``. That is, one and only one action in the group is checked ON at a time. + + .. note:: All actions in a group must be listed by the same ``ActionList``. + ''' + def SetHelpContext(self, Value: HelpContext) -> None: + ''' + Sets the ``Help`` context ``ID`` for the ``Action`` and action's clients. + + ``SetHelpContext()`` sets the new ``Value`` of the integer help context ``ID``, stored in the `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ property, for the ``Action``. + + ``SetHelpContext()`` always propagates this ``Value`` to all clients of the ``Action``. + + `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ is only used when ``htContext`` is selected in the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + + .. note:: To use *Help* in your application, you need to `enable Help in your application <Enabling_Help_in_Applications.htm>`__. + ''' + def SetHelpKeyword(self, Value: str) -> None: + ''' + Defines the ``Help`` keyword for the ``Action`` and action's clients. + + ``SetHelpKeyword()`` sets the new ``Value`` of the string help keyword, stored in the `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ property, for the ``Action``. + + ``SetHelpKeyword()`` always propagates this ``Value`` to all clients of the ``Action``. + + `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ is only used when ``htKeyword`` is selected in the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property. + ''' + def SetHelpType(self, Value: HelpType) -> None: + ''' + Sets the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property for the ``Action`` and action's clients. + + ``SetHelpType`` sets the new ``Value`` of the `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ property for the ``Action``. + + ``SetHelpType`` always propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetHint(self, Value: str) -> None: + ''' + Sets the `Hint <System.Actions.TContainedAction.Hint.htm>`__ property for the ``Action`` and action's clients to a new ``Value``. + + ``SetHint`` sets the new ``Value`` of the `Hint <System.Actions.TContainedAction.Hint.htm>`__ property for the ``Action``. + + ``SetHint`` always propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetVisible(self, Value: bool) -> None: + ''' + Sets the new ``Value`` of the `Visible <System.Actions.TContainedAction.Visible.htm>`__ property for the ``Action`` and action's clients. + + ``SetVisible()`` always propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetShortCut(self, Value: ShortCut) -> None: + ''' + Sets the new ``Value`` of the `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ property for the ``Action`` and action's clients. + + ``SetShortCut()`` always propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetImageIndex(self, Value: ImageIndex) -> None: + ''' + Sets the new ``Value`` of the `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ property for the ``Action`` and action's clients. + + ``SetImageIndex()`` always propagates this ``Value`` to all clients of the ``Action``. + ''' + def SetStatusAction(self, Value: StatusAction) -> None: + ''' + Sets the new ``Value`` of the `StatusAction <System.Actions.TContainedAction.StatusAction.htm>`__ property for the ``Action`` and action's clients. + + ``SetStatusAction()`` always propagates this ``Value`` to all clients of the ``Action``. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Instantiates and initializes a `ContainedAction <System.Actions.TContainedAction.htm>`__ object. + + Applications do not need to call ``Create()`` directly. Actions are created automatically when you choose *New Action* in the ``ActionList`` editor. + + ``Create()`` calls the inherited `System.Classes.TBasicAction.Create <System.Classes.TBasicAction.Create.htm>`__ constructor and then initializes the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ (setting it to ``True``), `Visible <System.Actions.TContainedAction.Visible.htm>`__ (setting it to ``True``), and `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ (setting it to -1) properties. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the instance of the contained action. + + If the action is contained in an ``ActionList`` or ``ActionManager``, ``Destroy()`` removes the action from that list. Then it calls the inherited ``Destroy()`` method. + ''' + def GetParentComponent(self) -> Component: + ''' + Returns the ``ActionList`` containing the action. + + ``GetParentComponent()`` returns the ``ActionList`` containing the action. This ``ActionList`` is stored in the `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ property. If `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ stores ``nil``, then ``GetParentComponent()`` calls the inherited `System.Classes.TComponent.GetParentComponent <System.Classes.TComponent.GetParentComponent.htm>`__ method. + ''' + def HasParent(self) -> bool: + ''' + Indicates whether the action is contained in an ``ActionList``. + + ``HasParent()`` returns ``True`` if the action is contained in an ``ActionList`` stored in the `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ property. If `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ stores ``nil``, then ``HasParent()`` calls the inherited `System.Classes.TComponent.HasParent <System.Classes.TComponent.HasParent.htm>`__ method. + ''' + def SetParentComponent(self, AParent: Component) -> None: + ''' + Sets the ``ActionList`` containing the ``Action``. + + ``SetParentComponent()`` sets the specified ``AParent`` ``ActionList`` as the ``ActionList`` containing the ``Action``. This ``ActionList`` is stored in the `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ property. + ''' + def Suspended(self) -> bool: + ''' + returns ``True`` if the `ActionList <System.Actions.TContainedAction.ActionList.htm>`__ of the ``Action`` is `suspended <System.Actions.TContainedActionList.State.htm>`__. + ''' + def DoHint(self, HintStr: str) -> bool: + ''' + Calls the `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ event handler. + + Typically, applications do not call the ``DoHint()`` method. It is called automatically when the user pauses the mouse on one of the action's client controls or ``MenuItems``. ``DoHint()`` is called by the action's client when the client asks to show the hint. + + ``DoHint()`` checks for an `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ event handler and passes ``HintStr`` to it, if the event handler exists. The `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ event handler can change the specified hint string ``HintStr``. ``DoHint()`` returns ``True`` if no event handler is assigned or if `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ returns ``True``. + + ``DoHint()`` can be used to determine which hint text should be shown. For example, `Vcl.Controls.TControlActionLink.DoShowHint <Vcl.Controls.TControlActionLink.DoShowHint.htm>`__ calls ``DoHint()`` internally, and if ``DoHint()`` returns ``True``, then `Vcl.Controls.TControlActionLink.DoShowHint <Vcl.Controls.TControlActionLink.DoShowHint.htm>`__ appends the action's shortcut specification to the hint text to display. + ''' + + def OnHint(self, Sender: Object, Node: TreeNode, Hint: str) -> None: + ''' + # OnHint: HintEvent + Occurs when the mouse pauses over a client control or ``MenuItem``. + + Use ``OnHint`` to override the default hint that appears when the user pauses the mouse over a client control or ``MenuItem``. The ``OnHint`` event handler can change the hint that appears (by changing the string stored in the client's ``Hint`` property), or display the hint in an application-specific way. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ContainedActionList(Component): + ''' + =================================== + System.Actions.TContainedActionList + =================================== + + The base class for list of actions, without the published properties. + + Implement ``ContainedActionList`` to work with common properties for all GUI application frameworks. + + `Actions <System.Actions.TContainedActionList.Actions.htm>`__ lists the actions maintained by the ``ActionList``. The `ActionCount <System.Actions.TContainedActionList.ActionCount.htm>`__ property returns the number of actions in the list. + + `OnStateChange <System.Actions.TContainedActionList.OnStateChange.htm>`__ sends a notification when the `State <System.Actions.TContainedActionList.State.htm>`__ changes. + ''' + + __hash__: ClassVar[None] = ... + Actions: list[ContainedAction] + ''' + Lists the actions maintained by the ``ActionList``. + + ``Actions`` is an indexed property containing a list of the actions in the ``ActionList`` component. + + ``Index`` identifies the action by ``Index``, where 0 is the index of the first action, 1 is the index of the second action, and so on. The upper limit for ``Index`` is given by the ``ActionCount`` property. + ''' + ActionCount: int + ''' + Indicates the number of actions in the ``ActionList``. + + ``ActionCount`` indicates how many actions are contained in the ``ActionList``. + ''' + State: ActionListState + ''' + Indicates whether the actions in the ``ActionList`` respond when the user triggers a client object. + + ``State`` can be one of the constants defined in the `ActionListState <System.Actions.TActionListState.htm>`__ type: ``asNormal``, ``asSuspended``, and ``asSuspendedEnabled``. + ''' + def CheckActionsCreated(self) -> None: + ''' + Raises an `EActionError <System.Actions.EActionError.htm>`__ exception if `the internal list of actions of the TContainedActionList has not been created <System.Actions.TContainedActionList.ActionsCreated.htm>`__. + ''' + def ActionsCreated(self) -> bool: + ''' + returns ``True`` if the internal `list <System.Classes.TList.htm>`__ of `actions <System.Actions.TContainedAction.htm>`__ of the `ContainedActionList <System.Actions.TContainedActionList.htm>`__ instance has been created. It returns ``False`` otherwise. + + The internal list of actions is created when you `create the TContainedActionList instance <System.Actions.TContainedActionList.Create.htm>`__. + ''' + def AddAction(self, Action: ContainedAction) -> None: + ''' + Adds an action to the list. + + Applications cannot call this protected method. ``AddAction`` is used internally to add an action to the ``Actions`` property array. To add an action to an ``ActionList``, set the action's ``ActionList`` property. + ''' + def RemoveAction(self, Action: ContainedAction) -> None: + ''' + Removes an action from the list. + + Applications cannot call this protected method. ``RemoveAction`` is used internally to remove an action from the ``Actions`` property array. ``RemoveAction`` removes the action and sets its ``ActionList`` property to ``nil`` (Delphi) or ``NULL`` (C++). To remove an action from an ``ActionList``, change the action's ``ActionList`` property. + ''' + def Change(self) -> None: + ''' + Triggers the ``OnChange`` event on the `ActionList <System.Actions.TContainedActionList.htm>`__ and then on all its `actions <System.Actions.TContainedAction.htm>`__. + + The internal list of actions is created when you `create the TContainedActionList instance <System.Actions.TContainedActionList.Create.htm>`__. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Handles `notifications <System.Classes.TComponent.Notification.htm>`__ about the removal of one of the `actions <System.Actions.TContainedAction.htm>`__ of the list. + + If ``AComponent`` is an action of the list and ``Operation`` is `opRemove <System.Classes.TOperation.htm>`__, the action is `removed from the list <System.Actions.TContainedActionList.RemoveAction.htm>`__. + ''' + def SetChildOrder(self, Component: Component, Order: int) -> None: + ''' + Sets the order in which actions are passed to a *callback* by the ``GetChildren()`` method. + + ``SetChildOrder()`` specifies the order in which the component streaming system loads and saves the action components owned by this ``ActionList``. It ensures that the actions are loaded and saved in the same order that they appear in the ``Actions`` property array. You should not need to call this method directly. + ''' + def SetState(self, Value: ActionListState) -> None: + ''' + Sets the `State <System.Actions.TContainedActionList.State.htm>`__ property for the ``ActionList``. + + If ``Value`` is ``asSuspendedEnabled``, then ``SetState`` also sets `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ to ``True`` for all the actions in the ``ActionList``. This is useful when designing in the `Action Manager <Action_Manager_editor.htm>`__. + + If the `OnStateChange <System.Actions.TContainedActionList.OnStateChange.htm>`__ event handler is set, then ``SetState`` calls this event handler. + ''' + def SameCategory(self, Source: str, Dest: str, IncludeSubCategory: bool) -> bool: + ''' + returns ``True`` if the ``Source`` and ``Dest`` `categories <System.Actions.TContainedAction.Category.htm>`__ are the same. If ``IncludeSubCategory`` is ``True``, this function also returns ``True`` if ``Dest`` is a subcategory of ``Source``. + + These are some examples of calls to this function: + + ================== =================== ====================== ================== + **Source** **Dest** **IncludeSubCategory** **Result** + ================== =================== ====================== ================== + ``File`` ``File`` ``True`` ``True`` + ``File.Recent`` ``File`` ``True`` ``False`` + ``File`` ``File.Recent`` ``True`` ``True`` + ``File`` ``File`` ``False`` ``True`` + ``File.Recent`` ``File`` ``False`` ``False`` + ``File`` ``File.Recent`` ``False`` ``False`` + ================== =================== ====================== ================== + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of `ContainedActionList <System.Actions.TContainedActionList.htm>`__. + + This creator is inherited from `Component <System.Classes.TComponent.htm>`__, see `Component.Create <System.Classes.TComponent.Create.htm>`__ for more information. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance of `ContainedActionList <System.Actions.TContainedActionList.htm>`__. + + This destructor is inherited from `Component <System.Classes.TComponent.htm>`__, see `Component.Destroy <System.Classes.TComponent.Destroy.htm>`__ for more information. + ''' + def ExecuteAction(self, Action: BasicAction) -> bool: + ''' + Generates an ``OnExecute`` event. + + Typically, applications do not call the ``ExecuteAction()`` method. Instead, the action indicated by the ``Action`` parameter calls ``ExecuteAction()`` in response to a user command. It is possible, however, to call ``ExecuteAction()`` to generate an ``OnExecute`` event even though no client control has been triggered. + + ``ExecuteAction()`` invokes the ``OnExecute`` event handler for the ``ActionList``. It returns ``True`` if the event handler handles the action, ``False`` otherwise. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified method for each child action of the ``ActionList``. + + ``GetChildren()`` is used by the component streaming system. For each action in the ``ActionList``, ``GetChildren()`` calls the method passed in Proc. The actions are passed to the *callback* in the order that they are loaded or saved by the component streaming system. + ''' + def GetEnumerator(self) -> ActionListEnumerator: + ''' + Returns a `ContainedActionList <System.Actions.TContainedActionList.htm>`__ enumerator, a `ActionListEnumerator <System.Actions.TActionListEnumerator.htm>`__ reference that enumerates the `actions <System.Actions.TContainedAction.htm>`__ in the list. To process all actions, read `Current <System.Actions.TActionListEnumerator.Current.htm>`__ from the enumerator within a "while `MoveNext <System.Actions.TActionListEnumerator.MoveNext.htm>`__ do" loop. + ''' + def UpdateAction(self, Action: BasicAction) -> bool: + ''' + Generates an ``OnUpdate`` event. + + Typically, applications do not call the ``UpdateAction()`` method. Instead, the action indicated by the ``Action`` parameter calls ``UpdateAction`` when informed by the application that it can update itself. It is possible, however, to call ``UpdateAction`` to generate an ``OnUpdate`` event even though this has not been initiated by the application. + + ``UpdateAction`` invokes the ``OnUpdate`` event handler for the ``ActionList``. It returns ``True`` if the event handler updates the action, ``False`` otherwise. + ''' + @overload + def EnumByCategory(self, Proc: EnumActionListEvent, Category: str, IncludeSubCategory: bool) -> bool: + ''' + Calls the specified procedure (`TEnumActionListEvent <System.Actions.TEnumActionListEvent.htm>`__ or `EnumActionListRef <System.Actions.TEnumActionListRef.htm>`__) once for every `action <System.Actions.TContainedAction.htm>`__ of the `list <System.Actions.TContainedActionList.htm>`__ in the specified `category <System.Actions.TContainedAction.Category.htm>`__. + + ``IncludeSubCategory`` determines whether actions in subcategories are included (``True``) or not (``False``) in the loop of calls. + + ``Proc``, an instance of either `EnumActionListEvent <System.Actions.TEnumActionListEvent.htm>`__ or `EnumActionListRef <System.Actions.TEnumActionListRef.htm>`__, can set its ``Done`` argument to ``True`` to stop the loop of calls prematurely. + ''' + @overload + def EnumByCategory(self, Proc: EnumActionListRef, Category: str, IncludeSubCategory: bool) -> bool: ... + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when a change occurs in the ``ActionList``. + + Write an ``OnChange`` event handler to update your application in response to changes in the ``ActionList``. Changes to the ``ActionList`` that trigger an ``OnChange`` event include changes to an action category or to the ``ActionList``\ s. ``ImageList``. + + .. note:: The ``ActionList`` automatically informs the actions in the list when an ``OnChange`` event occurs. You need only provide an ``OnChange`` event handler for application-specific responses. + + ``OnChange`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExecute(self, Action: BasicAction, Handled: bool) -> None: + ''' + # OnExecute: ActionEvent + Occurs when a client object triggers an action in the list. + + Write an ``OnExecute`` event handler to respond when an action in the list fires. + + When the user invokes a client object, the ``ActionList``\ s. ``OnExecute`` event is the first event to occur in response. If the ``OnExecute`` event handler sets its ``Handled`` parameter to ``True``, the action is considered handled, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class in response to the user action. + + If the ``OnExecute`` event handler does not set its ``Handled`` parameter to ``True``, the application's ``OnActionExecute`` event occurs next. If the ``OnActionExecute`` event does not respond to the user input, the ``Action`` object's ``OnExecute`` event occurs. Finally, if the action does not have an ``OnExecute`` event handler, the application locates a target object and executes any predefined response implemented by the ``Action`` object. + ''' + def OnUpdate(self, Action: BasicAction, Handled: bool) -> None: + ''' + # OnUpdate: ActionEvent + Occurs when the application is idle so that the ``ActionList`` can update a specific action in the list. + + Write an ``OnUpdate`` event handler to configure the properties of a specified action in the list so that it reflects current conditions. + + When the application is idle, it cycles through every action in turn, giving it a chance to update itself to reflect current conditions. For each action, the first event to occur in this sequence is the ``ActionList``\ s. ``OnUpdate`` event. If the ``OnUpdate`` event handler sets its ``Handled`` parameter to ``True``, the action is considered updated, and processing stops there. This blocks the execution of any other event handlers or any built-in response by a predefined action class. + + If the ``OnUpdate`` event handler does not set its ``Handled`` parameter to ``True``, the application's ``OnActionUpdate`` event occurs next. If the ``OnActionUpdate`` event does not update the action, the ``Action`` object's ``OnUpdate`` event occurs. Finally, if the action does not have an ``OnUpdate`` event handler, the application executes any predefined update method implemented by the ``Action`` object. + ''' + def OnStateChange(self, Sender: Object) -> None: + ''' + # OnStateChange: NotifyEvent + Occurs after the `State <System.Actions.TContainedActionList.State.htm>`__ property's ``Value`` is changed. + + Write an ``OnStateChange`` event handler to respond after the `State <System.Actions.TContainedActionList.State.htm>`__ property's ``Value`` is changed. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ContainedBindComponent(BasicBindComponent): + ''' + ============================================ + Data.Bind.Components.TContainedBindComponent + ============================================ + + Base class for all common binding components descending from it. + + ``ContainedBindComponent`` is an abstract class that is the base class for `CommonBindComponent <Data.Bind.Components.TCommonBindComponent.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + BindingsList: CustomBindingsList + ''' + Specifies a list that holds the binding expressions. + ''' + Index: int + ''' + Returns the ``Index`` of this component in the `bindings list <Data.Bind.Components.TContainedBindComponent.BindingsList.htm>`__. + ''' + ControlComponent: Component + ''' + Specifies the component that will be bound to the source component, by means of LiveBindings. + ''' + DisplayName: str + ''' + Returns a `string <System.String.htm>`__ containing the name of this component. + ''' + Category: str + ''' + Specifies a category for this component. + + For example, for a binding expression called ``BindExpressionForm121``, of type `BindExpression <Data.Bind.Components.TBindExpression.htm>`__, the following code: + + .. code-block:: python + :caption: Delphi + + ShowMessage(BindExpressionForm121.Category); + + shows the following message: ``Binding Expressions``. + ''' + + def GetBindingsList(self) -> CustomBindingsList: + ''' + Protected getter method for the `BindingsList <Data.Bind.Components.TContainedBindComponent.BindingsList.htm>`__ property. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Reads the state of this component. + + ``ReadState()`` is used internally in the component streaming system. It is ``not`` necessary to call it directly. + + ``ReadState()`` expects a Reader <System.Classes.TReader.htm>`__ object, which is used for reading the state of the component. + ''' + def GetControlComponent(self) -> Component: + ''' + Protected getter method for the `ControlComponent <Data.Bind.Components.TContainedBindComponent.ControlComponent.htm>`__ property. + ''' + def SetControlComponent(self, Value: Component) -> None: + ''' + Protected setter method for the `ControlComponent <Data.Bind.Components.TContainedBindComponent.ControlComponent.htm>`__ property. + ''' + def CheckControlComponent(self) -> None: + ''' + Verifies whether the `control component <Data.Bind.Components.TContainedBindComponent.ControlComponent.htm>`__ is assigned. + + If the `ControlComponent <Data.Bind.Components.TContainedBindComponent.ControlComponent.htm>`__ is ``nil``, then **CheckControlComponent** raises an exception. + ''' + def GetDisplayName(self) -> str: + ''' + Protected getter implementation for the `DisplayName <Data.Bind.Components.TContainedBindComponent.DisplayName.htm>`__ property. + ''' + def Designing(self) -> bool: + ''' + Returns whether this component is in design mode. + ''' + def Loading(self) -> bool: + ''' + Returns whether this component is in loading mode. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + ''' + def CanSetControlComponent(self, Value: Component) -> bool: + ''' + Returns whether the control component can be set a given value. + + As implemented in `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__, **CanSetControlComponent** always returns ``True``, but in descendants it actually returns whether the given ``Value`` (that is itself a `Component <System.Classes.TComponent.htm>`__) can be assigned to the control component. + ''' + def GetParentComponent(self) -> Component: + ''' + Returns the containing component. + + ``GetParentComponent()`` returns a reference to the component that contains the current component, or ``nil`` if there is no container. Use `HasParent <Data.Bind.Components.TContainedBindComponent.HasParent.htm>`__ to determine whether a component has a containing component. + ''' + def HasParent(self) -> bool: + ''' + Verifies whether the contained binding component has a parent. + + ``HasParent()`` returns ``True`` if the contained binding component has a parent, ``False`` otherwise. + ''' + def SetParentComponent(self, AParent: Component) -> None: + ''' + Sets the parent component of this component. + + ``SetParentComponent()`` is used internally in the component streaming system. It is ``not`` necessary to call it directly. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Control(Component): + ''' + ===================== + Vcl.Controls.TControl + ===================== + + ``Control`` is the base class for all components that are visible at run time. + + Controls are visual components, meaning the user can see them and possibly interact with them at run time. All controls have properties, methods, and events that describe aspects of their appearance, such as the position of the control, the cursor or hint associated with the control, methods to paint or move the control, and events that respond to user actions. + + ``Control`` has many protected properties and methods that are used or published by its descendants. + ''' + + __hash__: ClassVar[None] = ... + FCurrentPPI: int + ''' + Indicates the current PPI value for the control. + ''' + FAnchorMove: bool + ''' + Specifies whether the control must keep its dimensions when it is moved, while being anchored to the form. + + Use ``FAnchorMove`` to specify whether the control must keep its dimensions when it is moved, while being anchored to the form. + + ``FAnchorMove`` is only used at design time. + ''' + FAnchorRules: Point + ''' + Specifies the original coordinates of the anchor associated with the control. + + ``FAnchorRules`` is a property that gives the original anchor coordinates associated with the control. + + Based on the type of anchor used by the control, the coordinates of ``FAnchorRules`` have various meanings, given in the following tables. + + Meaning of ``FAnchorRules.X``: + + +---------------------+--------------------------------------------------+ + | **Type of anchor** | **Meaning** | + +=====================+==================================================+ + | ``akRight`` and | The original width of the control | + | ``akLeft`` | | + +---------------------+--------------------------------------------------+ + | ``akRight`` | The original left coordinate of the control | + +---------------------+--------------------------------------------------+ + | ``none`` | The original middle X coordinate of the control | + +---------------------+--------------------------------------------------+ + + Meaning of ``FAnchorRules.Y``: + + +---------------------+--------------------------------------------------+ + | **Type of anchor** | **Meaning** | + +=====================+==================================================+ + | ``akBottom`` and | The original height of the control | + | ``akTop`` | | + +---------------------+--------------------------------------------------+ + | ``akBottom`` | The original top coordinate of the control | + +---------------------+--------------------------------------------------+ + | ``none`` | The original middle Y coordinate of the control | + +---------------------+--------------------------------------------------+ + ''' + FAnchorOrigin: Point + ''' + Specifies the coordinates of the anchor associated with the control. + + ``FAnchorOrigin`` specifies the coordinates of the anchor associated with the control, given in its ``'X'`` and ``'Y'`` fields. + ''' + FOriginalParentCalcType: OriginalParentCalcType; + ''' + No have docs. + ''' + FOriginalParentSize: Point + ''' + Specifies the original size of the parent to which the control is anchored. + + ``FOriginalParentSize`` specifies the original size of the parent to which the control is anchored. + + The ``'X'`` and ``'Y'`` coordinates specify the original width and height of the parent control, respectively. + ''' + FExplicitLeft: int + ''' + Specifies the explicit horizontal pixel coordinate of the left edge of a component. The coordinate is relative to the component's parent. + ''' + FExplicitTop: int + ''' + Specifies the explicit vertical pixel coordinate of the top edge of a component. The coordinate is relative to the component's parent. + ''' + FExplicitWidth: int + ''' + Specifies the explicit horizontal size of the control in pixels. + ''' + FExplicitHeight: int + ''' + Specifies the explicit vertical size of the control in pixels. + ''' + FReserved: ReservedControlData # Do not use - for internal use only! + ''' + ``FReserved`` is an internal Delphi variable and should not be used. + + ``FReserved`` is an internal property and should not be directly used. + ''' + FScaleFactor: float + ''' + Indicates the current scale factor for the control. + ''' + ActionLink: ControlActionLink + ''' + Contains the ``ActionLink`` object associated with the control. + + ``ActionLink`` handles the association between the control and the action specified by the ``Action`` property. The ``ActionLink`` specifies which properties and events of the ``Action`` object determine the values of the control's corresponding properties and events. + + Most applications do not use the ``ActionLink`` property. ``Component`` writers can change this property in `Control <Vcl.Controls.TControl.htm>`__ descendants to be a custom descendant of `Control <Vcl.Controls.TControl.htm>`__ ``ActionLink`` that handles a desired configuration of properties and events. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use ``AutoSize`` to specify whether the control sizes itself automatically. When ``AutoSize`` is ``True``, the control resizes automatically when its contents change. + + By default, ``AutoSize`` is ``False``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use ``Caption`` to specify the text string that labels the control. + + To underline a character in a ``Caption`` that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + **Notes:** + + - Controls that display text use either the ``Caption`` property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, ``Caption`` is used for text that appears as a window title or label, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the ``Caption``. If you want to change the color of a button caption, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the ``Caption`` property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an HTML tag is declared inside the ``Caption`` property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use ``Color`` to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the ``Color`` property of the control's parent automatically changes the ``Color`` property of the control. When the value of the ``Color`` property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + DesktopFont: bool + ''' + Specifies whether the control uses the Windows icon font when writing text. + + Set ``DesktopFont`` to ``True`` to specify that the control should use the Windows icon font for its `Font <Vcl.Controls.TControl.Font.htm>`__ property. The Windows icon font is the value of the `IconFont <Vcl.Forms.TScreen.IconFont.htm>`__ property of the global ``Screen`` variable. + + When ``DesktopFont`` is ``True``, the control's `Font <Vcl.Controls.TControl.Font.htm>`__ property updates every time the Windows icon font changes. This font can be changed by setting the `IconFont <Vcl.Forms.TScreen.IconFont.htm>`__ property of the global `Screen <Vcl.Forms.Screen.htm>`__ variable, or by the actions of other programs. Setting the `Font <Vcl.Controls.TControl.Font.htm>`__ property from the `IconFont <Vcl.Forms.TScreen.IconFont.htm>`__ property of the Screen object does not allow controls to dynamically respond in this manner when the Windows icon font changes. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use ``DragKind`` to get or set whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the ``DragCursor`` property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the ``DragCursor`` property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use ``DragMode`` to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the ``DragMode`` property value to ``dmManual``. Enable automatic dragging by setting ``DragMode`` to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + IsControl: bool + ''' + Specifies whether a form stores its form-specific properties to a stream. + + Use ``IsControl`` to use a form as a complex control, rather than as a desktop form. ``IsControl`` affects the way the form gets saved. When ``IsControl`` is ``True``, form-specific properties do not get saved with the form. When ``IsControl`` is ``False``, the form-specific properties get saved along with the other properties. + + ``IsControl`` permits you to use the forms designer to create complex controls by creating those controls as forms, placing and naming their contained controls, and attaching code to events. After saving the form, edit the form as text, and in the text version set ``IsControl`` to ``True``. The next time the form is loaded and saved, only those form properties appropriate to use as a control are stored, not the properties specific to `Form <Vcl.Forms.TForm.htm>`__. Next, edit the form file as text, changing the type of the component from `Form <Vcl.Forms.TForm.htm>`__ to the desired control type, such as `Panel <Vcl.ExtCtrls.TPanel.htm>`__. + ''' + MouseCapture: bool + ''' + Specifies whether the control has "captured" mouse events. + + Use ``MouseCapture`` to determine whether a control has captured the mouse. When a control captures the mouse, all subsequent mouse events go to that control until the user releases the mouse button. + + A control captures the mouse when the user drags an item from it. In addition, if the control has the ``csCaptureMouse`` flag set in its `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ property, it captures the mouse when the user presses the left mouse button over it, until the user releases the mouse button. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use ``ParentBiDiMode`` to get or set whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When ``ParentBiDiMode`` is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If ``ParentBiDiMode`` is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set ``ParentBiDiMode`` to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, ``ParentBiDiMode`` becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. + + To have a control use the same color as its parent control, set ``ParentColor`` to ``True``. If ``ParentColor`` is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set ``ParentColor`` to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if ``ParentColor`` is ``True`` for all controls in a form, changing the background color of the form to gray causes all the controls on the form to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, ``ParentColor`` becomes ``False`` automatically. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. + + To have a control use the same font as its parent control, set ``ParentFont`` to true. If ``ParentFont`` is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default ``ParentFont`` to true so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, ``ParentFont`` becomes ``False`` automatically. + + When ``ParentFont`` is ``True`` for a form, the form uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use ``ParentShowHint`` to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If ``ParentShowHint`` is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If ``ParentShowHint`` is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. + + To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and ``ParentShowHint`` becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to ``PopupMenu`` to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ScalingFlags: ScalingFlags + ''' + Reflects which attributes of the control have been scaled. + + ``ScalingFlags`` is an internal set of flags used primarily in scaling inherited forms and their controls. Applications should not use this property without a serious need. + + These are the flags and their meanings: + + ================== ===================================================================== + **Flag** **Meaning** + ================== ===================================================================== + ``sfLeft`` ``Left`` side of control not yet scaled + ``sfTop`` ``Top`` of control not yet scaled + ``sfWidth`` ``Width`` of control not yet scaled + ``sfHeight`` ``Height`` of control not yet scaled + ``sfFont`` ``Font`` of control not yet scaled + ``sfDesignSize`` ``Design``-time dimensions of control not yet scaled + ================== ===================================================================== + ''' + Text: str + ''' + Contains a text string associated with the control. + + Use the ``Text`` property to read the ``Text`` of the control or to specify a new string for the ``Text`` value. By default, ``Text`` is the control name. For edit controls and memos, the ``Text`` appears within the control. For ``ComboBox``\ es, the ``Text`` is the content of the edit control portion of the ``ComboBox``. + + .. note:: Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the ``Text`` property to specify the text value. Which property is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or label, while ``Text`` is used for text that appears as the content of a control. + ''' + WheelAccumulator: int + ''' + Accumulates mouse wheel rotations. + + ``WheelAccumulator`` contains a value indicating the progress of event handlers in response to mouse wheel motion. See `DoMouseWheel <Vcl.Controls.TControl.DoMouseWheel.htm>`__ for more information. + ''' + WindowText: str + ''' + Specifies the text string of the control. + + Use ``WindowText`` to specify the text associated with the control. When setting ``WindowText``, the control frees the memory associated with the previous value of ``WindowText`` before assigning a new value. Any memory associated with ``WindowText`` is freed when the control is destroyed. By default, ``WindowText`` is the same string as the `Text <Vcl.Controls.TControl.Text.htm>`__ property. Descendants of `Control <Vcl.Controls.TControl.htm>`__ can override the `Text <Vcl.Controls.TControl.Text.htm>`__ property to implement a different value. + + For an edit box, the ``WindowText`` is the content of the control. For a ``ComboBox``, the text string is the content of the edit box part of the ``ComboBox``. For a button, the string is the button name. For all other controls, the string is the window title. + ''' + IScaling: bool + ''' + No have docs. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use ``Enabled`` to change the availability of the control to the user. To disable a control, set ``Enabled`` to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, labels), while others (container controls) simply lose their functionality without changing their appearance. If ``Enabled`` is set to ``False``, the control ignores mouse, keyboard, and timer events. + + To re-enable a control, set ``Enabled`` to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Action: BasicAction + ''' + Specifies the action associated with the control. + + ``Action`` is the ``Action`` object that is associated with the control. ``Actions`` allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). + + To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the ``Action`` property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use ``Align`` to align a control to the top, bottom, left, or right of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel`` or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's ``Align`` value to ``alLeft``. The value of ``alLeft`` for the ``Align`` property of the panel guarantees that the tool palette remains on the left side of the form and always equals the client height of the form. + + The default value of ``Align`` is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If ``Align`` is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the form and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same ``Align`` value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use ``Anchors`` to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its ``Anchors`` property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + ``Anchors`` is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the form is created in a maximized state, the control is not stretched because the form is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike ``Anchors``, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use ``BiDiMode`` to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from right to left instead of left to right. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BoundsRect: Rect + ''' + Specifies the bounding rectangle of the control, expressed in the coordinate system of the parent control. + + Use ``BoundsRect`` as a quick way to obtain the pixel locations of all corners of the control all at once. + + For example, the statement + + .. code-block:: python + + R := Control.BoundsRect; + + .. code-block:: python + + R = Control->BoundsRect; + + corresponds to + + .. code-block:: python + + R.Left := Control.Left; + R.Top := Control.Top; + R.Right := Control.Left + Control.Width; + R.Bottom := Control.Top + Control.Height; + + .. code-block:: python + + R.Left = Control->Left; + R.Top = Control->Top; + R.Right = Control->Left + Control->Width; + R.Bottom = Control->Top + Control->Height; + + The origin of the pixel coordinate system is in the upper-left corner of the parent window. + + .. note:: A point is considered within the control's bounds rectangle if it lies on the left or top side but not if it lies on the right or bottom side. That is, to be inside the bounds rectangle, the x-coordinate must be greater than or equal to ``BoundsRect.Left`` and less than ``BoundsRect.Right``, and the y-coordinate must be greater than or equal to ``BoundsRect.Top`` and less than ``BoundsRect.Bottom``. + ''' + ClientHeight: int + ''' + Specifies the height of the control's client area in pixels. + + Use ``ClientHeight`` to read or change the height of the control's client area. + + For `Control <Vcl.Controls.TControl.htm>`__, ``ClientHeight`` is the same as `Height <Vcl.Controls.TControl.Height.htm>`__. Derived classes may implement a ``ClientHeight`` property that differs from `Height <Vcl.Controls.TControl.Height.htm>`__. For example, the ``ClientHeight`` of a form is the value of the `Height <Vcl.Controls.TControl.Height.htm>`__ property minus the height of the title bar, resize border, and ``ScrollBar``\ s. + ''' + ClientOrigin: Point + ''' + Specifies the screen coordinates (in pixels) of the upper-left corner of a control's client area. + + Read ``ClientOrigin`` to locate the upper-left corner of the control's client area. ``ClientOrigin()`` returns ``'X'`` and ``'Y'`` coordinates as a TPoint type, where ``'X'`` specifies the horizontal coordinate of the point and ``'Y'`` specifies the vertical coordinate. + + The screen coordinates of a control that is descended from `Control <Vcl.Controls.TControl.htm>`__ and not `WinControl <Vcl.Controls.TWinControl.htm>`__ are the screen coordinates of the control's parent added to its `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties. If the control doesn't have a parent, an ``EInvalidOperation`` exception is raised when ``ClientOrigin`` is read. + ''' + ClientRect: Rect + ''' + Specifies the size of a control's client area in pixels. + + Read ``ClientRect`` to find out the size of the client area of a control. ``ClientRect()`` returns a rectangle with its ``Top`` and ``Left`` fields set to zero, and its ``Bottom`` and ``Right`` fields set to the control's ``Height`` and ``Width``, respectively. ``ClientRect`` is equivalent to ``Rect(0, 0, ClientWidth, ClientHeight)``. + + A point is considered within the control's client rectangle if it lies on the left or top side but not if it lies on the right or bottom side. That is, to be inside the client rectangle, the ``'X'``-coordinate must be greater than or equal to ``ClientRect.Left`` and less than ``ClientRect.Right``, and the ``'Y'``-coordinate must be greater than or equal to ``ClientRect``.Top and less than ``ClientRect``.Bottom. + + .. note:: ``ClientRect`` is the size of the physical client area of the control, not its logical client area. If the control supports scrolling, the ``ClientRect`` is not the entire scrolling range, but only the region that is available at any given time. + ''' + ClientWidth: int + ''' + Specifies the horizontal size of the control's client area in pixels. + + Use ``ClientWidth`` to read or change the width of the control's client area. ``ClientWidth`` is equivalent to `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__.Right. + + For `Control <Vcl.Controls.TControl.htm>`__, ``ClientWidth`` is the same as `Width <Vcl.Controls.TControl.Width.htm>`__. Derived classes may implement a ``ClientWidth`` property that differs from `Width <Vcl.Controls.TControl.Width.htm>`__. For example, the ``ClientWidth`` of a form is the value of the `Width <Vcl.Controls.TControl.Width.htm>`__ property minus the width of the resize border and ``ScrollBar``\ s. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use ``Constraints`` to specify the minimum and maximum width and height of the control. When ``Constraints`` contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the form. However, the height of the form depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by ``x: Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + ControlState: ControlState + ''' + Specifies the current state of a control at run time. + + Read ``ControlState`` to find out various conditions that affect the control such as whether it has been clicked or needs alignment. ``ControlState`` reflects transient conditions of an instance of the control, as opposed to attributes of the control class as a whole. ``ControlState`` consists of a set of flags drawn from the following values: + + ========================== ========================================================================================================================================================================================================================= + **Flag** **Meaning** + ========================== ========================================================================================================================================================================================================================= + ``csLButtonDown`` The left mouse button was clicked and not yet released. This is set for all mouse-down events. + ``csClicked`` The same as ``csLButtonDown``, but only set if `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ contains ``csClickEvents``, meaning that mouse-down events are interpreted as clicks. + ``csPalette`` The system palette has changed and the control or one of its descendants has not finished adjusting by realizing its palette. + ``csReadingState`` The control is reading its state from a stream. + ``csAlignmentNeeded`` The control needs to realign itself when alignment is re-enabled. + ``csFocusing`` The application is processing messages intended to give the control focus. This does not guarantee the control will receive focus, but prevents recursive calls. + ``csCreating`` The control and/or its owner and subcontrols are being created. This flag clears when all have finished creating. + ``csPaintCopy`` The control is being replicated, meaning a copy of the control is being painted. The `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ flag ``csReplicatable`` must be set for this state to occur. + ``csCustomPaint`` The control is processing custom paint messages. + ``csDestroyingHandle`` The control's window is being destroyed. + ``csDocking`` The control is being docked. + ========================== ========================================================================================================================================================================================================================= + + The flags in ``ControlState`` are specific to controls, and augment the state flags in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property. + + ``ControlState`` is primarily used by component writers in the implementation of components derived from `Control <Vcl.Controls.TControl.htm>`__. + ''' + ControlStyle: ControlStyle + ''' + Determines style characteristics of the control. + + Use ``ControlStyle`` to determine various attributes of the control, such as whether the control can capture the mouse or has a fixed size. The ``ControlStyle`` property contains a set of style flags indicating these attributes. The following table lists the flags and their meanings: + + =========================== ========================================================================================================================================================================================================================================================= + **Flag** **Meaning** + =========================== ========================================================================================================================================================================================================================================================= + ``csAcceptsControls`` The control becomes the parent of any controls dropped on it at design time. + ``csCaptureMouse`` The control captures mouse events when it is clicked. + ``csDesignInteractive`` The control maps right mouse button clicks at design time into left mouse button clicks to manipulate the control. + ``csClickEvents`` The control can receive and respond to mouse clicks. Some controls may not inherit this attribute, for example, `Button <Vcl.StdCtrls.TButton.htm>`__. + ``csFramed`` The control has a 3D frame. + ``csSetCaption`` The control's `Caption <Vcl.Controls.TControl.Caption.htm>`__ should match the ``Name`` if it has not been explicitly set to something else. + ``csOpaque`` The control completely fills its client rectangle. + ``csDoubleClicks`` The control can receive and respond to double-click messages. Otherwise, map double-clicks into clicks. + ``csFixedWidth`` The width of the control does not vary or scale. + ``csFixedHeight`` The height of the control does not vary or scale. + ``csNoDesignVisible`` The control is not visible at design time. + ``csReplicatable`` The control can be copied using the `PaintTo <Vcl.Controls.TWinControl.PaintTo.htm>`__ method to draw its image to an arbitrary canvas. + ``csNoStdEvents`` Standard events such as mouse, key, and click events are ignored. This flag allows an application to run faster when there is no need to respond to these events. + ``csDisplayDragImage`` If a control that has an associated drag ``ImageList`` is dragged across a control with this setting, then the ``ImageList`` is used to enhance the drag cursor while the cursor is over it. Otherwise, the drag cursor is used on its own. + ``csReflector`` The control responds to Windows dialog messages, focus messages, or size change messages. Use this setting if the control can be used as an *ActiveX* control, so that it receives notification of these events. + ``csActionClient`` The control is linked to an ``Action`` object. This flag is set when the `Action <Vcl.Controls.TControl.Action.htm>`__ property is set, and cleared if the `Action <Vcl.Controls.TControl.Action.htm>`__ property is cleared. + ``csMenuEvents`` The control responds to system menu commands. + =========================== ========================================================================================================================================================================================================================================================= + + ``ControlStyle`` describes all controls instantiated from a given class. ``ControlStyle`` should not be modified at run time, except in the constructor. The `ControlState <Vcl.Controls.TControl.ControlState.htm>`__ property records transient conditions. + + The `Control <Vcl.Controls.TControl.htm>`__ constructor initializes ``ControlStyle`` to the set of ``csCaptureMouse``, ``csClickEvents``, ``csSetCaption``, and ``csDoubleClicks``. + + ``ControlStyle`` is primarily used by component writers when implementing components derived from `Control <Vcl.Controls.TControl.htm>`__. + ''' + CurrentPPI: int + ''' + No have docs. + ''' + DockOrientation: DockOrientation + ''' + ``DockOrientation`` specifies how the control is docked relative to other controls docked in the same parent. + + Use ``DockOrientation`` to determine the position of the control relative to other controls docked to the same parent. Docking zones can be arranged from left to right or from top to bottom. + ''' + ExplicitLeft: int + ''' + Specifies the explicit horizontal pixel coordinate of the left edge of a component relative to its parent. + + ``ExplicitLeft`` is a read-only property used internally by Delphi. Use `Left <Vcl.Controls.TControl.Left.htm>`__ in applications to allow read and write access. + ''' + ExplicitTop: int + ''' + Specifies the explicit vertical pixel coordinate of the top edge of a component relative to its parent. + + ``ExplicitTop`` is a read-only property used internally by Delphi. Use `Top <Vcl.Controls.TControl.Top.htm>`__ in applications to allow read and write access. + ''' + ExplicitWidth: int + ''' + Specifies the explicit horizontal size of the control in pixels. + + ``ExplicitWidth`` is a read-only property used internally by Delphi. Use `Width <Vcl.Controls.TControl.Width.htm>`__ in applications to allow read and write access. + ''' + ExplicitHeight: int + ''' + Specifies the explicit vertical size of the control in pixels. + + ``ExplicitHeight`` is a read-only property used internally by Delphi. Use `Height <Vcl.Controls.TControl.Height.htm>`__ in applications to allow read and write access. + ''' + Floating: bool + ''' + Specifies whether the control is floating. + + Read ``Floating`` to determine whether a dockable control appears in a floating window, rather than docked to a parent control. + + .. note:: Use ``Floating`` rather than the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property to determine whether a control is free-floating. ``Floating`` controls may have a non-``nil`` (Delphi) or ``NULL`` (C++) parent if the `FloatingDockSiteClass <Vcl.Controls.TControl.FloatingDockSiteClass.htm>`__ property specifies a floating window type. + ''' + FloatingDockSiteClass: WinControlClass + ''' + Specifies the class of the temporary control that hosts the control when it is floating. + + Use ``FloatingDockSiteClass`` to specify the class that houses the control when it is floating. This class must be a descendant of `WinControl <Vcl.Controls.TWinControl.htm>`__. By default, it is TCustomDockForm. When the control is undocked, a temporary control of this type is created and the control is docked to that control. When the control is docked to another control, the temporary floating dock site is freed. + + If the control can float as a stand-alone window, ``FloatingDockSiteClass`` is ``nil`` (Delphi) or ``NULL`` (C++). + ''' + HostDockSite: WinControl + ''' + Specifies the control in which the control is docked. + + Read ``HostDockSite`` to access the windowed control to which the control is docked. If the control is floating, ``HostDockSite`` is a temporary control of type `FloatingDockSiteClass <Vcl.Controls.TControl.FloatingDockSiteClass.htm>`__, or (if there is no floating dock site class) ``nil`` (Delphi) or ``NULL`` (C++). + + Most applications should use the `ManualDock <Vcl.Controls.TControl.ManualDock.htm>`__ method rather than setting ``HostDockSite``. Setting ``HostDockSite`` automatically undocks the control from its previous host (if any) and docks it to the specified control, but does not adjust the control's position and alignment and bypasses the standard docking events. + + For dock clients, the value of ``HostDockSite`` is the same as the value of `Parent <Vcl.Controls.TControl.Parent.htm>`__. For controls that are not docking clients, ``HostDockSite`` is ``nil`` (Delphi) or ``NULL`` (C++), while `Parent <Vcl.Controls.TControl.Parent.htm>`__ specifies the containing control. + ''' + LRDockWidth: int + ''' + Specifies the width of the control when it is docked horizontally. + + Read ``LRDockWidth`` to get the width of the control from the last time it was docked horizontally. Set ``LRDockWidth`` to indicate the width the control should have the next time it is docked horizontally. + + ``LRDockWidth`` allows a control to "remember" its docked size even when its width changes because it is undocked or docked with a vertical orientation. + ''' + ScaleFactor: float + ''' + No have docs. + ''' + ShowHint: bool + ''' + ``ShowHint`` specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + ``ShowHint`` determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. + + To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own ``ShowHint`` property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's ``ShowHint`` property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the ``ShowHint`` property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the ``ShowHint`` property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the ``ShowHint`` value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TBDockHeight: int + ''' + Specifies the height of the control when it is docked vertically. + + Read ``BDockHeight`` to get the height of the control from the last time it was docked vertically. Set ``BDockHeight`` to indicate the height the control should have the next time it is docked vertically. + + ``BDockHeight`` allows a control to "remember" its docked size even when its height changes because it is undocked or docked with a horizontal orientation. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the ``Touch`` property to access gesturing options associated with a control. ``Touch`` specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + ``Touch`` is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + UndockHeight: int + ''' + Specifies the height of the control when it is floating. + + Read ``UndockHeight`` to get the height of the control from the last time it was floating. Set ``UndockHeight`` to indicate the height the control should have the next time it is undocked. + + ``UndockHeight`` allows a control to "remember" its floating size even when its height changes because it is docked. + ''' + UndockWidth: int + ''' + Specifies the width of the control when it is floating. + + Read ``UndockWidth`` to get the width of the control from the last time it was floating. Set ``UndockWidth`` to indicate the width the control should have the next time it is undocked. + + ``UndockWidth`` allows a control to "remember" its floating size even when its width changes because it is docked. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the ``Visible`` property to control the visibility of the control at run time. If ``Visible`` is ``True``, the control appears. If ``Visible`` is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's ``Visible`` property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set ``Visible`` to ``True`` and bring the form to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, ``Visible`` does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WindowProc: WndMethod + ''' + Points to the window procedure that responds to messages sent to the control. + + Use the ``WindowProc()`` property to temporarily replace or subclass the window procedure of the control. ``Component`` writers that are customizing the window procedure for a descendent class should override the `WndProc <Vcl.Controls.TControl.WndProc.htm>`__ method instead. + + Before assigning a new value to ``WindowProc()``, store the original value. ``WindowProc()`` is initially set to the `WndProc <Vcl.Controls.TControl.WndProc.htm>`__ method, so if the value has not been changed since then, the original value need not be stored. Within the procedure that is used as the new value for ``WindowProc()``, pass any unhandled messages to the original procedure that was the value of ``WindowProc()``. After completing any specialized message handling, restore the value of ``WindowProc()`` to the original procedure. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. + + To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Parent: WinControl + ''' + Specifies the parent of the control. + + Use the ``Parent`` property to get or set the parent of the control. The parent of a control is the control that contains it. For example, if an application includes three ``RadioButton``\ s in a ``GroupBox``, the ``GroupBox`` is the parent of the three ``RadioButton``\ s., and the ``RadioButton``\ s are the child controls of the ``GroupBox``. + + To serve as a parent, a control must be an instance of a `WinControl <Vcl.Controls.TWinControl.htm>`__ descendant. + + When creating a new control at run time, assign a ``Parent`` property value for the new control. Usually, this is a ``Form``, ``Panel`` ``GroupBox``, or a control that is designed to contain another. Changing the parent of a control moves the control onscreen so that it is displayed within the new parent. When the parent control moves, the child moves with the parent. + + Some controls (such as *ActiveX* controls) are contained in native windows rather than in a parent VCL Control*. For these controls, the value of *``Parent`` is ``nil`` (Delphi) or ``NULL`` (C++) and the `ParentWindow <Vcl.Controls.TWinControl.ParentWindow.htm>`__ property specifies the window. + + .. note:: The ``Parent`` property declared in `Control <Vcl.Controls.TControl.htm>`__ is similar to the `Owner <System.Classes.TComponent.Owner.htm>`__ property declared in TComponent, in that the *``Parent`` of a control frees the control just as the `Owner <System.Classes.TComponent.Owner.htm>`__ of a component frees that component. However, the *``Parent`` of a control is always a windowed control that visually contains the control, and is responsible for writing the control to a stream when the form is saved. The `Owner <System.Classes.TComponent.Owner.htm>`__ of a component is the component that was passed as a parameter in the constructor and, if assigned, initiates the process of saving all objects (including the control and its parent) when the form is saved. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use ``StyleElements`` to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + ``StyleElements`` is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + AlignWithMargins: bool + ''' + Specifies whether a control should be constrained by margins. + + If ``AlignWithMargins`` is ``True``, use the `Margins <Vcl.Controls.TControl.Margins.htm>`__ property of the control to govern the spacing relative to other controls that are aligned with this one. The controls are not allowed to be any closer than the spacing specified in `Margins <Vcl.Controls.TControl.Margins.htm>`__. This spacing is maintained as controls are moved when the parent control resizes. + + ``AlignWithMargins`` is ``True`` if the style ``csAlignWithMargins``, a `ControlStyle <Vcl.Controls.TControlStyle.htm>`__ type, is in the control's `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ property, and false otherwise. + ''' + Left: int + ''' + Specifies the horizontal coordinate of the left edge of a component relative to its parent. + + Use the ``Left`` property to determine where the left side of the control begins or to reposition the left side of the control. + + If the control is contained in another control, the ``Left`` and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the parent control. If the control is contained directly by the form, the property values are relative to the form. For forms, the value of the ``Left`` property is relative to the screen in pixels. + ''' + Top: int + ''' + Specifies the ``'Y'`` coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. + + Use ``Top`` to locate the top of the control or reposition the control to a different ``'Y'`` coordinate. The ``Top`` property, like the `Left <Vcl.Controls.TControl.Left.htm>`__ property, is the position of the control relative to its container. Thus, if a control is contained in a `Panel <Vcl.ExtCtrls.TPanel.htm>`__, the `Left <Vcl.Controls.TControl.Left.htm>`__ and ``Top`` properties are relative to the panel. If the control is contained directly by the form, it is relative to the form. For forms, the value of the ``Top`` property is relative to the screen in pixels. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the ``Width`` property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the ``Height`` property to read or change the height of the control. + ''' + Cursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when it passes into the region covered by the control. + + Change the value of ``Cursor`` to provide feedback to the user when the mouse pointer enters the control. The value of ``Cursor`` is the index of the cursor in the list of cursors maintained by the global variable, `Screen <Vcl.Forms.Screen.htm>`__. In addition to the built-in cursors provided by `Screen <Vcl.Forms.TScreen.htm>`__, applications can add custom cursors to the list. + ''' + Hint: str + ''' + ``Hint`` contains the text string that appears when the user moves the mouse over the control. + + Use the ``Hint`` property to provide a string of *Help* text either as a *Help Hint* or as *Help* text on a particular location, such as a ``StatusBar``. + + A *Help Hint* is a box containing *Help* text that appears for a control when the user moves the mouse pointer over the control and pauses momentarily. + + **To set up Help Hints** + + - Specify the ``Hint`` property of each control for which a *Help Hint* should appear. + - Set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of each appropriate control to ``True``, or set the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of all controls to ``True`` and set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the form to ``True``. + - At run time, set the value of the application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property to ``True``. + - To show the ``Hint`` on a ``StatusBar`` or another location, use the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler of the application. The application's `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event occurs when the mouse pointer moves over the control. + - Specify a hint to be used for both a *Help Hint* box and by an `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler by specifying values separated by a ``'|'`` (pipe) character. + + For example, + + .. code-block:: python + + Edit1.Hint := 'Name|Enter Enter Name in the edit box|1'; + + .. code-block:: python + + Edit1->Hint = "Name|Enter Name in the edit box|1"; + + Here: + + - The ``Name`` part is the short hint and appears at the top of the *Help Hint* box. + - ``Enter full name in the edit box`` is the long hint and appears below the short hint. It can be extracted using the `GetLongHint <Vcl.Controls.GetLongHint.htm>`__ function for use in an `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler. + - ``'1'`` is an optional ``ImageIndex`` in an ``ImageList`` in the ``Images`` property of the control and specifies the index of the image to appear in the hint. + + If ``Hint`` contains only one value, the entire string is used as a *Help Hint* and returned by the `GetLongHint <Vcl.Controls.GetLongHint.htm>`__ and `GetShortHint <Vcl.Controls.GetShortHint.htm>`__ functions. If a control has no ``Hint`` value specified, but its parent control does, the control uses the value of the parent control (as long as the control's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property is ``True``). + + .. note:: If the application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property is ``False``, the *Help Hint* does not appear, but the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler is still called. + ''' + HelpType: HelpType + ''' + Specifies whether the control's context-sensitive Help topic is identified by a context ``ID`` or by keyword. + + Set ``HelpType`` to specify whether the control identifies its context-sensitive Help topic by a context ``ID`` or by keyword: + + - When ``HelpType`` is ``htContext``, the `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ property value identifies the control's Help topic. + - When ``HelpType`` is ``htKeyword``, the `HelpKeyword <Vcl.Controls.TControl.HelpKeyword.htm>`__ property value identifies the control's Help topic. + + To use the Help, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + ''' + HelpKeyword: str + ''' + The ``HelpKeyword()`` property contains the keyword string that identifies the ``Help`` topic for the control. + + To enable the keyword-based context-sensitive ``Help`` for a control, set `Vcl.Controls.TControl.HelpType <Vcl.Controls.TControl.HelpType.htm>`__ to ``htKeyword`` and set ``HelpKeyword()`` to a keyword string. + + No keyword (zero-length string, the default) means that no ``Help`` topic is provided for the control. + + To use the ``Help``, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or other unit that provides an interface to the external *Help* viewer to use. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + ''' + HelpContext: HelpContext + ''' + The ``HelpContext()`` property contains the numeric context ``ID`` that identifies the ``Help`` topic for the control. + + In case of a ``.chm`` help file, you must map symbolic *Context IDs* of ``Help`` topics to numeric topic ``ID`` values in the ``[MAP]`` section of your project (``.hhp``) file. + + To enable *Context ID*-based context-sensitive ``Help`` for a control, set `Vcl.Controls.TControl.HelpType <Vcl.Controls.TControl.HelpType.htm>`__ to ``htContext`` and set ``HelpContext()`` to a numeric topic ``ID``. + + A topic ``ID`` of ``'0'`` (default) means that no ``Help`` topic is provided for the control. + + To use the ``Help``, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + ''' + Margins: Margins + ''' + Specifies the margins of the control. + + Use the ``Margins`` property to set the margins of the control. + + If `AlignWithMargins <Vcl.Controls.TControl.AlignWithMargins.htm>`__ is ``True``, then the ``Margins`` property of the control governs the spacing relative to other controls that are aligned with this one. The controls are not allowed to be closer than the spacing specified in ``Margins``. + + .. note:: The ``Margins`` you set for the control have effect only when `AlignWithMargins <Vcl.Controls.TControl.AlignWithMargins.htm>`__ is set to ``true`` and `Align <Vcl.Controls.TControl.Align.htm>`__ is not set to **alNone**. + ''' + CustomHint: CustomHint + ''' + ``CustomHint`` is a custom hint for the control. + + ``CustomHint`` is a `CustomHint <Vcl.Controls.CustomHint.htm>`__ instance for a control to specify the appearance of the control's hint. + ''' + ParentCustomHint: bool + ''' + Specifies where a control looks for its custom hint. + + To have a control use the same hint customization information as its parent control, set ``ParentCustomHint`` to ``true``. + + If ``ParentCustomHint`` is ``False``, the control uses its own `CustomHint <Vcl.Controls.TControl.CustomHint.htm>`__ property. + + Set ``ParentCustomHint`` to ``true`` for all controls to ensure that all the controls on a form display their hint messages alike. + + When the value of a control's `CustomHint <Vcl.Controls.TControl.CustomHint.htm>`__ property changes, ``ParentCustomHint`` becomes ``False`` automatically. + ''' + def GetDesignDpi(self) -> int: + ''' + Obtains the design DPI for the form where the control was designed. + ''' + def GetParentCurrentDpi(self) -> int: + ''' + Obtains the current DPI for parent control, or the current control DPI if there is no parent. + ''' + def GetCurrentPPI(self) -> int: + ''' + No have docs. + ''' + def AsyncSchedule(self, AsyncResult: BaseAsyncResult) -> None: + ''' + Schedules asynch method calls. + + ``Vcl.Controls.TControl.AsyncSchedule`` inherits from `System.Classes.TComponent.AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__. All content below this line refers to `System.Classes.TComponent.AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__. + + Schedules asynch method calls. + + By default, `AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__ uses `Queue <System.Classes.TThread.Queue.htm>`__ in order to queue the asynch method call with the main thread. + + Override `AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__ in descendant components in order to modify the management of the asynchronous scheduling. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Responds when the action associated with the control changes. + + ``ActionChange()`` is called automatically when the ``Action`` object specified by the ``Action`` property, or any of its properties, changes. By default, the control ``ActionLink``\ s. ``OnChange`` event handler calls ``ActionChange()``. + + ``ActionChange()`` updates the control properties that correspond to properties of the associated action. These properties include the ``Caption``, ``Enabled``, ``Hint``, and ``Visible`` properties and the ``OnClick`` event handler. + + The ``Sender`` parameter is the ``Action`` object that changed. + + The ``CheckDefaults`` parameter indicates whether the control's properties should all be updated or only those that have not been explicitly changed from their default values. When ``CheckDefaults`` is ``True``, only those properties and event handlers that have not been changed from the default values are updated. + ''' + def AdjustSize(self) -> None: + ''' + Sets the size of the control as determined by the ``AutoSize`` property. + + If the ``AutoSize`` property is ``True``, ``AdjustSize()`` is called automatically when the control needs to automatically resize itself to its contents. As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``AdjustSize()`` calls ``SetBounds()`` with the values of its ``Left``, ``Top``, ``Width``, and ``Height`` properties. This call can result in a change of size if these values are altered in the control's ``OnCanResize`` or ``OnConstrainedResize`` event handlers, or if the control's ``OnResize`` event handler makes any final adjustments. + + Descendent classes override ``AdjustSize()`` to change the size of the control to adjust to its contents. + + Other controls can call ``AdjustSize()`` after changing the control's contents. Do not call ``AdjustSize()`` in application code. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Overrides the inherited ``AssignTo()`` function to enable assignments to ``Action`` objects. + + Do not call the protected ``AssignTo()`` method in application code. The ``Action()`` method of a persistent object calls ``AssignTo()`` if it is passed the control as a ``Source`` and the persistent object does not know how to copy the properties of the control. The ``Dest`` parameter is the persistent object that should have its properties copied from the control. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``AssignTo()`` checks whether the ``Dest`` parameter is a ``CustomAction`` object, and if so, assigns values to its `Enabled <Vcl.Controls.TControl.Enabled.htm>`__, `Hint <Vcl.Controls.TControl.Hint.htm>`__, `Caption <Vcl.Controls.TControl.Caption.htm>`__, and `Visible <Vcl.Controls.TControl.Visible.htm>`__ properties and its ``OnExecute`` event. This allows arbitrary controls to assign these to an associated ``Action`` object. + ''' + def BeginAutoDrag(self) -> None: + ''' + Begins automatic drag. + + ``BeginAutoDrag()`` is called automatically when a user drags a control whose `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ is ``dmAutomatic``. Do not call ``BeginAutoDrag()`` in application code. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``BeginAutoDrag()`` calls `BeginDrag <Vcl.Controls.TControl.BeginDrag.htm>`__, passing in the global `Mouse <Vcl.Controls.Mouse.htm>`__ variable's `DragImmediate <Vcl.Controls.TMouse.DragImmediate.htm>`__ and `DragThreshold <Vcl.Controls.TMouse.DragThreshold.htm>`__ properties. + ''' + def CanResize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event dispatcher. + + ``CanResize()`` is called automatically when an attempt is made to resize the control, after any autosizing has occurred. The ``NewWidth`` and ``NewHeight`` arguments specify the attempted new values for the control's height and width. ``CanResize()`` optionally adjusts the values of ``NewWidth`` and ``NewHeight``, and returns ``True`` if the control can be resized to the returned values. ``CanResize()`` returns ``False`` if the control cannot be resized. + + ``CanResize()`` generates an `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event. An `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler may change the values of NewHeight and NewWidth. + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Indicates whether the control can resize itself automatically to accommodate its contents. + + ``CanAutoSize()`` is called automatically when the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True`` and an attempt is made to resize the control. It allows controls to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property before the resize sequence that begins with the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ and `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ events and ends with the `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event. + + When ``CanAutoSize()`` is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the control. ``CanAutoSize()`` adjusts these values so that the control's size adjusts to its contents. If the adjustment results in values of ``NewWidth`` and ``NewHeight`` that differ from the control's current width and height, ``CanAutoSize()`` returns ``True``, indicating that the resize sequence should proceed. If, after adjustment, ``NewWidth`` and ``NewHeight`` equal `Width <Vcl.Controls.TControl.Width.htm>`__ and `Height <Vcl.Controls.TControl.Height.htm>`__, ``CanAutoSize()`` returns ``False``, and the resize sequence is aborted. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``CanAutoSize()`` always returns ``True`` without changing ``NewWidth`` or ``NewHeight``. Override ``CanAutoSize()`` to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property for a particular control class's contents. + ''' + def Changed(self) -> None: + ''' + Sends a ``CM_CHANGED`` message to the control. + + Call ``Changed()`` after changing the properties of the control in a way that affects the properties of a parent object. ``Changed()`` sends a ``CM_CHANGED`` message back to the control. If the control is a windowed control, this message is sent to the parent so that it can make any necessary adjustments. + ''' + @overload + def ChangeScale(self, M: int, D: int) -> None: + ''' + Rescaling event dispatcher. + + ``ChangeScale()`` is called automatically when an event requires that the control resize itself. Most often, this event is a call to the ``ScaleBy()`` method of the control itself or the control's parent. This allows the control to adjust its own special properties, such as font sizes and display regions. + + ``ChangeScale()`` parameters have the same meaning as for ``ScaleBy()``. + + .. note:: Because control sizes and coordinates are integers, scaling can result in round-off error. Repeated calls to ``ChangeScale()`` can make the control gradually get smaller or slowly disappear from the form. Consider destroying and reloading the form after several rescalings. + ''' + @overload + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: ... + def Click(self) -> None: + ''' + Respond to user click. + + ``Click()`` is called automatically when the user left-clicks the control. ``Component`` or application code can call ``Click()`` to simulate a user mouse click. This is often done in menu actions and hotkey handlers. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``Click()`` queries whether the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler exists and is different from the ``OnExecute`` handler for the control's Action. If this is ``True``, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler is called. If this is ``False``, and the ``Action`` ``OnExecute`` event handler exists, the Action's Execute method is called. Override ``Click()`` to provide additional behavior. + ''' + def ConstrainedResize(self, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + Notify control of resize with constraints. + + ``ConstrainedResize()`` is called automatically when a control is resized and has nonzero Constraints. This allows the control to modify the constraints before they are applied. + + As implemented in TControl, ``ConstrainedResize()`` simply calls the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler. + ''' + def CalcCursorPos(self) -> Point: + ''' + Gives the coordinates of the cursor, with respect to the origin of the control. + + Use ``CalcCursorPos()`` to obtain the current coordinates of the mouse cursor, with respect to the origin of the control. + ''' + def CreateTouchManager(self) -> None: + ''' + Instantiates a touch manager. + + ``CreateTouchManager()`` is called automatically in the constructor of the `Control <Vcl.Controls.TControl.htm>`__ class. By default, it instantiates a `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. + + ``CreateTouchManager()`` can be overridden in descendent classes of `Control <Vcl.Controls.TControl.htm>`__ to use another touch manager, usually a user-defined one. + ''' + def DblClick(self) -> None: + ''' + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event dispatcher. + + ``DblClick()`` calls any event handler attached to the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event. Override ``DblClick()`` to provide other responses in addition to the inherited event-handler call when the user double-clicks the control. + + The ``DblClick()`` method is triggered by left mouse-button double-click message (``WM_LBUTTONDBLCLK``) from Windows. + ''' + def DefaultDockImage(self, DragDockObject: DragDockObject, Erase: bool) -> None: + ''' + Handles the painting and erasing of a dock image. + + The `DrawDragDockImage <Vcl.Controls.TControl.DrawDragDockImage.htm>`__ and `EraseDragDockImage <Vcl.Controls.TControl.EraseDragDockImage.htm>`__ methods call **DefaultDockImage** to paint or erase the drag image of a control while the user drags it in a drag-and-dock operation. + + ``DragDockObject`` contains the drag-and-dock information for the control. + + ``Erase`` specifies whether to draw or erase the image. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Provides methods to read and write the `IsControl <Vcl.Controls.TControl.IsControl.htm>`__ property to a stream such as a form file. + + ``DefineProperties()`` is called automatically by the streaming system that loads and saves *VCL Components*. It allows persistent objects to read and write properties that are not published. Published properties are loaded and stored automatically. + + ``DefineProperties()`` uses the methods of the filer passed as the Filer parameter to assign methods that can load and save the `IsControl <Vcl.Controls.TControl.IsControl.htm>`__ property. + + Override ``DefineProperties()`` to persist unpublished properties. Call the DefineBinaryProperty or DefineProperty method of the Filer parameter to assign methods that load or save property values. + + .. note:: When overriding this method, call the parent class's ``DefineProperties()`` method first. + ''' + def DockTrackNoTarget(self, Source: DragDockObject, X: int, Y: int) -> None: + ''' + Handles dragging of the control over an invalid docking target. + + ``DockTrackNoTarge()`` is called automatically when the control is dragged over an invalid docking target. It updates the docking rectangle of the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ specified by ``Source`` to reflect the current mouse coordinates, as given by ``'X'`` and ``'Y'``. + ''' + def DoContextPopup(self, MousePos: Point, Handled: bool) -> None: + ''' + Is an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event dispatcher. + + ``OnContextPopup`` calls any event handler attached to the ``OnContextPopup`` event. When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__ override ``OnContextPopup`` to provide other responses in addition to the inherited event-handler call when the user invokes the control's context menu. + + ``MousePos`` indicates the position where the user right-clicked the control. If the user invoked the context menu using the keyboard, ``MousePos`` is ``(-1,-1)``. + + ``Handled()`` returns a ``Boolean`` value indicating whether the control should continue with its default response to the user action. + ''' + def DoEndDock(self, Target: Object, X: int, Y: int) -> None: + ''' + Is an `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ event dispatcher. + + ``OnEndDock`` calls any event handler attached to the `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ event. When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__, override `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to provide other responses in addition to the inherited event-handler call when the user finishes a drag-and-dock operation. + ''' + def DoDock(self, NewDockSite: WinControl, ARect: Rect) -> None: + ''' + Docking event dispatcher. + + ``DoDock()`` is called automatically as part of the docking process. It updates the control's dimensions and causes it to repaint. + + ``NewDockSite`` is the control's new dock site. This value can be ``nil`` (Delphi) or ``NULL`` (C++) or ``NULL``DockSite (a constant that indicates no dock site). + + ``ARect`` specifies the control's new dimensions once it is docked to NewDockSite. + ''' + def DoStartDock(self, DragObject: DragObject) -> None: + ''' + Is an `OnStartDockevent <Vcl.Controls.TControl.OnStartDock.htm>`__ dispatcher. + + ``DoStartDock()`` calls any event handler attached to the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event. When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__, override ``DoStartDock()`` to provide other responses in addition to the inherited event-handler call when the user starts a drag-and-dock operation. + ''' + def DoMouseWheel(self, Shift: ShiftState, WheelDelta: int, MousePos: Point) -> bool: + ''' + Is an `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ event dispatcher. + + The ``DoMouseWheel`` method calls ``DoMouseWheelUp()`` to generate an OnMouseWheelUp event. + + The ``Shift`` parameter indicates the state of the *Shift*, *Alt*, and *Ctrl* keys. + + The ``MousePos`` parameter indicates the position of the mouse pointer. + + ``DoMouseWheelUp()`` returns ``True`` if an event handler indicates that it handled the message, and ``False`` otherwise. + + Override ``DoMouseWheelUp()`` to perform class-specific tasks in addition to calling the event handler when the mouse wheel is rotated upward. + ''' + def DoMouseWheelDown(self, Shift: ShiftState, MousePos: Point) -> bool: + ''' + Is an `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event dispatcher. + + The ``DoMouseWheel()`` method calls ``DoMouseWheelDown()`` to generate an ``OnMouseWheelDown`` event. + + The ``Shift`` parameter indicates the state of the *Shift*, *Alt*, and *Ctrl* keys. + + The ``MousePos`` parameter indicates the position of the mouse pointer. + + ``DoMouseWheelDown()`` returns ``True`` if an event handler indicates that it handled the message, and ``False`` otherwise. + + Override ``DoMouseWheelDown()`` to perform class-specific tasks in addition to calling the event handler when the mouse wheel is rotated downward. + ''' + def DoMouseWheelUp(self, Shift: ShiftState, MousePos: Point) -> bool: + ''' + Is an `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ event dispatcher. + + The ``DoMouseWheel()`` method calls ``DoMouseWheelUp()`` to generate an OnMouseWheelUp event. + + The ``Shift`` parameter indicates the state of the *Shift*, *Alt*, and *Ctrl* keys. + + The ``MousePos`` parameter indicates the position of the mouse pointer. + + ``DoMouseWheelUp()`` returns ``True`` if an event handler indicates that it handled the message, and ``False`` otherwise. + + Override ``DoMouseWheelUp()`` to perform class-specific tasks in addition to calling the event handler when the mouse wheel is rotated upward. + ''' + def DragCanceled(self) -> None: + ''' + Provides the interface for a method that responds to the cancellation of a drag. + + ``DragCanceled()`` is called automatically when a drag operation is canceled. As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``DragCanceled()`` does nothing. When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__, override ``DragCanceled()`` to provide code that executes when a drag-and-drop or drag-and-dock operation is canceled. + ''' + def DragOver(self, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Is an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event dispatcher. + + Override ``DragOver()`` to add additional code that executes before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is called. + + ``DragOver()`` sets the ``Accept`` parameter to ``True`` to indicate that the user can drop the dragged object on the control. It sets Accept to ``False`` to indicate that the user cannot drop the dragged object on the control. + + The ``Source`` parameter is the object being dragged. + + The ``State`` parameter indicates how the dragged object is moving in relation to the control. ``'X'`` and ``'Y'`` indicate the current position of the mouse. + ''' + def DoEndDrag(self, Target: Object, X: int, Y: int) -> None: + ''' + Is an `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event dispatcher. + + ``DoEndDrag()`` calls any event handler attached to the ``OnEndDrag`` event. When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__, override ``DoEndDrag()`` to provide other responses in addition to the inherited event-handler call when the user drops an object or cancels a drag-and-drop operation. + ''' + def DoStartDrag(self, DragObject: DragObject) -> None: + ''' + Is an `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event dispatcher. + + ``DoStartDrag()`` calls any event handler attached to the ``OnStartDrag`` event. When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__, override ``DoStartDrag()`` to provide other responses in addition to the inherited event-handler call when the user starts a drag-and-drop operation. + ''' + def DoGesture(self, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Processes the unhandled gesturing events. + + ``DoGesture()`` is run automatically for all gesturing events that were not handled by the user. ``DoGesture()`` is run only if `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is not set or if it did not handle the gesture event. + + Override ``DoGesture()`` in descending classes to support default behavior for gesture events that were not handled by the user. In `Control <Vcl.Controls.TControl.htm>`__, the ``DoGesture()`` method simply returns and does no special processing. + ''' + def DoGetGestureOptions(self, Gestures: InteractiveGestures, Options: InteractiveGestureOptions) -> None: + ''' + Returns the interactive gestures and their options. + + ``DoGetGestureOptions()`` is used internally to access the interactive gestures and their options associated with a `Control <Vcl.Controls.TControl.htm>`__. + ''' + def DrawDragDockImage(self, DragDockObject: DragDockObject) -> None: + ''' + Draws the dock image for the control. + + ``DrawDragDockImage()`` is called automatically to draw the control (or, more typically, the drag rectangle) when the control is manipulated in drag-and-dock operations. + + ``DrawDragDockImage()`` calls `DefaultDockImage <Vcl.Controls.TControl.DefaultDockImage.htm>`__ to render the image. + ''' + def EraseDragDockImage(self, DragDockObject: DragDockObject) -> None: + ''' + Erases the dock image for the control. + + ``DrawDragDockImage()`` is called automatically to erase the control (or, more typically, the drag rectangle) when the control is manipulated in drag-and-dock operations. + ''' + def GetAction(self) -> BasicAction: + ''' + Returns the value of the `Action <Vcl.Controls.TControl.Action.htm>`__ property. + + ``GetAction()`` is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to obtain the current value of the `Action <Vcl.Controls.TControl.Action.htm>`__ property. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the appropriate ``ActionLink`` class that is associated with the control class. + + ``GetActionLinkClass()`` returns the appropriate class type for the ``ActionLink`` used with a control. This class is used internally to create an ``ActionLink`` object for the control when it has an associated action. The ``ActionLink`` links the action to the control client. Each ``Action`` link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``GetActionLinkClass()`` returns the `Control <Vcl.Controls.TControl.htm>`__ ``ActionLink`` class type, which associates the ShowHint, ``Caption``, ``Enabled``, and ``Visible`` properties with the ``OnClick`` event handler. Descendants of `Control <Vcl.Controls.TControl.htm>`__ override this method to specify a descendant of `Control <Vcl.Controls.TControl.htm>`__ ``ActionLink`` that handles their configuration of properties and events. + ''' + def GetClientOrigin(self) -> Point: + ''' + Returns the screen coordinates of the upper-left corner of the control's client area. + + Override ``GetClientOrigin()`` to change how the ``ClientOrigin`` is calculated. + + The ``GetClientOrigin()`` method is the protected method for reading the ``ClientOrigin`` property. ``GetClientOrigin()`` calculates the ``ClientOrigin`` by adding the control's ``Left`` and ``Top`` values to the ``ClientOrigin`` coordinates of its parent. + ''' + def GetClientRect(self) -> Rect: + ''' + Returns a rectangle defining the client area of the control. + + Override ``GetClientRect()`` to change how the client area is calculated. + + The ``GetClientRect()`` method is the protected method for reading the ``ClientRect`` property. ``GetClientRect()`` returns a rectangle with the rectangle's ``Top`` and ``Left`` fields set to zero, and its ``Bottom`` and ``Right`` fields set to the control's ``ClientHeight`` and ``ClientWidth``, respectively. + ''' + def GetDeviceContext(self, WindowHandle: HWND) -> HDC: + ''' + Returns a device context for the control. + + Call ``GetDeviceContext()`` to obtain a device context and window handle. Override ``GetDeviceContext()`` to change how the device context is obtained. + + The window handle used by the control is returned in the `WindowHandle <Vcl.Controls.TWinControl.WindowHandle.htm>`__ parameter. ``GetDeviceContext()`` returns the device context of this, the parent control's window. + ''' + def GetDockEdge(self, MousePos: Point) -> Align: + ''' + Returns the edge on which another control should be docked when it is dragged over the control. + + Use ``GetDockEdge()`` to get the edge on which another control should be docked when it is dragged over the control. + + ``MousePos`` is the position of the mouse. + + ``GetDockEdge()`` is called automatically during drag-and-dock operations involving the control. + ''' + def GetEnabled(self) -> bool: + ''' + Returns the value of the ``Enabled`` property. + + ``GetEnabled()`` is the read implementation of the ``Enabled`` property. + + Override ``GetEnabled()`` and `SetEnabled <Vcl.Controls.TControl.SetEnabled.htm>`__ to change the implementation of the ``Enabled`` property. For example, a descendant of `Control <Vcl.Controls.TControl.htm>`__ might change the way the ``Enabled`` property interacts with an associated action. + ''' + def GetFloating(self) -> bool: + ''' + Returns the value of the `Floating <Vcl.Controls.TControl.Floating.htm>`__ property. + + ``GetFloating()`` is the implementation of the read-only `Floating <Vcl.Controls.TControl.Floating.htm>`__ property. ``GetFloating()`` returns ``true`` if the `HostDockSite <Vcl.Controls.TControl.HostDockSite.htm>`__ property is either ``nil`` (Delphi) or ``NULL`` (C++), or of type `FloatingDockSiteClass <Vcl.Controls.TControl.FloatingDockSiteClass.htm>`__. + + Override this method to change the way a control determines if it is floating. + ''' + def GetFloatingDockSiteClass(self) -> WinControlClass: + ''' + Returns the class used for the control when it is floating. + + ``GetFloatingDockSiteClass()`` is the read implementation of the `FloatingDockSiteClass <Vcl.Controls.TControl.FloatingDockSiteClass.htm>`__ property. Override this method to change the implementation of `FloatingDockSiteClass <Vcl.Controls.TControl.FloatingDockSiteClass.htm>`__. + ''' + def GetPalette(self) -> HPALETTE: + ''' + Returns the handle to a palette for use by the control. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``GetPalette()`` returns a null handle, indicating that the control does not have a palette. Override ``GetPalette()`` to implement derived objects that use a palette. Create a palette handle for the control by a call to the *Windows API Function CreatePalette*. ``GetPalette()`` should return the palette handle for the control. + + Specifying the palette for a control tells the application that the control's palette needs to be realized and designates the palette to use for realization. + + ``GetPalette()`` is called only if the run-time video mode requires color palette support, for example, in 256-color mode. + ''' + def GetPopupMenu(self) -> PopupMenu: + ''' + Returns the pop-up menu associated with the control. + + Call ``GetPopupMenu()`` to find the pop-up menu associated with the control. Override ``GetPopupMenu()`` to change which pop-up menu is associated with the control or to specify different pop-up menus depending on the state of the control. + + ``GetPopupMenu()`` returns the value of the ``Popup`` property. + ''' + def GetDragMode(self) -> None: + ''' + Returns the value of the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property. + + ``GetDragMode()`` is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to obtain the current value of the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property. + ''' + def IsTouchPropertyStored(self, AProperty: TouchProperty) -> bool: + ''' + Checks whether the associated touch manager stored any of the given options. + + ``IsTouchPropertyStored()`` is used internally by the *VCL Framework* to check whether the associated touch manager component has stored the given options. Do not call ``IsTouchPropertyStored()`` directly. ``IsTouchPropertyStored()`` is used primarily to ensure that controls that do not require gesturing are not storing useless data in the DFMs or executables. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a stream. + + Do not call ``Loaded()``. The *VCL Streaming* system calls ``Loaded()`` automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the form. + + ``Loaded()`` overrides the inherited method in order to initialize the control from its associated Action. To change the properties the control copies from its action, override the ActionChange method. + ''' + def MouseActivate(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int) -> MouseActivate: + ''' + Triggers a ``MouseActivateEvent <Vcl.Controls.TMouseActivateEvent.htm>`__ event. + + Use ``MouseActivate()`` to trigger a `MouseActivateEvent <Vcl.Controls.TMouseActivateEvent.htm>`__ event with the given parameters. + + The following table explains the meaning of each parameter: + + ==================== ==================================================================== + **Parameter** **Meaning** + ==================== ==================================================================== + ``Button`` The mouse button that is pressed. + ``Shift`` The shift state while the mouse button is pressed. + ``X | Y`` The current mouse coordinates. + ``HitTest`` The hit test value obtained from the ``WM_NCHITTEST`` message. + ==================== ==================================================================== + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event dispatcher. + + Override the protected ``MouseDown()`` method to provide other responses in addition to calling the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler when the user presses the mouse button down while the cursor's hotspot is over the control. + + The ``Button`` parameter determines which mouse button the user pressed. ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) were down when the user pressed the mouse button. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + A control calls ``MouseDown()`` in response to any of the Windows mouse-down messages (``WM_LBUTTONDOWN``, ``WM_MBUTTONDOWN``, ``WM_RBUTTONDOWN``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was pressed down: left, right, or middle. + ''' + def MouseMove(self, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Responds to mouse moving over control area. + + Override the protected ``MouseMove()`` method to provide other responses in addition to calling the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler when the user moves the mouse. + + A control calls ``MouseMove()`` in response to any of the Windows mouse-move messages (``WM_MOUSEMOVE``), decoding the message parameters into the shift-key state and position, which it passes in the Shift, X, and Y parameters, respectively. + + As the mouse cursor moves across a control, this method is called repeatedly. Each time it is called, it is with the new coordinates that reflect the continuous path of the mouse cursor across the screen real estate covered by the control's visual representation. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Is an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event dispatcher. + + Override the protected ``MouseUp()`` method to provide other responses in addition to calling the `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler when the user releases a previously pressed mouse button while the cursor's hot spot is over the control. + + A control calls ``MouseUp()`` in response to any of the Windows mouse-up messages (``WM_LBUTTONUP``, ``WM_MBUTTONUP``, ``WM_RBUTTONUP``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was released: left, right, or middle. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + ``Notification()`` allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the ``Notification()`` method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the ``Notification()`` method to update controls that rely on other objects. Data-aware objects override the ``Notification()`` method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def PositionDockRect(self, DragDockObject: DragDockObject) -> None: + ''' + Positions the docking rectangle according to the current drag-and-dock state. + + Use ``PositionDockRect()`` to adjust the docking rectangle of the drag-and-dock object specified by ``DragDockObject``. ``DragDockObject``\ s. `DockRect <Vcl.Controls.TDragDockObject.DockRect.htm>`__ property is updated to reflect the current drag-and-dock state. This updating process makes use of the `UndockWidth <Vcl.Controls.TControl.UndockWidth.htm>`__, `UndockHeight <Vcl.Controls.TControl.UndockHeight.htm>`__, `LRDockWidth <Vcl.Controls.TControl.LRDockWidth.htm>`__, or `BDockHeight <Vcl.Controls.TControl.TBDockHeight.htm>`__ property, as appropriate. + ''' + def PaletteChanged(self, Foreground: bool) -> bool: + ''' + Responds to changes in the system's palette by realizing the control's palette. + + Override ``PaletteChanged()`` to change how the control responds to Windows notifications that the system palette is changing. `Control <Vcl.Controls.TControl.htm>`__ responds to these notifications by trying to realize the control's palette, if any, into the current device context. If the change in the system palette causes the actual value of the control's palette to change, ``PaletteChanged()`` invalidates the control so that it can repaint with the new palette. + + Windows paints the active window with a foreground palette, while other windows are forced to use background palettes. Background palettes are approximate matches to the colors specified by the control's logical palette, given the limitations imposed by implementing the foreground palette. Windows only allows a single foreground palette. + + ``PaletteChanged()`` allows the control to obtain a new realization of its palette when the system palette changes. When ``Foreground`` is ``True``, the form has been activated and the control is specifying the new foreground palette. When ``Foreground`` is ``False``, another application or form has changed the foreground palette, and controls that are sensitive to the available palette should realize new background palettes to best match their logical palettes. + + If the control does not have a logical palette to be realized into the current device context, `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ returns a handle of 0, and ``PaletteChanged()`` returns ``False``, indicating that no palette was realized. If `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ returns the handle to a logical palette, ``PaletteChanged()`` realizes this palette into the current device context, and returns ``True``. + + .. note:: ``PaletteChanged()`` is called only when the run-time video mode requires palette support, such as for 256 color mode, but not 16 million color mode. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Prepares the control for having its properties assigned values read from a stream. + + ``ReadState()`` is part of a sequence of calls used by the streaming system that loads and saves component state. It reads the values of all the control's published properties, stored data, and owned components from the reader object passed in ``Reader``. + + Override ``ReadState()`` to change the preparations the control makes as it readies itself to have its property values assigned from a stream. For example, a control might destroy temporary internal data structures or objects before new instances are loaded from the stream. Remember to include a call to the inherited class's method when overriding ``ReadState()``. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``ReadState()`` assigns the Reader parameter's ``Parent`` property to the control's own ``Parent`` property before calling the inherited ``ReadState()`` method of TComponent. Finally, ``ReadState()`` synchronizes the ``Font``, ``Color``, and ``ShowHint`` properties with the parent control, as indicated by the ``ParentFont``, ``ParentColor``, and Parent``ShowHint`` properties, respectively. + ''' + def RequestAlign(self) -> None: + ''' + Instructs the parent of a control to reposition the control, enforcing its ``Align`` property. + + Controls call ``RequestAlign()`` internally when changes are made to the size or position of the control, so that they remain properly aligned within the parent control. Do not call ``RequestAlign()`` in application code. + ''' + def Resize(self) -> None: + ''' + Respond to control resize. + + ``Resize()`` is called automatically immediately after the control's dimensions change. As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``Resize()`` calls the control's `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event handler if it is assigned. + ''' + def ScaleConstraints(self, M: int, D: int) -> None: + ''' + Scales the values of the `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ property to the given ratio. + + Use ``ScaleConstraints()`` to scale the values of the `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ property to the given ``M/`` ``'D'`` ratio. + ''' + def ScaleMargins(self, M: int, D: int) -> None: + ''' + Scales the values of the `Margins <Vcl.Controls.TControl.Margins.htm>`__ property to the given ratio. + + Use ``ScaleMargins()`` to scale the values of the `Margins <Vcl.Controls.TControl.Margins.htm>`__ property to the given ``M/`` ``'D'`` ratio. + ''' + def DefaultScalingFlags(self) -> ScalingFlags: + ''' + No have docs. + ''' + def SendCancelMode(self, Sender: Control) -> None: + ''' + Cancels the modal state of the control. + + Call ``SendCancelMode()`` to cancel the modal state of the control. Various controls implemented in the VCL support a model state where the user must respond to the control before interacting with any other object on the form. An example is the dropped-down state of a ``ComboBox`` when the drop-down list is showing. For these controls, specific user actions send a *Windows Message* to the control to end the model state, such as a mouse click that closes up the drop-down list. + + ``SendCancelMode()`` allows an application to end the modal state of the control in the absence of a user action, or when implementing a new user interface response. + ''' + def SendDockNotification(self, Msg: int, WParam: Handle, LParam: Handle) -> None: + ''' + Sends a *Windows* message to the control's host dock site. + + Use ``SendDockNotification()`` to send a *Windows* message to the control's host dock site. + + ``SendDockNotification()`` is called automatically when the control's text or visibility changes. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Sets the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + + ``SetAutoSize()`` is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to set the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + ''' + def SetDragMode(self, Value: DragMode) -> None: + ''' + Sets the``DragMode``for the control. + + ``SetDragMode()`` is the protected write implementation for the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property. Override ``SetDragMode()`` to execute additional code when the value of the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property changes. + ''' + def SetEnabled(self, Value: bool) -> None: + ''' + Sets the value of the ``Enabled`` property. + + ``SetEnabled()`` is the protected write implementation of the ``Enabled`` property. After changing the internal representation of the ``Enabled`` property, ``SetEnabled()`` sends a *Windows* message back to the control so that it can respond to the change. When `Control <Vcl.Controls.TControl.htm>`__ receives this message, it invalidates the control so that its appearance reflects the change (for example, so that it appears grayed). Some descendants respond to this message in other ways (for example, windowed controls ensure that a disabled control does not have focus). + + Override ``GetEnabled()`` and ``SetEnabled()`` to change the implementation of the ``Enabled`` property. For example, a descendant of `Control <Vcl.Controls.TControl.htm>`__ might change the way the ``Enabled`` property interacts with an associated action. When overriding ``SetEnabled()``, be sure to call the inherited method. + ''' + def SetName(self, Value: ComponentName) -> None: + ''' + Sets the name of the control. + + ``SetName()`` is the protected write implementation of the ``Name`` property. `Control <Vcl.Controls.TControl.htm>`__ updates the ``Text`` or ``Caption`` property, if appropriate, after changing the value of ``Name``. + + Override ``SetName()`` to execute additional code when the value of the ``Name`` property changes. + ''' + def SetParent(self, AParent: WinControl) -> None: + ''' + Sets the parent of the control. + + ``SetParent()`` is the protected implementation of the ``Parent`` property. Override ``SetParent()`` to execute additional code when the value of the ``Parent`` property changes. + + The ``AParent`` parameter specifies the new parent of the control. + + If the control already has a parent, ``SetParent()`` removes the control from that parent's list of controls by calling the parent's RemoveControl method. If ``AParent`` is not ``nil`` (Delphi) or ``NULL`` (C++), ``SetParent()`` calls its InsertControl method to add the control to its list of controls. + + The `Control <Vcl.Controls.TControl.htm>`__ destructor calls ``SetParent()``\ (``nil`` (Delphi) or ``NULL`` (C++)) to remove the control from its parent's control list before destroying the component. + ''' + def SetParentBiDiMode(self, Value: bool) -> None: + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + ``SetParentBiDiMode()`` is the protected write implementation of the `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ property. + ''' + def SetBiDiMode(self, Value: BiDiMode) -> None: + ''' + Sets the control's bidirectional mode. + + ``SetBiDiMode`` is the write implementation of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. Override this method to change the implementation of `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + ''' + def SetStyleElements(self, Value: StyleElements) -> None: + ''' + No have docs. + ''' + def SetStyleName(self, Value: str) -> None: + ''' + No have docs. + ''' + def SetZOrder(self, TopMost: bool) -> None: + ''' + Repositions the control in its parent's control list, thereby changing position onscreen. + + Call ``SetZOrder()`` to change the z-order of the control. To make the control the topmost control, specify the TopMost value as ``True``. To make the control the bottommost, set TopMost to ``False``. + + After changing the order, ``SetZOrder()`` invalidates the control to ensure repainting to reflect the new order. + + The stacking order of windowed and non-windowed controls cannot be mingled. For example, if you put a memo, a windowed control on a form, and then put a label, a non-windowed control on top of it, the ``Label`` disappears behind the memo. Windowed controls always stack on top of non-windowed controls. In this example, calling the ``SetZOrder()`` method of the ``Label`` or the memo has no effect; the ``Label`` always remains behind the memo. + ''' + def SetCustomHint(self, Value: CustomHint) -> None: + ''' + Sets the value of the `CustomHint <Vcl.Controls.TControl.CustomHint.htm>`__ property. + + ``SetCustomHint()`` is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to set the value of the `CustomHint <Vcl.Controls.TControl.CustomHint.htm>`__ property. + ''' + def UpdateExplicitBounds(self) -> None: + ''' + Attempts to update the values of the control's explicit bounds to those of its current bounds. + + Use ``UpdateExplicitBounds()`` to update the values of the control's explicit bounds to those of its current bounds. + + The update process succeeds as long as the options ``csAligning`` in `ControlState <Vcl.Controls.TControl.ControlState.htm>`__ and ``csReading`` in `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ are disabled. + ''' + def UpdateBoundsRect(self, R: Rect) -> None: + ''' + Changes the ``Top``, ``Left``, ``Width``, and ``Height`` properties of the control, but does not update its screen image and bypasses all resize events. + + ``UpdateBoundsRect()`` is used internally by controls to stay synchronized with changes made by the underlying Windows screen object. ``UpdateBoundsRect()`` updates the properties to match those passed in the rectangle as the R parameter. + ''' + def VisibleChanging(self) -> None: + ''' + Provides the interface for a method that responds to changes in the control's visibility. + + ``VisibleChanging()`` is called before the value of a control's ``Visible`` property changes. As implemented in `Control <Vcl.Controls.TControl.htm>`__, it does nothing. Override ``VisibleChanging()`` to respond to changes in the control's visibility. For example, if a control should not change its visibility, override ``VisibleChanging()`` to raise an exception when an attempt is made to alter the control's visibility. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the control. + + Override ``WndProc()`` to change the initial *Windows* message handler for the control. The ``WindowProc()`` property is initialized to ``WndProc()``. + + ``WndProc()`` implements the mouse behavior specified by the `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ and `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ properties, and updates the `ControlState <Vcl.Controls.TControl.ControlState.htm>`__ property. It passes any unhandled messages on to the ``Dispatch()`` method. + + When overriding ``WndProc()`` to provide specialized responses to messages, be sure to call the inherited ``WndProc()`` at the end to dispatch any unhandled messages. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the ``UpdateStyleElements()`` method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def DoMouseEnter(self) -> None: + ''' + ``DoMouseEnter()`` is called when the mouse pointer enters the `SelectionPoint <FMX.Objects.TSelectionPoint.htm>`__ object. + + ``DoMouseEnter()`` calls the inherited `FMX.Controls.TControl.DoMouseEnter <FMX.Controls.TControl.DoMouseEnter.htm>`__ method and then initializes repainting of the `SelectionPoint <FMX.Objects.TSelectionPoint.htm>`__ shape. + + Override the protected ``DoMouseEnter()`` method to provide other responses when the mouse pointer enters the `SelectionPoint <FMX.Objects.TSelectionPoint.htm>`__ object. + ''' + def DoMouseLeave(self) -> None: + ''' + No have docs. + ''' + def FloatControl(self, DockSource: DragDockObject) -> None: # replaces use of CM_FLOAT message + ''' + No have docs. + ''' + def GetAllocatedWindowHandle(self) -> HWnd: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `Control <Vcl.Controls.TControl.htm>`__. + + Calling ``Create()`` constructs and initializes an instance of `Control <Vcl.Controls.TControl.htm>`__. However, you should never attempt to instantiate a `Control <Vcl.Controls.TControl.htm>`__. This class is intended solely as a base class from which other control classes descend and you should only call ``Create()`` to instantiate one of these descendants. + + ``Create()`` calls the parent constructor and initializes the control. + + When overriding ``Create()``, always call the inherited ``Create()`` method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the ``Create()`` method. + + .. note:: If a control's constructor allocates resources or memory, also override the destructor to free those resources. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `Control <Vcl.Controls.TControl.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call Free. Free verifies that the control is not nil, and only then calls ``Destroy()``. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it: + + - Frees the ``Font`` object in its ``Font`` property. + - Calls its inherited destructor. + + Override ``Destroy()`` to free any memory or resources allocated in the ``Create()`` method. When declaring a ``Destroy()`` method in a descendent control type, always add the override directive to the declaration and call the inherited ``Destroy()`` as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def IsCustomStyleActive(self) -> bool: + ''' + No have docs. + ''' + def IsLightStyleColor(self, AColor: Color) -> bool: + ''' + No have docs. + ''' + def ScaleForPPI(self, NewPPI: int) -> None: + ''' + No have docs. + ''' + def BeginDrag(self, Immediate: bool, Threshold: int) -> None: + ''' + Starts the dragging of a control. + + Call ``BeginDrag()`` to start a drag operation. ``BeginDrag()`` is called in application code only when the value of the control's ``DragMode`` is ``dmManual``. If `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ is ``dmAutomatic``, ``BeginDrag()`` is called automatically. + + If the ``Immediate`` parameter is ``True``, the mouse pointer changes to the value of the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property and dragging begins immediately. If ``Immediate`` is ``False``, the mouse pointer does not change to the value of the ``DragCursor`` property and dragging does not begin until the user moves the mouse pointer the number of pixels specified by the ``Threshold`` parameter. If the caller passes a Threshold value less than 0 (such as the default value for this parameter), ``BeginDrag()`` uses the `DragThreshold <Vcl.Controls.TMouse.DragThreshold.htm>`__ property of the global Mouse variable. + + Setting ``Immediate`` to ``False`` allows the control to accept mouse clicks without beginning a drag-and-drop or drag-and-dock operation. + ''' + def BringToFront(self) -> None: + ''' + Puts the control in front of all other controls in its parent control. + + Call ``BringToFront()`` to ensure that a form is visible or to reorder overlapping controls within a form. + + Note that controls that wrap Windows screen objects (control classes descended from TWinControl) always "stack" above lightweight controls (control classes descended from ``GraphicControl``). ``BringToFront()`` can force a lightweight control, such as a Shape, to stack above other lightweight controls, but wrapped controls, such as an Edit, will still stack above the Shape. + + Without ``BringToFront()``, controls are stacked in the order they were placed on the form. + ''' + @overload + def ClientToScreen(self, Point: Point) -> Point: + ''' + Translates a given point from client area coordinates to global screen coordinates. + + Use ``ClientToScreen()`` to convert a point whose coordinates are expressed locally to the control to the corresponding point in screen coordinates. In client area coordinates, (0, 0) corresponds to the upper-left corner of the control's client area. In screen coordinates, (0, 0) corresponds to the upper-left corner of the screen. + + Use `ScreenToClient <Vcl.Controls.TControl.ScreenToClient.htm>`__ along with ``ClientToScreen()`` to convert from one control's coordinate system to another control's coordinate system. For example, + + .. code-block:: python + + P := TargetControl.ScreenToClient(SourceControl.ClientToScreen(P)); + + .. code-block:: python + + P = TargetControl->ScreenToClient(SourceControl->ClientToScreen(P)); + + converts ``'P'`` from coordinates in ``SourceControl`` to coordinates in ``TargetControl``. + ''' + @overload + def ClientToScreen(self, Rect: Rect) -> Rect: ... + def ClientToParent(self, Point: Point, AParent: WinControl) -> Point: + ''' + Translates client coordinates to parent coordinates. + + ``ClientToParent()`` translates ``Point`` from the current control's coordinate system to ``AParent``\ s. coordinate system. ``AParent`` must be a control that can be found by iterating up the chain of ``Parent`` properties. If ``AParent`` is ``nil`` (Delphi) or ``NULL`` (C++), the control's immediate parent is used. + + An ``EInvalidOperation`` exception is thrown if ``AParent`` is not an ancestor control or the ``Parent`` property is ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def Dock(self, NewDockSite: WinControl, ARect: Rect) -> None: + ''' + Used internally to dock the control. + + Do not call ``Dock()`` in applications. It is called automatically to implement many of the details of docking the control to a dock site. + + To dock the control programmatically, use `ManualDock <Vcl.Controls.TControl.ManualDock.htm>`__ instead. + + The ``NewDockSite`` parameter specifies the docking site to which the control is being docked. The ``ARect`` parameter indicates the new dimensions of the control when it is docked to ``NewDockSite``. + ''' + def Dragging(self) -> bool: + ''' + Indicates whether a control is being dragged. + + Use ``Dragging()`` to determine the drag state of the control. If ``Dragging()`` returns ``True``, the control is being dragged. If ``Dragging()`` is ``False``, the control is not being dragged. + ''' + def DragDrop(self, Source: Object, X: int, Y: int) -> None: + ''' + Is an `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event dispatcher. + + When creating a component that descends from `Control <Vcl.Controls.TControl.htm>`__, override ``DragDrop()`` to add additional code that executes before the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler is called. + + The ``Source`` parameter is the object that was dropped onto the control. The ``'X'`` and ``'Y'`` parameters are the mouse coordinates where the object was dropped. + ''' + def DrawTextBiDiModeFlags(self, Flags: int) -> int: + ''' + Returns the text flags that reflect the current setting of the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Call ``DrawTextBiDiModeFlags()`` to obtain a value for the ``TextFlags`` property of a canvas when drawing the control's text or caption. The return value can also be used with the *Windows API DrawText Function*. + + Flags are the current text flags, unaltered by any bidirectional mode considerations. + + ``DrawTextBiDiModeFlags()`` adds or removes the DT_RIGHT or ``DT_RTLREADING`` flags based on the values returned from the `UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__ and `UseRightToLeftReading <Vcl.Controls.TControl.UseRightToLeftReading.htm>`__ methods. + ''' + def DrawTextBiDiModeFlagsReadingOnly(self) -> int: + ''' + Returns the text flag to add that indicates whether the control's text should read from right to left. + + Call ``DrawTextBiDiModeFlagsReadingOnly()`` to determine whether the ``DT_RTLREADING`` flag should be added when calling the *Windows API DrawText* or when assigning the ``TextFlags`` property of a canvas. + + ``DrawTextBiDiModeFlagsReadingOnly()`` returns the ``DT_RTLREADING`` flag or 0, depending on the value returned from the `UseRightToLeftReading <Vcl.Controls.TControl.UseRightToLeftReading.htm>`__ method. + + To obtain the text flags that indicate the bidirectional alignment as well as text direction for the control, use `DrawTextBiDiModeFlags <Vcl.Controls.TControl.DrawTextBiDiModeFlags.htm>`__ instead. + ''' + def EndDrag(self, Drop: bool) -> None: + ''' + Stops a control from being dragged any further. + + Use ``EndDrag()`` to stop a dragging operation that began with a call to the BeginDrag method. + + If the Drop parameter is ``True``, the control being dragged is dropped or docked. If the Drop parameter is ``False``, the control is not dropped or docked and dragging is canceled. + ''' + def GetControlsAlignment(self) -> Alignment: + ''' + Indicates how text is aligned within the control. + + Use ``GetControlsAlignment()`` to determine the alignment of the control. For controls that do not have an ``Alignment`` property, ``GetControlsAlignment()`` returns ``taLeftJustify``. + + .. note:: ``GetControlsAlignment()`` returns the alignment of text before it is altered by the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. To check whether the alignment should be reversed to reflect the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property, call `UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__. + ''' + def GetParentComponent(self) -> Component: + ''' + Returns the parent of the control. + + ``GetParentComponent()`` is called by the streaming system that loads and saves *VCL Components*. The component returned by ``GetParentComponent()`` is responsible for loading and saving the control when it is streamed in or out. As implemented in `Control <Vcl.Controls.TControl.htm>`__, + ``GetParentComponent()`` returns the value of the ``Parent`` property. + ''' + def HasParent(self) -> bool: + ''' + Indicates whether the control has a parent. + + ``HasParent()`` indicates whether the ``Parent`` property has been assigned a value. This method is used by the streaming system to determine whether the control has a parent that is responsible for writing it to a stream. As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``HasParent()`` returns ``True`` if the ``Parent`` property is not ``nil`` (Delphi) or ``NULL`` (C++), and false otherwise. + ''' + def Hide(self) -> None: + ''' + Makes the control invisible. + + Call ``Hide()`` to hide a control. ``Hide()`` sets the ``Visible`` property of the control to ``False``. + + Although a control that is hidden is not visible, its properties and methods are still available. + ''' + def InitiateAction(self) -> None: + ''' + Calls the ``ActionLink``\ s. ``Update()`` method if the control is associated with an ``ActionLink``. + + When the application is idle, the library makes a series of calls to allow controls to update their associated actions so that they reflect the current properties of the controls. The first of these is to the ``InitiateAction()`` method of the each form, followed by the ``InitiateAction()`` methods of its visible menus and controls. + + ``InitiateAction()`` calls the action's update method indirectly (through its ``ActionLink``), which leads to a number of events, any of which may update the action and stop the update process: + + #. First, the ``ActionList`` that contains the action receives an ``OnUpdate`` event. + #. If the ``ActionList`` does not handle the ``OnUpdate`` event, then the ``Application`` object receives an ``OnActionUpdate`` event. + #. If the ``OnActionUpdate`` event handler does not update the action, the action itself receives an ``OnUpdate`` event. + #. If that does not update the action, the active control's ``UpdateAction()`` method is called. + #. Finally, if the action is still not updated, the active form's ``UpdateAction()`` method is called. + ''' + def Invalidate(self) -> None: + ''' + Completely repaints the control. + + Use ``Invalidate()`` when the entire control needs to be repainted. When more than one region within the control needs repainting, ``Invalidate()`` will cause the entire window to be repainted in a single pass, avoiding flicker caused by redundant repaints. There is no performance penalty for calling ``Invalidate()`` multiple times before the control is actually repainted. + ''' + def MouseWheelHandler(self, Message: Message) -> None: + ''' + Dispatches messages received from a mouse wheel. + + The `WndProc <Vcl.Controls.TControl.WndProc.htm>`__ method calls ``MouseWheelHandler()`` when it receives a mouse wheel message. ``MouseWheelHandler()`` checks whether the windowed control is embedded in a form, and if so, calls the form's ``MouseWheelHandler()`` method. This allows the form to respond to mouse wheel messages before they are handled by individual controls. If the windowed control is not in a form, ``MouseWheelHandler()`` passes the mouse wheel message to the `Perform <Vcl.Controls.TControl.Perform.htm>`__ method, which generates an `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event, followed (if necessary) by an `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ or `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event. + ''' + def IsRightToLeft(self) -> bool: + ''' + Indicates whether the control should be reversed right to left. + + Use ``IsRightToLeft()`` to determine whether the control should be reversed in any way because it is running on a system with a Middle Eastern locale. ``IsRightToLeft()`` is intended for component writers to ease the process of implementing the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + ``IsRightToLeft()`` returns ``true`` if the application is running on a Middle East-enabled version of Windows and the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property indicates that the control should make any adjustments. + ''' + def ManualDock(self, NewDockSite: WinControl, DropControl: Control, ControlSide: Align) -> bool: + ''' + Docks the control. + + Use ``ManualDock()`` to dock the control programmatically. ``ManualDock()`` undocks the control from its current dock site, then docks the control to its new dock site. + + ``NewDockSite`` is the control's new dock site. + + ``DropControl`` is the control in the new dock site, if any, on which to drop the control. For example, when docking to a ``PageControl``, ``DropControl`` would be a ``TabSheet``. + + ``ControlSide`` specifies on which side of ``DropControl`` or ``NewDockSite`` (if ``DropControl`` is ``nil`` (Delphi) or ``NULL`` (C++)) the control should be docked. This value can be obtained by calling the dock site's `GetDockEdge <Vcl.Controls.TControl.GetDockEdge.htm>`__ method. + ''' + def ManualFloat(self, ScreenPos: Rect) -> bool: + ''' + Undocks the control. + + Use ``ManualFloat()`` to undock the control programmatically. + + ``ScreenPos`` is the rectangle in which the control is displayed when it starts floating. + ''' + def Refresh(self) -> None: + ''' + Repaints the control on the screen. + + Call the ``Refresh()`` method to repaint the control immediately. ``Refresh()`` calls the Repaint method. Use the ``Refresh()`` and Repaint methods interchangeably. + ''' + def Repaint(self) -> None: + ''' + Forces the control to repaint its image on the screen. + + Call ``Repaint()`` to force the control to repaint its image immediately. If the ``ControlStyle`` property includes ``csOpaque``, the control paints itself directly. Otherwise, the ``Repaint()`` method calls the ``Invalidate()`` method and then the ``Update()`` method so that any visible portions of controls beneath the control will be repainted as well. + ''' + def ReplaceDockedControl(self, Control: Control, NewDockSite: WinControl, DropControl: Control, ControlSide: Align) -> bool: + ''' + Docks the control in the place where another control is already docked. + + Call ``ReplaceDockedControl()`` to replace a control that is already docked while moving that control to another dock site. + + ``Control`` is the control whose place this control is taking. + + ``NewDockSite`` is the new dock site for the control that is replaced. + + ``DropControl`` is a control in the new ``dock`` site on which to drop the control that is replaced. For example, if ``NewDockSite`` were a ``PageControl``, ``DropControl`` would be a ``TabSheet``. + + ``ControlSide`` specifies on which side of ``DropControl`` or ``NewDockSite`` (if ``DropControl`` is ``nil`` (Delphi) or ``NULL`` (C++)) the replaced control should be docked. This value can be obtained by calling the dock site's `GetDockEdge <Vcl.Controls.TControl.GetDockEdge.htm>`__ method. + + ``ReplaceDockedControl()`` does the same thing as calling the `ManualDock <Vcl.Controls.TControl.ManualDock.htm>`__ method of the control specified by the `Control <Vcl.Controls.TControlCanvas.Control.htm>`__ parameter (using the values of ``NewDockSite``, ``DropControl``, and ``ControlSide``) in addition to calling `ManualDock <Vcl.Controls.TControl.ManualDock.htm>`__ for the control whose method this is, docking it in the current position of the `Control <Vcl.Controls.TControlCanvas.Control.htm>`__ parameter. However, calling ``ReplaceDockedControl()`` is more efficient, and prevents unnecessary flicker. + ''' + @overload + def ScreenToClient(self, Point: Point) -> Point: + ''' + Converts the screen coordinates of a specified point on the screen to client coordinates. + + Use ``ScreenToClient`` to convert a point in screen coordinates to local, or client area, coordinates. In client area coordinates (0, 0) corresponds to the upper-left corner of the control's client area. In screen coordinates (0, 0) corresponds to the upper-left corner of the screen. + + Use ``ScreenToClient`` along with ``ClientToScreen()`` to convert from one control's coordinate system to another control's coordinate system. For example, + + .. code-block:: python + + P := TargetControl.ScreenToClient(SourceControl.ClientToScreen(P)); + + .. code-block:: python + + P = TargetControl->ScreenToClient(SourceControl->ClientToScreen(P)); + + converts ``'P'`` from coordinates in ``SourceControl`` to coordinates in ``TargetControl``. + ''' + @overload + def ScreenToClient(self, Rect: Rect) -> Rect: ... + def ParentToClient(self, Point: Point, AParent: WinControl) -> Point: + ''' + Translate parent coordinates to client coordinates. + + ``ParentToClient()`` translates ``Point`` from the ``AParent``\ s. coordinate system to the current control's coordinate system. ``AParent`` must be a control that can be found by iterating up the chain of ``Parent`` properties. If ``AParent`` is ``nil`` (Delphi) or ``NULL`` (C++), the control's immediate parent is used. + + An ``EInvalidOperation`` exception is thrown if ``AParent`` is not an ancestor control or the ``Parent`` property is ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def SendToBack(self) -> None: + ''' + Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls. + + Use ``SendToBack()`` to change the order of overlapping controls or forms. + + The order in which controls stack on top of each other (also called the *Z order*) depends on the order the controls are placed on the form. For example, if you put a label and an image on a form so that one is on top of the other, the one that was placed first on the form becomes the one on the bottom. Because both the ``Label`` and the image are non-windowed controls, they "stack" as you would expect them to. Call the ``SendToBack()`` method for the top object to move it below the other object. + + The stacking order of two windowed controls is the same as the stacking of two non-windowed controls. For example, if you put a memo on a form, then put a ``CheckBox`` on top of it, the ``CheckBox`` remains on top. Calling ``SendToBack()`` for the ``CheckBox`` makes the memo appear on top. + + The stacking order of windowed and non-windowed controls cannot be mingled. For example, if you put a memo, a windowed control on a form, and then put a label, a non-windowed control on top of it, the ``Label`` disappears behind the memo. Windowed controls always stack on top of non-windowed controls. In this example, calling the ``SendToBack()`` method of the memo does nothing, the ``Label`` remains behind the memo. + + If the control has the input focus when the ``SendToBack()`` method executes, it loses the input focus. + ''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + ''' + Sets the ``Left``, ``Top``, ``Width``, and ``Height`` properties all at once. + + Use ``SetBounds()`` to change all of the component's boundary properties at one time. The same effect can be achieved by setting the ``Left``, ``Top``, ``Width``, and ``Height`` properties separately, but ``SetBounds()`` changes all four properties at once ensuring that the control will not repaint between changes. + + Specify the values for the ``Left``, ``Top``, ``Width``, and ``Height`` properties as the value of the ``ALeft``, ``ATop``, ``AWidth``, and ``AHeight`` parameters, respectively. + + Calling ``SetBounds()`` does not necessarily result in the ``Left``, ``Top``, ``Width``, and ``Height`` properties changing to the specified values. Before the properties are changed, the ``AutoSize`` or ``Constraints`` property may limit the changes, and an ``OnCanResize`` (or ``OnConstrainedResize``) event handler may change the new values. After the control's ``Left``, ``Top``, ``Width``, and ``Height`` properties are changed, ``SetBounds()`` generates an ``OnResize`` event. + + .. note:: ``Component`` writers can change the ``Left``, ``Top``, ``Width``, and ``Height`` properties while bypassing all resize events and constraint or autosize logic by using the ``UpdateBoundsRect()`` method instead. + ''' + def SetDesignVisible(self, Value: bool) -> None: + ''' + Makes a control visible at design time. + + ``SetDesignVisible()`` is used internally by Delphi during form design. + ''' + def SetParentComponent(self, Value: Component) -> None: + ''' + Sets the parent for the control. + + Do not call the ``SetParentComponent()`` method. It is used by the streaming system that loads and saves *VCL Components*. ``SetParentComponent()`` makes the component specified by the ``Value`` parameter the parent of the control. + + ``SetParentComponent()`` calls the SetParent method only if the component specified as the parent is a windowed control. + ''' + def Show(self) -> None: + ''' + Makes a control visible. + + Use the ``Show()`` method to make visible a control that was previously hidden. + + The ``Show()`` method sets the control's ``Visible`` property to ``True`` and ensures that the parent control is also visible. + ''' + def Update(self) -> None: + ''' + Processes any pending paint messages immediately. + + Call ``Update()`` to force the control to be repainted before any more, possibly time-consuming, processing takes place. Use ``Update()`` to provide immediate feedback to the user that cannot wait for the Windows paint message to arrive. + + ``Update()`` does not invalidate the control, but simply forces a repaint of any regions that have already been invalidated. Call Repaint instead to invalidate the control as well. + ''' + def UseRightToLeftAlignment(self) -> bool: + ''' + Specifies whether the control's alignment should be reversed right-to-left. + + Controls call ``UseRightToLeftAlignment()`` when implementing the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. ``UseRightToLeftAlignment()`` indicates whether the control's alignment should be reversed right-to-left. This information can be used when painting the control or when responding to mouse events. + + ``UseRightToLeftAlignment()`` returns ``True`` if the application is running on a system with a Middle Eastern locale and the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is ``bdRightToLeft``. Otherwise, it returns ``False``. Descendants override ``UseRightToLeftAlignment()`` if alignment in *Middle Eastern* locales depends on other factors. + ''' + def UseRightToLeftReading(self) -> bool: + ''' + Specifies whether the control is using a right-to-left reading order. + + Controls call ``UseRightToLeftReading()`` when implementing the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. ``UseRightToLeftReading()`` indicates whether the control's text should read from right to left. This information can be used to determine which style flags to set for the control when it is created and which flags to set for drawing text. + + ``UseRightToLeftReading()`` returns ``True`` if the application is running on a system with a Middle Eastern locale and the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is not bdLeftToRight. ``UseRightToLeftReading()`` returns ``False`` otherwise. + ''' + def UseRightToLeftScrollBar(self) -> bool: + ''' + Specifies whether the vertical ``ScrollBar`` appears on the left side of the control. + + Controls call ``UseRightToLeftScrollBar()`` when implementing the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. ``UseRightToLeftScrollBar()`` returns ``True`` when the vertical ``ScrollBar`` appears on the left side of the control, and ``False`` when it appears on the right side. + + ``UseRightToLeftScrollBar()`` returns ``True`` if the application is running on a system with a *Middle Eastern* locale and the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is bdRightToLeft or bdRightToLeftNoAlign. + ''' + def DesignWndProc(self, Message: Message) -> bool: + ''' + Processes the given message and returns some ``Boolean`` information based on the message's content. + + ``DesignWndProc()`` returns ``True`` if the ``csDesignInteractive`` option in `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ is enabled and if either the right mouse button is pressed or the right mouse button is released. The ``True`` value is returned also when `ControlStyle <Vcl.Controls.TControl.ControlStyle.htm>`__ is enabled and when either the mouse has moved or the right mouse button is double-clicked. + ''' + def GetDragImages(self) -> DragImageList: + ''' + Returns the control's ``ImageList`` containing the image to be displayed while dragging. + + Override ``GetDragImages()`` to provide a custom ``ImageList`` for the control. As implemented in `Control <Vcl.Controls.TControl.htm>`__, ``GetDragImages()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + @overload + def Perform(self, Msg: int, WParam: WPARAM, LParam: LPARAM) -> LRESULT: + ''' + Responds as if the control received a specified *Windows* message. + + Call ``Perform()`` to bypass the *Windows Message* queue and send a message directly to the control's window procedure. + + ``Perform()`` fills a message record (of type ``Message``) with the message ``ID`` passed in the ``Msg`` parameter, the message parameters passed in ``WParam`` and ``LParam``, and a result field of zero. ``Perform()`` then passes the message record to the ``WindowProc()`` method for processing. + ''' + @overload + def Perform(self, Msg: int, AObjectMsg: CMObjectMsg) -> LRESULT: ... + @overload + def Perform(self, Msg: int, WParam: WPARAM, LParam) -> LRESULT: ... + @overload + def Perform(self, Msg: int, WParam: WPARAM, LParam: str) -> LRESULT: ... + @overload + def Perform(self, Msg: int, WParam: WPARAM, LParam: str, BufLen: int, ResultIsLen: bool) -> LRESULT: ... + @overload + def Perform(self, Msg: int, WParam: WPARAM, LParam: str) -> LRESULT: ... + @overload + def Perform(self, Msg: int, WParam: WPARAM, LParam: Rect) -> LRESULT: ... + @overload + def SetTextBuf(self, Buffer: str) -> None: + ''' + Sets the text of the control. + + Call the ``SetTextBuf()`` method to set the text of the control to the text in the specified buffer. + + The text is set to the text in the buffer pointed to by the Buffer parameter. Buffer must point to a null-terminated string. The ``SetTextBuf()`` method sends the ``WM_SETTEXT`` and ``CM_TEXTCHANGED`` messages. Doing this in the tight execution of a function can result in the change not being seen until messages from the *Windows Message* queue are processed after the function finishes executing. To interrupt a function's execution and process messages, use the ``ProcessMessages()`` method of the ``Application`` object. + + .. note:: The ``SetTextBuf()`` method is provided for backwards compatibility only. To set the text of a control now, assign a string value to the `Text <Vcl.Controls.TControl.Text.htm>`__ property. + ''' + @overload + def SetTextBuf(self, Buffer: str) -> None: ... + def DefaultHandler(self, Message) -> None: + ''' + Provides message handling for all messages that do not have specific handlers. + + Override ``DefaultHandler()`` to extend the default handling of messages. ``DefaultHandler()`` is the final opportunity for component writers to handle messages to controls. The method referenced by ``WindowProc()`` provides the first opportunity. Individual message methods such as `Click <Vcl.Controls.TControl.Click.htm>`__ provide additional opportunities. + + ``DefaultHandler()``handles the messages Windows sends to manage the control's text: ``WM_GETTEXT``, ``WM_SETTEXT``, and ``WM_GETTEXTLENGTH``. + ''' + def GetTextBuf(self, Buffer: str, BufSize: int) -> int: + ''' + Retrieves the control's text, copies it into a buffer, and returns the number of characters copied. + + Call ``GetTextBuf()`` to retrieve the text of a control into a fixed size buffer. The text copied is the value of the `Text <Vcl.Controls.TControl.Text.htm>`__ property. ``GetTextBuf()`` returns the number of characters that were actually copied, which is either the length of the `Text <Vcl.Controls.TControl.Text.htm>`__ property, or BufSize - 1, whichever is smaller. + + To find out how many characters the buffer needs to hold the entire text, call the `GetTextLen <Vcl.Controls.TControl.GetTextLen.htm>`__ method before allocating a buffer for ``GetTextBuf()``. + + .. note:: ``GetTextBuf()`` is available for compatibility with 16-bit code. Where backward compatibility is not an issue, use the `Text <Vcl.Controls.TControl.Text.htm>`__ property. + + .. note:: To obtain the control's text as an AnsiString, use the `Text <Vcl.Controls.TControl.Text.htm>`__ property instead. + ''' + def GetTextLen(self) -> int: + ''' + Returns the length of the control's text. + + Call ``GetTextLen()`` to find the length of the control's text. This is the size needed for a text buffer to be used by the `GetTextBuf <Vcl.Controls.TControl.GetTextBuf.htm>`__ method. + ''' + def GetSystemMetrics(self, nIndex: int) -> int: + ''' + No have docs. + ''' + def GetStyleName(self) -> str: + ''' + No have docs. + ''' + @overload + def ScaleValue(self, Value: int) -> int: + ''' + No have docs. + ''' + @overload + def ScaleValue(self, Value: float) -> float: ... + @overload + def ScaleValue(self, Value: Point) -> Point: ... + @overload + def ScaleValue(self, Value: Rect) -> Rect: ... + @overload + def ScaleValue(self, Value: Size) -> Size: ... + def ScaleRectSize(self, Value: Rect) -> Rect: + ''' + No have docs. + ''' + def SetProps(self) -> None: + ''' + ''' + + OnGesture: GestureEvent + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for ``OnGesture`` to perform custom processing for gesture events. ``OnGesture`` is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + ``OnGesture`` is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when an attempt is made to resize the control. + + Use ``OnCanResize`` to adjust the way a control is resized. If necessary, change the new width and height of the control in the ``OnCanResize`` event handler. The ``OnCanResize`` event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no ``OnCanResize`` event handler, or if the ``OnCanResize`` event handler indicates that the resize attempt can proceed, the ``OnCanResize`` event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + ``OnCanResize`` is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the ``OnClick`` event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute`` method, the action's ``OnExecute`` method responds to click events unless it is superseded by an ``OnClick`` event handler. + + Usually, ``OnClick`` occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a button or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a button or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the ``OnClick`` event of the ``CheckBox`` is triggered when the user presses Alt+B. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the ``OnClick`` event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the ``OnClick`` event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an ``OnClick`` event occurs when the user clicks a disabled component or in a blank area of the form. + + ``OnClick`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + # OnConstrainedResize: ConstrainedResizeEvent + Adjusts the resize constraints. + + Use ``OnConstrainedResize`` to adjust a control's constraints when an attempt is made to resize it. Upon entry to the ``OnConstrainedResize`` event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the ``OnConstrainedResize`` event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The ``OnConstrainedResize`` handler is called immediately after the ``OnCanResize`` handler. + + ``OnConstrainedResize`` is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The ``OnContextPopup`` event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The ``OnContextPopup`` event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Applications`` key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the ``OnContextPopup`` can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an ``OnContextPopup`` event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an ``OnContextPopup`` event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an ``OnContextPopup`` event handler, the event handler may be called multiple times for each context menu invocation. + + ``OnContextPopup`` is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the ``OnDblClick`` event to respond to mouse double-clicks. + + ``OnDblClick`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the ``OnDragDrop`` event handler to specify what happens when the user drops an object. The ``Source`` parameter of the ``OnDragDrop`` event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + ``OnDragDrop`` is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an ``OnDragOver`` event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the ``OnDragOver`` event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. + + To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the ``OnDragOver`` event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the ``OnDragOver`` event handler, the ``Accept`` parameter defaults to ``True``. However, if an ``OnDragOver`` event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + ``OnDragOver`` is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use ``OnEndDock`` to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the ``OnEndDrag`` event handler to specify any special processing that occurs when dragging stops. + + ``OnEndDrag`` is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the ``OnMouseActivate`` event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the ``OnMouseActivate`` events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the ``OnMouseActivate`` event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a button down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for MouseActivate, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the ``OnMouseActivate`` event handler for a ``Form`` forces the user to click into a non-client area to activate the form: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how Windows processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The ``OnMouseActivate`` event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both VCL *Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the ``OnMouseDown`` event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The ``OnMouseDown`` event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + ``OnMouseDown`` is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the ``OnMouseMove`` event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + ``OnMouseMove`` is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an ``OnMouseUp`` event handler to implement special processing when the user releases a mouse button. + + The ``OnMouseUp`` event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + ``OnMouseUp`` is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseWheel(self, Sender: Object, Shift: ShiftState, WheelDelta: int, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheel: MouseWheelEvent + Occurs when the mouse wheel is rotated. + + Write code in the ``OnMouseWheel`` event handler to respond to mouse wheel messages. If there is no ``OnMouseWheel`` event handler, or if the mouse wheel message is not handled in the ``OnMouseWheel`` event handler, then an `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ or `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event occurs, depending on the direction the mouse wheel was rotated. + + ``OnMouseWheel`` is an event handler of type `Vcl.Controls.TMouseWheelEvent <Vcl.Controls.TMouseWheelEvent.htm>`__. + ''' + def OnMouseWheelDown(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelDown: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated downward. + + Write code in the ``OnMouseWheelDown`` event handler to perform actions when the mouse wheel is rotated downward. OnMouseWheelDown occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelDown`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnMouseWheelUp(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelUp: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated upward. + + Write code in the ``OnMouseWheelUp`` event handler to perform actions when the mouse wheel is rotated upward. ``OnMouseWheelUp`` occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelUp`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use ``OnResize`` to make any final adjustments after a control is resized. + + To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + ``OnResize`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the ``OnStartDock`` event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The ``OnStartDock`` event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the ``OnStartDock`` event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to Win32 applications only. + + ``OnStartDock`` is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the ``OnStartDrag`` event handler to implement special processing when the user starts to drag the control or an object it contains. ``OnStartDrag`` only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The ``OnStartDrag`` event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the ``OnStartDrag`` event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying Windows control handles internal drag operations. For these controls, there are no ``OnStartDrag`` or OnEndDrag events for drag operations within the control. + + ``OnStartDrag`` is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ControlBar(CustomControlBar): + ''' + ======================== + Vcl.ExtCtrls.TControlBar + ======================== + + ``ControlBar`` manages the layout of ``ToolBar`` components. + + Use ``ControlBar`` as a docking site for ``ToolBar`` components. ``Control`` bars contain child controls (usually ``ToolBar`` objects) that can be moved and resized independently. As with a ``CoolBar``, each child control resides on its own individual band that the user positions by dragging its sizing grip. + + .. tip:: When docking ``ToolBar`` objects to a ``ControlBar``, you may find it useful to use ``ToolDockObject``. + + .. note:: If you want to use `ActionToolBar <Vcl.ActnCtrls.TActionToolBar.htm>`__ on a ``ControlBar`` component, you should set the ``AutoSize`` property to ``False``. When the ``AutoSize`` property is set to ``True`` (default), the `ActionToolBar <Vcl.ActnCtrls.TActionToolBar.htm>`__ control wraps its controls and expands itself in size, accordingly. This does not allow the `ActionToolBar <Vcl.ActnCtrls.TActionToolBar.htm>`__ component to display properly on a ``ControlBar`` component. When the ``AutoSize`` property is set to ``False``, the `ActionToolBar <Vcl.ActnCtrls.TActionToolBar.htm>`__ hides items on the end of the bar and displays a dropdown button that provides access to those items. The control displays in the proper size. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Specifies the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object that presents a drawing surface for the control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ encapsulates a *Windows* device context, providing all the tools and methods needed for drawing and painting. + + `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ is a protected property that is usually redeclared as public in descendants of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoDock: bool + ''' + Determines whether the ``ControlBar`` temporarily docks drag clients to provide visual feedback. + + If `AutoDock <Vcl.ExtCtrls.TCustomControlBar.AutoDock.htm>`__ is ``True`` (the default), when a dockable object is dragged over the ``ControlBar``, the ``ControlBar`` temporarily docks the object so that the user can see the impact of the drag operation. That is, the user can see the dock position and how other docked controls will be repositioned to make room. When the user releases the mouse, the dragged object is docked at the current spot, and any temporary dockings are canceled. However, if the user cancels the drag-and-dock operation, the dragged object reverts to its last temporary dock site rather than to its location at the start of the drag operation. + + If `AutoDock <Vcl.ExtCtrls.TCustomControlBar.AutoDock.htm>`__ is ``False``, the ``ControlBar`` does not temporarily dock dragged objects. Instead, the user only sees the dragging rectangle as it passes over the ``ControlBar``, with no feedback as to the adjustments the ``ControlBar`` would make if the dragged object were released. + ''' + AutoDrag: bool + ''' + Specifies whether control bands can be undocked by dragging. + + Use `AutoDrag <Vcl.ExtCtrls.TCustomControlBar.AutoDrag.htm>`__ to specify whether control bands are automatically undocked when the user drags them. If `AutoDrag <Vcl.ExtCtrls.TCustomControlBar.AutoDrag.htm>`__ is ``True``, control bands (``TToolBar`` objects) are undocked when dragged off the ``ControlBar``. Otherwise, control bands are kept within the ``ControlBar``. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner *Bevel*. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner *Bevel* has a raised, lowered, or flat look. + + The inner *Bevel* appears immediately inside the outer *Bevel*. If there is no outer *Bevel* (``BevelOuter`` is ``bvNone``), the inner *Bevel* appears immediately inside the border. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelKind: BevelKind + ''' + Specifies the control's *Bevel* style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a *Bevel*. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the *Bevel* stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the *Bevel* specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelWidth: int + ''' + Specifies the width of the inner and outer *Bevel*s. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer *Bevel*s. + ''' + BorderWidth: int + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + CornerEdge: CornerEdge + ''' + Stores the size of the cornering for the edge of the bands. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + DrawingStyle: BandDrawingStyle + ''' + No have docs. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + GradientDirection: GradientDirection + ''' + Stores the direction of the gradient as horizontal or vertical. + + ``Vcl.ExtCtrls.TControlBar.GradientDirection`` inherits from `Vcl.ExtCtrls.TCustomControlBar.GradientDirection <Vcl.ExtCtrls.TCustomControlBar.GradientDirection.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomControlBar.GradientDirection <Vcl.ExtCtrls.TCustomControlBar.GradientDirection.htm>`__. + ''' + GradientEndColor: Color + ''' + Stores the color that the gradient is painted with when it ends. + + ``Vcl.ExtCtrls.TControlBar.GradientEndColor`` inherits from `Vcl.ExtCtrls.TCustomControlBar.GradientEndColor <Vcl.ExtCtrls.TCustomControlBar.GradientEndColor.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomControlBar.GradientEndColor <Vcl.ExtCtrls.TCustomControlBar.GradientEndColor.htm>`__. + + Stores the color that the gradient is painted with when it ends. + + Use this property to store the color that you want to use to end your drawing. (This blends with the start color.) + ''' + GradientStarColor: Color + ''' + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a ``Form`` have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes false automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + Picture: Picture + ''' + Specifies the ``ControlBar``\ s. picture. + + Use `Picture <Vcl.ExtCtrls.TCustomControlBar.Picture.htm>`__ to specify the ``ControlBar``\ s. picture. The picture is tiled across the ``ControlBar``. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + RowSize: RowSize + ''' + Specifies the height of the ``ControlBar``\ s. rows. + + Use `RowSize <Vcl.ExtCtrls.TCustomControlBar.RowSize.htm>`__ to specify the height, in pixels, of the ``ControlBar``\ s. rows. + ''' + RowSnap: bool + ''' + Specifies whether controls are snapped to the ``ControlBar``\ s. rows when docked. + + Use `RowSnap <Vcl.ExtCtrls.TCustomControlBar.RowSnap.htm>`__ to specify whether controls are snapped to the ``ControlBar``\ s. rows when docked. Controls that are snapped have their ``Top`` and ``Height`` properties set automatically to correspond to the ``ControlBar``\ s. rows. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and false otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+----------+-----------+--------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | | | | + +==================================================================================+=====================================================================================================================+==========+===========+================================================================================+ + | ``NewLeft`` | ``NewTop`` constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ | NewWidth | NewHeight | Location and size of child control, as determined by container's | + | | can modify these values to reposition the control. | | size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+----------+-----------+--------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ | | | | + | | can modify this value. | | | | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+----------+-----------+--------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | | | | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+----------+-----------+--------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | | | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | | | | + +----------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+----------+-----------+--------------------------------------------------------------------------------+ + ''' + def OnBandDrag(self, Sender: Object, Control: Control, Drag: bool) -> None: + ''' + # OnBandDrag: BandDragEvent + Occurs when the user starts a drag operation on a specified control. + + Use `OnBandDrag <Vcl.ExtCtrls.TCustomControlBar.OnBandDrag.htm>`__ to conditionally allow the user to start dragging a control in the ``ControlBar``. + + ``OnBandDrag`` is an event handler of type `Vcl.ExtCtrls.TBandDragEvent <Vcl.ExtCtrls.TBandDragEvent.htm>`__. + ''' + def OnBandInfo(self, Sender: Object, Control: Control, Insets: Rect, PreferredSize: int, RowCount: int) -> None: + ''' + # OnBandInfo: BandInfoEvent + Occurs when the ``ControlBar`` adjusts the docking position of a band. + + Write code in the `OnBandInfo <Vcl.ExtCtrls.TCustomControlBar.OnBandInfo.htm>`__ event handler to provide information to the ``ControlBar`` that it can use when arranging its bands. The `OnBandInfo <Vcl.ExtCtrls.TCustomControlBar.OnBandInfo.htm>`__ event handler has several parameters that can be used to return information about how the band should be positioned, including its size, inset, and number of rows. + + OnBandInfo is an event handler of type `Vcl.ExtCtrls.TBandInfoEvent <Vcl.ExtCtrls.TBandInfoEvent.htm>`__. + + ''' + def OnBandMove(self, Sender: Object, Control: Control, ARect: Rect) -> None: + ''' + # OnBandMove: BandMoveEvent + Occurs when a control band is moving. + + Write an `OnBandMove <Vcl.ExtCtrls.TCustomControlBar.OnBandMove.htm>`__ event handler to perform actions when a band is moving. + + Use `OnBandMove <Vcl.ExtCtrls.TCustomControlBar.OnBandMove.htm>`__ to specify the destination rectangle for the band. For example, adjust the destination rectangle so that its right edge matches the right edge of the ``ControlBar``. This means the control extends to the ``ControlBar``\ s. right edge no matter where it is moved. + + ``OnBandMove`` is an event handler of type `Vcl.ExtCtrls.TBandMoveEvent <Vcl.ExtCtrls.TBandMoveEvent.htm>`__. + ''' + def OnBandPaint(self, Sender: Object, Control: Control, Canvas: Canvas, ARect: Rect, Options: BandPaintOptions) -> None: + ''' + # OnBandPaint: BandPaintEvent + Occurs when a control band is painted. + + Write an `OnBandPaint <Vcl.ExtCtrls.TCustomControlBar.OnBandPaint.htm>`__ event handler to customize the way the ``ControlBar`` draws its bands. From the event handler, you can draw to the ``ControlBar``\ s. canvas, using the dimensions of the band that are passed in as the ``ARect`` parameter. You can change the dimensions so that the automatically drawn frame and grabber appear in a different portion of the ``ControlBar`` (for example, indented slightly). You can suppress the automatic painting of the frame or grabber by removing options from the ``Options`` parameter. + + ``OnBandPaint`` is an event handler of type `Vcl.ExtCtrls.TBandPaintEvent <Vcl.ExtCtrls.TBandPaintEvent.htm>`__. + ''' + def OnBeginBandMove(self, Sender: Object, Control: Control, AllowMove: bool) -> None: + ''' + # OnBeginBandMove: BeginBandMoveEvent + Occurs when a control band begins to move. + + ``VCL.ExtCtrls.TControlBar.OnBeginBandMove`` inherits from `Vcl.ExtCtrls.TCustomControlBar.OnBeginBandMove <Vcl.ExtCtrls.TCustomControlBar.OnBeginBandMove.htm>`__. All content below this line refers to `Vcl.ExtCtrls.TCustomControlBar.OnBeginBandMove <Vcl.ExtCtrls.TCustomControlBar.OnBeginBandMove.htm>`__. + + ``OnBeginBandMove`` is an event handler of type `Vcl.ExtCtrls.TBeginBandMoveEvent <Vcl.ExtCtrls.TBeginBandMoveEvent.htm>`__. + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new ``Width`` and ``Height`` of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + # OnConstrainedResize: ConstrainedResizeEvent + Adjusts the resize constraints. + + Use `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ to adjust a control's constraints when an attempt is made to resize it. Upon entry to the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ handler is called immediately after the ``OnCanResize`` handler. + + `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndBandMove(self, Sender: Object, Control: Control) -> None: + ''' + # OnEndBandMove: EndBandMoveEvent + Occurs when a control band ends moving. + + `OnEndBandMove <Vcl.ExtCtrls.TCustomControlBar.OnEndBandMove.htm>`__ is an event handler of type `Vcl.ExtCtrls.TEndBandMoveEvent <Vcl.ExtCtrls.TEndBandMoveEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnPaint(self, Sender: Object) -> None: + ''' + # OnPaint: NotifyEvent + Occurs when the ``ControlBar`` is painted. + + Write an `OnPaint <Vcl.ExtCtrls.TCustomControlBar.OnPaint.htm>`__ event handler to change the way the ``ControlBar`` is rendered. When a ``ControlBar`` receives a *Windows* paint message, it first draws the background picture, if any, and then generates an `OnPaint <Vcl.ExtCtrls.TCustomControlBar.OnPaint.htm>`__ event. After the `OnPaint <Vcl.ExtCtrls.TCustomControlBar.OnPaint.htm>`__ event exits, the ``ControlBar`` generates an ``OnBandPaint`` event for each band, finally rendering the grabbers and frames for each band. + + Use the ``Canvas`` property to draw the ``ControlBar``\ s. image. Use the ``ClientRect`` property to obtain the dimensions on which to draw. + + If the custom drawing is intended to change the appearance of individual bands, use the ``OnBandPaint`` event instead. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomAction(ContainedAction): + ''' + ========================== + Vcl.ActnList.TCustomAction + ========================== + + ``CustomAction`` is the base class for VCL actions intended to be used with ``MenuItems`` and controls. + + ``CustomAction`` introduces support for the `properties <Vcl.ActnList.TCustomAction_Properties.htm>`__, `events <Vcl.ActnList.TCustomAction_Events.htm>`__, and `methods <Vcl.ActnList.TCustomAction_Methods.htm>`__ of ``MenuItems`` and controls that are clients of ``Action`` objects. + + Most properties and events introduced in ``CustomAction`` are ``public``; therefore, use ``CustomAction`` as a base class when deriving your own actions that ``publish`` specific subset of properties of associated controls. + + ``Action`` objects centralize the response to user commands (actions) and represent user interface elements in applications that use actions. They provide an easy way to synchronize, for example, the enabled state and ``Caption`` of a ``SpeedButton`` and a ``MenuItem``, and handle the response when users click these components. Each such component, called the client, has its properties dynamically updated by the ``Action`` and forwards user actions to the ``Action`` for a response. + + At design time, you can work in the `Action List editor <Action_List_editor.htm>`__ with actions contained in an ``ActionList`` or in the `Action Manager editor <Action_Manager_editor.htm>`__ of the ``ActionManager``. The ``ActionList`` or ``ActionManager`` is a container for actions, which it organizes into categories. + + Component and control ``public`` properties and events that are supported in ``CustomAction``, either directly or through an ancestor, are: + + - `Caption <System.Actions.TContainedAction.Caption.htm>`__ + - `Checked <System.Actions.TContainedAction.Checked.htm>`__ + - `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ + - `HelpType <System.Actions.TContainedAction.HelpType.htm>`__ + - `HelpContext <System.Actions.TContainedAction.HelpContext.htm>`__ + - `HelpKeyword <System.Actions.TContainedAction.HelpKeyword.htm>`__ + - `Hint <System.Actions.TContainedAction.Hint.htm>`__ + - `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ + - `ShortCut <System.Actions.TContainedAction.ShortCut.htm>`__ + - `Visible <System.Actions.TContainedAction.Visible.htm>`__ + - `OnHint <System.Actions.TContainedAction.OnHint.htm>`__ + - `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ + - `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ + + Because the `OnHint <System.Actions.TContainedAction.OnHint.htm>`__, `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__, and `OnExecute <System.Classes.TBasicAction.OnExecute.htm>`__ events are ``public``, they do not appear in the `Object Inspector <Object_Inspector.htm>`__. That is, the `Object Inspector <Object_Inspector.htm>`__ does not support generating custom event handlers for these events. + + ``CustomAction`` can also act as the base class for predefined ``Action`` classes. You can derive from ``CustomAction`` if you want to retain the ``public`` scope of supported properties and events or modify the ``public`` scope to the ``published`` scope. + + For predefined actions that augment the behavior of ``CustomAction``, see the ``Action`` classes in the `Vcl.StdActns <Vcl.StdActns.htm>`__, `Vcl.DBActns <Vcl.DBActns.htm>`__, and `Vcl.ExtActns <Vcl.ExtActns.htm>`__ units. + ''' + + FImage: Object + ''' + Specifies an image object. + + ``FImage`` is a protected field that specifies an image. The property that uses the ``FImage`` field is used for design-time support in *.NET*. + ''' + FMask: Object + ''' + Specifies a mask. + + ``FMask`` is a protected field that specifies a mask object. The property that uses the ``FMask`` field is used for design-time support in *.NET*. + ''' + Images: CustomImageList + ''' + No have docs. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + ActionList: CustomActionList + ''' + Holds the ``ActionList`` to which the ``Action`` belongs. + + ``Vcl.ActnList.TCustomAction.ActionList`` inherits from `System.Actions.TContainedAction.ActionList <System.Actions.TContainedAction.ActionList.htm>`__. All content below this line refers to `System.Actions.TContainedAction.ActionList <System.Actions.TContainedAction.ActionList.htm>`__. + ''' + Images: Object + ''' + No have docs. + ''' + + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of this action to a destination object. + + ``AssignTo()`` is overridden so that existing objects of type `CustomAction <Vcl.ActnList.TCustomAction.htm>`__ can be copied to other ``Action`` objects of the same type. ``AssignTo()`` ensures the correct assignment of property values. + ''' + def CreateShortCutList(self) -> CustomShortCutList: + ''' + Creates the `ShortCutList <Vcl.ActnList.TShortCutList.htm>`__ object for the ``Action``. + + ``CreateShortCutList()`` creates an empty *VCL* shortcut list object for the current action. + + Notice that implementations of shortcuts are *FireMonkey* or *VCL Framework*-specific. + ''' + def SetImageIndex(self, Value: ImageIndex) -> None: + ''' + Sets the new ``Value`` of the `ImageIndex <System.Actions.TContainedAction.ImageIndex.htm>`__ property for the ``Action`` and action's clients. + + ``Vcl.ActnList.TCustomAction.SetImageIndex`` inherits from `System.Actions.TContainedAction.SetImageIndex <System.Actions.TContainedAction.SetImageIndex.htm>`__. All content below this line refers to `System.Actions.TContainedAction.SetImageIndex <System.Actions.TContainedAction.SetImageIndex.htm>`__. + + `SetImageIndex <System.Actions.TContainedAction.SetImageIndex.htm>`__ always propagates this ``Value`` to all clients of the ``Action``. + ''' + def Change(self) -> None: + ''' + Generates an `OnChange <System.Classes.TBasicAction.OnChange.htm>`__ event. + + `Change <System.Classes.TBasicAction.Change.htm>`__ is called automatically when the ``Action``\ s. properties change. This method calls the `OnChange <System.Classes.TBasicAction.OnChange.htm>`__ event handler, if one is assigned. + ''' + def GetImages(self) -> CustomImageList: + ''' + No have docs. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + Do not call the protected `Loaded <System.Classes.TComponent.Loaded.htm>`__ method. The streaming system calls this method after it loads the component's form from a *Stream*. + + When the streaming system loads a form or data module from its form file, it first constructs the ``Form`` component by calling its constructor, then reads its property values from the ``Form`` file. After reading all the property values for all the components, the streaming system calls the `Loaded <System.Classes.TComponent.Loaded.htm>`__ methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time `Loaded <System.Classes.TComponent.Loaded.htm>`__ is called. `Loaded <System.Classes.TComponent.Loaded.htm>`__ is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, `Loaded <System.Classes.TComponent.Loaded.htm>`__ clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: `Loaded <System.Classes.TComponent.Loaded.htm>`__ may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden `Loaded <System.Classes.TComponent.Loaded.htm>`__ method without first checking that the memory has not been allocated in a previous call. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Instantiates and initializes a VCL `CustomAction <Vcl.ActnList.TCustomAction.htm>`__ object. + + Applications do not need to call the constructor directly. Actions are created automatically when you add them to an ``ActionManager`` (in the `Action Manager editor <Action_Manager_editor.htm>`__) or ``ActionList`` component (in the `Action List editor <Action_List_editor.htm>`__) at design time. + + If you want to create an action at run time, assign a `ActionList <Vcl.ActnList.TActionList.htm>`__ or `ActionManager <Vcl.ActnMan.TActionManager.htm>`__ component to its `ActionList <Vcl.ActnList.TCustomAction.ActionList.htm>`__ property after calling ``Create()``. + + ``AOwner`` is the component that is responsible for freeing the ``Action``. It becomes the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. + + `Create <FMX.ActnList.TCustomAction.Create.htm>`__ simply calls an inherited `System.Actions.TContainedAction.Create <System.Actions.TContainedAction.Create.htm>`__ constructor. + ''' + def Destroy(self) -> None: + ''' + Frees an instance of `CustomAction <Vcl.ActnList.TCustomAction.htm>`__. + + Do not call the destructor directly in an application. Instead, call ``Free()``. Free ensures that the ``Action`` is not ``nil`` before calling the destructor. + + If the ``Action`` is contained in an ``ActionList`` or ``ActionManager``, ``Destroy()`` removes the ``Action`` from that list. + ''' + def Execute(self) -> bool: + ''' + Responds when a client control "fires". + + ``Execute()`` is called automatically when a client control "fires" (for example, when the user clicks a ``Button`` or selects a ``MenuItem``). It returns ``True`` if an event handler is found to handle the ``Action``, ``False`` if there was no event handler or if the ``Action`` was not enabled. + + ``Execute()`` first ensures that the ``Action`` is updated. Then, if the `Enabled <System.Actions.TContainedAction.Enabled.htm>`__ property is ``True``, it attempts to handle the ``Action`` by generating an `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event on the ``ActionList`` that contains this action (if the ``Action`` belongs to an ``ActionList``). If the ``ActionList``\ s. `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event handler does not handle the ``Action``, ``Execute()`` generates an `OnActionExecute <Vcl.Forms.TApplication.OnActionExecute.htm>`__ event on the application itself. If neither the ``ActionList`` nor the application handles the ``Action`` in response to these events, ``Execute()`` generates an `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event on itself. If this action has no `OnExecute <System.Actions.TContainedActionList.OnExecute.htm>`__ event handler, ``Execute()`` instructs the application to locate the current target control and call the `ExecuteTarget <System.Classes.TBasicAction.ExecuteTarget.htm>`__ method, which is the mechanism by which predefined ``Action`` classes perform their function. + ''' + def Update(self) -> bool: + ''' + Provides an opportunity to execute centralized code when an application is idle. + + `Update <System.Classes.TBasicAction.Update.htm>`__ triggers the `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event handler. `Update <System.Classes.TBasicAction.Update.htm>`__ returns ``True`` if an event handler was found, ``False`` otherwise. When the application is idle, the `OnUpdate <System.Classes.TBasicAction.OnUpdate.htm>`__ event occurs for every action. This provides an opportunity for applications to execute centralized code for enabling and disabling, checking and unchecking, and so on. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomActionList(ContainedActionList): + ''' + ============================== + Vcl.ActnList.TCustomActionList + ============================== + + ``CustomActionList`` is the base class for ``ActionList`` objects that manage a set of actions. + + ``Action`` lists manage a collection of ``Action`` objects so that they are available to the components in an application. These ``Action`` objects centralize the response of the application to user input, and update the properties of all controls that trigger that response. + + ``CustomActionList`` descendants provide the user interface for working with actions at design time. These include ``ActionList``, which lets you set up actions using the `Action List editor <Action_List_editor.htm>`__, and ``ActionManager``, which lets you configure actions using the `Action Manager editor <Action_Manager_editor.htm>`__. + + ``Action`` lists maintain a list of actions that can be grouped by category. Actions in an ``ActionList`` are `ContainedAction <System.Actions.TContainedAction.htm>`__ or descendant types. + ''' + + __hash__: ClassVar[None] = ... + Images: CustomImageList + ''' + Lists the images available for actions in the ``ActionList``. + + ``Images`` is a list of bitmaps that can be displayed to the left of any action in the ``ActionList``. An action is associated with an image from this ``ImageList`` by its ``ImageIndex`` property. This image can then appear on client controls such as ``MenuItems``, ``ToolButton``s, and so on. + ''' + FImageListChanging: bool + ''' + No have docs. + ''' + + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications when objects are created or destroyed. + + ``Notification()`` notifies the ``ActionList`` that the component specified by ``AComponent`` is about to be inserted or removed, as specified by Operation. By default, components pass along the notification to their owned components, if any. + + `CustomActionList <Vcl.ActnList.TCustomActionList.htm>`__ overrides ``Notification()`` to update the ``Images`` property when images from the list are destroyed and the ``Actions`` property when actions in the list are destroyed. + ''' + def Change(self) -> None: + ''' + Generates an ``Change()`` event. + + ``Change()`` is called when a change, such as a modification to the categories of the actions in the list, occurs in the ``ActionList``. + + ``Change()``: + + #. Invokes an ``Change()`` handler, if one has been assigned. + #. Informs all actions in the list that something has changed so that they can update themselves. + ''' + def SetImages(self, Value: CustomImageList) -> None: + ''' + Sets the value of the ``Images`` property. + + ``SetImages()`` is the protected write implementation of the ``Images`` property. It registers the ``ActionList`` with the ``ImageList`` specified by ``Value``. so that it will be informed of any changes to the ``ImageList``. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `CustomActionList <Vcl.ActnList.TCustomActionList.htm>`__ object. + + Call ``Create()`` to instantiate an ``ActionList`` at run time. ``Action`` lists added to forms at design time are created automatically. + + The ``AOwner`` parameter is the owner of the ``ActionList``; typically, this is a form or data module. + ''' + def Destroy(self) -> None: + ''' + Disposes of the instance of an ``ActionList`` object. + + You normally do not need to call the destructor for an ``ActionList`` if it has an owner. The ``ActionList`` is destroyed automatically by its owner, which was passed to its constructor when it was created. In situations where the custom ``ActionList`` object needs to be manually destroyed, do so by calling its ``Free()`` method. + ''' + def IsShortCut(self, Message: WMKey) -> bool: + ''' + Evaluates an input key combination to determine whether it is a shortcut for one of the actions in the list. + + Typically, applications do not need to call ``IsShortCut()``. When the ``Form``\ s. `IsShortCut <Vcl.Forms.TCustomForm.IsShortCut.htm>`__ method does not evaluate a shortcut key by some other means (such as an event handler), it calls ``IsShortCut()`` for every associated ``ActionList`` until it finds one that can handle the shortcut. + + The ``ActionList``\ s. ``IsShortCut()`` method, in turn, checks the specified keystroke against the ``ShortCut`` property and ``SecondaryShortCuts`` properties of each action in the list. If it finds a match, it tells the action to handle the shortcut, and then returns ``True``. If ``IsShortCut()`` cannot find an action to handle the shortcut, it returns ``False``. + + ``Message`` encapsulates the *Windows* keystroke message that is to be checked whether it is a shortcut. The ``Message`` parameters are: + + - *Key* is the key code for the potential shortcut key. + - *Shift* specifies the state of the *Shift*, *Alt*, and *Ctrl* keys that may be combined with Key. + - ``KeyText`` is the string representation of the potential shortcut key. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomActivityIndicator(CustomControl): + ''' + ====================================== + Vcl.WinXCtrls.TCustomActivityIndicator + ====================================== + + The base class for `ActivityIndicator <Vcl.WinXCtrls.TActivityIndicator.htm>`__. + + An animated rotating display indicating that the application is performing some activity. + + `Create <Vcl.WinXCtrls.TCustomActivityIndicator.Create.htm>`__ the activity indicator, set the `color <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorColor.htm>`__, `size <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorSize.htm>`__ and `type <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorType.htm>`__, and call `StartAnimation <Vcl.WinXCtrls.TCustomActivityIndicator.StartAnimation.htm>`__ to start the animation. You can modify the speed of the animation with the `FrameDelay <Vcl.WinXCtrls.TCustomActivityIndicator.FrameDelay.htm>`__ property. + ''' + + __hash__: ClassVar[None] = ... + Animate: bool + ''' + Specifies whether the activity indicator is currently animated. + + Default is ``False``. + ''' + FrameDelay: int + ''' + Specifies how fast the activity indicator displays its animation sequence. + + Set this property to a lower value to speed up the animation. + ''' + IndicatorColor: ActivityIndicatorColor + ''' + The color of the activity indicator. + + Possible values are: + + - ``aicBlack``: Default. The elements of the indicator are black. + - ``aicWhite``: The elements of the indicator are white. + ''' + IndicatorSize: ActivityIndicatorSize + ''' + The size of the activity indicator. + + Possible values are: + + - ``aisSmall``: 24 x 24 pixels. + - ``aisMedium``: Default. 32 x 32 pixels. + - ``aisLarge``: 48 x 48 pixels. + - ``aisXLarge``: 64 x 64 pixels. + ''' + IndicatorType: ActivityIndicatorType + ''' + The type of the activity indicator. + + Possible values are: + + - ``aitMomentumDots``: Default. Traditional Windows 8/10 rotating sequence of dots, accelerating and deccelerating in a circular pattern. + - ``aitRotatingSector``: Alternating sectors of a segmented ring are highlighted in sequence to indicate activity. + - ``aitSectorRing``: Sectors of a segmented ring are highlighted in sequence until the ring is completely highlighted. On the next pass, each sector is displayed in a dimmed state. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + + def ReloadFrames(self) -> None: + ''' + Loads the appropriate animation frames from resources. + + ``ReloadFrames`` takes into account the current values `IndicatorType <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorType.htm>`__, `IndicatorSize <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorSize.htm>`__, and `IndicatorColor <Vcl.WinXCtrls.TCustomActivityIndicator.IndicatorColor.htm>`__. + ''' + def DrawFrame(self) -> None: + ''' + Displays a single frame of the current activity indicator animation sequence. + ''' + def Paint(self) -> None: + ''' + Responds to a mouse click. + + The `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method for `CustomControl <Vcl.Controls.TCustomControl.htm>`__ does nothing other than provide the interface for a method that responds to ``WM_PAINT`` messages. `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called by the `PaintWindow <Vcl.Controls.TCustomControl.PaintWindow.htm>`__ method, after that method has supplied the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ with the handle to a device context. When creating a custom control, always override `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ to draw the image of the control. + + .. tip:: To determine which portions of the control's ``Canvas`` need to be repainted when `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called, use the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property of the ``Canvas``. + ''' + def Resize(self) -> None: + ''' + Respond to control resize. + + `Resize <Vcl.Controls.TControl.Resize.htm>`__ is called automatically immediately after the control's dimensions change. As implemented in `Control <Vcl.Controls.TControl.htm>`__, `Resize <Vcl.Controls.TControl.Resize.htm>`__ calls the control's `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event handler if it is assigned. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of the `CustomActivityIndicator <Vcl.WinXCtrls.TCustomActivityIndicator.htm>`__. + + ``Create()`` sets the default values for all the activity indicator properties. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + ``Application``\ s should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def StartAnimation(self) -> None: + ''' + Sets the `Animate <Vcl.WinXCtrls.TCustomActivityIndicator.Animate.htm>`__ property to ``True``. + ''' + def StopAnimation(self) -> None: + ''' + Sets the `Animate <Vcl.WinXCtrls.TCustomActivityIndicator.Animate.htm>`__ property to ``False``. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomBindingsList(Component): + ''' + ======================================== + Data.Bind.Components.TCustomBindingsList + ======================================== + + Represents the base class for the ``BindingList``. + + The ``CustomBindingsList`` class implements a list of binding expressions, output converters, method scopes, and other ``BindingList``-related functionality. + ''' + + __hash__: ClassVar[None] = ... + Methods: Methods + ''' + Specifies a list of available methods. For more information about these methods, read the `LiveBindings Methods <LiveBindings_Methods.htm>`__ topic. + ''' + OutputConverters: OutputConverters + ''' + Specifies a list of available output converters. For more information about output converters, read the `LiveBindings Output Converters <LiveBindings_Output_Converters.htm>`__ help topic. + ''' + BindComps: list[ContainedBindComponent] + ''' + No have docs. + ''' + BindCompCount: int + ''' + No have docs. + ''' + UseAppManager: bool + ''' + Specifies whether the ``BindingsList`` uses the global application manager for managed bindings. + ''' + PromptDeleteUnused: bool + ''' + No have docs. + ''' + DependencyList: IDependencyList + ''' + No have docs. + ''' + def AddBindComp(self, ABindComp: ContainedBindComponent) -> None: + ''' + No have docs. + ''' + def RemoveBindComp(self, ABindComp: ContainedBindComponent) -> None: + ''' + No have docs. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Data.Bind.Components.TCustomBindingsList.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Forwards notification messages to all owned components. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def Create(self, AOwner: Component) -> None: + ''' + Allocates memory and constructs a safely initialized instance of a component. + + ``Data.Bind.Components.TCustomBindingsList.Create`` inherits from `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. All content below this line refers to `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. + + All objects have a `Create <System.Classes.TComponent.Create.htm>`__ method that constructs the object. `Component <System.Classes.TComponent.htm>`__ redefines `Create <System.Classes.TComponent.Create.htm>`__ so that, for components, `Create <System.Classes.TComponent.Create.htm>`__ also: + + - Establishes the relationship of a component and its `Owner <System.Classes.TComponent.Owner.htm>`__, as indicated by the ``AOwner`` parameter. + + - Sets the `ComponentStyle <System.Classes.TComponent.ComponentStyle.htm>`__ property to `csInheritable <System.Classes.TComponentStyle.htm>`__, meaning that the component can be inherited by a descendent form type. + + It is not necessary to explicitly create components added in the *Form Designer*. These components are created automatically when the application is run, and they are destroyed when the application is closed. + + For components created programmatically, that is, not created in the *Form Designer*, call `Create <System.Classes.TComponent.Create.htm>`__ and pass in an owner component as the ``AOwner`` parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use ``Free()`` when it needs to be destroyed. + + .. tip:: When passing in ``Self`` as the `Owner <System.Classes.TComponent.Owner.htm>`__ parameter, consider what ``Self`` references. If a component creates another component in one of its methods, then ``Self`` refers to the first component and not the component being created, which is then owned by the first component. + + .. note:: The `Component <System.Classes.TComponent.htm>`__ constructor is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the *Form Designer*. Do not forget to use the override directive when declaring a new component's `Create <System.Classes.TComponent.Create.htm>`__ constructor. + ''' + def Destroy(self) -> None: + ''' + Disposes of the component and its owned components. + + ``Data.Bind.Components.TCustomBindingsList.Destroy`` inherits from `System.Classes.TComponent.Destroy <System.Classes.TComponent.Destroy.htm>`__. All content below this line refers to `System.Classes.TComponent.Destroy <System.Classes.TComponent.Destroy.htm>`__. + + Disposes of the component and its owned components. + + Do not call `Destroy <System.Classes.TComponent.Destroy.htm>`__ directly. Call ``Free()`` instead. ``Free()`` verifies that the component is not ``nil``, and only then calls `Destroy <System.Classes.TComponent.Destroy.htm>`__. + + Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains. To destroy a form, call its ``Release()`` method. ``Release()`` waits for all the ``Form``\ s. event handlers and the event handlers of the ``Form``\ s. components to finish executing before destroying the ``Form``. + + .. note:: A form owns all the controls and nonvisual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well. By default, all forms are owned by the global ``Application`` object. When an application terminates, it frees the global ``Application`` object, which frees all forms. For objects that are not components, and for components created with a nil owner, be sure to call ``Free()`` after finishing with the object; otherwise the memory allocated for the object will be lost until the application terminates. + ''' + def GetMethodsScope(self) -> IScope: + ''' + No have docs. + ''' + def GetOutputConverter(self) -> IValueRefConverter: + ''' + No have docs. + ''' + def Notify(self, AObject: Object, AProperty: str) -> None: + ''' + `NotifyOutputs <Data.Bind.Components.TCustomBindControlValue.NotifyOutputs.htm>`__ indicates that the expression engine should call ``Notify()`` when assigning values to object properties. + + Also, it specifies whether the expression engine should call ``Notify()`` when assigning values to object properties. This will cause any managed expressions which depend on the object property to be re-evaluated. + + By default, `NotifyOutputs <Data.Bind.Components.TCustomBindControlValue.NotifyOutputs.htm>`__ is set to ``False``. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Enumerates all child components. + + ``Data.Bind.Components.TCustomBindingsList.GetChildren`` inherits from `System.Classes.TComponent.GetChildren <System.Classes.TComponent.GetChildren.htm>`__. All content below this line refers to `System.Classes.TComponent.GetChildren <System.Classes.TComponent.GetChildren.htm>`__. + + `GetChildren <System.Classes.TComponent.GetChildren.htm>`__ is used internally in the component streaming system. It is not necessary to call it directly. + + `GetChildren <System.Classes.TComponent.GetChildren.htm>`__ expects a `GetChildProc <System.Classes.TGetChildProc.htm>`__ routine that receives all enumerated components. + + ``Root`` represents the owner of the components that will be enumerated. + + This method does nothing in `Component <System.Classes.TComponent.htm>`__ and is expected to be overridden in descendants. + ''' + def GetEnumerator(self) -> BindingsListEnumerator: + ''' + Returns a ``Component`` enumerator. + + ``Data.Bind.Components.TCustomBindingsList.GetEnumerator`` inherits from `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. All content below this line refers to `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. + + `GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__ returns a `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ reference, which enumerates the components contained within a specified containing component. To process all these subcomponents, call the `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ `GetCurrent <System.Classes.TComponentEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TComponentEnumerator.MoveNext.htm>`__ do loop. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomControl(WinControl): + ''' + =========================== + Vcl.Controls.TCustomControl + =========================== + + Base class for controls that wrap *Windows* *Screen* objects but perform their own rendering. + + In most descendants of `WinControl <Vcl.Controls.TWinControl.htm>`__, the job of drawing the control's surface belongs to the underlying *Windows* *Screen* object. If a control has visible features that cannot be rendered by a *Windows* screen object, it requires access to a canvas object so it can do its own drawing. + + ``CustomControl`` is one of two base classes for controls that draw their own surfaces. Because ``CustomControl`` is descended from `WinControl <Vcl.Controls.TWinControl.htm>`__, instances of its descendants can receive focus and serve as containers. + + Classes of controls that perform their own screen rendering and do not need the features of `WinControl <Vcl.Controls.TWinControl.htm>`__ should be descendants of `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ instead of ``CustomControl``. `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ objects can render themselves with less overhead, because they do not have underlying *Windows* *Screen* objects. + + ``CustomControl`` objects have a `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method, which is called whenever the control needs to render its image. Custom controls paint themselves using the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Specifies the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object that presents a drawing surface for the control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. ``Canvas`` encapsulates a *Windows* device context, providing all the tools and methods needed for drawing and painting. + + ``Canvas`` is a protected property that is usually redeclared as public in descendants of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + ''' + + def Paint(self) -> None: + ''' + Renders the image of a custom control. + + The ``Paint()`` method for `CustomControl <Vcl.Controls.TCustomControl.htm>`__ does nothing other than provide the interface for a method that responds to ``WM_PAINT`` messages. ``Paint()`` is called by the `PaintWindow <Vcl.Controls.TCustomControl.PaintWindow.htm>`__ method, after that method has supplied the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ with the handle to a device context. When creating a custom control, always override ``Paint()()`` to draw the image of the control. + + .. tip:: To determine which portions of the control's canvas need to be repainted when ``Paint()`` is called, use the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property of the canvas. + ''' + def PaintWindow(self, DC: HDC) -> None: + ''' + Renders the image of the control on a specified device context. + + ``PaintWindow()`` is called automatically when a custom control receives a ``WM_PAINT`` message. ``PaintWindow()`` assigns the device context specified by the ``DC`` parameter to the custom control's canvas, calls the `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method, and finally removes the device context. Override ``PaintWindow()`` to provide additional responses to the ``WM_PAINT`` message. To draw the image of the control, override the `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method instead. + ''' + def get_Canvas(self) -> Canvas: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Calling ``Create()`` constructs and initializes an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. However, you should never attempt to instantiate a `CustomControl <Vcl.Controls.TCustomControl.htm>`__. This class is intended solely as a base class from which other control classes descend and you should only call ``Create()`` to instantiate one of these descendants. Controls placed on forms at design time are created automatically. + + After calling the inherited constructor, ``Create()`` initializes the control and also a `Canvas <Vcl.Graphics.TCanvas.htm>`__ object for its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + When overriding ``Create()``, always call the inherited ``Create()`` method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the ``Create()`` method. + + .. note:: If a component's constructor allocates resources or memory, also override the destructor to free those resources. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls ``Destroy()``. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override ``Destroy()`` to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a ``Destroy()`` method in a descendent control type, always add the override directive to the declaration and call the inherited ``Destroy()`` as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomDrawGrid(CustomGrid): + ''' + ========================= + Vcl.Grids.TCustomDrawGrid + ========================= + + ``CustomDrawGrid`` is the base class for grids that publish events for painting and manipulating the cells in the grid. + + Use ``CustomDrawGrid`` as a base class when defining grid components that publish events for painting or manipulating the cells in the grid. ``CustomDrawGrid`` introduces a number of events and methods that take advantage of the tabular organization of the grid in responding to user actions. + + Do not create instances of ``CustomDrawGrid``. Instead, put a grid control in a form by instantiating a descendant of ``CustomDrawGrid``. Use ``DrawGrid`` to represent non-textual material in a tabular grid. For text, use a ``StringGrid`` object. If the text represents field values from a dataset, use ``DBGrid``. If you are displaying ``Name``/``Value`` pairs, use ``ValueListEditor``. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Specifies the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object that presents a drawing surface for the control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ encapsulates a *Windows* device context, providing all the tools and methods needed for drawing and painting. + + `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ is a protected property that is usually redeclared as public in descendants of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + ''' + Col: int + ''' + Specifies the index of the column that contains the selected cell. + + Use `Col <Vcl.Grids.TCustomGrid-Col.htm>`__ at runtime to determine the current column in the grid. Setting `Col <Vcl.Grids.TCustomGrid-Col.htm>`__ moves focus to the cell in the current row that is in the new column. The first column has an index of 0, the second column an index of 1, and so on. + + The selected cell in the grid can be located by reading the `Col <Vcl.Grids.TCustomGrid-Col.htm>`__ property and the ``Row`` property to obtain the indexes of its column and row. When focus moves to the grid, the selected cell gets input focus. + ''' + ColWidths: int + ''' + No have docs. + ''' + ColAlignments: Alignment + ''' + No have docs. + ''' + CellAlignments: Alignment + ''' + No have docs. + ''' + DrawingStyle: GridDrawingStyle + ''' + Determines the style used when drawing the grid. + + `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ determines the style used to draw the grid. The following table lists the possible values of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__. + + ================== ========================================================= + **Value** **Meaning** + ================== ========================================================= + ``gdsClassic`` The grid control uses the standard, unthemed style. + ``gdsThemed`` The grid control uses the current operating system theme. + ``gdsGradient`` The grid control uses gradients for styling. + ================== ========================================================= + + *Notes about DrawingStyle for*\ `Vcl.Grids.TStringGrid <Vcl.Grids.TStringGrid.htm>`__: + + - Setting ``FixedColor`` has no effect unless you also set ``DrawingStyle`` to ``gdsClassic``. + - Setting ``GradientStartColor`` and ``GradientEndColor`` has no effect unless you set the value of ``DrawingStyle`` to ``gdsGradient``. + ''' + EditorMode: bool + ''' + Determines whether the current cell can be edited. + + Set `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ to ``True``, at runtime, to put the grid in edit mode. When `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ is ``True``, the user can edit cells in the grid. When the user presses F2, `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ is set to ``True``. When the user presses *Enter*, the value of `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ is toggled. + + .. note:: `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ has no effect if the ``Options`` property does not include ``goEditing`` or if the ``Options`` property includes ``goAlwaysShowEditor``. + ''' + GridHeight: int + ''' + Specifies the height of the grid in pixels. + + Read `GridHeight <Vcl.Grids.TCustomGrid.GridHeight.htm>`__ to determine the size of the grid. If `GridHeight <Vcl.Grids.TCustomGrid.GridHeight.htm>`__ is less than the value of ``ClientHeight``, all of the rows of the grid appear in the control with an empty region below the grid. If the underlying grid is too tall to appear in the control, `GridHeight <Vcl.Grids.TCustomGrid.GridHeight.htm>`__ is the same as ``ClientHeight``, and the user must scroll to see the entire contents of the grid. + ''' + GridWidth: int + ''' + Specifies the width of the grid in pixels. + + Read `GridWidth <Vcl.Grids.TCustomGrid.GridWidth.htm>`__ to determine the size of the grid. If `GridWidth <Vcl.Grids.TCustomGrid.GridWidth.htm>`__ is less than the value of ``ClientWidth``, all of the columns of the grid appear in the control with an empty region to the right of the grid. If the underlying grid is too wide to appear in the control, `GridWidth <Vcl.Grids.TCustomGrid.GridWidth.htm>`__ is the same as ``ClientWidth``, and the user must scroll to see the entire contents of the grid. + ''' + LeftCol: int + ''' + Specifies the index of the first visible scrollable column in the grid. + + Read `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ to determine the index of the first column in the scrollable region that is visible. Set `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ to scroll the columns in the grid so that the column with index `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ is the first column after the fixed columns. + ''' + Selection: GridRect + ''' + Indicates the boundaries of the current selection. + + Set `Selection <Vcl.Grids.TCustomGrid.Selection.htm>`__ to select a range of cells in the grid. `Selection <Vcl.Grids.TCustomGrid.Selection.htm>`__ can either represent the first column, first row, last column and last row in the grid, or the row and column coordinates of the upper left and bottom right cells in the selected region. + + `Selection <Vcl.Grids.TCustomGrid.Selection.htm>`__ can only indicate more than one cell when ``Options`` includes ``goRangeSelect``. + ''' + Row: int + ''' + Specifies the index of the row that contains the selected cell. + + Use `Row <Vcl.Grids.TCustomGrid.Row.htm>`__ at runtime to determine the current row in the grid. Setting `Row <Vcl.Grids.TCustomGrid.Row.htm>`__ moves focus to the cell in the current column that is in the new row. The first row has an index of 0, the second row an index of 1, and so on. + + The selected cell in the grid can be located by reading the `Row <Vcl.Grids.TCustomGrid.Row.htm>`__ property and the ``Col`` property to obtain the indexes of its row and column. When focus moves to the grid, the selected cell gets input focus. + ''' + RowHeights: int + ''' + No have docs. + ''' + TabStops: bool + ''' + No have docs. + ''' + TopRow: int + ''' + Specifies the index of the first visible scrollable row in the grid. + + Read `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ to determine the index of the first row in the scrollable region that is visible. Set `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ to scroll the rows in the grid so that the row with index `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ is the first row after the fixed rows. + ''' + + def ColumnMoved(self, FromIndex: int, ToIndex: int) -> None: + ''' + Generates an `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ event. + + ``ColumnMoved()`` is called immediately after a column in the grid has moved. It overrides the inherited method to generate an `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ event. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to make internal adjustments or to block the `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ event. + ''' + def DrawCell(self, ACol: int, ARow: int, ARect: Rect, AState: GridDrawState) -> None: + ''' + Generates an `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event. + + ``DrawCell()`` is called automatically whenever a cell in the grid is drawn. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the background of the cell is painted before ``DrawCell()`` is called, and the 3D effects of the fixed cells or the focus rectangle around the focused cell are drawn after ``DrawCell()``. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to draw the contents of the cell or to block the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event. + ''' + def GetEditMask(self, ACol: int, ARow: int) -> str: + ''' + Generates an `OnGetEditMask <Vcl.Grids.TCustomDrawGrid.OnGetEditMask.htm>`__ event. + + The inplace editor calls ``GetEditMask()`` to obtain any input mask associated with the cell specified by the ``ACol`` and ``ARow`` parameters. + + ``GetEditMask()`` returns the ``Value`` parameter set by the `OnGetEditMask <Vcl.Grids.TCustomDrawGrid.OnGetEditMask.htm>`__ event handler. If there is no `OnGetEditMask <Vcl.Grids.TCustomDrawGrid.OnGetEditMask.htm>`__ event handler, ``GetEditMask()`` returns an empty string, indicating that there is no edit mask. + ''' + def GetEditText(self, ACol: int, ARow: int) -> str: + ''' + Generates an `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event. + + The inplace editor calls ``GetEditText()`` to obtain the text for the indicated cell. ``GetEditText()`` returns the ``Value`` parameter set by the `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event handler. If there is no `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event handler, ``GetEditText()`` returns an empty string. + ''' + def RowMoved(self, FromIndex: int, ToIndex: int) -> None: + ''' + Generates an `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event. + + ``RowMoved()`` is called immediately after a row in the grid changes position. It overrides the inherited method to generate an `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to make internal adjustments or to block the `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event. + ''' + def SelectCell(self, ACol: int, ARow: int) -> bool: + ''' + Determines whether a particular cell in the grid can be selected. + + Grid controls call ``SelectCell()`` internally before attempting to move selection to a the cell identified by the ``ACol`` and ``ARow`` parameters. ``ACol`` and ``ARow`` are the column and row indexes for the cell, where the first column has index 0, and the top row has index 0. + + ``SelectCell()`` generates an `OnSelectCell <Vcl.Grids.TCustomDrawGrid.OnSelectCell.htm>`__ event. This method then returns ``True``, unless the `OnSelectCell <Vcl.Grids.TCustomDrawGrid.OnSelectCell.htm>`__ event handler indicates that the cell should not be selected. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to check the properties of the information displayed in the cell or block the `OnSelectCell <Vcl.Grids.TCustomDrawGrid.OnSelectCell.htm>`__ event. + ''' + def SetEditText(self, ACol: int, ARow: int, Value: str) -> None: + ''' + Generates an `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event. + + ``SetEditText()`` is called by the inplace editor so that the grid can store the new value for the current cell. ``SetEditText()`` overrides the inherited parent class's method to generate an `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to update an internal representation of the cell's value, or to block the `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event. + ''' + def TopLeftChanged(self) -> None: + ''' + Generates an `OnTopLeftChanged <Vcl.Grids.TCustomDrawGrid.OnTopLeftChanged.htm>`__ event. + + Grid controls call ``TopLeftChanged()`` internally, whenever the `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ or `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ property changes. After calling the inherited parent class's method to update the position of the `InplaceEditor <Vcl.Grids.TCustomGrid.InplaceEditor.htm>`__ (inherited from TCustomGrid), ``TopLeftChanged()`` generates an `OnTopLeftChanged <Vcl.Grids.TCustomDrawGrid.OnTopLeftChanged.htm>`__ event. + ''' + def CellRect(self, ACol: int, ARow: int) -> Rect: + ''' + Returns the *Screen* coordinates of a cell in the grid. + + Call ``CellRect()`` to obtain the boundaries, in pixels, of the cell in the column and row indicated by the ``ACol`` and ``ARow`` parameters. The top left cell is specified when ``ACol`` and ``ARow`` are set to zero. + + If the indicated cell is not visible, ``CellRect()`` returns an empty rectangle. + ''' + def MouseToCell(self, X: int, Y: int, ACol: int, ARow: int) -> None: + ''' + Returns the column and row of the cell at the position with screen coordinates ``(X,Y)``. + + Call ``MouseToCell()`` to convert from grid-relative screen coordinates to row and column indexes. The ``'X'`` and ``'Y'`` parameters are the *Screen* coordinates of the point to be converted. ``MouseToCell()`` returns the ``ACol`` parameter as the number of the column over the point (X,Y), and the ``ARow`` parameter as the number of the row. + + Usually the ``MouseToCell()`` method is used in a mouse event handler, which supplies the mouse coordinates as the ``'X'`` and ``'Y'`` parameters of the method call. + ''' + + def OnColumnMoved(self, Sender: Object, FromIndex: int, TolistIndex: int) -> None: + ''' + # OnColumnMoved: MovedEvent + + Occurs immediately after the position of a column changes. + + Use ``OnColumnMoved`` to perform special processing when the position of a grid column changes. Columns can be moved programmatically or by user manipulation. ``OnColumnMoved`` does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goColMoving``. + ''' + def OnDrawCell(self, Sender: Object, ACol: int, ARow: int, Rect: Rect, State: GridDrawState) -> None: + ''' + # OnDrawCell: DrawCellEvent + Occurs when a cell in the grid needs to be drawn. + + Write an ``OnDrawCell`` event handler to draw the contents of all the cells in the grid. Draw on the cell using the methods of the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. The ``Rect`` parameter indicates the location of the cell on the canvas. The ``Col`` and ``Row`` parameters indicate the column and row indexes of the cell that should be drawn. The ``State`` parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (nonscrolling) cell. + + If the ``OnDrawCell`` event handler is not assigned, all cells in the ``DrawGrid`` will appear empty. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the ``DrawGrid`` paints the background color of the cell before the ``OnDrawCell`` event, and draws a focus rectangle around the selected cell after the ``OnDrawCell`` event handler finishes drawing the contents of the cell. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``False``, the ``OnDrawCell`` event handler should paint the background of the cell and provide all visual indication of selection and focus. + ''' + def OnGetEditMask(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + OnGetEditMask: GetEditEvent + Occurs when the in-place editor requests an `edit mask <Vcl.Mask.TCustomMaskEdit.EditMask.htm>`__. + + Write an ``OnGetEditMask`` event handler to provide the in-place editor with an ``EditMask`` that describes the valid input strings a user can type into a cell. Set the ``Value`` parameter to the string that describes the ``EditMask`` for the cell specified by the ``ACol`` and ``ARow`` parameters. If the cell does not have an ``EditMask``, set the ``Value`` parameter to an empty string. + + ``OnGetEditMask`` does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goEditing``. + ''' + def OnGetEditText(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + OnGetEditText: GetEditEvent + Occurs when the in-place editor requests the value of a cell. + + Write an ``OnGetEditText`` event handler to provide the in-place editor with a string representing the contents of the cell. Set the ``Value`` parameter to the string for the cell specified by the ``ACol`` and ``ARow`` parameters. When the cell enters edit mode, the contents of the cell are drawn as the ``Value`` string returned by the ``OnGetEditText`` event handler. This image need not match the appearance of the cell when it is not in edit mode, which is drawn using the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler. + + ``OnGetEditText`` does not occur unless the ``Options`` property includes ``goEditing``. + ''' + def OnRowMoved(self, Sender: Object, FromIndex: int, TolistIndex: int) -> None: + ''' + OnRowMoved: MovedEvent + Occurs immediately after the position of a row changes. + + Write an ``OnRowMoved`` event handler to provide special processing whenever a row in the grid changes position. Rows can be moved programmatically or by user manipulation. ``OnRowMoved`` does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goRowMoving``. + ''' + def OnSelectCell(self, Sender: Object, ACol: int, ARow: int, CanSelect: bool) -> None: + ''' + OnSelectCell: SelectCellEvent + Occurs before a cell in the grid is selected. + + Write an ``OnSelectCell`` event handler to specify whether any particular cell in the grid can be selected. The ``Col`` and ``Row`` parameters indicate the column and row indexes of the cell that is about to be selected. Set the ``CanSelect`` parameter to ``False`` to prevent the cell being selected. + ''' + def OnSetEditText(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + OnSetEditText: SetEditEvent + Occurs when the user edits the value of a cell. + + Write an ``OnSetEditText`` event handler to perform any special processing of the text edited by the user in an in-place editor. For example, use the ``OnSetEditText`` event to retrieve and store the value of a cell so that it can be displayed in an `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler. ``OnSetEditText`` occurs every time the user changes the text. + + The ``Value`` parameter is the new value for the cell specified by the ``ACol`` and ``ARow`` parameters. + + ``OnSetEditText`` does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goEditing``. + ''' + def OnTopLeftChanged(self, Sender: Object) -> None: + ''' + OnTopLeftChanged: NotifyEvent + Occurs immediately after the `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ property or the `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ property changes. + + Use ``OnTopLeftChanged`` to perform special processing when the non-fixed cells in the grid are scrolled. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomEdit(WinControl): + ''' + ======================== + Vcl.StdCtrls.TCustomEdit + ======================== + + ``CustomEdit`` is the base class from which all edit-box and memo controls are derived. + + ``CustomEdit`` encapsulates the behavior common to all components for editing text by introducing methods and properties that provide: + + Basic text editing functions such as selecting text, modifying selected text, and case conversions. + + Ability to respond to changes in the contents of the text. + + Access control of the text for making it read-only or introducing a password character to hide the actual value. + + Do not create instances of ``CustomEdit``. Use ``CustomEdit`` as a base class when declaring control objects that permit the user to enter or modify text. Properties and methods of ``CustomEdit`` provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior. + ''' + + __hash__: ClassVar[None] = ... + AutoSelect: bool + ''' + Determines whether all the text in the edit control is automatically selected when the control gets focus. + + Set ``AutoSelect`` to select all the text when the edit control gets focus. ``AutoSelect`` only applies to single-line edit controls. + + Use ``AutoSelect`` when the user is more likely to replace the text in the edit control than to append to it. + ''' + AutoSize: bool + ''' + Determines whether the height of the edit control automatically resizes to accommodate the text. + + Use ``AutoSize`` to make the edit control adjust its size automatically so the client area accommodates the height of the text. When ``AutoSize`` is ``False``, the edit control has a fixed height. When ``AutoSize`` is ``True``, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style. + + .. note:: ``AutoSize`` only adjusts the height of the edit control. Even with ``AutoSize`` set to ``True``, text in the edit control may appear truncated if it extends beyond the width of the control. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``Edit`` control has a single line border around the client area. + + Use ``BorderStyle`` to affect the sharpness with which the client area of the ``Edit`` control stands out. ``BorderStyle`` can have a value of either ``bsSingle`` or ``bsNone``. If ``BorderStyle`` is ``bsSingle``, the ``Edit`` control has a single-line border around the client area. If ``BorderStyle`` is ``bsNone``, there will be no border. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text within the edit control. + + Use ``CharCase`` to force the contents of the edit control to assume a particular case. + + When ``CharCase`` is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types them into the edit control. Changing the ``CharCase`` property to ``ecLowerCase`` or ``ecUpperCase`` changes the actual contents of the text, not just the appearance. Any case information is lost and can't be recaptured by changing ``CharCase`` to ecNormal. + ''' + HideSelection: bool + ''' + Determines whether the visual indication of the selected text remains when focus shifts to another control. + + Set ``HideSelection`` to ``False`` to provide visual feedback of the selected portion of the text even when the edit control does not have focus. Set ``HideSelection`` to ``True`` to show the selection only when the edit control has focus. ``HideSelection`` does not affect the actual value of the selection, only the visual indication. Always setting ``HideSelection`` to ``False`` can make forms with many edit controls look too busy. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can enter into the edit control. + + Use ``MaxLength`` to limit the number of characters that can be entered into the edit control. A value of 0 indicates that there is no application-defined limit on the length. + + Use ``MaxLength`` to limit the length of the text in an edit control if that text will be copied into a fixed-length buffer. + + .. note:: Setting ``MaxLength`` will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of ``MaxLength`` characters. + + .. note:: Even when ``MaxLength`` is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control. + + .. note:: The unit of ``MaxLength`` is characters (not bytes) if the application is using themes. + ''' + OEMConvert: bool + ''' + Determines whether characters typed in the edit control are converted from *ANSI* to *OEM* and then back to *ANSI*. To ensure that any characters typed in the edit control can be unambiguously converted to the *OEM* character set, set ``OEMConvert`` to ``True``. This causes all characters to be converted from *ANSI* to *OEM* and then back to *ANSI* as they are typed. Set ``OEMConvert`` to ``False`` to avoid the overhead of this conversion when it does not matter whether the text can be unambiguously mapped to an *OEM* string. + + ``OEMConvert`` is most useful for edit controls used to enter file names when the application does not use Unicode file names. + ''' + NumbersOnly: bool + ''' + Allows only numbers to be typed into the text edit. + + Use ``NumbersOnly`` to prohibit entry of non-numeric characters in the ``textfield``. Note, however, that a user can paste non-numeric characters in the ``textfield`` even when this property is set. + ''' + PasswordChar: str + ''' + Indicates the character, if any, to display in place of the actual characters typed in the control. + + Use the ``PasswordChar`` property to create an edit control that displays a special character in place of any entered text. If ``PasswordChar`` is set to the ``NULL`` character (*ANSI* character zero), the edit control displays its text normally. If ``PasswordChar`` is any other character, the edit control displays ``PasswordChar`` in place of each character typed. ``PasswordChar`` affects the appearance of the edit control only. The value of the ``Text`` property reflects the actual characters that are typed. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + Alignment: Alignment + ''' + Determines how the text is aligned within the text ``Edit`` control. + + Use ``Alignment`` to change the way the text is formatted in the text ``Edit`` control. ``Alignment`` can take one of the following values: + + ==================== ================================================== + **Value** **Meaning** + ==================== ================================================== + ``taLeftJustify`` Align text to the left side of the control + ``taCenter`` Center text horizontally in the control. + ``taRightJustify`` Align text to the right side of the control. + ==================== ================================================== + ''' + CanUndo: bool + ''' + Indicates whether the edit control contains changes that can be backed out. + + Read ``CanUndo`` to determine whether the user has made any changes to the text that can be undone by calling the `Undo <Vcl.StdCtrls.TCustomEdit.Undo.htm>`__ method. This is useful when enabling or disabling menu items that correspond to these commands. + ''' + Modified: bool + ''' + Indicates whether the user edited the text of the edit control. + + Use ``Modified`` to determine whether the user changed the ``Text`` property of the edit control. Modified is only reset to ``False`` when you assign a value to the ``Text`` property. In particular, it is not reset when the control receives focus. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the edit control. To restrict the edit control to display only, set the ``ReadOnly`` property to ``True``. Set ``ReadOnly`` to ``False`` to allow the contents of the edit control to be edited. + + Setting ``ReadOnly`` to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + SelLength: int + ''' + Specifies the number of characters (bytes) that are selected. + + Read ``SelLength`` to determine the length, in bytes, of the selected text. This is the same as the number of characters, unless you are using a multi-byte character set. Set ``SelLength`` to change the selection to consist of the first ``SelLength`` bytes starting at `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__. + + .. note:: Setting ``SelLength`` to a value greater than the number of characters from `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ to the end of the text results in the selection of all characters from `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ to the end of the text. Reading ``SelLength`` immediately after setting it to a value greater than the number of available characters returns the number of characters actually selected, not the value that was just set. + ''' + SelStart: int + ''' + Specifies the position of the first selected character in the text. + + Read ``SelStart`` to determine the position of the first selected character, where 0 indicates the first character. If there is no selected text, ``SelStart`` indicates the position of the cursor. Set ``SelStart()`` to remove the current selection and position the cursor just before the indicated character. To select a particular range of the text, first set ``SelStart`` to position the cursor, and then set `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ to extend the selection. + ''' + SelText: str + ''' + Specifies the selected portion of the ``Edit`` control's text. + + Read ``SelText`` to determine the value of the selected text. Set ``SelText`` to replace the selected text with a new string. If there is no selection, but the ``Edit`` control has focus, set ``SelText`` to insert a new string into the text at the cursor. + ''' + Text: Caption + ''' + Contains a text string associated with the control. + + ``Vcl.StdCtrls.TCustomEdit.Text`` inherits from `Vcl.Controls.TControl.Text <Vcl.Controls.TControl.Text.htm>`__. All content below this line refers to `Vcl.Controls.TControl.Text <Vcl.Controls.TControl.Text.htm>`__. + + Contains a text string associated with the control. + + Use the `Text <Vcl.Controls.TControl.Text.htm>`__ property to read the `Text <Vcl.Controls.TControl.Text.htm>`__ of the control or to specify a new string for the `Text <Vcl.Controls.TControl.Text.htm>`__ value. By default, `Text <Vcl.Controls.TControl.Text.htm>`__ is the control name. For ``Edit`` controls and memos, the `Text <Vcl.Controls.TControl.Text.htm>`__ appears within the control. For ``ComboBox``\ es, the `Text <Vcl.Controls.TControl.Text.htm>`__ is the content of the ``Edit`` control portion of the ``ComboBox``. + + .. note:: Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. Which property is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + ''' + TextHint: str + ''' + A hint or message to be displayed when the ``Text`` property is empty. + + Use ``TextHint`` to cue the user on what kind of entry is expected in the text field. Runtime themes must be enabled. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def ObserverAdded(self, ID: int, Observer: IObserver) -> None: + ''' + No have docs. + ''' + def ObserverToggle(self, AObserver: IObserver, Value: bool) -> None: + ''' + No have docs. + ''' + def Change(self) -> None: + ''' + Generates an ``Change()`` event. + + Applications do not call the ``Change()`` method directly. It is triggered automatically by Windows events. ``Change()`` is exposed as a protected method so that derived classes can make additional responses when the text changes beyond invoking the ``Change()`` event handler. If Derived classes that override the ``Change()`` method do not call the inherited method, the ``Change()`` event handler will not be called. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + When a windowed control receives a key-down message (``WM_KEYDOWN``) from Windows, its message handler calls the `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ method. If `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ determines that the control should, in fact, process the character, it calls `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__, passing the key code and shift-key state in the ``Key`` and ``Shift`` parameters, respectively. + + `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ calls any event handler attached to the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Override `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ to provide other responses in addition to the event handler call. + + The ``Key`` parameter is the key on the keyboard. For nonalphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the *Shift*, *Alt*, or *Ctrl* keys are combined with the keystroke. + + Either `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ or the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds to keyboard input. + + When a windowed control receives a key-press message (``WM_CHAR``) from Windows, its message handler calls the `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ method. If `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ determines that the control should, in fact, process the character, it calls `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__, passing the key code in the ``Key`` parameter. + + `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ calls any event handler attached to the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Override `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ to provide other responses in addition to the event handler call. + + Either `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ or the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler it calls can suppress further processing of a character by setting the ``Key`` parameter to zero. + + .. note:: The ``Key`` parameter is the character represented by the key that is pressed, not a *Windows* virtual key code. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter record passed in the ``Params`` parameter. + + The `CreateWnd <Vcl.StdCtrls.TCustomEdit.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to `CreateWindowHandle <Vcl.StdCtrls.TCustomEdit.CreateWindowHandle.htm>`__. `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ overrides the inherited method to specify a scrollable single-line edit control that reflects the current values of the `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__, `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__, `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__, and `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ properties. + ''' + def CreateWindowHandle(self, Params: CreateParams) -> None: + ''' + Creates a *Windows* control to represent the control. + + ``CreateWindowHandle()`` calls the inherited ``CreateWindowHandle()`` method after working around a *Win95* bug involving setting the read-only style on machines with *Far East* locales. + ''' + def CreateWnd(self) -> None: + ''' + Creates a *Windows* control corresponding to the edit control. + + ``CreateWnd()`` is called when the edit control is created, and whenever a change to the edit control requires the window to be recreated. After calling the inherited method, ``CreateWnd()`` sends the newly created *Window Messages* to enforce the `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ and `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ properties. + ''' + def DestroyWnd(self) -> None: + ''' + Destroys the *Windows* control that corresponds to the edit control. + + The *Windows* control for the edit box can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. When this happens, ``DestroyWnd()`` is called. + + Before the window is destroyed, ``DestroyWnd()`` saves a copy of any properties that are needed to recreate the window after it is destroyed. + ''' + def DoSetMaxLength(self, Value: int) -> None: + ''' + Sets the `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ property. + + ``DoSetMaxLength()`` is the property access function for the `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ property. It is exposed as a protected method so that descendants of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ can customize the implementation of the `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ property. + + ``DoSetMaxLength()`` sends an ``EM_LIMITTEXT`` message to the window of the edit control. + ''' + def DoSetTextHint(self, Value: str) -> None: + ''' + Sets the value of the `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ property. + + ``DoSetTextHint()`` is a protected method used to set the value of the `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ property. + ''' + def GetSelLength(self) -> int: + ''' + Returns the `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ property. + + ``GetSelLength()`` is the property access function for the `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ property. It is exposed as a protected method so that descendants of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ can customize the implementation of the `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ property. + + ``GetSelLength()`` sends an ``EM_GETSEL`` message to the window of the edit control and returns the difference between the starting position and the ending position. + ''' + def GetSelStart(self) -> int: + ''' + Returns the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ property. + + ``GetSelStart()`` is the property access method for the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ property. It is exposed as a protected method so that descendants of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ can customize the implementation of the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ property. + + ``GetSelStart()`` sends an ``EM_GETSEL`` message to the window of the edit control and returns the starting position. + ''' + def GetSelText(self) -> str: + ''' + Returns the `SelText <Vcl.StdCtrls.TCustomEdit.SelText.htm>`__ property. + + ``GetSelText()`` is the property access method for the `SelText <Vcl.StdCtrls.TCustomEdit.SelText.htm>`__ property. It is exposed as a protected method so that descendants of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ can customize the implementation of the `SelText <Vcl.StdCtrls.TCustomEdit.SelText.htm>`__ property. + ''' + def SetAlignment(self, Value: Alignment) -> None: + ''' + Sets the `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ property. + + ``SetAlignment()`` is exposed as a protected method so derived classes can customize their implementation of the `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ property. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Sets the `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ property. + + ``SetAutoSize()`` is the protected write implementation of the `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ property. + + `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ overrides the inherited method to update the height of the edit control to reflect the current font when the value of `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ changes to ``True``. + ''' + def SetSelLength(self, Value: int) -> None: + ''' + Sets the `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ property. + + ``SetSelLength()`` is the property access method for the `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ property. It is exposed as a protected method so that descendants of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ can customize the implementation of the `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ property. + + ``SetSelLength()`` sends an ``EM_SETSEL`` message to the window of the edit control, specifying a selection that begins at `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ and ends at `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ Value. + ''' + def SetSelStart(self, Value: int) -> None: + ''' + Sets the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ property. + + ``SetSelStart()`` is the property access method for the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ property. It is exposed as a protected method so that descendants of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ can customize the implementation of the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ property. + + ``SetSelLength()`` sends an ``EM_SETSEL`` message to the window of the edit control to position the cursor on the position indicated by ``Value``. + ''' + def SendGetSel(self, SelStart: int, SelEnd: int) -> None: + ''' + No have docs. + ''' + def UpdateTIPStatus(self) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. + + Call ``Create()`` to create and initialize an instance of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. + + ``AOwner`` is another component, typically the ``Form``, that is responsible for freeing the edit control. It becomes the value of the ``Owner()`` property. + + Derived objects that override the ``Create()`` method should call the inherited ``Create()`` before performing any additional initialization. + ''' + def Clear(self) -> None: + ''' + Deletes all text from the edit control. + + Use ``Clear()`` to replace the ``Text`` property with an empty string. ``Clear()`` removes all text, not just the selected text. To remove just the selected text, use ``ClearSelection()``. + ''' + def ClearSelection(self) -> None: + ''' + Removes the selected text from the edit control. + + Use ``ClearSelection()`` to delete the selected text from the edit control. If no text is selected, ``ClearSelection()`` does nothing. If all of the text is selected, ``ClearSelection()`` clears all text, like the `Clear <Vcl.StdCtrls.TCustomEdit.Clear.htm>`__ method. + + .. note:: Calling ``ClearSelection()`` does the same thing as sending the edit control a ``WM_CLEAR`` message. + ''' + def CopyToClipboard(self) -> None: + ''' + Copies the selected text in the edit control to the ``Clipboard`` in ``CF_TEXT`` format. + + Use ``CopyToClipboard()`` to replace the contents of the ``Clipboard`` with the selected text. ``CopyToClipboard()`` does not clear the ``Clipboard`` if no text is selected. If no text is selected, ``CopyToClipboard()`` does nothing. + + .. note:: Calling ``CopyToClipboard()`` does the same thing as sending the edit control a ``WM_COPY`` message. + ''' + def CutToClipboard(self) -> None: + ''' + Copies the selected text to the ``Clipboard`` in ``CF_TEXT`` format and then deletes the selection. + + Use ``CutToClipboard()`` to replace the contents of the ``Clipboard`` with the selected text while clearing the selected text. If no text is selected, ``CutToClipboard()`` does nothing. + + .. note:: Calling `CopyToClipboard <Vcl.StdCtrls.TCustomEdit.CopyToClipboard.htm>`__ does the same thing as sending the edit control a ``WM_CUT`` message. + ''' + def DefaultHandler(self, Message) -> None: + ''' + Provides message handling for all messages that the control does not fully process itself. + + Override ``DefaultHandler()`` to change the default message handling for the edit control. The ``Message`` parameter can be cast to a ``Message`` type to obtain the ``WParam``, ``LParam``, and ``Result`` of the message. If the ``Result`` of the message is non-zero, the message has already been handled. Set the ``Result`` field to a non-zero value to prevent further processing of the message by the inherited method. + + .. note:: In Delphi, calling inherited in a message-handling method results in a call to the ancestor's ``DefaultHandler()`` method if that ancestor does not specify a handler for the message being handled. + ''' + def GetControlsAlignment(self) -> Alignment: + ''' + Indicates how text is aligned within the control. + + Use `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ to determine the alignment of the control. For controls that do not have an ``Alignment`` property, `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ returns ``taLeftJustify``. + + .. note:: `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ returns the alignment of text before it is altered by the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. To check whether the alignment should be reversed to reflect the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property, call `UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__. + ''' + def PasteFromClipboard(self) -> None: + ''' + Pastes the contents of the ``Clipboard`` into edit control, replacing the current selection. + + Use ``PasteFromClipboard()`` to replace the selected text with the contents of the ``Clipboard``, or, if no text is selected, to insert the contents of the ``Clipboard`` at the cursor. If the ``Clipboard`` is empty, or if it does not contain anything in ``CF_TEXT`` format, ``PasteFromClipboard()`` does nothing. + + .. note:: Calling ``PasteFromClipboard()`` does the same thing as sending the edit control a ``WM_PASTE`` message. + ''' + def Undo(self) -> None: + ''' + Backs out all changes in the undo buffer. + + Call ``Undo()`` to cancel all changes made to the ``Text`` property since the last call to the `Clear <Vcl.StdCtrls.TCustomEdit.Clear.htm>`__ ``Undo()`` method. If `Clear <Vcl.StdCtrls.TCustomEdit.Clear.htm>`__ ``Undo()`` was never called, ``Undo()`` rolls back all changes. To determine whether there are any changes in the undo buffer, check the ``CanUndo`` property. + ''' + def ClearUndo(self) -> None: + ''' + Clears the undo buffer so that no changes to the text can be backed out. + + Use ``ClearUndo()`` to commit changes to the ``Text`` property. After calling ``ClearUndo()``, the `CanUndo <Vcl.StdCtrls.TCustomEdit.CanUndo.htm>`__ property is ``False`` and the `Undo <Vcl.StdCtrls.TCustomEdit.Undo.htm>`__ method does nothing. + ''' + def SetSelText(self, Value: str) -> None: + ''' + Sets the ``SelText`` property. + + ``SetSelText()`` is the property access method for the `SelText <Vcl.StdCtrls.TCustomEdit.SelText.htm>`__ property. + ''' + def SelectAll(self) -> None: + ''' + Selects all text in the edit control. + + Use ``SelectAll()`` to select all text in the edit control. To select only part of the text, use the `SelStart <Vcl.StdCtrls.TCustomEdit.SelStart.htm>`__ and `SelLength <Vcl.StdCtrls.TCustomEdit.SelLength.htm>`__ properties. + ''' + def GetSelTextBuf(self, Buffer: str, BufSize: int) -> int: + ''' + Copies the selected text into a buffer and returns the number of characters copied. + + Use ``GetSelTextBuf()`` to copy the selected text into a character buffer. If there is no selection, the buffer receives an empty string. If the selection contains more than (``BufSize - 1``) characters, only the first (``BufSize - 1``) characters are copied. ``GetSelTextBuf()`` returns the number of characters that were actually copied into the buffer. + ''' + def SetSelTextBuf(self, Buffer: str) -> None: + ''' + Replaces the selected text with a null-terminated string. + + Use ``SetSelTextBuf()`` to replace the current selection by the contents of the null-terminated string pointed to by ``Buffer``. If no text is selected, the contents of ``Buffer`` are inserted at the cursor. ``SetSelTextBuf()`` does the same thing as setting the `SelText <Vcl.StdCtrls.TCustomEdit.SelText.htm>`__ property, except that it takes a pointer to a char type rather than a string. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the text for the ``Edit`` control may have changed. + + Write an ``OnChange`` event handler to take specific action whenever the text for the ``Edit`` control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the ``Edit`` control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the ``Edit`` control. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomForm(ScrollingWinControl): + ''' + ===================== + Vcl.Forms.TCustomForm + ===================== + + ``CustomForm`` is the base class from which to derive a window such as a form or dialog. + + Derive from ``CustomForm`` to create a custom window. The ``CustomForm`` descendant can contain other objects, such as ``Button``, ``CheckBox``, and ``ComboBox`` objects. + ''' + + __hash__: ClassVar[None] = ... + FFormState: FormState + ''' + No have docs. + ''' + ActiveMDIChild: Form + ''' + Specifies the *MDI Child* that has focus. + + Use ``ActiveMDIChild`` to get the *MDI Child* that has focus. + + If the form is not an *MDI* parent (that is, if the ``FormStyle`` property of the form is not ``fsMDIForm``), ``ActiveMDIChild()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + AlphaBlend: bool + ''' + Specifies whether the form is translucent. + + Set ``AlphaBlend`` to specify that the form represents a layered window that allows a translucent color. The `AlphaBlendValue <Vcl.Forms.TCustomForm.AlphaBlendValue.htm>`__ property specifies the degree of translucency. + + .. note:: ``AlphaBlend`` does not work on all systems. The application must be running under Windows 2000 or better, and the machine must be a P90 or better. + ''' + AlphaBlendValue: Byte + ''' + Specifies the degree of translucency on a translucent form. + + Set ``AlphaBlendValue`` to a value between 0 and 255 to indicate the degree of translucency when the `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ property is ``True``. A value of 0 indicates a completely transparent window. A value of 255 indicates complete opacity. + + .. note:: ``AlphaBlendValue`` only has an effect when the `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ property is ``True``. + ''' + BorderIcons: BorderIcons + ''' + Specifies which icons appear on the title bar of the form. + + Use ``BorderIcons`` to get or set the icons that appear on the title bar of the form. ``BorderIcons`` can include any of the following ``BorderIcons`` values: + + ================= ============================================================================================================================================================================================================================================ + **Value** **Meaning** + ================= ============================================================================================================================================================================================================================================ + ``biSystemMenu`` The form has a ``Control`` menu (also known as a ``System`` menu). + ``biMinimize`` The form has a ``Minimize()`` button + ``biMaximize`` The form has a ``Maximize`` button + ``biHelp`` If ``BorderStyle`` is ``bsDialog`` or ``biMinimize`` and ``biMaximize`` are excluded, a question mark appears in the form's title bar and when clicked, the cursor changes to ``crHelp``; otherwise, no question mark appears. + ================= ============================================================================================================================================================================================================================================ + + .. note:: Certain combinations of the ``BorderIcons`` and ``BorderStyle`` properties are mutually exclusive. For example, ``BorderIcons`` ``biMax``, ``biMin`` with ``BorderStyle`` of ``bsDialog`` are mutually exclusive. + ''' + AutoScroll: bool + ''' + Indicates whether ``ScrollBar``\ s appear automatically on the scrolling windowed control if it is not large enough to display all of its controls. + + If `AutoScroll: bool <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is ``True``, the ``ScrollBar``\ s appear automatically when necessary. For example, if the user resizes the control so that some of its controls are partially obscured, ``ScrollBar``\ s appear. + + If `AutoScroll: bool <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is ``False``, ``ScrollBar``\ s don't appear automatically. In this case, use the `HorzScrollBar: ControlScrollBar <Vcl.Forms.TScrollingWinControl.HorzScrollBar: ControlScrollBar.htm>`__ and `VertScrollBar: ControlScrollBar <Vcl.Forms.TScrollingWinControl.VertScrollBar: ControlScrollBar.htm>`__ properties to make ``ScrollBar``\ s appear. + ''' + ClientHeight: int + ''' + Specifies the height of the control's client area in pixels. + + Use `ClientHeight: int <Vcl.Controls.TControl.ClientHeight: int.htm>`__ to read or change the height of the control's client area. + + For `Control <Vcl.Controls.TControl.htm>`__, `ClientHeight: int <Vcl.Controls.TControl.ClientHeight: int.htm>`__ is the same as `Height <Vcl.Controls.TControl.Height.htm>`__. Derived classes may implement a `ClientHeight: int <Vcl.Controls.TControl.ClientHeight: int.htm>`__ property that differs from `Height <Vcl.Controls.TControl.Height.htm>`__. For example, the `ClientHeight: int <Vcl.Controls.TControl.ClientHeight: int.htm>`__ of a form is the value of the `Height <Vcl.Controls.TControl.Height.htm>`__ property minus the height of the title bar, resize border, and ``ScrollBar``\ s. + ''' + ClientWidth: int + ''' + Specifies the horizontal size of the control's client area in pixels. + + Use `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ to read or change the width of the control's client area. `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ is equivalent to `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__.Right. + + For `Control <Vcl.Controls.TControl.htm>`__, `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ is the same as `Width <Vcl.Controls.TControl.Width.htm>`__. Derived classes may implement a `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ property that differs from `Width <Vcl.Controls.TControl.Width.htm>`__. For example, the `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ of a form is the value of the `Width <Vcl.Controls.TControl.Width.htm>`__ property minus the width of the resize border and ``ScrollBar``\ s. + ''' + TransparentColor: bool + ''' + Specifies whether a color on the form appears transparent. + + Use ``TransparentColor`` to indicate that one of the colors on the form should be treated as transparent, allowing windows behind the form to completely show through. The `TransparentColorValue <Vcl.Forms.TCustomForm.TransparentColorValue.htm>`__ property indicates the color that appears completely transparent. + + .. note:: To make the entire form transparent, or to make it translucent rather than transparent, use the `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ and `AlphaBlendValue <Vcl.Forms.TCustomForm.AlphaBlendValue.htm>`__ properties. + + .. note:: ``TransparentColor`` does not work on all systems. The application must be running under Windows 2000 or better, with adequate hardware. + ''' + TransparentColorValue: Color + ''' + Indicates the color on the form that appears transparent when `TransparentColor <Vcl.Forms.TCustomForm.TransparentColor.htm>`__ is ``True``. + + Use ``TransparentColorValue`` to indicate the color that appears transparent when the `TransparentColor <Vcl.Forms.TCustomForm.TransparentColor.htm>`__ property is ``True``. + + .. note:: If the application uses a 16-bit color palette, ``TransparentColorValue`` must be a basic color. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D: bool <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of Windows or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D: bool <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DefaultMonitor: DefaultMonitor + ''' + Specifies the monitor on which the form appears. + + Use ``DefaultMonitor`` to associate a form with a particular monitor in a multi-monitor application. The following table lists the possible values: + + ================== ========================================================================================================================================================== + **Value** **Meaning** + ================== ========================================================================================================================================================== + ``dmDesktop`` No attempt is made to position the form on a specific monitor. + ``dmPrimary`` The form is positioned on the first monitor listed in the global screen object's `Monitors <Vcl.Forms.TScreen.Monitors.htm>`__ property. + ``dmMainForm`` The form appears on the same monitor as the application's main form. + ``dmActiveForm`` The form appears on the same monitor as the currently active form. + ================== ========================================================================================================================================================== + + .. note:: ``DefaultMonitor`` has no effect if the application does not have a main form. + ''' + HorzScrollBar: ControlScrollBar + ''' + Represents the horizontal ``ScrollBar`` for the scrolling windowed control. + + Use `HorzScrollBar <Vcl.Forms.TScrollingWinControl.HorzScrollBar.htm>`__ to hide, show, or manipulate the horizontal ``ScrollBar`` for the scrolling windowed control. + ''' + Icon: Icon + ''' + Specifies the icon that appears when the form is minimized. + + Set the ``Icon`` property to provide an icon for the form. If ``Icon`` is not set, the system provides a default icon when the form is minimized. + ''' + MDIChildCount: int + ''' + Specifies the number of open *MDI Child* forms. + + Use ``MDIChildCount`` to get the number of open *MDI Child* forms. + + ``MDIChildCount`` is meaningful only if the form is an *MDI* parent (that is, if the form's ``FormStyle`` property is set to ``fsMDIForm``). + ''' + MDIChildren: list + ''' + Provides indexed access to all *MDI Child* forms. + + Use ``MDIChildren`` to access a child form. + + I is the index of the child form to access. The order of *MDI Children* changes as different MDI forms are activated. Initially, forms are listed in creation order, with new forms being added to the end of the array. Whenever an *MDI Child* is activated, however, it moves to the front of the list. Thus, use I to index over all forms in the array, but not to refer to a specific form. + + ``MDIChildren`` is meaningful only if the form is an MDI frame (that is, if the form's ``FormStyle`` property is set to ``fsMDIForm``). + ''' + ObjectMenuItem: MenuItem + ''' + Represents an OLE object menu item that reacts to selections of OLE objects. + + Use ``ObjectMenuItem`` to get or set a menu item that becomes enabled or disabled when an OLE object on the form is selected or unselected respectively. + + The OLE object menu item can be used for standard OLE commands, such as `Activate <Vcl.Forms.TCustomForm.Activate.htm>`__ or ``Convert``. (The implementations of these commands are provided by the OLE server.) + ''' + PixelsPerInch: int + ''' + Represents the proportion of the font on the system on which the form was designed. + + Use ``PixelsPerInch`` at runtime to change how the form is scaled to the current screen resolution. If ``PixelsPerInch`` is changed from its default value, the form will not have the same proportion on every screen resolution. + + At design time, ``PixelsPerInch`` is set automatically when the form is saved. Changes to ``PixelsPerInch`` made in the *Object Inspector* only affect the form at runtime. + + The form's ``Scaled`` property must be true for ``PixelsPerInch`` to have an effect. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. + + To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to true. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to true so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the form uses the default font. Currently, the default font is *Tahoma 8 pt*. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu: `PopupMenu <Vcl.Controls.TControl.PopupMenu: PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the PopupMenu: `PopupMenu <Vcl.Menus.TPopupMenu: PopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu: PopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu: PopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu: PopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + PopupChildren: List + ''' + No have docs. + ''' + Position: Position + ''' + Represents the size and placement of the form. + + Use ``Position`` to get or set the size and placement of the form. ``Position`` can have one of the following ``Position`` values: + + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Value** | **Meaning** | + +=========================+=============================================================================================================================================================+ + | ``poDesigned`` | The form appears positioned on the screen and with the same height and width as it had at design time. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDefault`` | The form appears in a position on the screen and with a height and width determined by the operating system. Each time you run the application, the | + | | form moves slightly down and to the right. The right side of the form is always near the rightmost side of the screen, and the bottom of the form | + | | is always near the bottom of the screen, regardless of the screen's resolution. | + | | | + | | The operating system only supports this for overlapped windows. For a pop-up or child window (that has a | + | | `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ of ``bsDialog`` or ``bsNone``, for example), the window is positioned in the upper-left corner of | + | | the screen. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDefaultPosOnly`` | The form displays with the size you created it at design time, but the operating system chooses its position on the screen. Each time you run the | + | | application, the form moves slightly down and to the right. When the form can no longer move down and to the right and keep the same size while | + | | remaining entirely visible on the screen, the form displays at the upper-left corner of the screen. | + | | | + | | The operating system only supports this for overlapped windows. For a pop-up or child window (that has a | + | | `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ of ``bsDialog`` or ``bsNone``, for example), the window is positioned in the upper-left corner of | + | | the screen. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDefaultSizeOnly`` | The form appears in the position you left it at design time, but the operating system chooses its size. The right side of the form is always near | + | | the rightmost side of the screen, and the bottom of the form is always near the bottom of the screen, regardless of the screen's resolution. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poScreenCenter`` | The form remains the size you left it at design time, but is positioned in the center of the screen. In multi-monitor applications, the form may be | + | | moved from this center position so that it falls entirely on one monitor, as specified by the | + | | `DefaultMonitor <Vcl.Forms.TCustomForm.DefaultMonitor.htm>`__ property. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDesktopCenter`` | The form remains the size you left it at design time, but is positioned in the center of the screen. No adjustments are made for multi-monitor | + | | applications. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poMainFormCenter`` | The form remains the size you left it at design time, but is positioned in the center of the application's main form. No adjustments are made for | + | | multi-monitor applications. This position should only be used with secondary forms. If set for a main form, it acts like ``poScreenCenter``. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poOwnerFormCenter`` | The form remains the size you left it at design time, but is positioned in the center of the form specified by the | + | | `Owner <System.Classes.TComponent.Owner.htm>`__ property. If the | + | | `Owner <System.Classes.TComponent.Owner.htm>`__ property does not specify a form, this position acts like ``poMainFormCenter``. | + +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + Note that if ``Position`` is set to ``poDefault``, ``poDefaultPosOnly`` or ``poDefaultSizeOnly``, and `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ is set to ``bsDialog`` or ``bsNone``, the form will be positioned at ``(0,0)``. + ''' + PrintScale: PrintScale + ''' + Represents the proportions of a printed form. + + Use ``PrintScale`` to get or set the proportions of the printed form. ``PrintScale`` can have one of the following **TPrintScale** values: + + ==================== ==================================================================================================================================================================================================================================== + **Value** **Meaning** + ==================== ==================================================================================================================================================================================================================================== + ``poNone`` No special scaling occurs; therefore, the printed form and how the form appears onscreen may appear squished or stretched. + ``poProportional`` The form is printed so that the printed image is approximately the same visible size as on the screen (WYSIWYG). The form image is scaled so that the printed image is approximately the same visible size as on the screen. + ``poPrintToFit`` The form is printed using the same screen proportions, but in a size that just fits the printed page. + ==================== ==================================================================================================================================================================================================================================== + ''' + Scaled: bool + ''' + Specifies whether the form is sized according to the value of the ``PixelsPerInch`` property. + + ``Scaled`` determines whether the form adjusts itself to differences between the font used at design time and the current system font used by a system at runtime. If ``Scaled`` is ``True``, the form resizes itself and all its child controls to maintain the relationship between the size of controls and the height of text displayed in the default font. If ``Scaled`` is ``False``, no such resizing occurs. + + By setting ``Scaled`` to true, the form can adjust to fonts that are not scalable (that is, fonts that only supply discrete point sizes) or to differences such as forms designed using small fonts at design time that are run on systems that use large fonts. + + The degree of resizing is determined by the ``PixelsPerInch`` property, which measures the proportion of the font on the system used when designing the form. + ''' + TileMode: TileMode + ''' + Represents how *MDI Child* forms are arranged when the `Tile <Vcl.Forms.TForm.Tile.htm>`__ method is called. + + ``TileMode`` can have one of the following ``TileMode`` values: + + ================= ====================================================================== + **Value** **Meaning** + ================= ====================================================================== + ``tbHorizontal`` Each form stretches across the width of the parent form + ``tbVertical`` Each form stretches along the height of the parent form + ================= ====================================================================== + + ``TileMode`` is meaningful only if the form is an *MDI Child* (that is, if the form's `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property is set to ``fsMDIChild``). + ''' + VertScrollBar: ControlScrollBar + ''' + Represents the vertical ``ScrollBar`` for the scrolling windowed control. + + Use `VertScrollBar <Vcl.Forms.TScrollingWinControl.VertScrollBar.htm>`__ to hide, show, or manipulate the vertical ``ScrollBar`` for the scrolling windowed control. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the form to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WindowMenu: MenuItem + ''' + Specifies the *Window* menu for an *MDI* parent form. + + Use ``WindowMenu`` to get or set the *Window* menu for an *MDI* parent form. The *Window* menu is a standard menu in *MDI Application*s. It contains commands that let the user manage the windows in the application. Menu items usually include `Cascade <Vcl.Forms.TForm.Cascade.htm>`__, Arrange Icons, `Tile <Vcl.Forms.TForm.Tile.htm>`__, and so on. + + The *Window* menu also lists (at the bottom) the child windows that are currently open in the application. When the user selects one of these windows from the menu, the window becomes the active window in the application. + + Although this menu is commonly called the *Window* menu, it can have any name that corresponds to an existing menu item on the menu bar. The names of open child forms are merged onto the menu automatically at run-time. + + ``WindowMenu`` is meaningful only if the form is an *MDI* parent (that is, if the form's `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property is set to ``fsMDIForm``). + ''' + ClientHandle: HWND + ''' + Provides access to the handle of the form's internal MDI client window. + + Use ``ClientHandle`` to get the handle for the form's internal MDI client window. + + ``ClientHandle`` is meaningful only if the form is an *MDI* parent (that is, if the form's ``FormStyle`` property is set to ``fsMDIForm``). + + .. note:: Use the Handle property instead to get the handle to the form window itself. + ''' + FormStyle: FormStyle + ''' + Determines the form's style. + + Use ``FormStyle`` to get or set the form's style. ``FormStyle`` is one of the following values: + + ================== ========================================================================================================================================================================================================================================================== + **Value** **Meaning** + ================== ========================================================================================================================================================================================================================================================== + ``fsNormal`` The form is neither an *MDI* parent window nor an *MDI Child* window. + ``fsMDIChild`` The form is an *MDI Child* window. + ``fsMDIForm`` The form is an *MDI* parent window. + ``fsStayOnTop`` This form remains on top of the desktop and of other forms in the project, except any others that also have ``FormStyle`` set to ``fsStayOnTop``. If one ``fsStayOnTop`` form launches another, neither form will consistently remain on top. + ================== ========================================================================================================================================================================================================================================================== + + If the form is the main form of an *MDI Application*, its ``FormStyle`` property must be set to ``fsMDIForm``. + + .. note:: It is not advisable to change ``FormStyle`` at runtime. + + .. warning:: GraphicControl descendants placed in the client area of a form with ``FormStyle`` set to ``fsMDIForm`` will not paint. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + OldCreateOrder: bool + ''' + Specifies when `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ and `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ events occur. + + When ``OldCreateOrder`` is ``False`` (the default) the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event occurs after all constructors are finished and the `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ event occurs before any destructors are called. + + This differs from earlier versions of the library (distributed with Delphi version 3 and previous and C++Builder 1), where the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event occurred when the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ constructor executed and the `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ event occurred when the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ destructor executed. Applications that require the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event and `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ events to occur from the constructor and destructor of the form can set ``OldCreateOrder`` to true. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + Active: bool + ''' + Specifies whether the form has focus. + + Use ``Active`` to determine whether the form has focus. The ``ActiveForm`` receives all keyboard input. If it has a title bar, it is drawn using the active colors specified in the ``Control`` panel. + + If ``Active`` is ``True`` , the form has focus; if ``Active`` is ``False``, the form does not have focus. + ''' + ActiveControl: WinControl + ''' + Specifies the control that has focus on the form. + + Use ``ActiveControl`` to get or set the control that has focus on the form. Only one control can have focus at a given time in an application. + + If the form does not have focus, ``ActiveControl`` is the control on the form that will receive focus when the form receives focus. + + .. note:: When focus shifts to another control, ``ActiveControl`` is updated before the OnExit event occurs. + ''' + ActiveOleControl: WinControl + ''' + Specifies the OLE control on the form that reacts to changes in focus. + + Use ``ActiveOleControl`` to get or set an OLE control on the form that reacts to changes in focus. + + If ``ActiveOleControl`` is not ``nil`` (Delphi) or ``NULL`` (C++), the user interface for the specified OLE control is deactivated when it is not focused. Also, when the form receives or loses focus, the document window for the specified OLE control is activated or deactivated respectively. + ''' + BorderStyle: FormBorderStyle + ''' + Specifies the appearance and behavior of the form border. + + Use ``BorderStyle`` to get or set the appearance and behavior of the form border. ``BorderStyle`` can be any of the following ``Form`` ``BorderStyle`` values: + + ===================== ====================================================== + **Value** **Meaning** + ===================== ====================================================== + ``bsDialog`` Not resizable; no minimize/maximize menu + ``bsSingle`` Not resizable; minimize/maximize menu + ``bsNone`` Not resizable; no visible border line + ``bsSizeable`` Standard resizable border + ``bsToolWindow`` like ``bsSingle`` but with a smaller caption + ``bsSizeToolWin`` like ``bsSizeable`` with a smaller caption + ===================== ====================================================== + + .. note:: Changing the border style of an *MDI Child* form to ``bsDialog`` or ``bsNone`` has no effect. + ''' + Canvas: Canvas + ''' + Provides access to the drawing area of the form. + + Use ``Canvas`` to draw on the client area of the form. ``Canvas`` is often used in the OnPaint event handler. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. + + To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&). + + **Notes:** + + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or label, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button caption, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an HTML tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Designer: IDesignerHook + ''' + Specifies the designer interface for the form. + + The ``Designer`` property is used internally at design time. Never assign a value to this property. This is done automatically by the *Form Designer*. Only use this property when designing classes for use in the *Form Designer*, such as property editors and component editors. + ''' + DropTarget: bool + ''' + Specifies whether the form is the target of a drag-and-drop operation. + + Use ``DropTarget`` to determine whether the form is currently the target of a drag-and-drop operation. + ''' + FormState: FormState + ''' + Indicates transitional state information about the form. + + Read ``FormState`` to determine the state of the form. ``FormState`` indicates when the form is in various transitional states or when certain Windows operations have occurred. The following table lists the values that can be included in a form's state: + + ===================================== ============================================================================================================================================================================================================== + **Value** **Meaning** + ===================================== ============================================================================================================================================================================================================== + `fsCreating <Vcl.Forms.htm>`__ The form's constructor is currently executing. + `fsVisible <Vcl.Forms.htm>`__ The form's window is visible. This state is used to update the ``Visible`` property. + `fsShowing <Vcl.Forms.htm>`__ The form's `WindowState <Vcl.Forms.TCustomForm.WindowState.htm>`__ property is changing. This state is used to prevent ``WindowState`` changes from interfering with a transition that is in progress. + `fsModal <Vcl.Forms.htm>`__ The form was created as a modal window. + `fsCreatedMDIChild <Vcl.Forms.htm>`__ The form is an *MDI* parent window. This state is only set once the MDI client window has been created. + `fsActivated <Vcl.Forms.htm>`__ The form has received a ``CM_ACTIVATE`` message (because it received focus or the application became active) but has not yet called the Activate method to generate an ``OnActivate`` event. + ===================================== ============================================================================================================================================================================================================== + ''' + GlassFrame: GlassFrame + ''' + Accesses the *Glass Frame* under *Windows Vista*, *Windows 7*, or later Windows operating systems. + + Use ``GlassFrame`` to make your forms *Windows Vista* or *Windows 7* Aero-compatible, displaying a glass effect. + + ``GlassFrame`` is a property of a `GlassFrame <Vcl.Forms.TGlassFrame.htm>`__ object created automatically for any form. + + .. note:: The property is only available for *Windows Vista* or *Windows 7* with Aero. Otherwise, the *Glass Frame* is ignored. + ''' + CustomTitleBar: TitleBar + ''' + No have docs. + ''' + HelpFile: str + ''' + Specifies the name of the Help file the form uses to display the Help from. + + If your form should have a Help file different from the default Help file of the application specified using the `Application.HelpFile <Vcl.Forms.TApplication.HelpFile.htm>`__ property of the global ``Application`` type object, then use the ``HelpFile`` property of the form to specify the name of the Help file the form will use to display the Help from. + + The *Help* system specified by `Application.HelpSystem <Vcl.Forms.TApplication.HelpSystem.htm>`__ displays *Help* topics from the Help file specified by the ``HelpFile`` property of the form when the form has the focus. + ''' + KeyPreview: bool + ''' + Specifies whether the form should receive keyboard events before the active control. + + If ``KeyPreview`` is ``True``, keyboard events occur on the form before they occur on the active control. (The active control is specified by the ``ActiveControl`` property.) + + If ``KeyPreview`` is ``False``, keyboard events occur only on the active control. + + Navigation keys (*Tab*, *BackTab*, the arrow keys, and so on) are unaffected by ``KeyPreview`` because they do not generate keyboard events. Similarly, when a button has focus or when its ``Default`` property is ``True``, the *Enter* key is unaffected by ``KeyPreview`` because it does not generate a keyboard events. + + ``KeyPreview`` is ``False`` by default. + ''' + Menu: MainMenu + ''' + Specifies the form's ``MainMenu``. + + Use ``Menu`` to get or set the form's ``MainMenu``. At design time, ``Menu`` is set to the first ``MainMenu`` component added to the form. + ''' + ModalResult: ModalResult + ''' + Represents the return value of a form that is used as a modal dialog. + + Use ``ModalResult`` to close the form when it is displayed modally. + + By default, ``ModalResult`` is ``mrNone``. Set ``ModalResult`` to any nonzero value to close the form. The value assigned to ``ModalResult`` becomes the return value of the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ function call used to display the form. + + .. note:: This property is modified automatically by some components such as the ``Button`` control. + + .. tip:: If you call the `Close <Vcl.Forms.TCustomForm.Close.htm>`__ method from a modal form, then ``ModalResult`` is automatically set to ``mrCancel``. + ''' + Monitor: Monitor + ''' + Provides access to the monitor on which the form appears. + + Use ``Monitor`` to access information about the monitor on which the form appears if the application runs on a multi-monitor system. The monitor is determined by the ``DefaultMonitor`` property. + ''' + OleFormObject: IOleForm + ''' + Specifies the IOleForm interface for an in-place OLE object contained in the form. + + ``OleFormObject`` is used to communicate resize and destroy notifications when a form is used as a frame for an in-place OLE object. + ''' + PopupMode: PopupMode + ''' + Controls how the top-level form behaves with respect to Window's ``WS_POPUP`` style. + + The ``PopupMode`` property controls how the top-level form behaves with respect to Window's ``WS_POPUP`` style. A window that has the ``WS_POPUP`` style is always above its "owner" in Z-order. You can use the ``PopupMode`` property in conjunction with the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__ property to avoid the appearance of a hung application caused by a modal dialog showing up behind another form on the screen. + + .. note:: Using the ``PopupMode`` property is similar to specifying ``fsStayOnTop`` for the `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property, but allows better control over the layering. + + The ``PopupMode`` property is automatically set to ``pmAuto`` when the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ method is called. However, this causes the window handle to be recreated, which is not usually desirable. To avoid the re-creation of window handles, you can explicitly set the ``PopupMode`` property to ``pmAuto`` prior to calling the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ method (such as at design time). + + Set the ``PopupMode`` property to ``pmExplicit`` for non-modal design windows such as tool palettes and other floating ``ToolWindow``\ s. This causes the windows to always remain on top of the main form. In the case of a snapped together design (in which the window is docked to the main form), the design window remains on top of the designer. + + .. note:: For undocked windows, the design window remains above the main form, allowing other top-level forms to obscure the design window. + + Set the ``PopupMode`` property to ``pmNone`` if you want the pop-up window to have the pre-Delphi 8 behavior (except for the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ item mentioned above). + + You can force the Z-Ordering of your forms and create a "stacked" appearance that the user cannot change by setting the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__ property to an explicit ``CustomForm``. If the ``PopupMode`` property is ``pmExplicit`` and `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__ is nil, then the ``Application.MainForm`` is implicitly used as the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__. If no ``Application.MainForm`` is assigned, then ``Application.Handle`` is used as the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__. If the ``PopupMode`` property is set to ``pmAuto``, ``Screen.ActiveForm`` is used as the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__. + ''' + ScreenSnap: bool + ''' + Specifies whether form snaps to edge of screen. + + ``ScreenSnap`` determines whether the edges of the form snap to the edge of the screen when the user moves the form. To control the snap distance, set the `SnapBuffer <Vcl.Forms.TCustomForm.SnapBuffer.htm>`__ property. + ''' + SnapBuffer: int + ''' + Specifies distance for screen snap. + + If `ScreenSnap <Vcl.Forms.TCustomForm.ScreenSnap.htm>`__ is ``True``, ``SnapBuffer`` determines the maximum number of pixels that be between the form edge and the screen edge before the form snaps to the screen edge. + ''' + WindowState: WindowState + ''' + Represents how the form appears on the screen. + + Set ``WindowState`` to minimize, maximize, or restore the form window. Read ``WindowState`` to determine whether the form is minimized, maximized, or in a normal state. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + PopupParent: CustomForm + ''' + Sets an order for stacked forms that users cannot change. + + If the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is set to ``pmExplicit`` and ``PopupParent`` is nil, then the ``Application``.MainForm is implicitly used as the ``PopupParent``. If no ``Application.MainForm`` is assigned, then ``Application.Handle`` is used as the ``PopupParent``. + + If the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is set to ``pmAuto``, ``Screen.ActiveForm`` is used as the ``PopupParent`` property. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + TaskbarHandler: TaskbarHandler + ''' + No have docs. + ''' + Left: int + ''' + Specifies the horizontal coordinate of the left edge of a component relative to its parent. + + Use the `Left <Vcl.Controls.TControl.Left.htm>`__ property to determine where the left side of the control begins or to reposition the left side of the control. + + If the control is contained in another control, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the parent control. If the control is contained directly by the form, the property values are relative to the form. For forms, the value of the `Left <Vcl.Controls.TControl.Left.htm>`__ property is relative to the screen in pixels. + ''' + Top: int + ''' + Specifies the ``'Y'`` coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. + + Use `Top <Vcl.Controls.TControl.Top.htm>`__ to locate the top of the control or reposition the control to a different Y coordinate. The `Top <Vcl.Controls.TControl.Top.htm>`__ property, like the `Left <Vcl.Controls.TControl.Left.htm>`__ property, is the position of the control relative to its container. Thus, if a control is contained in a `Panel <Vcl.ExtCtrls.TPanel.htm>`__, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the panel. If the control is contained directly by the form, it is relative to the form. For forms, the value of the `Top <Vcl.Controls.TControl.Top.htm>`__ property is relative to the screen in pixels. + ''' + + def Activate(self) -> None: + ''' + Activation event dispatcher. + + Activation is the event dispatcher for form activations. + + The form component calls ``Activate()`` in response to the ``CM_ACTIVATE`` message, sent when a form gets the focus either because of a change in active windows within an application or because of the application becoming active. As defined in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, Activate simply calls the `OnActivate <Vcl.Forms.TCustomForm.OnActivate.htm>`__ event handler. + ''' + def ActiveChanged(self) -> None: + ''' + Active state event dispatcher. + + ``ActiveChanged`` is the event dispatcher for changes in the form's active status. As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``ActiveChanged`` does nothing. Override this method in a descendant class to implement event handling or other response to a change in the active form. + ''' + def AdjustClientRect(self, Rect: Rect) -> None: + ''' + Adjusts the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property to exclude the ``ScrollBar``\ s. + + ``Vcl.Forms.TCustomForm.AdjustClientRect`` inherits from `Vcl.Forms.TScrollingWinControl.AdjustClientRect <Vcl.Forms.TScrollingWinControl.AdjustClientRect.htm>`__. All content below this line refers to `Vcl.Forms.TScrollingWinControl.AdjustClientRect <Vcl.Forms.TScrollingWinControl.AdjustClientRect.htm>`__. + + Adjusts the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property to exclude the ``ScrollBar``\ s. + + `AdjustClientRect <Vcl.Forms.TScrollingWinControl.AdjustClientRect.htm>`__ is called internally when the control needs accurate information on where to place child controls within the client area. It indents ``Rect`` to exclude the area taken by the ``ScrollBar``s, then calls the inherited `AdjustClientRect <Vcl.Forms.TScrollingWinControl.AdjustClientRect.htm>`__ method. + ''' + def AlignControls(self, AControl: Control, Rect: Rect) -> None: + ''' + Aligns all child controls of the form that fall within a specified rectangle. + + Use ``AlignControls()`` to align all controls within an area of the form. Specify the area in which to align the controls as the value of the ``Rect`` parameter. + + ``AlignControls()`` uses the ``Align`` property value for each child control to determine how to align it. The ``AControl`` parameter can be ``nil`` (Delphi) or ``NULL`` (C++). If you specify a control in ``AControl``, that control takes precedence in alignment over other, similarly aligned controls. + ''' + def BeginAutoDrag(self) -> None: + ''' + Responds when the user starts dragging the form if ``DragMode`` is ``dmAutomatic``. + + ``BeginAutoDrag()`` suppresses the default behavior of the ``BeginAutoDrag()`` method. This is because forms do not change the mouse cursor when dragged. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Repositions and resizes the form by the ratio M/D, adjusting its client area and font size as needed. + + `CustomForm <Vcl.Forms.TCustomForm.htm>`__ overrides ``ChangeScale()`` to rescale any ``ScrollBar``\ s and child controls. + ''' + def ClientWndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for a MDI form from the client. + + The ``ClientWndForm()`` method receives message for a MDI form from a client. ``ClientWndForm()`` is called when a form is created. ``ClientWndForm`` handles messages that deal with background erase, repaint, and determining which part of the window corresponds to a particular screen coordinate. + Override ``ClientWndForm`` to change how the form responds to Windows client messages. + ''' + def CloseModal(self) -> None: + ''' + ``CloseModal()`` prepares a modal form for closing. + + Do not call ``CloseModal()`` in your application. ``CloseModal()`` is used by the *VCL* when a modal form needs to be closed. ``CloseModal()`` does not close the form by itself; it simply calls the registered close events and updates the `ModalResult <Vcl.Forms.TCustomForm.ModalResult.htm>`__ property. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes the window-creation parameter record when the form window is created. + + The `CreateWnd <Vcl.Forms.TCustomForm.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to `CreateWindowHandle <Vcl.Forms.TCustomForm.CreateWindowHandle.htm>`__. `CustomForm <Vcl.Forms.TCustomForm.htm>`__ overrides ``CreateParams()`` to customize the way the form creates its Windows representation after calling the inherited method. You should never need to override this method in the context of a form class. + + The fields of the Params parameter become the parameters to a call to the CreateWindowEx OS function. + ''' + def CreateWindowHandle(self, Params: CreateParams) -> None: + ''' + Creates a form window given a set of window-creation parameters. + + The `CreateWnd <Vcl.Forms.TCustomForm.CreateWnd.htm>`__ method calls ``CreateWindowHandle()`` to create the form window once it has been specified in the window-creation parameters. ``CreateWindowHandle()`` creates the window by calling the CreateWindowEx API function, passing parameters from the record passed in the ``Params`` parameter. ``CreateWindowHandle()`` removes the ``CS_HREDRAW`` and ``CS_VREDRAW`` class styles from the window class. + + Params holds information needed when telling Windows to create a window handle. + ''' + def CreateWnd(self) -> None: + ''' + Creates the form window. + + ``CreateWnd()`` is called when the form is created, and whenever a change to the form requires the window to be recreated. ``CreateWnd()`` calls (indirectly) the `CreateParams <Vcl.Forms.TCustomForm.CreateParams.htm>`__ method to obtain the window creation parameters, and then calls `CreateWindowHandle <Vcl.Forms.TCustomForm.CreateWindowHandle.htm>`__ to direct Windows to create the underlying window for the form. It then initializes the newly-created window to reflect the property settings of the form. + ''' + def Deactivate(self) -> None: + ''' + Generates an `OnDeactivate <Vcl.Forms.TCustomForm.OnDeactivate.htm>`__ event. + + The form component calls ``Deactivate()`` in response to the ``CM_DEACTIVATE`` message, sent when a form gets the focus either because of a change in active windows within an application or because of the application becoming active. + + The default ``Deactivate()`` method calls any event handler attached by the user to the `OnDeactivate <Vcl.Forms.TCustomForm.OnDeactivate.htm>`__ event. Override this method to block the `OnDeactivate <Vcl.Forms.TCustomForm.OnDeactivate.htm>`__ event or provide additional responses to the loss of activation. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Designates methods for storing a form's unpublished data on a stream such as a form file. + + ``DefineProperties()`` calls the inherited method and calls the filer object's ``DefineProperty()`` method for the ``PixelsPerInch``, and ``TextHeight()`` properties. ``Form`` descendants can also specify methods that read and write data other than properties by overriding the ``DefineProperties()`` method. + ''' + def DestroyHandle(self) -> None: + ''' + Destroys the control's window without destroying the control. + + Call `DestroyHandle <Vcl.Controls.TWinControl.DestroyHandle.htm>`__ to dispose of the window, but leave the control intact. The control can later recreate the window if needed. `DestroyHandle <Vcl.Controls.TWinControl.DestroyHandle.htm>`__ is the converse operation to `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__. Applications should call the high-level `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__ and `DestroyHandle <Vcl.Controls.TWinControl.DestroyHandle.htm>`__ methods, rather than the lower-level methods of `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ and `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__, whenever possible. + + If the control has `WinControl <Vcl.Controls.TWinControl.htm>`__ objects as child controls, `DestroyHandle <Vcl.Controls.TWinControl.DestroyHandle.htm>`__ calls each of their `DestroyHandle <Vcl.Controls.TWinControl.DestroyHandle.htm>`__ methods before calling `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ to destroy its own handle. + ''' + def DestroyWindowHandle(self) -> None: + ''' + Destroys the window created in the `CreateWindowHandle <Vcl.Forms.TCustomForm.CreateWindowHandle.htm>`__ method. + + ``DestroyWindowHandle()`` is called automatically to destroy the window associated with a form before destroying the form. + ''' + def DoClose(self, Action: CloseAction) -> None: + ''' + ``Form`` closing event dispatcher. + + ``DoClose()`` is called automatically when the form is about to close. ``DoClose()`` can alter closing behavior by changing the ``Action`` parameter. For more information, refer to the ``OnClose`` event handler. + + As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``DoClose()`` simply calls the ``OnClose`` event handler. + ''' + def DoCreate(self) -> None: + ''' + ``Form`` creation event dispatcher. + + ``DoCreate()`` is called automatically after form construction is complete. The precise way ``DoCreate()`` is called can be modified by setting the ``OldCreateOrder`` property. + + As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``DoCreate`` simply calls the ``OnCreate`` event handler. + ''' + def DoDestroy(self) -> None: + ''' + ``Form`` destruction event dispatcher. + + ``DoDestroy()`` is called automatically when the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ object is about to be deallocated. The precise way ``DoDestroy()`` is called can be modified by setting the ``OldCreateOrder`` property. + + As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``DoDestroy()`` simply calls the ``OnDestroy`` event handler. + ''' + def DoHide(self) -> None: + ''' + ``Form`` hide event dispatcher. + + ``DoHide()`` is called automatically when the form is hidden. + + As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``DoHide()`` calls the ``OnHide`` event handler. + ''' + def DoShow(self) -> None: + ''' + ``Form`` show event dispatcher. + + ``DoShow()`` is called automatically when the application is about to show the form. As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``DoShow()`` simply calls the OnShow event handler. + ''' + def DoThumbButtonNotify(self, ItemID: int) -> None: + ''' + No have docs. + ''' + def DoWindowPreviewRequest(self) -> None: + ''' + No have docs. + ''' + def DoThumbPreviewRequest(self, APreviewHeight: int, APreviewWidth: int) -> None: + ''' + No have docs. + ''' + def GetBorderIconStyles(self, Style: int, ExStyle: int) -> None: + ''' + No have docs. + ''' + def GetBorderStyles(self, Style: int, ExStyle: int, ClassStyle: int) -> None: + ''' + No have docs. + ''' + def GetClientRect(self) -> Rect: + ''' + Returns the value of the ``ClientRect`` property. + + ``GetClientRect()`` is the protected access function for the ``ClientRect`` property. It returns the dimensions of the form window, indented by any ``ScrollBar``\ s and menus. + + Override this method to change the way the client area of the form is defined. + ''' + def GetFloating(self) -> bool: + ''' + Returns the value of the `Floating <Vcl.Controls.TControl.Floating.htm>`__ property. + + ``GetFloating()`` is the protected access function for the `Floating <Vcl.Controls.TControl.Floating.htm>`__ property. Override this method in descendants that implement floating windows in some class-specific way. + ''' + def GetInternalTextHeight(self) -> int: + ''' + Returns the ``FTextHeight`` integer value of `CustomForm <Vcl.Forms.TCustomForm.htm>`__. + ''' + def GetOwnerWindow(self) -> HWND: + ''' + No have docs. + ''' + def HandleCreateException(self) -> bool: + ''' + Handles exceptions that are raised by the ``OnCreate`` event handler. + + The form calls ``HandleCreateException()`` internally if the ``OnCreate`` event handler raises an exception. ``HandleCreateException()`` forwards the exception on to the ``Application`` object, which generates an ``OnException`` event. If there is no ``OnException`` event handler, the application displays an exception message box. + + ``HandleCreateException()`` returns ``True`` if it handles the exception, false otherwise. + ''' + def InitializeNewForm(self) -> None: + ''' + No have docs. + ''' + def Loaded(self) -> None: + ''' + Performs fix-ups when the form is first loaded into memory. + + ``Loaded()`` overrides the inherited method to give focus to the ActiveControl if it is assigned. Before assigning focus, ``Loaded()`` calls the inherited method to perform any lower-level initialization. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications that objects are about to be inserted or removed. + + ``Notification()`` is called when the component specified by ``AComponent`` is about to be inserted or removed, as specified by Operation. By default, forms pass along the notification to their owned components, if any. In addition, ``Notification()`` makes internal adjustments if the ``MainMenu`` is added or deleted. + + A form can, if needed, override ``Notification()`` to make other adjustments when components are inserted or removed. In particular, if a form has object fields or properties that contains references to other components, it might check the notifications of component removals and invalidate those references as needed. + ''' + def Paint(self) -> None: + ''' + Generates an `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ event. + + The form component calls ``Paint()`` in response to the ``WM_PAINT`` message (sent when the window needs to be painted) before rendering all controls on the form. + + The default ``Paint()`` method calls any event handler attached by the user to the `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ event. Override ``Paint()`` to block the `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ event or to draw additional features before or after the `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ event. + ''' + def PaintWindow(self, DC: HDC) -> None: + ''' + Renders the image of the form. + + Applications can't call this protected method. It is called when the form needs to be painted. + + ``PaintWindow()`` locks the canvas to prevent threading issues, assigns the ``DC`` parameter as the Handle of the form's canvas, and then calls the `Paint <Vcl.Forms.TCustomForm.Paint.htm>`__ method to render the image of the form. + ''' + def PaletteChanged(self, Foreground: bool) -> bool: + ''' + Responds to changes in the system's palette by realizing the control's palette as returned from GetPalette. + + ``PaletteChanged()`` is called automatically when the system palette changes. The ``Foreground`` parameter indicates whether the palette realization should treat this control's palette as being in the foreground or the background. The return value from ``PaletteChanged()`` indicates whether the form actually realized its palette, returning true only if the form has an associated palette. + + Most applications should not need to alter the default behavior of ``PaletteChanged()``. + ''' + def GetDesignDpi(self) -> int: + ''' + Obtains the design *DPI* for the form where the control was designed. + ''' + def ScaleForCurrentDpi(self) -> None: + ''' + Checks if there is a change in *DPI* and performs the necessary changes to scale all the controls for the new *DPI*. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Reads the form's published properties, stored data, and owned components from a reader object. + + ``ReadState()`` is part of a sequence of calls used by the *VCL Streaming* system that loads and saves *VCL Components*. It reads the values of all the component's published properties, stored data, and owned components from the reader object passed in ``Reader``. Do not call ``ReadState()`` directly. + + Any descendant classes overriding ``ReadState()`` should end with a call to the inherited ``ReadState()`` method. + ''' + def RequestAlign(self) -> None: + ''' + Instructs the form's parent (if any) to reposition the form, enforcing its `Align`` property. + + ``RequestAlign()`` is called internally when changes are made to the size or position of the form, so that it remains properly aligned within a dock site or properly positioned on the screen. + ''' + def SetChildOrder(self, Child: Component, Order: int) -> None: + ''' + Changes the order in which Child appears when GetChildren is called. + + Use ``SetChildOrder()`` to change the order in which child components are loaded and saved. The ``Child`` moves as if it were an item in a list object: items previously below the child's old position move up, and those below the new position move down. + ''' + def SetParentBiDiMode(self, Value: bool) -> None: + ''' + Sets the `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ property. + + ``SetParentBiDiMode()`` is the protected implementation of the `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ property. It overrides the inherited method to obtain the `BiDiMode <Vcl.Forms.TApplication.BiDiMode.htm>`__ property of the application if the form does not have a parent. + ''' + def DoDock(self, NewDockSite: WinControl, ARect: Rect) -> None: + ''' + Docking event dispatcher. + + ``DoDock()`` supplements the inherited ``DoDock()`` method by updating form borders. + ''' + def SetParent(self, AParent: WinControl) -> None: + ''' + Sets the ``Parent`` property. + + ``SetParent()`` is the protected implementation of the ``Parent`` property. It overrides the inherited method to regenerate the form's window when the ``Parent`` property is changed to ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def UpdateActions(self) -> None: + ''' + Updates all actions associated with the form. + + ``UpdateActions()`` is called automatically when the application is idle to allow all components in the form an opportunity to update any actions for which the component is a target. This allows actions to be checked, grayed, and so on to reflect the current state of their targets. + + ``UpdateActions()`` updates all actions associated with the form, its menus, and the components contained in the form. + ''' + def UpdateWindowState(self) -> None: + ''' + Updates the `WindowState <Vcl.Forms.TCustomForm.WindowState.htm>`__ property to reflect the current state of the form. + + ``UpdateWindowState()`` ensures that the `WindowState <Vcl.Forms.TCustomForm.WindowState.htm>`__ property reflects the current state of the form. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def ValidateRename(self, AComponent: Component, CurName: str, NewName: str) -> None: + ''' + Determines if a form can rename one of its owned components. + + The ``ValidateRename()`` method checks to see if a form can rename one of its owned components, passed in ``AComponent``, from its current name (``CurName``) to the string passed in ``NewName``. If ``AComponent`` is ``nil`` (Delphi) or ``NULL`` (C++) or ``NewName`` is already the name of a component in the ``Form``\ s. list, ``ValidateRename()`` raises an ``EComponentError`` exception. + ''' + def VisibleChanging(self) -> None: + ''' + Responds just before the form changes the value of its ``Visible`` property. + + This protected method raises an exception if, for some reason, the form should not change its visible state. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the form. + + ``WndProc()`` is the first method that receives messages for a form. After calling the inherited method, ``WndProc()`` performs some window activation, focus, and position message handling necessary to keep in sync with Windows. Override ``WndProc()`` to change how the form responds to *Windows Messages*. + ''' + def Resizing(self, State: WindowState) -> None: + ''' + Makes any required adjustments when the form changes size. + + This protected method is called automatically when the form is resized, including when it is maximized, minimized, or restored to normal size. ``Resizing()`` adjusts the size and position of any child controls that are aligned to the form. + + The ``State`` parameter indicates the state of the form after the resize. + ''' + def get_ActiveMDIChild(self) -> Form: + ''' + No have docs. + ''' + def get_MDIChildCount(self) -> int: + ''' + No have docs. + ''' + def get_MDIChildren(self, I: int) -> Form: + ''' + No have docs. + ''' + def QueryInterface(self, IID: GUID, Obj) -> HResult: + ''' + Returns a reference to a specified interface if that interface is supported by the form. + + For forms that support interfaces, ``QueryInterface()`` calls the ``QueryInterface()`` method of the interface supported by the form. ``QueryInterface()`` returns a reference to the interface specified by the ``IID`` parameter, as the ``Obj`` parameter. If the form does not support the interface, the ``Obj`` parameter is ``nil`` (Delphi) or ``NULL`` (C++). + + ``QueryInterface()`` returns ``S_OK`` if the ``Obj`` parameter is successfully assigned. + ''' + def DoBeforeMonitorDpiChanged(self, OldDPI: int, NewDPI: int) -> None: + ''' + No have docs. + ''' + def DoAfterMonitorDpiChanged(self, OldDPI: int, NewDPI: int) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a new ``Form`` object. + + Use ``Create()`` to instantiate a ``Form`` object or descendant of ``Form`` at runtime. ``AOwner`` is the owner of the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ object. + + For descendants of `CustomForm <Vcl.Forms.TCustomForm.htm>`__ that are not ``Form`` objects, use `CreateNew <Vcl.Forms.TCustomForm.CreateNew.htm>`__ instead. Calling ``Create()`` for a `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendant that is not a ``Form`` will raise an exception. + ''' + def CreateNew(self, AOwner: Component, Dummy: int) -> None: + ''' + Creates and initializes a new form. + + Use ``CreateNew()`` instead of ``Create()`` to create a form without using the associated ``.dfm`` file to initialize it. Always use ``CreateNew()`` if the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendant is not a ``Form`` object or a descendant of ``Form``. + + ``CreateNew()`` bypasses the streaming in of the previously-associated ``.dfm`` file. If the form contains visual components, therefore, you must stream in an external ``.dfm`` to bind the visual components with their classes. If the newly created form has an external ``.dfm`` file, then you can follow the call to ``CreateNew()`` with a call to ``InitInheritedComponent()``. If you need to create the ``.dfm`` file for the new form instance, bracket the call to ``CreateNew()`` with calls to ``WriteComponentResFile()`` and ``ReadComponentResFile``. The following code sequence + + #. streams out an external ``.dfm`` file; + #. creates a new form disassociated from any ``.dfm`` resource file; + #. streams in the external ``.dfm`` file and binds it to this new form. + + .. code-block:: python + + WriteComponentResFile('Temp.dfm', Form1); + ... + + Form2 := TForm.CreateNew(Application); + + ReadComponentResFile('Temp.dfm', Form2); + + .. warning:: Using ``CreateNew()`` instead of ``Create()`` can cause unpredictable results because most forms are written assuming their controls will be created from the ``.dfm`` file. + + The ``CreateNew()`` method calls `Create <Vcl.Forms.TCustomForm.Create.htm>`__ and `InitializeNewForm <Vcl.Forms.TCustomForm.InitializeNewForm.htm>`__. + + The first argument, ``AOwner``, is the owner of the form (usually the application or another form is the owner). The second argument, ``Dummy``, defaults to 0 and is not used by this constructor. The system passes 0 by default if this constructor is passed only the first argument, ``AOwner``. + ''' + def Destroy(self) -> None: + ''' + Removes the form from memory. + + Do not call ``Destroy()``. Instead, call ``Release()``, which indirectly produces a call to the Free method, which in turn calls ``Destroy()``. + ''' + def ScaleForPPI(self, NewPPI: int) -> None: + ''' + No have docs. + ''' + def Close(self) -> None: + ''' + No have docs. + ''' + def CloseQuery(self) -> bool: + ''' + Close attempt event dispatcher. + + ``CloseQuery()`` is called automatically when an attempt is made to close the form. ``CloseQuery()`` can allow the form to close by returning true, or prevent the form from closing by returning false. + + As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``CloseQuery()`` polls any *MDI Children* by calling their ``CloseQuery()`` methods. If no child form aborts the close, ``CloseQuery()`` then calls the `OnCloseQuery <Vcl.Forms.TCustomForm.OnCloseQuery.htm>`__ event handler, if it exists, to determine if the close should be allowed. If no such event handler exists, ``CloseQuery()`` returns ``True``. + ''' + def DefaultHandler(self, Message) -> None: + ''' + Provides message handling for all messages that the form does not fully process. + + Override ``DefaultHandler()`` to change the default message handling for the form. This is seldom necessary because messages can be handled by creating message methods. + + ``DefaultHandler()`` passes any otherwise-unhandled messages to the form's window procedure by calling the ``CallWindowProc`` OS function. + + .. note:: In Delphi code, calling inherited in a message-handling method results in a call to the ancestor's ``DefaultHandler()`` method unless that ancestor specifies a handler for the message. + ''' + def DefocusControl(self, Control: WinControl, Removing: bool) -> None: + ''' + Removes focus from a control on the form. + + Use ``DefocusControl()`` to remove focus from a control on the form. This method is used internally by the VCL. + + ``Control`` is the control from which to remove focus. If ``Control`` is the form's active control, ``DefocusControl()`` sets the form's ``ActiveControl`` property to ``nil`` (Delphi) or ``NULL`` (C++). + + Removing specifies whether to set focus to the control's parent. + ''' + def Dock(self, NewDockSite: WinControl, ARect: Rect) -> None: + ''' + Handles automatic docking of the form into other windows. + + Do not call ``Dock()`` in application code. It is called automatically when the form is released on a docking site that will accept it. To dock a form programmatically, use the `ManualDock <Vcl.Controls.TControl.ManualDock.htm>`__ method instead. + ''' + def FocusControl(self, Control: WinControl) -> None: + ''' + Sets focus to a control on the form. + + Use ``FocusControl()`` to set focus to a control on the form. + + ``Control`` is a ``WinControl`` object encapsulating the control on which to set focus. ``FocusControl()`` sets the ``ActiveControl`` property. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Returns the "child" components of the form; that is, those components that return the form from their GetParentComponent method. + + The component streaming system calls ``GetChildren()`` to request that the form execute a callback for every child component in the form. The callback must execute in creation order (the order the child components appear in the form file). A child component is defined as any component that returns this form from its GetParentComponent method. + + Proc is the callback to execute for every child component. + + Root specifies the top-level component (such as a form or data module) that is currently being loaded or saved. + + In `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``GetChildren()`` first calls the inherited method, which executes Proc for every control that lists the form as its Parent. Then, if the Root parameter identifies this form, ``GetChildren()`` executes Proc for every child component that does not have a Parent. + ''' + def GetFormImage(self) -> Bitmap: + ''' + Returns a bitmap of the form. + + Use the ``GetFormImage()`` method to obtain a bitmap of the form. + ''' + def Hide(self) -> None: + ''' + ``Hides`` the form. + + ``Hide()`` sets the ``Visible`` property to false. + ''' + def IsShortCut(self, Message: WMKey) -> bool: + ''' + Indicates whether ``ScrollBar``\ s appear automatically on the scrolling windowed control if it is not large enough to display all of its controls. + + If `AutoScroll <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is ``True``, the ``ScrollBar``\ s appear automatically when necessary. For example, if the user resizes the control so that some of its controls are partially obscured, ``ScrollBar``\ s appear. + + If `AutoScroll <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is ``False``, ``ScrollBar``\ s don't appear automatically. In this case, use the `HorzScrollBar <Vcl.Forms.TScrollingWinControl.HorzScrollBar.htm>`__ and `VertScrollBar <Vcl.Forms.TScrollingWinControl.VertScrollBar.htm>`__ properties to make ``ScrollBar``\ s appear. + ''' + def MakeFullyVisible(self, AMonitor: Monitor ) -> None: + ''' + Ensures that the form is fully visible on a specified monitor. + + Call ``MakeFullyVisible()`` to ensure that the form does not appear split over more than one monitor in a multi-monitor application. + + ``AMonitor`` is the monitor on which the form should appear. If ``AMonitor`` is ``nil`` (Delphi) or ``NULL`` (C++), ``MakeFullyVisible()`` uses the `Monitor <Vcl.Forms.TCustomForm.Monitor.htm>`__ property. + + ``MakeFullyVisible()`` checks whether the form fits entirely on the specified monitor. If not, it repositions the form so that it fits, if possible. + ''' + def MouseWheelHandler(self, Message: Message) -> None: + ''' + Directs mouse wheel messages to the appropriate control. + + ``MouseWheelHandler()`` is called automatically when the form or any windowed control contained in the form receives a message from a mouse wheel. The ``Message`` parameter encapsulates the message. + + As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``MouseWheelHandler()`` performs no special processing, but simply redirects the message to the active control by calling its ``Perform()`` method. By default, the ``Perform()`` method generates the appropriate mouse wheel events. + ''' + def Print(self) -> None: + ''' + ``Prints`` the form. + + Call ``Print()`` to print the form. ``Print()`` uses the `GetFormImage <Vcl.Forms.TCustomForm.GetFormImage.htm>`__ method to obtain a bitmap of the form and draws that to the printer's ``HDC``. + ''' + def RecreateAsPopup(self, AWindowHandle: HWND) -> None: + ''' + No have docs. + ''' + def Release(self) -> None: + ''' + Destroys the form and frees its associated memory. + + Use ``Release()`` to destroy the form and free its associated memory. + + ``Release()`` does not destroy the form until all event handlers of the form and event handlers of components on the form have finished executing. ``Release()`` also guarantees that all messages in the form's event queue are processed before the form is released. Any event handlers for the form or its children should use ``Release()`` instead of Free (Delphi) or delete (C++). Failing to do so can cause a memory access error. + + .. note:: ``Release()`` returns immediately to the caller. It does not wait for the form to be freed before returning. + ''' + def SendCancelMode(self, Sender: Control) -> None: + ''' + Cancels modes on the form. + + Use ``SendCancelMode()`` to release the mouse capture and cancel ``ScrollBar`` input and menu processing on the form. + ''' + def SetFocus(self) -> None: + ''' + Sets focus to the form. + + Use ``SetFocus()`` to give the form input focus. ``SetFocus()`` calls the ``SetFocus()`` method of the active control, if one exists. To determine whether the form has focus, use the Active property. + ''' + def SetFocusedControl(self, Control: WinControl) -> bool: + ''' + Sets focus to a control on the form. + + Use ``SetFocusedControl()`` to give a control on the form input focus. ``SetFocusedControl()`` returns ``False`` if the ``Control`` specified by the ``Control`` parameter was already in the process of receiving focus, true otherwise. + + .. note:: A return value of true does not indicate the control has successfully received input focus. If the ``Control`` can't have focus (for example, if it is not visible), ``SetFocusedControl()`` will still return true, indicating that an attempt was made. + ''' + def Show(self) -> None: + ''' + ``Shows`` the form. + + Use ``Show()`` to set the form's ``Visible`` property to true and to bring the form to the front of other forms on the screen. + ''' + def ShowModal(self) -> int: + ''' + Shows a form as a modal dialog. + + Use ``ShowModal()`` to show a form as a modal form. A modal form is one where the application can't continue to run until the form is closed. Thus, ``ShowModal()`` does not return until the form closes. When the form closes, it returns the value of the ``ModalResult`` property. + + To close a modal form, set its ``ModalResult`` property to a nonzero value. + + .. note:: If the form contains buttons with a ``ModalResult`` property set to a value other than ``mrNone``, the form automatically closes when the user clicks one of those buttons and returns the ``ModalResult`` value as the return value of ``ShowModal()``. + + You can check the return value against common return values using the global ``IsAbortResult``, ``IsAnAllResult``, ``IsNegativeResult``, or ``IsPositiveResult()`` functions. + ''' + def WantChildKey(self, Child: Control, Message: Message) -> bool: + ''' + Indicates whether the form processes keyboard input for a control it owns. + + ``WantChildKey()`` is called by any control that the form owns when the control receives keyboard input. If ``WantChildKey()`` returns ``True``, the control performs no further processing in response to the keyboard input, instead deferring to its parent form to respond to the keystroke. In its default implementation, ``WantChildKey()`` always returns ``False``; it is overridden in ``ActiveForm`` to implement certain *ActiveX* functionality. + ''' + def set_PopupParent(self, Value: CustomForm) -> None: + ''' + No have docs. + ''' + def GetRootDesigner(self) -> IDesignerNotify: + ''' + No have docs. + ''' + def get_PopupParent(self) -> CustomForm: + ''' + No have docs. + ''' + def AfterConstruction(self) -> None: + ''' + Construction event dispatcher. + + ``AfterConstruction()`` is the dispatcher for the event that occurs immediately after the form object's construction. As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``AfterConstruction()`` calls the ``OnCreate`` event handler, provided the ``OldCreateOrder`` property is ``False``. + ''' + def BeforeDestruction(self) -> None: + ''' + Destruction event dispatcher. + + ``BeforeDestruction()`` is the dispatcher for the event that occurs immediately before the form object's destruction. As implemented in `CustomForm <Vcl.Forms.TCustomForm.htm>`__, ``BeforeDestruction()`` calls the ``OnDestroy`` event handler, provided the ``OldCreateOrder`` property is ``False``. + ''' + + def OnActivate(self, Sender: Object) -> None: + ''' + Occurs when the form becomes active. + + Use ``OnActivate`` to perform special processing when the form receives focus. A form becomes active when focus is transferred to it (when the user clicks on the form, for example). + + .. note:: The ``OnActivate`` event of the application (``TApplication``), not the form, occurs when Windows switches control from another application. + ''' + def OnAfterMonitorDpiChanged(self, Sender: Object, OldDPI: int, NewDPI: int) -> None: + ''' + No have docs. + ''' + def OnBeforeMonitorDpiChanged(self, Sender: Object, OldDPI: int, NewDPI: int) -> None: + ''' + No have docs. + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new width and height of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a button or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a button or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses Alt+B. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The Click method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the form. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnClose(self, Sender: Object, Action: CloseAction) -> None: + ''' + Occurs when the form closes. + + Use ``OnClose`` to perform special processing when the form closes. The ``OnClose`` event specifies which event handler to call when a form is about to close. The handler specified by ``OnClose`` might, for example, test to make sure all fields in a data-entry form have valid contents before allowing the form to close. + + A form is closed by the ``Close()`` method or when the user chooses ``Close()`` from the form's system menu. + + The `CloseEvent <Vcl.Forms.TCloseEvent.htm>`__ type points to a method that handles the closing of a form. The value of the ``Action`` parameter determines if the form actually closes. These are the possible values of Action: + + =============== ========================================================================================================== + **Value** **Meaning** + =============== ========================================================================================================== + ``caNone`` The form is not allowed to close, so nothing happens. + ``caHide`` The form is not closed, but just hidden. Your application can still access a hidden form. + ``caFree`` The form is closed and all allocated memory for the form is freed. + ``caMinimize`` The form is minimized, rather than closed. This is the default action for *MDI Child* forms. + =============== ========================================================================================================== + + If a form is an *MDI Child* form, and its ``BorderIcons`` property is ``biMinimize``, then the default ``Action`` is ``caMinimize``. If a *MDI Child* form does not have these settings, the default ``Action`` is ``caNone``, meaning that nothing happens when the user attempts to close the form. + + If a form is an *SDI* child form, ``Action`` defaults to ``caHide``. + + To close the form and free it in an ``OnClose`` event, set ``Action`` to ``caFree``. + + .. note:: When the application shuts down, the main form receives an ``OnClose`` event, but any child forms do not receive the ``OnClose`` event. + ''' + def OnCloseQuery(self, Sender: Object, CanClose: bool) -> None: + ''' + Occurs when close is attempted. + + Use ``OnCloseQuery`` to specify the conditions under which the form can close. An ``OnCloseQuery`` event handler returns a ``Boolean`` ``CanClose`` value that determines whether a form is allowed to close. Its default value is ``True``. + + You can use an ``OnCloseQuery`` event handler to ask users if they are sure they really want the form closed immediately. For example, you can use the handler to display a message box that prompts the user to save a file before closing the form. + + The `CloseQueryEvent <Vcl.Forms.TCloseQueryEvent.htm>`__ type points to the method that determines whether a form can be closed. The value of the ``CanClose`` parameter determines if the form can close or not. + ''' + def OnCreate(self, Sender: Object) -> None: + ''' + Occurs when the form is created. + + Use ``OnCreate`` to perform special processing when the form is created and is invoked by `CustomForm <Vcl.Forms.TCustomForm.htm>`__'s constructor. Either implement this event or override the constructor of the form; do not do both. Any objects created in the ``OnCreate`` event should be freed by the ``OnDestroy`` event. + + When a form is being created and its ``Visible`` property is ``True``, the following events occur in the order listed: + + #. ``OnCreate`` + #. ``OnShow`` + #. ``OnActivate`` + #. ``OnPaint`` + + .. note:: Use of the ``OnCreate`` event is discouraged in C++ code because it can interact badly with the form's constructor (see ``OldCreateOrder``). It is recommended that you override the form constructor instead. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDeactivate(self, Sender: Object) -> None: + ''' + Occurs when the form loses focus. + + Use ``OnDeactivate`` to perform special processing when the active form becomes inactive and another form in the same application becomes the active one. If activation goes to another application, this event is not triggered. To determine whether another application has become active, use the `Application <Vcl.Forms.TApplication.htm>`__ object's ``OnDeactivate`` event. + + .. note:: ``OnDeactivate()`` is called differently than described, when the form's parent is set to another component (for example, a panel). + ''' + def OnDestroy(self, Sender: Object) -> None: + ''' + Occurs when the form is destroyed. + + Use ``OnDestroy`` to perform special processing when the form is destroyed. Either implement this event or override the destructor of the class, but not both. This event should destroy any objects created in the ``OnCreate`` event. + ''' + def OnDragDrop(self, Sender, Source: Object, X: int, Y: int) -> None: + ''' + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. + + To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnHelp(self, Command: int, Data: int, CallHelp: bool) -> bool: + ''' + Occurs when the form receives a request for Help. + + Write an ``OnHelp`` event handler to perform special processing when the user requests Help. The `HelpContext <Vcl.Forms.TApplication.HelpContext.htm>`__ and `HelpJump <Vcl.Forms.TApplication.HelpJump.htm>`__ methods automatically trigger the ``OnHelp`` event. + + The `HelpEvent <Vcl.Forms.THelpEvent.htm>`__ type has the following parameters: ``CallHelp``, ``Command``, and ``Data``. + + Set ``CallHelp`` to ``true`` if the application should still invoke the *Help* system after the event. Set ``CallHelp`` to ``false`` to prevent the default response given by the *Help* system. All application ``Help()`` methods go through ``OnHelp``. The application calls the *Help* system only if ``OnHelp``\ s. ``CallHelp`` parameter is ``true`` or if no ``OnHelp`` event handler is assigned. + + The event handler returns ``True`` if it succeeds, ``False`` if it fails. + + The possible values for the ``Data`` parameter depend upon the value of the ``Command`` parameter. To find the possible values of the ``Command`` and ``Data`` parameters, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + + In order for the ``OnHelp`` event handler to work properly, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the ``HTMLHelp`` Windows native *Help* handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + ''' + def OnHide(self, Sender: Object) -> None: + ''' + Occurs when the form is hidden (that is, when its ``Visible`` property is set to false). + + Use ``OnHide`` to perform special processing when the form is hidden (that is, when the form's ``Visible`` property is set to false). + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets Windows ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the + + ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the Key to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like #13 for carriage return, #3 for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets Windows ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the + + ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the Key to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like #13 for carriage return, #3 for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a button down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the form: + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. Shift keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnPaint(self, Sender: Object) -> None: + ''' + Occurs when the form is redrawn. + + Use ``OnPaint`` to perform special processing when the form is redrawn. Any special painting on the form should be done in this event. ``OnPaint`` occurs before any controls on the form are painted. + + To determine which portions of the form's canvas need to be repainted, use the ``ClipRect`` property of the canvas. + + If you use the form's ``Canvas`` property outside the ``OnPaint`` event, it will be erased and drawn-over by the next ``OnPaint`` event. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. + + To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnShortCut(self, Msg: WMKey, Handled: bool) -> None: + ''' + Occurs when the user presses a key (before the ``OnKeyDown`` event). + + Use ``OnShortCut`` to dispatch shortcut keystrokes before the form handles them. When the user presses a key, the form can dispatch it as a shortcut key instead of allowing the standard keystroke processing (OnKeyDown, OnKeyPress, and OnKeyUp). Built-in shortcut processing is provided for menu shortcuts and actions associated with the form. ``OnShortCut`` allows the form to implement additional shortcuts. + + If the ``OnShortCut`` implements a response to the keystroke, set the ``Handled`` parameter of the event handler to true. This prevents the keystroke from being passed on to menus or actions associated with the form. It also prevents the standard keystroke processing in the same way that a menu or action shortcut does. + ''' + def OnShow(self, Sender: Object) -> None: + ''' + Occurs when the form is shown (that is, when its ``Visible`` property is set to true). + + Use ``OnShow`` to perform special processing when the form is shown (that is, when the form's ``Visible`` property is set to true). + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomGrid(CustomControl): + ''' + ===================== + Vcl.Grids.TCustomGrid + ===================== + + ``CustomGrid`` is the base type for all components that present information in a two-dimensional grid. + + Use ``CustomGrid`` as a base class when defining components that represent information in a tabular format. ``CustomGrid`` introduces properties and methods to control the appearance and behavior of the grid, including responses to mouse actions and user editing. + + Do not create instances of ``CustomGrid``. Instead, put a grid control in a form by instantiating a descendant of ``CustomGrid``. Use TDrawGrid to represent non-textual material in a tabular grid. For text, use a ``StringGrid`` object. If the text represents field values from a dataset, use ``DBGrid``. + + { TCustomDrawGrid } + { A grid relies on the OnDrawCell event to display the cells. + CellRect + This method returns control relative screen coordinates of the cell or + an empty rectangle if the cell is not visible. + EditorMode + Setting to true shows the editor, as if the F2 key was pressed, when + goEditing is turned on and goAlwaysShowEditor is turned off. + MouseToCell + Takes control relative screen X, Y location and fills in the column and + row that contain that point. + OnColumnMoved + Called when the user request to move a column with the mouse when + the goColMoving option is on. + OnDrawCell + This event is passed the same information as the DrawCell method + discussed above. + OnGetEditMask + Called to retrieve edit mask in the inplace editor when goEditing is + turned on. + OnGetEditText + Called to retrieve text to edit when goEditing is turned on. + OnRowMoved + Called when the user request to move a row with the mouse when + the goRowMoving option is on. + OnSetEditText + Called when goEditing is turned on to reflect changes to the text + made by the editor. + OnTopLeftChanged + Invoked when TopRow or LeftCol change. } + ''' + + __hash__: ClassVar[None] = ... + FGridState: GridState + ''' + Specifies state information about how the grid layout changes. + + ``FGridState`` specifies state information about how the grid layout changes. + + The following table lists the possible values for the ``FGridState`` field. + + ================== ================================================ + **Value** **Meaning** + ================== ================================================ + ``gsNormal`` The grid layout is not changing. + ``gsSelecting`` The user is selecting a cell or row. + ``gsRowSizing`` The user is changing the height of a row. + ``gsColSizing`` The user is changing the width of a column. + ``gsRowMoving`` The user is dragging a row to a new position. + ``gsColMoving`` The user is dragging a column to a new position. + ================== ================================================ + + ``FGridState`` is used internally by the grid controls. Applications should not depend on the value of ``FGridState``. + ''' + FSaveCellExtents: bool + ''' + Internal field. + + ``FSaveCellExtents`` is used internally by the grid controls. + ''' + DesignOptionsBoost: GridOptions + ''' + No have docs. + ''' + VirtualView: bool + ''' + Controls the use of maximum screen clipping optimizations when the grid window changes size. + + ``VirtualView`` controls the use of maximum screen clipping optimizations when the grid window changes size. The default value of the ``VirtualView`` field is ``False``, which means only the area exposed by the size change will be redrawn, for less flicker. If ``VirtualView`` is ``True``, the entire data area of the grid is redrawn when the size changes. This is required when the data displayed in the grid is not bound to the number of rows or columns in the grid, such as the DBGrid (a few grid rows displaying a view onto a million row table). + + ``VirtualView`` is used internally by the grid controls. ``Application``\ s should not depend on the value of ``VirtualView``. + ''' + FInternalColor: Color + ''' + Specifies the color used to draw cells. + + ``FInternalColor`` specifies the currently selected color used to draw cells. ``FInternalColor`` is only useful in descending classes. + + ``FInternalColor`` is used internally by the grid controls. Applications should not depend on the value of ``FInternalColor``. + ''' + FInternalDrawingStyle: GridDrawingStyle + ''' + Specifies the style in which the grid is drawn. + + ``FInternalDrawingStyle`` specifies the style in which the grid is drawn. Do not change the value of ``FInternalDrawingStyle``, rather, use the `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ property. + + ``FInternalDrawingStyle`` is used internally by the grid controls. Applications should not depend on the value of ``FInternalDrawingStyle``. + ''' + FHotTrackCell: HotTrackCellInfo + ''' + Specifies the currently hot-tracked cell. + + ``FHotTrackCell`` specifies the currently hot-tracked cell. ``FHotTrackCell`` is only useful in descending classes. + + ``FHotTrackCell`` is used internally by the grid controls. Applications should not depend on the value of ``FHotTrackCell``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether a single line border is drawn around the grid. + + Set ``BorderStyle`` to ``bsSingle`` to add a single line border around the grid's image. Set ``BorderStyle`` to ``bsNone`` to omit the border. + ''' + Col: int + ''' + Specifies the index of the column that contains the selected cell. + + Use ``Col`` at runtime to determine the current column in the grid. Setting ``Col`` moves focus to the cell in the current row that is in the new column. The first column has an index of 0, the second column an index of 1, and so on. + + The selected cell in the grid can be located by reading the ``Col`` property and the ``Row`` property to obtain the indexes of its column and row. When focus moves to the grid, the selected cell gets input focus. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + ColCount: int + ''' + Specifies the number of columns in the grid. + + Read ``ColCount`` to determine the number entries in the ``ColWidths`` array. Set ``ColCount`` to add or delete columns at the right side of the grid. The value of ``ColCount`` includes any fixed columns at the left of the grid as well as the scrollable columns in the body of the grid. + ''' + ColWidths: list + ''' + Indicates the width (in pixels) of all the columns in the grid. + + Read ``ColWidths`` to determine the width of the cells in the column specified by the ``Index`` parameter. An index of 0 refers to the first column. Set ``ColWidths`` at runtime to change the width of an individual column. + + If the width of a column has not been set explicitly by resizing with the mouse, or by using the ``ColWidths`` property, its width is DefaultColWidth. + + Use the ``ColCount`` property to determine the number of entries in the ``ColWidths`` array. + ''' + ColAlignments: list[Alignment] + ''' + `ColAlignments <Vcl.Grids.TCustomGrid-ColAlignments.htm>`__ property allows you to specify the text alignment for the column specified by ``Index``. If not specified, then `CustomGrid.DefaultColAlignment <Vcl.Grids.TCustomGrid.DefaultColAlignment.htm>`__ will be used. + ''' + DefaultColWidth: int + ''' + Determines the width (in pixels) of all columns that have not been explicitly resized. + + Set ``DefaultColWidth`` to change the size of all columns in the grid. When ``DefaultColWidth`` is set, columns that have been resized using the mouse or by setting the ``ColWidths`` property are given the ``DefaultColWidth`` as well. + + When new columns are added to the grid using the ``ColCount`` property, they are created with a width of ``DefaultColWidth``. + ''' + DefaultColAlignment: Alignment + ''' + `DefaultColAlignment <Vcl.Grids.TCustomGrid.DefaultColAlignment.htm>`__ is the default text alignment for all columns where alignment is not explicitly specified using `CustomGrid.ColAlignments <Vcl.Grids.TCustomGrid-ColAlignments.htm>`__. + ''' + DefaultDrawing: bool + ''' + Determines whether the Cells are painted when the grid is drawn. + + Set ``DefaultDrawing`` to ``True`` to have the grid automatically paint the cells in the grid, including adding the background color, the 3-D effects on the fixed cells, and the focus rectangle around the selected cell. Set ``DefaultDrawing`` to ``False`` to skip the painting of the cells when the grid is drawn. + + When ``DefaultDrawing`` is ``False``, the cells should be painted using the DrawCell method. For `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, DrawCell is an abstract method. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ use DrawCell to provide their own customized drawing code, or to generate an OnDrawCell event. + ''' + DefaultRowHeight: int + ''' + Specifies the height (in pixels) of all rows that have not been explicitly resized. + + Set ``DefaultRowHeight`` to change the size of all rows in the grid. When ``DefaultRowHeight`` is set, rows that have been resized using the mouse or by setting the ``RowHeights`` property are given the ``DefaultRowHeight`` as well. + + When new rows are added to the grid using the ``RowCount`` property, they are created with a height of ``DefaultRowHeight``. + ''' + DrawingStyle: GridDrawingStyle + ''' + Determines the style used when drawing the grid. + + ``DrawingStyle`` determines the style used to draw the grid. The following table lists the possible values of ``DrawingStyle``. + + ================= ========================================================= + **Value** **Meaning** + ================= ========================================================= + ``gdsClassic`` The grid control uses the standard, unthemed style. + ``gdsThemed`` The grid control uses the current operating system theme. + ``gdsGradient`` The grid control uses gradients for styling. + ================= ========================================================= + + *Notes about DrawingStyle for*\ `Vcl.Grids.TStringGrid <Vcl.Grids.TStringGrid.htm>`__: + + - Setting ``FixedColor`` has no effect unless you also set ``DrawingStyle`` to ``gdsClassic``. + - Setting ``GradientStartColor`` and ``GradientEndColor`` has no effect unless you set the value of ``DrawingStyle`` to ``gdsGradient``. + ''' + EditorMode: bool + ''' + Determines whether the current cell can be edited. + + Set ``EditorMode`` to ``True``, at runtime, to put the grid in edit mode. When ``EditorMode`` is ``True``, the user can edit cells in the grid. When the user presses F2, ``EditorMode`` is set to ``True``. When the user presses *Enter*, the value of ``EditorMode`` is toggled. + + .. note:: ``EditorMode`` has no effect if the ``Options`` property does not include goEditing or if the ``Options`` property includes goAlwaysShowEditor. + ''' + FixedColor: Color + ''' + Specifies the background color of the fixed rows and columns in the grid. + + Set ``FixedColor`` to specify the color for the nonscrolling cells in the grid. The scrolling region of the grid is drawn using the ``Color`` property. + ''' + FixedCols: int + ''' + Specifies the number of columns on the left of the grid that cannot be scrolled. + + Set ``FixedCols`` to create or get rid of nonscrolling columns. Nonscrolling columns appear at the left of the grid, and are always visible, even when the user scrolls the other columns in the grid. Use nonscrolling columns for displaying row titles or row numbers, or to implement a scroll lock that the user can set. + + Nonscrolling columns are visually distinct from the scrollable columns in the grid. They are painted with a separate background color, and their cells have a raised, 3-D look. + + .. note:: Grids must include at least one scrolling column. Do not set ``FixedCols`` to a value greater than ColCount - 1. + ''' + FixedRows: int + ''' + Specifies the number of rows on the top of the grid that cannot be scrolled. + + Set ``FixedRows`` to create or get rid of nonscrolling rows. Nonscrolling rows appear at the top of the grid, and are always visible, even when the user scrolls the other rows in the grid. Use nonscrolling rows for displaying column titles or column numbers. + + Nonscrolling rows are visually distinct from the scrollable rows in the grid. They are painted with a separate background color, and their cells have a raised, 3-D look. + + .. note:: Grids must include at least one scrolling row. Do not set ``FixedRows`` to a value greater than RowCount - 1. + ''' + GradientEndColor: Color + ''' + Determines the ending gradient color. + + ``GradientEndColor`` determines the ending gradient color. ``GradientEndColor`` is used when the value of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ is ``gdsGradient``. ``GradientEndColor`` and `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ define the color range used when drawing individual cells within the grid control. + ''' + GradientStartColor: Color + ''' + Determines the starting gradient color. + + ``GradientStartColor`` determines the starting gradient color. ``GradientStartColor`` is used when the value of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ is ``gdsGradient``. `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ and ``GradientStartColor`` define a color range used when drawing individual cells within the grid control. + ''' + GridHeight: int + ''' + Specifies the height of the grid in pixels. + + Read ``GridHeight`` to determine the size of the grid. If ``GridHeight`` is less than the value of ``ClientHeight``, all of the rows of the grid appear in the control with an empty region below the grid. If the underlying grid is too tall to appear in the control, ``GridHeight`` is the same as ``ClientHeight``, and the user must scroll to see the entire contents of the grid. + ''' + GridLineWidth: int + ''' + Specifies the width (in pixels) of the lines that separate the cells of the grid. + + Set ``GridLineWidth`` to make the lines that separate the cells in the grid heavier or lighter. When ``GridLineWidth`` is zero, no separators are drawn between the cells of the grid. + + ``GridLineWidth`` will have no effect if the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property does not include ``goFixedHorzLine``, ``goFixedVertLine``, ``goHorzLine``, or ``goVertLine``. + + .. note:: Values greater than 3 pixels are not recommended for applications that run on *Windows 9x* or *Windows ME* because of distortions that can appear. + ''' + GridWidth: int + ''' + Specifies the width of the grid in pixels. + + Read ``GridWidth`` to determine the size of the grid. If ``GridWidth`` is less than the value of ``ClientWidth``, all of the columns of the grid appear in the control with an empty region to the right of the grid. If the underlying grid is too wide to appear in the control, ``GridWidth`` is the same as ``ClientWidth``, and the user must scroll to see the entire contents of the grid. + ''' + HitTest: Point + ''' + Indicates the current position of the mouse cursor. + + Read ``HitTest`` to determine the position of the mouse when it is over the grid or when the grid has captured the mouse. ``HitTest`` may represent a position that is not within the client area of the grid control if the user is moving or resizing the rows or columns, or if the user is selecting a range of cells using the mouse. ``HitTest`` is the position of the mouse cursor in the coordinate system where ``(0,0)`` is the upper left corner of the grid control's client area. + ''' + InplaceEditor: InplaceEdit + ''' + Designates the edit control the grid uses to allow users to edit the contents of the selected cell. + + Read ``InplaceEditor`` to gain direct access to the edit control that sits on top of the selected cell when the grid is in edit mode. The inplace editor is created the first time the grid is put in edit mode. It is not destroyed until the grid is destroyed. The grid moves the editor when the selected cell changes. The grid hides the editor's window when the grid goes out of edit mode. + ''' + LeftCol: int + ''' + Specifies the index of the first visible scrollable column in the grid. + + Read ``LeftCol`` to determine the index of the first column in the scrollable region that is visible. Set ``LeftCol`` to scroll the columns in the grid so that the column with index ``LeftCol`` is the first column after the fixed columns. + ''' + Options: GridOptions + ''' + Specifies various display and behavioral properties of the grid. + + Set ``Options`` to include the desired properties for the grid. See the type `Vcl.Grids.TGridOptions <Vcl.Grids.TGridOptions.htm>`__ for definitions of these properties. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + Row: int + ''' + Specifies the index of the row that contains the selected cell. + + Use ``Row`` at runtime to determine the current row in the grid. Setting ``Row`` moves focus to the cell in the current column that is in the new row. The first row has an index of 0, the second row an index of 1, and so on. + + The selected cell in the grid can be located by reading the ``Row`` property and the ``Col`` property to obtain the indexes of its row and column. When focus moves to the grid, the selected cell gets input focus. + ''' + RowCount: int + ''' + Specifies the number of rows in the grid. + + Read ``RowCount`` to determine the number of entries in the ``RowHeights`` array. Set ``RowCount`` to add or delete rows at the bottom of the grid. The value of ``RowCount`` includes any fixed rows at the top of the grid as well as the scrollable rows in the body of the grid. + ''' + ScrollBars: ScrollStyle + ''' + Specifies whether the grid includes horizontal and vertical ``ScrollBar``\ s. + + .. note:: If all the cells in the grid fit in the ``ClientWidth``, no horizontal ``ScrollBar`` appears, even if ``ScrollBars`` is ``ssHorizontal`` or ``ssBoth``. If all the cells fit in the ``ClientHeight``, no vertical ``ScrollBar`` appears, even if ``ScrollBars`` is ``ssVertical`` or ``ssBoth``. + ''' + Selection: GridRect + ''' + Indicates the boundaries of the current selection. + + Set ``Selection`` to select a range of cells in the grid. ``Selection`` can either represent the first column, first row, last column and last row in the grid, or the row and column coordinates of the upper left and bottom right cells in the selected region. + + ``Selection`` can only indicate more than one cell when ``Options`` includes ``goRangeSelect``. + ''' + TopRow: int + ''' + Specifies the index of the first visible scrollable row in the grid. + + Read ``TopRow`` to determine the index of the first row in the scrollable region that is visible. Set ``TopRow`` to scroll the rows in the grid so that the row with index ``TopRow`` is the first row after the fixed rows. + ''' + VisibleColCount: int + ''' + Indicates the number of scrollable columns visible in the grid. + + Use ``VisibleColCount`` to determine the number of scrollable columns fully visible in the grid. ``VisibleColCount`` does not include the fixed columns counted by the ``FixedCols`` property. It does not include any partially visible columns on the right edge of the grid. + ''' + VisibleRowCount: int + ''' + Indicates the number of scrollable rows visible in the grid. + + Use ``VisibleRowCount`` to determine the number of scrollable rows fully visible in the grid. ``VisibleRowCount`` does not include the fixed rows counted by the ``FixedRows`` property. It does not include any partially visible rows on the bottom of the grid. + ''' + IsUpdating: bool + ''' + No have docs. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + + # property RowHeights[Index: int]: int read GetRowHeights write SetRowHeightsint + # property TabStops[Index: int]: bool read GetTabStops write SetTabStopsint + + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def ObserverAdded(self, ID: int, Observer: IObserver) -> None: + ''' + No have docs. + ''' + def ObserverToggle(self, AObserver: IObserver, Value: bool) -> None: + ''' + No have docs. + ''' + def ObserverCurrent(self) -> VarRec: + ''' + No have docs. + ''' + def CalcDrawInfo(self, DrawInfo: GridDrawInfo) -> None: + ''' + Calculates the pixel locations of the grid boundaries. + + Use ``CalcDrawInfo()`` to determine the pixel locations of the major grid boundaries in the ``'X'`` and ``'Y'`` directions, including things like the first visible column/row, the last visible column/row, the pixel extent of the fixed column/row, etc. + ''' + def CalcFixedInfo(self, DrawInfo: GridDrawInfo) -> None: + ''' + Calculates the pixel locations of the fixed cells. + + Use CalcDrawInfo to determine the pixel locations of the fixed cells in the ``'X'`` and ``'Y'`` directions. + ''' + def CalcSizingState(self, X: int, Y: int, State: GridState, Index: int, SizingPos: int, SizingOfs: int, FixedInfo: GridDrawInfo) -> None: + ''' + Determines the appearance of the mouse cursor during resizing. + + Use ``CalcSizingState()`` to determine if the mouse cursor should be changed to a resize or drag cursor based on where the mouse is in the grid. For example, cursor over a grid line, in the fixed cell region, and column resize is ``enabled = resize`` cursor. + ''' + def CalcColWidth(self, ATextLength: int, ACaption: str, AColumnObj: Object) -> int: + ''' + No have docs. + ''' + def ChangeGridOrientation(self, RightToLeftOrientation: bool) -> None: + ''' + Prepares the grid's canvas for painting to reflect a right-to-left or left-to-right orientation. + + `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ uses ``ChangeGridOrientation()`` internally when painting. ``ChangeGridOrientation()`` sets the origin and dimensions of the grid's canvas so that painting occurs from right-to-left or from left-to-right based on the value of the ``RightToLeftOrientation`` parameter. + + ``RightToLeftOrientation`` is ``True`` if the grid should prepare for painting from ``Right`` to ``Left``. ``RightToLeftOrientation`` is ``False`` if the grid should restore the canvas to normal. + ''' + def CreateEditor(self) -> InplaceEdit: + ''' + Creates the inplace editor control. + + Grid controls call ``CreateEditor()`` internally the first time the grid goes into edit mode. ``CreateEditor()`` is exposed as a protected method so that descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ can substitute a specialized descendant of TInplaceEdit to handle cell editing. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes the window-creation parameter record. + + The ``CreateWnd()`` method is called internally to specify the properties of the window that implements this control. These properties are set in the window-creation parameter record passed as Params. The fields of this record become the parameters to a call to the ``CreateWindowEx`` API function. + + After calling the inherited method, ``CreateParams()`` adjusts the value of ``Params`` to request that the grid receive double click messages, and to implement the values of the `ScrollBars <Vcl.Grids.TCustomGrid.ScrollBars.htm>`__ and `BorderStyle <Vcl.Grids.TCustomGrid.BorderStyle.htm>`__ properties. + ''' + def CreateWnd(self) -> None: + ''' + ``CreateWnd()`` is used in control initialization. + + The ``CreateWnd()`` method is called internally to specify the properties of the window that implements this control. As implemented in `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, ``CreateWnd()`` makes sure that the grid can use the themes before continuing with the other initializations. + ''' + def DoGesture(self, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Processes the unhandled gesturing events. + + `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ is run automatically for all gesturing events that were not handled by the user. `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ is run only if `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is not set or if it did not handle the gesture event. + + Override `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ in descending classes to support default behavior for gesture events that were not handled by the user. In `Control <Vcl.Controls.TControl.htm>`__, the `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method simply returns and does no special processing. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Provides special processing when the user presses a key. + + After generating an `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event, ``KeyDown()`` calls `CanGridAcceptKey <Vcl.Grids.TCustomGrid.CanGridAcceptKey.htm>`__ to screen out problematic key combinations. ``KeyDown()`` moves to the appropriate cell in response to navigational key combinations, or sets the `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ property to ``True`` when the user presses F2. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Provides special processing when the user presses a key. + + ``KeyPress()`` is called automatically after the `KeyDown <Vcl.Grids.TCustomGrid.KeyDown.htm>`__ method, but before the user releases the key. + + After generating an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event, ``KeyPress()`` toggles the `EditorMode <Vcl.Grids.TCustomGrid.EditorMode.htm>`__ property when the user presses the *Enter* key. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X, Y: int) -> None: + ''' + Provides special processing when the user presses a mouse button. + + ``MouseDown()`` hides the editor window so that it can move selection to the cell that receives the mouse click. If the mouse lands in the hot region for beginning a move or resize of a row or column, ``MouseDown()`` starts the move or resize, and provides visual feedback by changing the cursor. If the editor window was hidden, it is brought back up in its new location. Finally, ``MouseDown()`` generates an `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event. + ''' + def MouseMove(self, Shift: ShiftState, X, Y: int) -> None: + ''' + Provides special processing when the user moves the mouse. + + If the grid is in the middle of moving or resizing a row or column, or in the middle of selecting a range of cells using the mouse, ``MouseMove()`` calculates the changes implied by the mouse move and provides visual feedback to the user. Finally, ``MouseMove()`` generates an `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X, Y: int) -> None: + ''' + Provides special processing when the user releases the mouse button. + + ``MouseUp()`` finishes a move or resize operation on a row or column, or if the user is selecting a range of cells using the mouse, ``MouseUp()`` finishes the select operation. Finally, ``MouseUp()`` generates an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event. + ''' + def AdjustSize(self, Index: int, Amount: int, Rows: bool) -> None: + ''' + Adds or deletes rows or columns from the grid. + + Grid components call ``AdjustSize()`` internally to fix up the number of rows or columns when the user resizes them using the mouse. ``Index`` is the index of the row or column where the insertion or deletion should begin. Amount is the number of rows or columns to insert (``Amount > 0``) or delete (``Amount < 0``). Rows is a boolean that indicates whether the rows or the columns are changing. + ''' + def BoxRect(self, ALeft: int, ATop: int, ARight: int, ABottom: int) -> Rectint: + ''' + Returns the *Screen* coordinates of a specified set of cells. + + Call ``BoxRect()`` to obtain the *Screen* coordinates, in pixels, of the cells that run from the column with index ``ALeft`` to the column with index ``ARight`` and the row with index ``ATop`` to the row with index ``ABottom``. The coordinates of cells that are not visible onscreen are not included in the final rectangle. + ''' + def DoExit(self) -> None: + ''' + Hides the inplace editor when selection moves to another control in a form. + + After calling the inherited method, which generates an ``OnExit`` event, ``DoExit()`` hides the inplace editor unless the ``Options`` property includes ``goAlwaysShowEditor``. + ''' + def CalcExpandedCellRect(self, Coord: GridCoord) -> GridRect: + ''' + No have docs. + ''' + def CellRect(self, ACol: int, ARow: int) -> Rectint: + ''' + Returns the *Screen* coordinates of a cell in the grid. + + Call ``CellRect()`` to obtain the boundaries, in pixels, of the cell in the column and row indicated by the ``ACol`` and ``ARow`` parameters. The top left cell is specified when ``ACol`` and ``ARow`` are set to zero. + + If the indicated cell is not visible, ``CellRect()`` returns an empty rectangle. + ''' + def CanEditAcceptKey(self, Key: str) -> bool: + ''' + Indicates whether the ``Key`` parameter can be entered into the current cell. + + ``CanEditAcceptKey()`` provides a simple screening of keyboard input while the user is editing the contents of a cell. The ``CanEditAcceptKey()`` method for `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ always returns ``True``. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to screen out illegal characters. + + More refined validation can be obtained by using an ``EditMask``. + ''' + def CanGridAcceptKey(self, Key: int, Shift: ShiftState) -> bool: + ''' + Indicates whether the grid should respond to a given key combination. + + Grid controls call ``CanGridAcceptKey()`` internally to screen key combinations when the user first presses a key. The ``CanGridAcceptKey()`` method for `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ always returns ``True``. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to screen out irrelevant key combinations, or key combinations that indicate actions that would violate the ``Options`` or mode of the grid. + ''' + def CanEditModify(self) -> bool: + ''' + Indicates whether the current cell in the grid can be edited. + + Grid components use ``CanEditModify()`` internally to determine whether to allow the user to edit the current cell. ``CanEditModify()`` returns ``True`` unless the inplace editor has disallowed editing for the cell. + ''' + def CanEditShow(self) -> bool: + ''' + Indicates whether the inplace edit control can be created to allow editing. + + Grid controls call ``CanEditShow()`` internally before creating the editor for a cell. ``CanEditShow()`` is called after the grid has determined that the field can be edited by calling CanEditModify. + + ``CanEditShow()`` returns ``False`` if the ``Options`` property does not indicate that the grid allows editing, or if it indicates that the grid permits row selection. Otherwise, if the ``Options`` property indicates that the grid is locked in edit mode, or if the grid has input focus, ``CanEditShow()`` returns ``True``. If the grid is not locked in edit mode and the grid does not have input focus, ``CanEditShow()`` returns ``False``. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def DoMouseWheelDown(self, Shift: ShiftState, MousePos: Point) -> bool: + ''' + Performs tasks when the mouse wheel is rotated downward. + + Override ``DoMouseWheelDown()`` to perform tasks when the mouse wheel is rotated downward. + + ``DoMouseWheelDown()`` returns ``False`` if the control's parent should handle the message. + + In `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, ``DoMouseWheelDown()`` increments the current row and returns ``True``. + ''' + def DoMouseWheelUp(self, Shift: ShiftState, MousePos: Point) -> bool: + ''' + Performs tasks when the mouse wheel is rotated upward. + + Override ``DoMouseWheelUp()`` to perform tasks when the mouse wheel is rotated downward. + + ``DoMouseWheelUp()`` should return ``False`` if the control's parent should handle the message. + + In `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, ``DoMouseWheelUp()`` decrements the current row and returns ``True``. + ''' + def FixedCellClick(self, ACol: int, ARow: int) -> None: + ''' + Triggers the `OnFixedCellClick <Vcl.Grids.TCustomGrid.OnFixedCellClick.htm>`__ event. + + ``FixedCellClick()`` is called whenever the user clicks in a fixed cell. Descending classes can override ``FixedCellClick()`` to support custom processing for this event. As defined in `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, ``FixedCellClick()`` simply triggers the `OnFixedCellClick <Vcl.Grids.TCustomGrid.OnFixedCellClick.htm>`__ event. + + `OnFixedCellClick <Vcl.Grids.TCustomGrid.OnFixedCellClick.htm>`__ is only triggered if the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes either ``goFixedRowClick`` or ``goFixedColClick``, or both. Also, at least one fixed column or row must me defined. + ''' + def FocusCell(self, ACol: int, ARow: int, MoveAnchor: bool) -> None: + ''' + Changes the current cell to a specified cell. + + `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ calls ``FocusCell()`` internally to change the currently selected cell. ``FocusCell()`` changes the current cell and updates the selection appropriately. + + ``ACol`` is the column of the cell to select. + + ``ARow`` is the row of the cell to select. + + ``MoveAnchor`` determines how the selection changes. If the grid does not allow multiple cells to be selected (Options does not include ``goRangeSelect``), ``MoveAnchor`` is ignored and the specified cell becomes the selected cell. If the grid allows multiple cells to be selected, ``MoveAnchor`` determines whether the new cell becomes the starting cell (anchor) of a new selection, or whether the current selection is updated to range from the current anchor to the specified cell. + ''' + def GetEditText(self, ACol: int, ARow: int) -> str: + ''' + Returns the value of the indicated cell formatted for editing. + + The inplace editor calls ``GetEditText()`` to obtain the text for the indicated cell. ``GetEditText()`` returns an empty string. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override the ``GetEditText()`` method to return a string that represents the contents of the cell indicated by the ``ACol`` and ``ARow`` parameters. + ''' + def SetEditText(self, ACol: int, ARow: int, Value: str) -> None: + ''' + Provides the interface for a method that updates the text associated with a cell. + + ``SetEditText()`` is called by the inplace editor so that the grid can store the new value for the current cell. The ``SetEditText()`` method for `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ does nothing. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to update an internal representation of the cell's value or to generate an event, such as `Vcl.Grids.TCustomDrawGrid.OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__. + ''' + def GetEditLimit(self) -> int: + ''' + Provides the interface for a method that limits the number of characters the user can type into cells. + + The inplace editor calls ``GetEditLimitCell()`` to determine if a limit should be placed on the number of characters a user can type into a cell. ``GetEditLimitCell()`` sets no limits. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to limit the text for certain cells. + ''' + def GetEditMask(self, ACol: int, ARow: int) -> str: + ''' + Provides the interface for a method that returns an input mask for the specified cell. + + The inplace editor calls ``GetEditMask()`` to obtain any input mask associated with the cell specified by the ``ACol`` and ``ARow`` parameters. ``GetEditMask()`` returns an empty string, indicating that the cell has no input mask. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to provide an input mask or to generate an event, such as `Vcl.Grids.TCustomDrawGrid.OnGetEditMask <Vcl.Grids.TCustomDrawGrid.OnGetEditMask.htm>`__. + ''' + def GetEditStyle(self, ACol: int, ARow: int) -> EditStyle: + ''' + Indicates whether a specified cell has an *Ellipsis* button or drop-down arrow. + + ``GetEditStyle`` indicates whether the specified cell can only be edited directly (``\ esSimple``), whether it has an *Ellipsis* button that users can click to launch an editor for modifying field values (``\ esEllipsis``), or whether it has a drop-down arrow that users can click to display a pick list of possible values (``\ esPickList``). + + ``ACol`` is the column that contains the cell. ``ARow`` is the row that contains the cell. + + In `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, ``GetEditStyle`` always returns ``\ esSimple``, indicating that there is no *Ellipsis* button or drop-down arrow. Descendant classes can override this methods if they provide a way to add pick lists or *Ellipsis* buttons to cells. + ''' + def GetGridWidth(self) -> int: + ''' + Returns the value of the ``GridWidth`` property. + + ``GetGridWidth()`` is the protected property access method for the ``GridWidth`` property. It computes the value of the ``GridWidth`` property based on the column widths, separator width, and the size of the control. + ''' + def GetGridHeight(self) -> int: + ''' + Returns the value of the ``GridHeight`` property. + + ``GetGridHeight()`` is the protected property access method for the ``GridHeight`` property. It computes the value of the ``GridHeight`` property based on the row heights, separator width, and the size of the control. + ''' + def HideEdit(self) -> None: + ''' + ides the inplace editor when it is not in use. + + Grid controls call ``HideEditor()`` when the grid goes out of edit mode. ``HideEditor()`` hides the window of the inplace editor. + ''' + def HideEditor(self) -> None: + ''' + Hides the inplace editor when it is not in use. + + Grid controls call ``HideEditor()`` when the grid goes out of edit mode. ``HideEditor()`` hides the window of the inplace editor. + ''' + def ShowEditor(self) -> None: + ''' + Displays the inplace editor when the grid enters edit mode. + + Grid controls call ``ShowEditor()`` when the grid enters edit mode. ``ShowEditor()`` displays the window of the inplace editor over the currently selected cell. If the inplace editor does not yet exist, ``ShowEditor()`` creates it. + ''' + def ShowEditorChar(self, Ch: str) -> None: + ''' + Displays the inplace editor, with its text set to the specified character. + + Grid controls call ``ShowEditorChar()`` when the user types a character into a cell and the editor is not already showing. ``ShowEditorChar()`` displays the window of the inplace editor over the currently selected cell, and sets its text property to the character ``Ch``. If the inplace editor does not yet exist, ``ShowEditorChar()`` creates it. + ''' + def InvalidateEditor(self) -> None: + ''' + Causes the inplace editor to repaint itself, moving to a new location if necessary. + + ``InvalidateEditor()`` is called when the selected cell changes while the grid is in edit mode. + ''' + def InvalidateGrid(self) -> None: + ''' + Tells *Windows* to repaint the grid after other important *Windows Messages* are handled. + + ``InvalidateGrid()`` is used internally to ensure that the grid is repainted when its properties change. It calls the `Invalidate <Vcl.Grids.TInplaceEdit.Invalidate.htm>`__ method to indicate that the grid needs repainting. + ''' + def MoveColumn(self, FromIndex: int, ToIndex: int) -> None: + ''' + Moves a column to a new position. + + Call ``MoveColumn()`` to move the column identified by the ``FromIndex`` parameter to the position specified by the ``ToIndex`` parameter. + ''' + def ColumnMoved(self, FromIndex: int, ToIndex: int) -> None: + ''' + Provides the interface for a method that responds when the position of a column changes. + + ``ColumnMoved()`` is called immediately after a column in the grid has moved. + + The ``FromIndex`` parameter is the old index of the column, + + The ``ToIndex`` parameter is the new index. + + The ``ColumnMoved()`` method of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ does nothing. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to make internal adjustments or to generate an event, such as `Vcl.Grids.TCustomDrawGrid.OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__. + ''' + def MoveRow(self, FromIndex: int, ToIndex: int) -> None: + ''' + Moves a row to a new position. + + Call ``MoveRow()`` to move the row identified by the ``FromIndex`` parameter to the position specified by the ``ToIndex`` parameter. + ''' + def RowMoved(self, FromIndex: int, ToIndex: int) -> None: + ''' + Provides the interface for a method that responds when the position of a row changes. + + ``RowMoved()`` is called immediately after a row in the grid changes position. + + The ``FromIndex`` parameter is the old index of the row, and the ``ToIndex`` parameter is the new index. + + The ``RowMoved()`` method of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ does nothing. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to make internal adjustments or to generate an event, such as `Vcl.Grids.TCustomDrawGrid.OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__. + ''' + def SelectionMoved(self, OldSel: GridRect) -> None: + ''' + No have docs. + ''' + def DrawCell(self, ACol: int, ARow: int, ARect: Rect, AState: GridDrawState) -> None: + ''' + Provides the prototype for a method that draws the contents of a cell in the grid. + + Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ implement the ``DrawCell()`` method to draw the contents of the cell. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the background of the cell is painted before ``DrawCell()`` is called, and the 3D effects of the fixed cells or the focus rectangle around the focused cell are drawn after ``DrawCell()``. + + The ``ACol`` and ``ARow`` parameters give the column and row indexes of the cell that should be drawn. + + The ``ARect`` parameter gives the boundaries of the cell in the coordinates of the canvas. + + The ``AState`` parameter indicates whether the cell is selected, whether the cell has input focus, and whether the cell is in the fixed, non-scrolling portion of the grid. + ''' + def DrawCellBackground(self, ARect: Rect, AColor: Color, AState: GridDrawState, ACol: int, ARow: int) -> None: + ''' + Draws the background of a cell in the grid. + + ``DrawCellBackground()`` draws the background of a cell. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ can override the ``DrawCellBackground()`` method to supply custom drawing techniques. + + If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the background of the cell is painted before `DrawCell <Vcl.Grids.TCustomGrid.DrawCell.htm>`__ is called, and the three-dimensional effects of the fixed cells or the focus rectangle around the focused cell is drawn after `DrawCell <Vcl.Grids.TCustomGrid.DrawCell.htm>`__. + + The ``ACol`` and ``ARow`` parameters give the column and row indexes of the cell that should be drawn. The ``ARect`` parameter gives the boundaries of the cell in the coordinates of the canvas. The + + A``State`` parameter indicates whether the cell is selected, has input focus, or is in the fixed, nonscrolling portion of the grid. + ''' + def DrawCellHighlight(self, ARect: Rect, AState: GridDrawState, ACol: int, ARow: int) -> None: + ''' + Draws the background of a highlighted cell in the grid. + + ``DrawCellHighlight`` draws the background of a highlighted cell. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ can override the ``DrawCellHighlight()`` method to implement custom drawing techniques. + + If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the background of the highlighted cell is painted before `DrawCell <Vcl.Grids.TCustomGrid.DrawCell.htm>`__ is called, and the three-dimensional effects of the fixed cells or the focus rectangle around the focused cell is drawn after ``DrawCellHighlight``. + + The ``ACol`` and ``ARow`` parameters give the column and row indexes of the cell that should be drawn. The ``ARect`` parameter gives the boundaries of the cell in the coordinates of the canvas. The + + ``AState`` parameter indicates whether the cell is selected, has input focus or is in the fixed, nonscrolling portion of the grid. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Adds the ``ColWidths`` and ``RowHeights`` properties to the values saved with the grid. + + ``DefineProperties()`` overrides the inherited method to save the ``ColWidths`` and ``RowHeights`` properties with the grid when they contain values other than the default widths and heights. + ''' + def MoveColRow(self, ACol: int, ARow: int, MoveAnchor, Show: bool) -> None: + ''' + Selects the cell indicated by the ``ACol`` and ``ARow`` parameters. + + Grid controls call ``MoveColRow()`` internally when changing the selected cell or cells. ``MoveColRow()`` selects the indicated cell, but does not take care of removing any previous selection. + + The ``ACol`` and ``ARow`` parameters are the column index and the row index of the cell to be selected. The ``MoveAnchor`` parameter indicates whether the new cell becomes the upper left corner of the selected region. ``MoveAnchor`` is ``True`` unless ``MoveColRow()`` is called when extending a multicell selected region. The Show parameter indicates whether ``MoveColRow()`` should ensure that the newly selected cell is visible. + ''' + def SelectCell(self, ACol: int, ARow: int) -> bool: + ''' + Determines whether a particular cell in the grid can be selected. + + Grid controls call ``SelectCell()`` internally before attempting to move selection to a the cell identified by the ``ACol`` and ``ARow`` parameters. ``ACol`` and ``ARow`` are the column and row indexes for the cell, where the first column has index 0, and the top row has index 0. + + The ``SelectCell()`` method for `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ always returns ``True``, allowing the cell to be selected. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to check the properties of the information displayed in the cell or to generate an event, such as `Vcl.Grids.TCustomDrawGrid.OnSelectCell <Vcl.Grids.TCustomDrawGrid.OnSelectCell.htm>`__. + ''' + def SizeChanged(self, OldColCount: int, OldRowCount: int) -> None: + ''' + Responds to changes in the size of the grid. + + ``SizeChanged()`` provides the interface for a method that responds to changes in the number of rows or columns in the grid. The ``SizeChanged()`` method of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ does nothing. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to make internal adjustments or generate events. + ''' + def Sizing(self, X: int, Y: int) -> bool: + ''' + Indicates whether the indicated coordinates are on one of the resize hot zones of the graph. + + Grid controls call ``Sizing()`` internally with the coordinates of a mouse click to determine whether the user is about to resize a row or column. + ''' + def ScrollData(self, DX: int, DY: int) -> None: + ''' + Scrolls the visual image of the cells in the grid. + + Grid controls call ``ScrollData()`` internally when the nonfixed rows or columns scroll. ``ScrollData()`` updates the image of the grid. + ''' + def SetStyleElements(self, Value: StyleElements) -> None: + ''' + No have docs. + ''' + def InvalidateCell(self, ACol: int, ARow: int) -> None: + ''' + Invalidates the region occupied by a cell so that it will be repainted with the next *Windows* paint message. + + Call ``InvalidateCell()`` when the contents of a cell change so that the cell will need to be repainted. The ``ACol`` parameter is the column index of the cell, and the ``ARow`` parameter is the row index. + ''' + def InvalidateCol(self, ACol: int) -> None: + ''' + Invalidates the region occupied by a column so that it will be repainted with the next *Windows* paint message. + + Call ``InvalidateCol()`` when a column changes so that the area it occupies will need to be repainted. The ``ACol`` parameter is the column index. + ''' + def InvalidateRow(self, ARow: int) -> None: + ''' + Invalidates the region occupied by a row so that it will be repainted with the next *Windows* paint message. + + Call ``InvalidateRow()`` when a row changes so that the area it occupies will need to be repainted. The ``ARow`` parameter is the row index. + ''' + def IsTouchPropertyStored(self, AProperty: TouchProperty) -> bool: + ''' + Checks whether the associated touch manager stored any of the given options. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used internally by the *VCL Framework* to check whether the associated touch manager component has stored the given options. Do not call `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ directly. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used primarily to ensure that controls that do not require gesturing are not storing useless data in the *DFMs* or executables. + ''' + def TopLeftChanged(self) -> None: + ''' + Updates the position of the inplace editor when the grid scrolls. + + Grid controls call ``TopLeftChanged()`` internally, whenever the `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ or `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ property changes. + + Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ override this method to make additional adjustments or to generate an event, such as `Vcl.Grids.TCustomDrawGrid.OnTopLeftChanged <Vcl.Grids.TCustomDrawGrid.OnTopLeftChanged.htm>`__. + ''' + def TimedScroll(Direction: GridScrollDirection) -> None: + ''' + Extends a move, resize, or selection out of the scrollable region when the user drags the mouse in a direction where the grid is scrolled. + + ``TimedScroll()`` is called periodically as the user continues to drag with the mouse outside of the scrollable cells in the grid. ``TimedScroll()`` does nothing unless the user is moving a row or column, resizing a row or column, or selecting a multiple cell region using the mouse. ``TimedScroll()`` scrolls the cells in the grid to allow the operation to continue into the portion of the grid that was hidden due to scrolling. + ''' + def Paint(self) -> None: + ''' + Draws the image of the grid control on the *Screen*. + + ``Paint()`` is called when the grid receives a paint message. ``Paint()`` draws the grid, calling the ``DrawCell()`` method when it is time to paint the contents of each cell. If ``DefaultDrawing`` is ``False``, ``Paint()`` does not draw the background of the cells, provide the raised 3D effects on the fixed cells, or draw the focus rectangle around the selected cell when it has focus. + ''' + def ColWidthsChanged(self) -> None: + ''' + Responds when the column widths change. + + ``ColWidthsChanged()`` is called immediately after the column widths change. The change can result from setting the ``ColWidths`` property, from setting the ``DefaultColWidth`` property, from moving one of the columns, or from resizing the columns with the mouse. + + ``ColWidthsChanged()`` adjusts the ``ScrollBar`` and the position of the inplace editor to take into account the new column size and positions of the columns. + ''' + def RowHeightsChanged(self) -> None: + ''' + Responds when the row heights change. + + ``RowHeightsChanged()`` is called immediately after the row heights change. The change can result from setting the ``RowHeights`` property, from setting the ``DefaultRowHeight`` property, from moving one of the rows, or from resizing the rows with the mouse. + + ``RowHeightsChanged()`` adjusts the ``ScrollBar`` and the position of the inplace editor to take into account the new row size and positions of the rows. + ''' + def DeleteColumn(self, ACol: int) -> None: + ''' + Deletes a specified column from the grid. + + Call ``DeleteColumn()`` to remove a column from the middle of the grid. Provide the index of the column to remove as ``ACol``. To remove the last column from the grid, set the ``ColCount`` property instead. + ''' + def DeleteRow(self, ARow: int) -> None: + ''' + Deletes a specified from the grid. + + Call ``DeleteRow()`` to remove a row from the middle of the grid. Provide the index of the row to remove as ARow. To remove the last row from the grid, set the ``RowCount`` property instead. + ''' + def UpdateDesigner(self) -> None: + ''' + Notifies the designer when rows and columns of the grid are moved or resized. + + At design time, the designer automatically keeps track of property changes so that it can prompt the user to save any changes. Moving or resizing the rows and columns of the grid using the mouse bypasses this system. When such changes occur, ``UpdateDesigner()`` notifies the designer that the properties of the grid have changed and that the changes should be saved. + ''' + def BeginColumnDrag(self, Origin: int, Destination: int, MousePt: Point) -> bool: + ''' + Starts the dragging of a column in the grid. + + ``BeginColumnDrag()`` is called automatically when the user clicks on a column to start dragging. It enables the grid to control whether the column can be repositioned and if so, which column. + + ``Origin`` is the index of the column to be moved. When ``BeginColumnDrag()`` is called, this is the index of the column in which the mouse was clicked. `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ does not change this value. However, descendant classes can override this method to adjust which column can be moved. + + ``Destination`` is the index of where the column should move. When ``BeginColumnDrag()`` is called, this is the same as ``Origin``. `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ does not change this value because the mouse has not yet moved. Descendant classes can override this method to adjust the default destination of the column. + + ``MousePt`` is the coordinates of the mouse button when the user clicked. + + ``BeginColumnDrag()`` returns ``True`` if the drag operation is permitted, ``False`` if the drag should be disallowed. + ''' + def BeginRowDrag(self, Origin: int, Destination: int, MousePt: Point) -> bool: + ''' + Starts the dragging of a row in the grid. + + Call ``BeginRowDrag()`` to start a drag operation. ``BeginRowDrag()`` enables the grid to control where the row can be dropped. It is exposed as a protected method so that descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ can customize row dragging in a grid. + ''' + def CheckColumnDrag(self, Origin: int, Destination: int, MousePt: Point) -> bool: + ''' + ``CheckColumnDrag()`` validates whether the column currently selected for dragging can be dropped at the current location. + + Use ``CheckColumnDrag()`` to validate that the column currently selected for dragging can be dropped at the current location. ``CheckColumnDrag()`` can change the ``Origin`` (the column being dragged) and/or the ``Destination`` (the drop target), as needed, to keep the grid's columns in order. + ''' + def CheckRowDrag(self, Origin: int, Destination: int, MousePt: Point) -> bool: + ''' + ``CheckRowDrag()`` validates whether the row currently selected for dragging can be dropped at the current location. + + Use ``CheckRowDrag()`` to validate that the row currently selected for dragging can be dropped at the current location. ``CheckRowDrag()`` can change the ``Origin`` (the row being dragged) and/or the ``Destination`` (the drop target), as needed, to keep the grid's rows in order. + ''' + def EndColumnDrag(self, Origin: int, Destination: int, MousePt: Point) -> bool: + ''' + Ends the dragging of a column in the grid. + + Call ``EndColumnDrag()`` to end a drag operation. ``EndColumnDrag()`` enables the grid to control where the column can be dropped. It is exposed as a protected method so that descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ can customize column dragging in a grid. + ''' + def EndRowDrag(self, Origin: int, Destination: int, MousePt: Point) -> bool: + ''' + Ends the dragging of a row in the grid. + + Call ``EndRowDrag()`` to end a drag operation. ``EndRowDrag()`` enables the grid to control where the row can be dropped. It is exposed as a protected method so that descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ can customize row dragging in a grid. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__. + + Call ``Create()`` to create a grid control at runtime. Grid controls placed on a form at design time are created automatically. + + ``Owner()`` is a component that is responsible for freeing the grid and for initiating the streaming process when it is saved to a form file. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the grid reference is not ``nil``, and only then calls ``Destroy()``. + ''' + def MouseCoord(self, X: int, Y: int) -> GridCoord: + ''' + Returns the row and column indexes of the cell that contains a point specified in screen coordinates. + + Call ``MouseCoord()`` to locate the column and row of the cell which contains a given screen coordinate. Usually, ``MouseCoord()`` is used to locate the cell that is under the mouse. + ''' + def BeginUpdate(self) -> None: + ''' + No have docs. + ''' + def EndUpdate(self) -> None: + ''' + No have docs. + ''' + def TextWidthToColWidth(ATextLength: int, ACaption: str, AColumnObj: Object) -> int: + ''' + No have docs. + ''' + + def OnFixedCellClick(self, Sender: Object, ACol: int, ARow: int) -> None: + ''' + # OnFixedCellClick: FixedCellClickEvent + Determines the event triggered when a user clicks in a fixed cell. + + Write an event handler for ``OnFixedCellClick`` to supply custom logic to your application in response to a user clicking in a fixed cell. ``OnFixedCellClick`` is only triggered if the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes either the ``goFixedColClick`` or ``goFixedRowClick`` option, or both options. + + ``OnFixedCellClick`` can be useful when implementing sorting on columns. By clicking in a fixed cell, the applied sorting rule can be reversed. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomImageList(BaseImageList): + '''Wrapper for Delphi TCustomImageList''' + __hash__: ClassVar[None] = ... + AllocBy: int + '''int:''' + BkColor: int + '''int:''' + BlendColor: int + '''int:''' + ColorDepth: ColorDepth + '''ColorDepth:''' + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + DrawingStyle: DrawingStyle + '''DrawingStyle:''' + GrayscaleFactor: int + '''int:''' + Handle: int + '''int:''' + Height: int + '''int:''' + ImageType: ImageType + '''ImageType:''' + Masked: bool + '''bool:''' + OnChange: Callable[[Object], None] + '''Callable[[Object], None]:''' + Owner: Any + '''Returns the Component Owner''' + Scaling: bool + '''bool:''' + ShareImages: bool + '''bool:''' + Width: int + '''int:''' + + def Add(self, Image: Bitmap, Mask: Bitmap) -> int: + '''TCustomImageList.Add(Image: Bitmap, Mask: Bitmap) -> int''' + def AddDisabledImage(self, Value: CustomImageList, Index: int) -> int: + '''TCustomImageList.AddDisabledImage(Value: CustomImageList, Index: int) -> int''' + def AddDisabledImages(self, Value: CustomImageList) -> None: + '''TCustomImageList.AddDisabledImages(Value: CustomImageList) -> None''' + def AddIcon(self, Image: Icon) -> int: + '''TCustomImageList.AddIcon(Image: Icon) -> int''' + def AddImage(self, Value: CustomImageList, Index: int) -> int: + '''TCustomImageList.AddImage(Value: CustomImageList, Index: int) -> int''' + def AddImages(self, Value: CustomImageList) -> None: + '''TCustomImageList.AddImages(Value: CustomImageList) -> None''' + def AddMasked(self, Image: Bitmap, MaskColor: int) -> int: + '''TCustomImageList.AddMasked(Image: Bitmap, MaskColor: int) -> int''' + @overload + def Assign(self, Source: Persistent) -> None: + '''TCustomImageList.Assign(Source: Persistent) -> None + Copies the contents of another similar object. + Assign copies properties and other attributes of the specified Source object to the current object. The standard form of a call to Assign is: + + Destination.Assign(Source); {Delphi} + + Destination->Assign(Source); // C++ + + which tells the current object to copy the contents of the Source object to itself. + Most objects override Assign to handle the assignment of properties from similar objects. When overriding Assign, call the inherited method if the destination object cannot handle the assignment of properties from the class of the Source parameter. + If no overridden Assign method can handle the assignment of properties from Source, the method implemented in TPersistent calls the source object's AssignTo method. This allows the source object to handle the assignment. If the Source object is nil (Delphi) or NULL (C++), Assign raises an EConvertError exception. + In general, the statement + + Destination := Source; {Delphi} + + Destination = Source; // C++ + + is not the same as the statement + + Destination.Assign(Source); {Delphi} + + Destination->Assign(Source); // C++ + + The assignment operator makes Destination reference the same object as Source, whereas the Assign method copies the contents of the object referenced by Source into the object referenced by Destination. + + Note: The types of some properties are also objects. If these properties have written methods that use Assign to set the value of the property, then in these cases the assignment operator does the same thing as the Assign method.''' + @overload + def Assign(self, Source) -> Any: + '''TCustomImageList.Assign(Source: Persistent) -> None + Copies the contents of another similar object. + Assign copies properties and other attributes of the specified Source object to the current object. The standard form of a call to Assign is: + + Destination.Assign(Source); {Delphi} + + Destination->Assign(Source); // C++ + + which tells the current object to copy the contents of the Source object to itself. + Most objects override Assign to handle the assignment of properties from similar objects. When overriding Assign, call the inherited method if the destination object cannot handle the assignment of properties from the class of the Source parameter. + If no overridden Assign method can handle the assignment of properties from Source, the method implemented in TPersistent calls the source object's AssignTo method. This allows the source object to handle the assignment. If the Source object is nil (Delphi) or NULL (C++), Assign raises an EConvertError exception. + In general, the statement + + Destination := Source; {Delphi} + + Destination = Source; // C++ + + is not the same as the statement + + Destination.Assign(Source); {Delphi} + + Destination->Assign(Source); // C++ + + The assignment operator makes Destination reference the same object as Source, whereas the Assign method copies the contents of the object referenced by Source into the object referenced by Destination. + + Note: The types of some properties are also objects. If these properties have written methods that use Assign to set the value of the property, then in these cases the assignment operator does the same thing as the Assign method.''' + @overload + def Assign(self, Source) -> Any: + '''TCustomImageList.Assign(Source: Persistent) -> None + Copies the contents of another similar object. + Assign copies properties and other attributes of the specified Source object to the current object. The standard form of a call to Assign is: + + Destination.Assign(Source); {Delphi} + + Destination->Assign(Source); // C++ + + which tells the current object to copy the contents of the Source object to itself. + Most objects override Assign to handle the assignment of properties from similar objects. When overriding Assign, call the inherited method if the destination object cannot handle the assignment of properties from the class of the Source parameter. + If no overridden Assign method can handle the assignment of properties from Source, the method implemented in TPersistent calls the source object's AssignTo method. This allows the source object to handle the assignment. If the Source object is nil (Delphi) or NULL (C++), Assign raises an EConvertError exception. + In general, the statement + + Destination := Source; {Delphi} + + Destination = Source; // C++ + + is not the same as the statement + + Destination.Assign(Source); {Delphi} + + Destination->Assign(Source); // C++ + + The assignment operator makes Destination reference the same object as Source, whereas the Assign method copies the contents of the object referenced by Source into the object referenced by Destination. + + Note: The types of some properties are also objects. If these properties have written methods that use Assign to set the value of the property, then in these cases the assignment operator does the same thing as the Assign method.''' + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def CheckIndexAndName(self, AIndex: int, AName: str) -> None: + '''TCustomImageList.CheckIndexAndName(AIndex: int, AName: str) -> None''' + def Clear(self, *args, **kwargs) -> Any: ... + def Create(self, AOwner: Component) -> None: + '''TCustomImageList.Create(AOwner: Component) -> None + Allocates memory and constructs a safely initialized instance of a component. + All objects have a Create method that constructs the object. TComponent redefines Create so that, for components, Create also: + + Establishes the relationship of a component and its Owner, as indicated by the AOwner parameter. + Sets the ComponentStyle property to csInheritable, meaning that the component can be inherited by a descendent form type. + It is not necessary to explicitly create components added in the Form Designer. These components are created automatically when the application is run, and they are destroyed when the application is closed. + For components created programmatically, that is, not created in the Form Designer, call Create and pass in an owner component as the AOwner parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use Free when it needs to be destroyed. + + Tip: When passing in Self as the Owner parameter, consider what Self references. If a component creates another component in one of its methods, then Self refers to the first component and not the component being created, which is then owned by the first component. + Note: The TComponent constructor is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the Form Designer. Do not forget to use the override directive when declaring a new component's Create constructor.''' + def CreateSize(self, AWidth: int, AHeight: int) -> None: + '''TCustomImageList.CreateSize(AWidth: int, AHeight: int) -> None''' + def Delete(self, Index: int) -> None: + '''TCustomImageList.Delete(Index: int) -> None''' + def Destroy(self, *args, **kwargs) -> Any: + '''Disposes of the component and its owned components. + Do not call Destroy directly. Call Free instead. Free verifies that the component is not nil, and only then calls Destroy. + Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains. + To destroy a form, call its Release method. Release waits for all the form's event handlers and the event handlers of the form's components to finish executing before destroying the form. + + Note: A form owns all the controls and nonvisual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well. By default, all forms are owned by the global Application object. When an application terminates, it frees the global Application object, which frees all forms. For objects that are not components, and for components created with a nil owner, be sure to call Free after finishing with the object; otherwise the memory allocated for the object will be lost until the application terminates.''' + def Draw(self, Canvas: Canvas, X: int, Y: int, Index: int, Enabled: bool) -> None: + '''TCustomImageList.Draw(Canvas: Canvas, X: int, Y: int, Index: int, Enabled: bool) -> None''' + def DrawOverlay(self, Canvas: Canvas, X: int, Y: int, ImageIndex: int, Overlay: int, Enabled: bool) -> None: + '''TCustomImageList.DrawOverlay(Canvas: Canvas, X: int, Y: int, ImageIndex: int, Overlay: int, Enabled: bool) -> None''' + def FileLoad(self, ResType: ResType, Name: str, MaskColor: int) -> bool: + '''TCustomImageList.FileLoad(ResType: ResType, Name: str, MaskColor: int) -> bool''' + def GetBitmap(self, Index: int, Image: Bitmap) -> bool: + '''TCustomImageList.GetBitmap(Index: int, Image: Bitmap) -> bool''' + def GetHotSpot(self, *args, **kwargs) -> Any: ... + def GetIcon(self, Index: int, Image: Icon) -> None: + '''TCustomImageList.GetIcon(Index: int, Image: Icon) -> None''' + def GetImageBitmap(self, *args, **kwargs) -> Any: ... + def GetIndexByName(self, AName: str) -> int: + '''TCustomImageList.GetIndexByName(AName: str) -> int''' + def GetInstRes(self, Instance: int, ResType: ResType, Name: str, Width: int, LoadFlags: LoadResources, MaskColor: int) -> bool: + '''TCustomImageList.GetInstRes(Instance: int, ResType: ResType, Name: str, Width: int, LoadFlags: LoadResources, MaskColor: int) -> bool''' + def GetMaskBitmap(self, *args, **kwargs) -> Any: ... + def GetNameByIndex(self, AIndex: int) -> str: + '''TCustomImageList.GetNameByIndex(AIndex: int) -> str''' + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def GetResource(self, ResType: ResType, Name: str, Width: int, LoadFlags: LoadResources, MaskColor: int) -> bool: + '''TCustomImageList.GetResource(ResType: ResType, Name: str, Width: int, LoadFlags: LoadResources, MaskColor: int) -> bool''' + def HandleAllocated(self, *args, **kwargs) -> Any: ... + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + def Insert(self, Index: int, Image: Bitmap, Mask: Bitmap) -> None: + '''TCustomImageList.Insert(Index: int, Image: Bitmap, Mask: Bitmap) -> None''' + def InsertIcon(self, Index: int, Image: Icon) -> None: + '''TCustomImageList.InsertIcon(Index: int, Image: Icon) -> None''' + def InsertMasked(self, Index: int, Image: Bitmap, MaskColor: int) -> None: + '''TCustomImageList.InsertMasked(Index: int, Image: Bitmap, MaskColor: int) -> None''' + def IsImageNameAvailable(self, *args, **kwargs) -> Any: ... + def IsScaled(self, *args, **kwargs) -> Any: ... + def Move(self, CurIndex: int, NewIndex: int) -> None: + '''TCustomImageList.Move(CurIndex: int, NewIndex: int) -> None''' + def Overlay(self, ImageIndex: int, Overlay: int) -> bool: + '''TCustomImageList.Overlay(ImageIndex: int, Overlay: int) -> bool''' + def RegisterChanges(self, Value: ChangeLink) -> None: + '''TCustomImageList.RegisterChanges(Value: ChangeLink) -> None''' + def Replace(self, Index: int, Image: Bitmap, Mask: Bitmap) -> None: + '''TCustomImageList.Replace(Index: int, Image: Bitmap, Mask: Bitmap) -> None''' + def ReplaceIcon(self, Index: int, Image: Icon) -> None: + '''TCustomImageList.ReplaceIcon(Index: int, Image: Icon) -> None''' + def ReplaceMasked(self, Index: int, NewImage: Bitmap, MaskColor: int) -> None: + '''TCustomImageList.ReplaceMasked(Index: int, NewImage: Bitmap, MaskColor: int) -> None''' + def ResInstLoad(self, Instance: int, ResType: ResType, Name: str, MaskColor: int) -> bool: + '''TCustomImageList.ResInstLoad(Instance: int, ResType: ResType, Name: str, MaskColor: int) -> bool''' + def ResourceLoad(self, ResType: ResType, Name: str, MaskColor: int) -> bool: + '''TCustomImageList.ResourceLoad(ResType: ResType, Name: str, MaskColor: int) -> bool''' + def SetSize(self, AWidth: int, AHeight: int) -> None: + '''TCustomImageList.SetSize(AWidth: int, AHeight: int) -> None''' + def UnRegisterChanges(self, Value: ChangeLink) -> None: + '''TCustomImageList.UnRegisterChanges(Value: ChangeLink) -> None''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomLinkControlToField(LinkControlToFieldDelegate): + ''' + ============================================== + Data.Bind.Components.TCustomLinkControlToField + ============================================== + + Represents the base class for linking a control to a field. + + The ``CustomLinkControlToField`` class implements the functionality for linking a control to a field in a ``DataSource``. + + .. tip:: If the direction is bidirectional, then the control must support the ``IEditLinkObserver`` interface. + ''' + + __hash__: ClassVar[None] = ... + Binding: ExpressionsBindComponent + ''' + No have docs. + ''' + FieldName: str + ''' + No have docs. + ''' + AutoActivate: bool + ''' + No have docs. + ''' + Active: bool + ''' + No have docs. + ''' + Direction: LinkControlToFieldDirection + ''' + No have docs. + ''' + Control: Component + ''' + No have docs. + ''' + ControlMemberName: str + ''' + No have docs. + ''' + Track: bool + ''' + No have docs. + ''' + CustomFormat: str + ''' + No have docs. + ''' + CustomParse: str + ''' + No have docs. + ''' + LookupDataSource: BaseLinkingBindSource + ''' + No have docs. + ''' + LookupKeyFieldName: str + ''' + No have docs. + ''' + LookupValueFieldName: str + ''' + No have docs. + ''' + UseEvalShortcuts: bool + ''' + Determines whether this binding component delegate `uses evaluation shortcuts <LiveBindings_in_RAD_Studio.htm#Using_Evaluation_Shortcuts>`__ (``True``) or not (``False``). + ''' + + def Reactivate(self) -> None: + ''' + No have docs. + ''' + def AllowBidirectional(self) -> bool: + ''' + No have docs. + ''' + def CheckAllowBidirectional(self) -> bool: + ''' + No have docs. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Data.Bind.Components.TCustomLinkControlToField.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def GetSourceScopes(self, Sender: Component, AScopes: list[IScope]) -> list[IScope]: + ''' + Returns an array of scopes for the source component. + + ``Data.Bind.Components.TCustomLinkControlToField.GetSourceScopes`` inherits from `Data.Bind.Components.TBindComponentDelegate.GetSourceScopes <Data.Bind.Components.TBindComponentDelegate.GetSourceScopes.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GetSourceScopes <Data.Bind.Components.TBindComponentDelegate.GetSourceScopes.htm>`__. + ''' + def MemberRenaming(self, Sender: Component, AComponent: Component, ACurMemberName: str, ANewMemberName: str) -> None: + ''' + Used for renaming a member of this binding component. + + ``Data.Bind.Components.TCustomLinkControlToField.MemberRenaming`` inherits from `Data.Bind.Components.TBindComponentDelegate.MemberRenaming <Data.Bind.Components.TBindComponentDelegate.MemberRenaming.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.MemberRenaming <Data.Bind.Components.TBindComponentDelegate.MemberRenaming.htm>`__. + + `MemberRenaming <Data.Bind.Components.TBindComponentDelegate.MemberRenaming.htm>`__ is used for renaming component members. The old member name is given through the ``ACurMemberName`` parameter, while the new member name is given through the ``ANewMemberName`` parameter. + ''' + def SetAutoActivate(self, Value: bool) -> None: + ''' + No have docs. + ''' + def GetControlExpression(self) -> str: + ''' + No have docs. + ''' + def SetActive(self, Value: bool) -> None: + ''' + Activates or deactivates the bind control value of this link delegate wrapper. + + ``Data.Bind.Components.TCustomLinkControlToField.SetActive`` inherits from `Data.Bind.Components.TLinkControlDelegate.SetActive <Data.Bind.Components.TLinkControlDelegate.SetActive.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkControlDelegate.SetActive <Data.Bind.Components.TLinkControlDelegate.SetActive.htm>`__. + ''' + def GetActive(self) -> bool: + ''' + No have docs. + ''' + def CanActivate(self, Sender: Component) -> bool: + ''' + Lets the wrapper binding component indicate whether a delegate (or contained) binding component may be activated. + + ``Data.Bind.Components.TCustomLinkControlToField.CanActivate`` inherits from `Data.Bind.Components.TBindComponentDelegate.CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__. + + The `CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__ method returns ``True`` if the delegate (or contained) binding component can be activated, ``False`` otherwise. + ''' + def ClearGeneratedExpressions(self, Sender: Component) -> None: + ''' + Clears all the generated bindings expressions, at once, for the quick binding component this delegate wraps onto. + + ``Data.Bind.Components.TCustomLinkControlToField.ClearGeneratedExpressions`` inherits from `Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions <Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions <Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions.htm>`__. + + For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + def RequiresControlHandler(self) -> bool: + ''' + Used internally for observing purposes. + + ``Data.Bind.Components.TCustomLinkControlToField.RequiresControlHandler`` inherits from `Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler <Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler <Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler.htm>`__. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + ``Data.Bind.Components.TCustomLinkControlToField.Loaded`` inherits from `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. All content below this line refers to `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. + + Do not call the protected `Loaded <System.Classes.TComponent.Loaded.htm>`__ method. The streaming system calls this method after it loads the component's form from a *Stream*. + + When the streaming system loads a form or data module from its form file, it first constructs the ``Form`` component by calling its constructor, then reads its property values from the ``Form`` file. After reading all the property values for all the components, the streaming system calls the `Loaded <System.Classes.TComponent.Loaded.htm>`__ methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time `Loaded <System.Classes.TComponent.Loaded.htm>`__ is called. `Loaded <System.Classes.TComponent.Loaded.htm>`__ is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, `Loaded <System.Classes.TComponent.Loaded.htm>`__ clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: `Loaded <System.Classes.TComponent.Loaded.htm>`__ may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden `Loaded <System.Classes.TComponent.Loaded.htm>`__ method without first checking that the memory has not been allocated in a previous call. + ''' + def GetUseEvalShortcuts(self) -> bool: + ''' + Setter of `UseEvalShortcuts <Data.Bind.Components.TCustomLinkControlToField.UseEvalShortcuts.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + + ``Data.Bind.Components.TCustomLinkControlToField.Create`` inherits from `Data.Bind.Components.TContainedBindComponent.Create <Data.Bind.Components.TContainedBindComponent.Create.htm>`__. All content below this line refers to `Data.Bind.Components.TContainedBindComponent.Create <Data.Bind.Components.TContainedBindComponent.Create.htm>`__. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + + ``Data.Bind.Components.TCustomLinkControlToField.Destroy`` inherits from `Data.Bind.Components.TContainedBindComponent.Destroy <Data.Bind.Components.TContainedBindComponent.Destroy.htm>`__. All content below this line refers to `Data.Bind.Components.TContainedBindComponent.Destroy <Data.Bind.Components.TContainedBindComponent.Destroy.htm>`__. + ''' + def ClearExpressionProperties(self) -> None: + ''' + No have docs. + ''' + def GetDelegates(self) -> list[CommonBindComponent]: + ''' + Gets the delegate (or contained) binding components that this wrapper binding component uses to execute expressions and respond to user input. + + ``Data.Bind.Components.TCustomLinkControlToField.GetDelegates`` inherits from `Data.Bind.Components.TBindComponentDelegate.GetDelegates <Data.Bind.Components.TBindComponentDelegate.GetDelegates.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GetDelegates <Data.Bind.Components.TBindComponentDelegate.GetDelegates.htm>`__. + ''' + def GenerateExpressions(self, Sender: Component) -> None: + ''' + Automatically generates the bindings expressions for the quick binding component this delegate wraps onto. + + ``Data.Bind.Components.TCustomLinkControlToField.GenerateExpressions`` inherits from `Data.Bind.Components.TBindComponentDelegate.GenerateExpressions <Data.Bind.Components.TBindComponentDelegate.GenerateExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GenerateExpressions <Data.Bind.Components.TBindComponentDelegate.GenerateExpressions.htm>`__. + + For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomLinkLabel(WinControl): + ''' + ============================= + Vcl.ExtCtrls.TCustomLinkLabel + ============================= + + Base class for labels containing an HTML link. + + `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__ is the base class for labels that can contain an HTML link tag (and only that). The `OnLinkClick <Vcl.ExtCtrls.TCustomLinkLabel.OnLinkClick.htm>`__ event is triggered by clicking the link. + ''' + + __hash__: ClassVar[None] = ... + Alignment: LinkAlignment + ''' + Controls the horizontal placement of the text within the link label. + + Set ``Alignment`` to specify how the text of the link label is justified within the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property of the link label control. The default value of ``Alignment`` property is ``taLeftJustify``. The possible values for the ``Alignment`` property are ``taLeftJustify`` and ``taRightJustify``. + + .. note:: This is available for *Windows Vista* only, *Windows 7*, or later Windows operating systems. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + UseVisualStyle: bool + ''' + Indicates whether the link label can use visual styles. + + ``UseVisualStyle`` specifies whether the link label supports visual styles. The default value of the ``UseVisualStyle`` property is ``False``. + + .. note:: This is available on *Windows Vista*, *Windows 7*, or later Windows operating systems only. + ''' + + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Sets the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + + `SetAutoSize <Vcl.Controls.TControl.SetAutoSize.htm>`__ is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to set the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + ''' + def UseThemes(self) -> bool: + ''' + Determines whether the application containing the ``LinkLabel`` supports themes. + + The ``UseThemes()`` method returns ``True`` if the application has themes enabled, or ``False`` otherwise. You can select or deselect "Enable runtime themes" on the *Project* > *Options* > *Application* page. + + .. note:: This is available for *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.Controls.TWinControl.Create.htm>`__ an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Call `Create <Vcl.Controls.TWinControl.Create.htm>`__ to construct and initialize a new control and insert the newly-constructed control into its owner, as specified by the ``AOwner`` parameter. `Create <Vcl.Controls.TWinControl.Create.htm>`__ inserts the control in the owner by calling the owner's ``InsertComponent()`` method. + + Most controls override `Create <Vcl.Controls.TWinControl.Create.htm>`__ to initialize their unique properties. Objects that override the `Create <Vcl.Controls.TWinControl.Create.htm>`__ method must always call the inherited `Create <Vcl.Controls.TWinControl.Create.htm>`__ method first, and then proceed with the component-specific initialization. Specify the override directive when overriding the `Create <Vcl.Controls.TWinControl.Create.htm>`__ method. + + If a component's `Create <Vcl.Controls.TWinControl.Create.htm>`__ method allocates resources or memory, override the `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ method to free those resources. + ''' + + def OnLinkClick(self, Sender: Object, Link: str, LinkType: SysLinkType) -> None: + ''' + # OnLinkClick: SysLinkEvent + Event for click on `CustomLinkLabel <Vcl.ExtCtrls.TCustomLinkLabel.htm>`__ HTML link. + + ``OnLinkClick`` is triggered by a click on a `CustomLinkLabel <Vcl.ExtCtrls.TCustomLinkLabel.htm>`__'s HTML link. The event identifies the link URI and link type. + + OnLinkClick is an event handler of type `Vcl.ExtCtrls.TSysLinkEvent <Vcl.ExtCtrls.TSysLinkEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomLinkListControlToField(LinkControlToFieldDelegate, IControlEditorName): + ''' + ================================================== + Data.Bind.Components.TCustomLinkListControlToField + ================================================== + + Represents the base class for linking a ``ListControl`` to a field. + + The ``CustomLinkListControlToField`` class implements the functionality for linking a ``ListControl``, such as ``ListBox``, to a field. + + .. tip:: If the direction is bidirectional, then the control must support the ``IEditLinkObserver`` interface. + ''' + + __hash__: ClassVar[None] = ... + BindLink: CustomBindGridListLink + ''' + No have docs. + ''' + FieldName: str + ''' + No have docs. + ''' + AutoActivate: bool + ''' + No have docs. + ''' + Active: bool + ''' + No have docs. + ''' + Direction: LinkControlToFieldDirection + ''' + No have docs. + ''' + BufferCount: int + ''' + No have docs. + ''' + AutoBufferCount: bool + ''' + No have docs. + ''' + Control: Component + ''' + No have docs. + ''' + ControlMemberName: str + ''' + No have docs. + ''' + CustomFormat: str + ''' + No have docs. + ''' + CustomParse: str + ''' + No have docs. + ''' + FillExpressions: FormatExpressions + ''' + Specifies additional optional expressions to use when filling the ``ListControl``. Use this collection when multiple expressions are needed to fill an item in the list. + + For instance, you can use ``FillExpressions`` in order to populate a *FireMonkey* ``ListBox`` item ``Text`` and ``Detail`` properties. Use the `FillDisplayCustomFormat <Data.Bind.Components.TCustomLinkFillControlToField.FillDisplayCustomFormat.htm>`__ and `FillDisplayCustomFormat <Data.Bind.Components.TCustomLinkFillControlToField.FillDisplayCustomFormat.htm>`__ properties in order to fill the ``Text`` property and add an item to the `FillExpressions <Data.Bind.Components.TCustomLinkFillControlToField.FillExpressions.htm>`__ collection, for the ``Detail`` property. + ''' + ListItemStyle: str + ''' + No have docs. + ''' + FillHeaderExpressions: FormatExpressions + ''' + Specifies a collection of expressions to fill a list header. This property is optional. + ''' + FillBreakFieldName: str + ''' + Specifies the field used to determine a break. This property is optional. + ''' + FillBreakCustomFormat: str + ''' + Specifies a custom expression that is used with the field defined by the `FillBreakFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName.htm>`__ property. For instance, the expression ``StrCopy(%s, 0, 1);`` causes a break when the first character of the field is different. This property is optional. + ''' + FillHeaderFieldName: str + ''' + Specifies the field to display in the list header. If `FillBreakFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName.htm>`__ and `FillBreakCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat.htm>`__ are blank, then the value determined using **FillHeaderFieldName** and `FillBreakCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat.htm>`__ controls breaks. This is the only required field to cause breaking. + ''' + FillHeaderCustomFormat: str + ''' + Specifies a custom expression that is used with the field defined by the `FillHeaderFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName.htm>`__ property. For instance, the expression ``StrCopy(%s, 0, 1);`` displays the first character of the field in the header. This property is optional. + ''' + FillBreakGroups: FillBreakGroups + ''' + Specifies a collection of break value ranges. The break value falls within an item in this collection. The display value associated with the item is displayed in the header. This property is optional. + ''' + UseEvalShortcuts: bool + ''' + Determines whether this binding component delegate `uses evaluation shortcuts <LiveBindings_in_RAD_Studio.htm#Using_Evaluation_Shortcuts>`__ (``True``) or not (``False``). + ''' + + def Reactivate(self) -> None: + ''' + No have docs. + ''' + def GetActive(self) -> bool: + ''' + No have docs. + ''' + def SetActive(self, Value: bool) -> None: + ''' + Activates or deactivates the bind control value of this link delegate wrapper. + + ``Data.Bind.Components.TCustomLinkListControlToField.SetActive`` inherits from `Data.Bind.Components.TLinkControlDelegate.SetActive <Data.Bind.Components.TLinkControlDelegate.SetActive.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkControlDelegate.SetActive <Data.Bind.Components.TLinkControlDelegate.SetActive.htm>`__. + ''' + def GetControlComponentMemberName(self) -> str: + ''' + Returns a `string <System.String.htm>`__ containing the name of the control component member. + + ``Data.Bind.Components.TCustomLinkListControlToField.GetControlComponentMemberName`` inherits from `Data.Bind.Components.TLinkControlDelegate.GetControlComponentMemberName <Data.Bind.Components.TLinkControlDelegate.GetControlComponentMemberName.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkControlDelegate.GetControlComponentMemberName <Data.Bind.Components.TLinkControlDelegate.GetControlComponentMemberName.htm>`__. + + When a control member is specified, expressions execute against the member rather than against the control component. + ''' + def CanActivate(self, Sender: Component) -> bool: + ''' + Lets the wrapper binding component indicate whether a delegate (or contained) binding component may be activated. + + ``Data.Bind.Components.TCustomLinkListControlToField.CanActivate`` inherits from `Data.Bind.Components.TBindComponentDelegate.CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__. + + The `CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__ method returns ``True`` if the delegate (or contained) binding component can be activated, ``False`` otherwise. + ''' + def ClearGeneratedExpressions(self, Sender: Component) -> None: + ''' + Clears all the generated bindings expressions, at once, for the quick binding component this delegate wraps onto. + + ``Data.Bind.Components.TCustomLinkListControlToField.ClearGeneratedExpressions`` inherits from `Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions <Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions <Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions.htm>`__. + + For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + def RequiresControlHandler(self) -> bool: + ''' + Used internally for observing purposes. + + ``Data.Bind.Components.TCustomLinkListControlToField.RequiresControlHandler`` inherits from `Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler <Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler <Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler.htm>`__. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + ``Data.Bind.Components.TCustomLinkListControlToField.Loaded`` inherits from `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. All content below this line refers to `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. + + Do not call the protected `Loaded <System.Classes.TComponent.Loaded.htm>`__ method. The streaming system calls this method after it loads the component's form from a *Stream*. + + When the streaming system loads a form or data module from its form file, it first constructs the ``Form`` component by calling its constructor, then reads its property values from the ``Form`` file. After reading all the property values for all the components, the streaming system calls the `Loaded <System.Classes.TComponent.Loaded.htm>`__ methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time `Loaded <System.Classes.TComponent.Loaded.htm>`__ is called. `Loaded <System.Classes.TComponent.Loaded.htm>`__ is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, `Loaded <System.Classes.TComponent.Loaded.htm>`__ clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: `Loaded <System.Classes.TComponent.Loaded.htm>`__ may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden `Loaded <System.Classes.TComponent.Loaded.htm>`__ method without first checking that the memory has not been allocated in a previous call. + ''' + def GetDisplaysMultipleSourceMembers(self) -> bool: + ''' + No have docs. + ''' + def GetControlEditorName(self, AGuid: GUID) -> str: + ''' + No have docs. + ''' + def SetFieldName(self, AName: str) -> None: + ''' + No have docs. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Designates methods for storing an object's unpublished data on a *Stream* such as a form file. + + ``Data.Bind.Components.TCustomLinkListControlToField.DefineProperties`` inherits from `System.Classes.TComponent.DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__. All content below this line refers to `System.Classes.TComponent.DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__. + + `Component <System.Classes.TComponent.htm>`__ overrides the `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ method defined in `Persistent <System.Classes.TPersistent.htm>`__ to define "fake" ``Top`` and ``Left`` properties. These are defined so that components that are not controls can be manipulated at design time. However, the ``Top`` and ``Left`` properties are hidden, that is, they are not published, because only controls appear at run time. + + `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ is virtual; descendent classes can override it. When overriding `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__, be aware that the `Ancestor <System.Classes.TFiler.Ancestor.htm>`__ property of ``Filer`` might be set, and that this property can determine whether or not it is appropriate to write properties. + + `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ is called automatically as part of the component streaming system; do not call it directly. + ''' + def GetUseEvalShortcuts(self) -> bool: + ''' + Setter of `UseEvalShortcuts <Data.Bind.Components.TCustomLinkListControlToField.UseEvalShortcuts.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + + ``Data.Bind.Components.TCustomLinkListControlToField.Create`` inherits from `Data.Bind.Components.TContainedBindComponent.Create <Data.Bind.Components.TContainedBindComponent.Create.htm>`__. All content below this line refers to `Data.Bind.Components.TContainedBindComponent.Create <Data.Bind.Components.TContainedBindComponent.Create.htm>`__. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + + ``Data.Bind.Components.TCustomLinkListControlToField.Destroy`` inherits from `Data.Bind.Components.TContainedBindComponent.Destroy <Data.Bind.Components.TContainedBindComponent.Destroy.htm>`__. All content below this line refers to `Data.Bind.Components.TContainedBindComponent.Destroy <Data.Bind.Components.TContainedBindComponent.Destroy.htm>`__. + ''' + def ClearExpressionProperties(self) -> None: + ''' + No have docs. + ''' + def FillList(self) -> None: + ''' + No have docs. + ''' + def GetDelegates(self) -> list[CommonBindComponent]: + ''' + Gets the delegate (or contained) binding components that this wrapper binding component uses to execute expressions and respond to user input. + + ``Data.Bind.Components.TCustomLinkListControlToField.GetDelegates`` inherits from `Data.Bind.Components.TBindComponentDelegate.GetDelegates <Data.Bind.Components.TBindComponentDelegate.GetDelegates.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GetDelegates <Data.Bind.Components.TBindComponentDelegate.GetDelegates.htm>`__. + ''' + def GenerateExpressions(self, Sender: Component) -> None: + ''' + Automatically generates the bindings expressions for the quick binding component this delegate wraps onto. + + ``Data.Bind.Components.TCustomLinkListControlToField.GenerateExpressions`` inherits from `Data.Bind.Components.TBindComponentDelegate.GenerateExpressions <Data.Bind.Components.TBindComponentDelegate.GenerateExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GenerateExpressions <Data.Bind.Components.TBindComponentDelegate.GenerateExpressions.htm>`__. + + For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + + def OnFilledListItem(self, Sender: Object, AEditor: IBindListEditorItem) -> None: + ''' + # OnFilledListItem: FillListItemEvent + ''' + def OnFillingListItem(self, Sender: Object, AEditor: IBindListEditorItem) -> None: + ''' + # OnFillingListItem: FillListItemEvent + ''' + def OnFillingList(self, Sender: Object) -> None: + ''' + # OnFillingList: NotifyEvent + ''' + def OnFilledList(self, Sender: Object) -> None: + ''' + # OnFilledList: NotifyEvent + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomLinkPropertyToField(LinkPropertyToFieldDelegate): + ''' + =============================================== + Data.Bind.Components.TCustomLinkPropertyToField + =============================================== + + Represents the base class for linking a property of a component to a field. + + The ``CustomLinkPropertyToField`` class implements the functionality for linking a property of a component to a field. + + .. tip:: The user input to this component is not monitored using an observer. + ''' + + __hash__: ClassVar[None] = ... + BindLink: CustomBindLink + ''' + No have docs. + ''' + AutoActivate: bool + ''' + No have docs. + ''' + Active: bool + ''' + No have docs. + ''' + CustomFormat: str + ''' + No have docs. + ''' + LookupDataSource: BaseLinkingBindSource + ''' + No have docs. + ''' + LookupKeyFieldName: str + ''' + No have docs. + ''' + LookupValueFieldName: str + ''' + No have docs. + ''' + + def Reactivate(self) -> None: + ''' + No have docs. + ''' + def GetActive(self) -> bool: + ''' + No have docs. + ''' + def SetActive(self, Value: bool) -> None: + ''' + Protected setter implementation for the `Active <Data.Bind.Components.TCustomLinkPropertyToField.Active.htm>`__ property. + + ``Data.Bind.Components.TCustomLinkPropertyToField.SetActive`` inherits from `Data.Bind.Components.TLinkPropertyToFieldDelegate.SetActive <Data.Bind.Components.TLinkPropertyToFieldDelegate.SetActive.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkPropertyToFieldDelegate.SetActive <Data.Bind.Components.TLinkPropertyToFieldDelegate.SetActive.htm>`__. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Data.Bind.Components.TCustomLinkPropertyToField.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def GetSourceScopes(self, Sender: Component, AScopes: list[IScope]) -> list[IScope]: + ''' + Returns an array of scopes for the source component. + + ``Data.Bind.Components.TCustomLinkPropertyToField.GetSourceScopes`` inherits from `Data.Bind.Components.TBindComponentDelegate.GetSourceScopes <Data.Bind.Components.TBindComponentDelegate.GetSourceScopes.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GetSourceScopes <Data.Bind.Components.TBindComponentDelegate.GetSourceScopes.htm>`__. + ''' + def MemberRenaming(self, Sender: Component, AComponent: Component, ACurMemberName: str, ANewMemberName: str) -> None: + ''' + Used for renaming a member of this binding component. + + ``Data.Bind.Components.TCustomLinkPropertyToField.MemberRenaming`` inherits from `Data.Bind.Components.TBindComponentDelegate.MemberRenaming <Data.Bind.Components.TBindComponentDelegate.MemberRenaming.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.MemberRenaming <Data.Bind.Components.TBindComponentDelegate.MemberRenaming.htm>`__. + + `MemberRenaming <Data.Bind.Components.TBindComponentDelegate.MemberRenaming.htm>`__ is used for renaming component members. The old member name is given through the ``ACurMemberName`` parameter, while the new member name is given through the ``ANewMemberName`` parameter. + ''' + def GetDelegates(self) -> list[CommonBindComponent]: + ''' + Gets the delegate (or contained) binding components that this wrapper binding component uses to execute expressions and respond to user input. + + ``Data.Bind.Components.TCustomLinkPropertyToField.GetDelegates`` inherits from `Data.Bind.Components.TBindComponentDelegate.GetDelegates <Data.Bind.Components.TBindComponentDelegate.GetDelegates.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GetDelegates <Data.Bind.Components.TBindComponentDelegate.GetDelegates.htm>`__. + ''' + def CanActivate(self, Sender: Component) -> bool: + ''' + Lets the wrapper binding component indicate whether a delegate (or contained) binding component may be activated. + + ``Data.Bind.Components.TCustomLinkPropertyToField.CanActivate`` inherits from `Data.Bind.Components.TBindComponentDelegate.CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__. + + The `CanActivate <Data.Bind.Components.TBindComponentDelegate.CanActivate.htm>`__ method returns ``True`` if the delegate (or contained) binding component can be activated, ``False`` otherwise. + ''' + def ClearGeneratedExpressions(self, Sender: Component) -> None: + ''' + Clears all the generated bindings expressions, at once, for the quick binding component this delegate wraps onto. + + ``Data.Bind.Components.TCustomLinkPropertyToField.ClearGeneratedExpressions`` inherits from `Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions <Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions <Data.Bind.Components.TBindComponentDelegate.ClearGeneratedExpressions.htm>`__. + + For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + def RequiresControlHandler(self) -> bool: + ''' + Used internally for observing purposes. + + ``Data.Bind.Components.TCustomLinkPropertyToField.RequiresControlHandler`` inherits from `Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler <Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler <Data.Bind.Components.TBindComponentDelegate.RequiresControlHandler.htm>`__. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + ``Data.Bind.Components.TCustomLinkPropertyToField.Loaded`` inherits from `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. All content below this line refers to `System.Classes.TComponent.Loaded <System.Classes.TComponent.Loaded.htm>`__. + + Do not call the protected `Loaded <System.Classes.TComponent.Loaded.htm>`__ method. The streaming system calls this method after it loads the component's form from a *Stream*. + + When the streaming system loads a form or data module from its form file, it first constructs the ``Form`` component by calling its constructor, then reads its property values from the ``Form`` file. After reading all the property values for all the components, the streaming system calls the `Loaded <System.Classes.TComponent.Loaded.htm>`__ methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time `Loaded <System.Classes.TComponent.Loaded.htm>`__ is called. `Loaded <System.Classes.TComponent.Loaded.htm>`__ is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, `Loaded <System.Classes.TComponent.Loaded.htm>`__ clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: `Loaded <System.Classes.TComponent.Loaded.htm>`__ may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden `Loaded <System.Classes.TComponent.Loaded.htm>`__ method without first checking that the memory has not been allocated in a previous call. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + + ``Data.Bind.Components.TCustomLinkPropertyToField.Create`` inherits from `Data.Bind.Components.TContainedBindComponent.Create <Data.Bind.Components.TContainedBindComponent.Create.htm>`__. All content below this line refers to `Data.Bind.Components.TContainedBindComponent.Create <Data.Bind.Components.TContainedBindComponent.Create.htm>`__. + ''' + def Destroy(self) -> None: + ''' + Destroys an instance of the `ContainedBindComponent <Data.Bind.Components.TContainedBindComponent.htm>`__ class. + + ``Data.Bind.Components.TCustomLinkPropertyToField.Destroy`` inherits from `Data.Bind.Components.TContainedBindComponent.Destroy <Data.Bind.Components.TContainedBindComponent.Destroy.htm>`__. All content below this line refers to `Data.Bind.Components.TContainedBindComponent.Destroy <Data.Bind.Components.TContainedBindComponent.Destroy.htm>`__. + ''' + def GenerateExpressions(self, Sender: Component) -> None: + ''' + Automatically generates the bindings expressions for the quick binding component this delegate wraps onto. + + ``Data.Bind.Components.TCustomLinkPropertyToField.GenerateExpressions`` inherits from `Data.Bind.Components.TBindComponentDelegate.GenerateExpressions <Data.Bind.Components.TBindComponentDelegate.GenerateExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.GenerateExpressions <Data.Bind.Components.TBindComponentDelegate.GenerateExpressions.htm>`__. + + For more information regarding the quick binding components, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomListControl(WinControl): + ''' + =============================== + Vcl.Controls.TCustomListControl + =============================== + + ``CustomListControl`` is the base class for controls that display a list of items. + + ``CustomListControl`` is the common base class for controls that represent a list of items. Its descendants include ``ComboBox``\ es, ``ListBox``\ es, and ``ListView``\ s. ``CustomListControl`` introduces a common set of properties and methods for working with the items in the list. This includes the ability to: + + - Add items to the list. + - Delete items from the list. + - Select items in the list. + - Copy items to another ``CustomListControl`` descendant. + - Rearrange the order of items. + + ``CustomListControl`` cannot be instantiated directly. + ''' + + __hash__: ClassVar[None] = ... + ItemIndex: int + ''' + Specifies the index of the selected item. + + Read ``ItemIndex`` to determine which item is selected. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ``ItemIndex`` is -1. If the ``ListControl`` supports multiple selected items, ``ItemIndex`` is the index of the selected item that has focus. + + Set ``ItemIndex`` programmatically to select an item by passing in the ``Index`` value. + ''' + + def GetItemIndex(self) -> int: + ''' + Returns the value of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + Override ``GetItemIndex()`` to provide the read implementation for the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. ``GetItemIndex()`` returns the index of the selected item, where the first item in the list has index 0, the second item has index 1, and so on. If no item is selected, ``GetItemIndex()`` returns -1. If the ``ListControl`` supports multiple selected items, ``GetItemIndex()`` returns the index of the selected item that has focus. + ''' + def IsTouchPropertyStored(self, AProperty: TouchProperty) -> bool: + ''' + Checks whether the associated touch manager stored any of the given options. + + ``Vcl.Controls.TCustomListControl.IsTouchPropertyStored`` inherits from `Vcl.Controls.TControl.IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__. All content below this line refers to `Vcl.Controls.TControl.IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used internally by the *VCL Framework* to check whether the associated touch manager component has stored the given options. Do not call `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ directly. `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used primarily to ensure that controls that do not require gesturing are not storing useless data in the *DFMs* or executables. + ''' + def SetItemIndex(self, Value: int) -> None: + ''' + Sets the value of the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + Override ``SetItemIndex()`` to provide the write implementation for the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + ``Value`` represents the index of the item to select, where the first item in the list has index 0, the second item has index 1, and so on. If ``Value`` is -1, ``SetItemIndex()`` deselects all items (the same as the `ClearSelection <Vcl.Controls.TCustomListControl.ClearSelection.htm>`__ method). + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.Controls.TWinControl.Create.htm>`__ an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Call `Create <Vcl.Controls.TWinControl.Create.htm>`__ to construct and initialize a new control and insert the newly-constructed control into its owner, as specified by the ``AOwner`` parameter. `Create <Vcl.Controls.TWinControl.Create.htm>`__ inserts the control in the owner by calling the owner's ``InsertComponent()`` method. + + Most controls override `Create <Vcl.Controls.TWinControl.Create.htm>`__ to initialize their unique properties. Objects that override the `Create <Vcl.Controls.TWinControl.Create.htm>`__ method must always call the inherited `Create <Vcl.Controls.TWinControl.Create.htm>`__ method first, and then proceed with the component-specific initialization. Specify the override directive when overriding the `Create <Vcl.Controls.TWinControl.Create.htm>`__ method. + + If a component's `Create <Vcl.Controls.TWinControl.Create.htm>`__ method allocates resources or memory, override the `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ method to free those resources. + ''' + def AddItem(self, Item: str, AObject: Object) -> None: + ''' + Adds an item to the ``ListControl``. + + ``AddItem()`` adds an item to the end of the list, possibly associating it with a specified object. + + ``Item`` is the text that is the item's value. This is the string that appears for the item in the ``ListControl``. + + ``AObject`` is an object that you can associate with the item. Note that the ``ListControl`` does not take ownership of this object. That is, if you delete the item, the corresponding object is not freed. + ''' + def Clear(self) -> None: + ''' + Deletes all the items from the ``ListControl``. + + ``Clear()`` empties the ``ListControl`` so that it contains no items. + ''' + def ClearSelection(self) -> None: + ''' + Removes the selection, leaving all items unselected. + + Call ``ClearSelection()`` to cancel the selection of any selected items in the ``ListControl``. ``ClearSelection()`` removes the selection, but leaves the items in the list. + ''' + def CopySelection(self, Destination: CustomListControl) -> None: + ''' + Copies the selected items to another `CustomListControl <Vcl.Controls.TCustomListControl.htm>`__ descendant. + + ``CopySelection()`` adds all selected items to another `CustomListControl <Vcl.Controls.TCustomListControl.htm>`__ descendant. + + ``Destination`` is the ``ListControl`` that receives the items. + ''' + def DeleteSelected(self) -> None: + ''' + Deletes all the selected items. + + Call ``DeleteSelected()`` to remove all selected items from the ``ListControl``. ``DeleteSelected()`` deletes only the items that are selected. + ''' + def GetCount(self) -> int: + ''' + Returns the number of items in the list. + + Call ``GetCount()`` to determine the number of items in the ``ListControl``. + ''' + def MoveSelection(self, Destination: CustomListControl) -> None: + ''' + Moves all selected items to another ``ListControl``. + + Call ``MoveSelection`` to copy all selected items to another ``ListControl`` and then delete them from this ``ListControl``. + ''' + def SelectAll(self) -> bool: + ''' + Selects all items or all text in the selected item. + + ``SelectAll()`` performs different tasks, depending on the custom ``ListControl`` descendant. In ``ListControl``\ s that allow multiple items to be selected, ``SelectAll()`` selects all items in the list. In ``ListControl``\ s that allow only one item to be selected, ``SelectAll()`` selects the entire text of the current item. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomListView(CustomMultiSelectListControl): + '''Wrapper for Delphi TCustomListView''' + __hash__: ClassVar[None] = ... + BoundingRect: Rect + '''Rect:''' + Canvas: Canvas + '''Canvas:''' + Checkboxes: bool + '''bool:''' + Column: ListColumn + '''ListColumn:''' + ControlCount: Any + '''Returns the count of contained controls''' + Controls: Any + '''Returns an iterator over contained controls''' + DropTarget: ListItem + '''ListItem:''' + FlatScrollBars: bool + '''bool:''' + Focused: Any + '''Determines whether the control has input focus.''' + FullDrag: bool + '''bool:''' + GridLines: bool + '''bool:''' + Handle: Any + '''Provides access to the underlying Windows screen object for the control.''' + HandleAllocated: Any + '''Reports whether a screen object handle exists for the control.''' + HotTrack: bool + '''bool:''' + HotTrackStyles: ListHotTrackStyles + '''ListHotTrackStyles:''' + ItemFocused: ListItem + '''ListItem:''' + Items: ListItems + '''ListItems:''' + ParentWindow: Any + '''Reference to parent's underlying control.''' + RowSelect: bool + '''bool:''' + SelCount: int + '''int:''' + Selected: ListItem + '''ListItem:''' + Showing: Any + '''Indicates whether the control is showing on the screen.''' + TopItem: ListItem + '''ListItem:''' + ViewOrigin: Point + '''Point:''' + VisibleRowCount: int + '''int:''' + WorkAreas: WorkAreas + '''WorkAreas:''' + + def AddItem(self, Item: str, AObject: Object) -> None: + '''TCustomListView.AddItem(Item: str, AObject: Object) -> None''' + def AlphaSort(self, *args, **kwargs) -> Any: ... + def Arrange(self, Code: ListArrangement) -> None: + '''TCustomListView.Arrange(Code: ListArrangement) -> None''' + def CanFocus(self) -> Any: + '''TWinControl.CanFocus() + Indicates whether a control can receive focus.''' + def Clear(self, *args, **kwargs) -> Any: ... + def ClearSelection(self, *args, **kwargs) -> Any: ... + def CopySelection(self, Destination: CustomListControl) -> None: + '''TCustomListView.CopySelection(Destination: CustomListControl) -> None''' + def Create(self, AOwner: Component) -> None: + '''TCustomListView.Create(AOwner: Component) -> None + Creates an instance of TWinControl. + Call Create to construct and initialize a new control and insert the newly-constructed control into its owner, as specified by the AOwner parameter. Create inserts the control in the owner by calling the owner's InsertComponent method. + Most controls override Create to initialize their unique properties. Objects that override the Create method must always call the inherited Create method first, and then proceed with the component-specific initialization. Specify the override directive when overriding the Create method. + If a component's Create method allocates resources or memory, override the Destroy method to free those resources.''' + def CustomSort(self, SortProc: Callable[[int,int,int],int], lParam: int) -> bool: + '''TCustomListView.CustomSort(SortProc: Callable[[int, int, int], int], lParam: int) -> bool''' + def DeleteSelected(self, *args, **kwargs) -> Any: ... + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys an instance of TWinControl. + Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TWinControl reference is not nil, and only then calls Destroy.''' + def FindCaption(self, StartIndex: int, Value: str, Partial: bool, Inclusive: bool, Wrap: bool) -> ListItem: + '''TCustomListView.FindCaption(StartIndex: int, Value: str, Partial: bool, Inclusive: bool, Wrap: bool) -> ListItem''' + def FindData(self, StartIndex: int, Value: Pointer, Inclusive: bool, Wrap: bool) -> ListItem: + '''TCustomListView.FindData(StartIndex: int, Value: Pointer, Inclusive: bool, Wrap: bool) -> ListItem''' + def GetCount(self, *args, **kwargs) -> Any: ... + def GetDragImages(self, *args, **kwargs) -> Any: + '''Returns the control's image list containing the image to be displayed while dragging. + Override GetDragImages to provide a custom image list for the control. As implemented in TControl, GetDragImages returns nil (Delphi) or NULL (C++).''' + def GetHitTestInfoAt(self, X: int, Y: int) -> HitTests: + '''TCustomListView.GetHitTestInfoAt(X: int, Y: int) -> HitTests''' + def GetItemAt(self, X: int, Y: int) -> ListItem: + '''TCustomListView.GetItemAt(X: int, Y: int) -> ListItem''' + def GetNearestItem(self, Point: Point, Direction: SearchDirection) -> ListItem: + '''TCustomListView.GetNearestItem(Point: Point, Direction: SearchDirection) -> ListItem''' + def GetNextItem(self, StartItem: ListItem, Direction: SearchDirection, States: ItemStates) -> ListItem: + '''TCustomListView.GetNextItem(StartItem: ListItem, Direction: SearchDirection, States: ItemStates) -> ListItem''' + def GetSearchString(self, *args, **kwargs) -> Any: ... + def IsEditing(self, *args, **kwargs) -> Any: ... + def Scroll(self, DX: int, DY: int) -> None: + '''TCustomListView.Scroll(DX: int, DY: int) -> None''' + def SelectAll(self, *args, **kwargs) -> Any: ... + def SetFocus(self) -> Any: + '''TWinControl.SetFocus() + Gives the input focus to the control.''' + def StringWidth(self, S: str) -> int: + '''TCustomListView.StringWidth(S: str) -> int''' + def UpdateItems(self, FirstIndex: int, LastIndex: int) -> None: + '''TCustomListView.UpdateItems(FirstIndex: int, LastIndex: int) -> None''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomMemo(CustomEdit): + ''' + ======================== + Vcl.StdCtrls.TCustomMemo + ======================== + + ``CustomMemo`` is the base type for ``Memo`` components, which are multiline edit boxes, including `Memo <Vcl.StdCtrls.TMemo.htm>`__ and ``DBMemo``. + + ``CustomMemo`` introduces new properties and methods to expand the capabilities of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ for handling multiline edit boxes. + + Do not create instances of ``CustomMemo``. Use ``CustomMemo`` as a base class when declaring control objects that implement a multiline edit control. Properties and methods of ``CustomMemo`` provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior. + ''' + + __hash__: ClassVar[None] = ... + ScrollBars: ScrollStyle + ''' + Determines whether the ``Memo`` control has ``ScrollBar``\ s. + + Use ``ScrollBars`` to give a multiline ``Edit`` control horizontal or vertical ``ScrollBar``\ s. ``ScrollBars`` can take one of the following values: + + =================== ===================================================================================== + **Value** **Meaning** + =================== ===================================================================================== + ``ssNone`` The control has no ``ScrollBar``\ s. + ``ssHorizontal`` The control has a single ``ScrollBar`` on the bottom edge. + ``ssVertical`` The control has a single ``ScrollBar`` on the right edge. + ``ssBoth`` The control has a ``ScrollBar`` on both the bottom and right edges. + =================== ===================================================================================== + ''' + WantReturns: bool + ''' + Determines whether the user can insert return characters into the text. + + Set ``WantReturns`` to ``True`` to allow users to enter return characters into the text. Set ``WantReturns`` to ``False`` to allow the ``Form`` to handle return characters instead. + + For example, in a form with a default button (such as an *OK* button) and a ``Memo`` control, if ``WantReturns`` is ``False``, pressing *Enter* chooses the default button. If ``WantReturns`` is ``True``, pressing *Enter* inserts a return character in the text. + + .. note:: If ``WantReturns`` is ``False``, users can still enter return characters into the text by pressing *Ctrl+Enter*. + ''' + WantTabs: bool + ''' + Determines whether the user can insert tab characters into the text. + + Set ``WantTabs`` to ``True`` to allow users to enter tab characters into the text. Set ``WantTabs`` to ``False`` if you want the tab character to select the next control on the ``Form`` instead. + + .. note:: If ``WantTabs`` is ``True``, users can tab into the ``Edit`` control, but they can't tab out. + ''' + WordWrap: bool + ''' + Determines whether the ``Edit`` control inserts soft carriage returns so that the text wraps at the right margin. + + Set ``WordWrap`` to ``True`` to make the ``Edit`` control wrap text at the right margin so that it fits in the client area. The wrapping has cosmetic purposes only. The text does not include any return characters that were not explicitly entered. Set ``WordWrap`` to ``False`` to have the ``Edit`` control display a separate line only where return characters were explicitly entered into the text. + + .. note:: Most of the times when ``WordWrap`` is ``True``, the horizontal ``ScrollBar`` is not necessary. However, exceptions appear; when the line cannot be cut into pieces, the wrapping cannot occur. In these cases, the ``ScrollBar`` is still required. + ''' + CaretPos: Point + ''' + Indicates the position of the caret in the client area of the memo. + + Use ``CaretPos`` to determine the coordinates of the cursor. ``CaretPos`` defines a location onscreen, in characters, with the origin in the top left corner of the memo. ``'X'`` specifies the horizontal coordinate of the point, ``'Y'`` specifies the vertical coordinate. To determine the position of the caret in terms of characters of text only (rather than X/Y location), use the ``SelStart`` property. + ''' + Lines: str + ''' + Contains the individual lines of text in the ``Memo`` control. + + Use ``Lines`` to manipulate text in an ``Memo`` control on a line-by-line basis. ``Lines`` is a `Strings <System.Classes.TStrings.htm>`__ object, so the `Strings <System.Classes.TStrings.htm>`__ methods may be used for ``Lines`` to perform manipulations such as counting the lines of text, adding new lines, deleting lines, or replacing lines with new text. For example: + + .. code-block:: python + + MyMemo.Lines.Add(...); + + To work with all the text at once, use the ``Text`` property. To manipulate individual lines of text, the ``Lines`` property works better. + + .. note:: Although ``Lines`` is implemented as a `Strings <System.Classes.TStrings.htm>`__ descendant, it does not implement the support for associating objects with the strings in the list. + ''' + + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter record passed in the ``Params`` parameter. + + The ``CreateWnd()`` method calls ``CreateParams()`` to initialize the parameters it passes to `CreateWindowHandle <Vcl.StdCtrls.TCustomMemo.CreateWindowHandle.htm>`__. `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__ overrides the inherited method to specify a scrollable multiline ``Edit`` control. The ``Params`` parameter is updated to reflect the current values of the `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__, `ScrollBars <Vcl.StdCtrls.TCustomMemo.ScrollBars.htm>`__, and `WordWrap <Vcl.StdCtrls.TCustomMemo.WordWrap.htm>`__ properties, in addition to the ``BorderStyle``, `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__, `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__, and `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ properties that the inherited method specifies. + ''' + def CreateWindowHandle(self, Params: CreateParams) -> None: + ''' + Creates a window based on the window-creation parameter record. + + The ``CreateWnd()`` method calls ``CreateWindowHandle()`` to create the ``Edit`` control window once it has been specified in the window-creation parameters. ``CreateWindowHandle()`` creates the window by calling the ``CreateWindowEx`` API function, passing parameters from the record passed in the ``Params`` parameter. ``CreateWindowHandle()`` overrides the inherited method to interpret the `Caption <Vcl.Controls.TControl.Caption.htm>`__ in ``Params`` as the initial text rather than as the window caption. + ''' + def GetCaretPos(self) -> Point: + ''' + Returns the value of the `CaretPos <Vcl.StdCtrls.TCustomMemo.CaretPos.htm>`__ property. + + ``CaretPos`` represents the coordinates of the cursor. ``GetCaretPos`` is the protected implementation of the `CaretPos <Vcl.StdCtrls.TCustomMemo.CaretPos.htm>`__ property. Override this method to change the way the caret position is computed. + ''' + def DoGetGestureOptions(self, Gestures: InteractiveGestures, Options: InteractiveGestureOptions) -> None: + ''' + Returns the interactive gestures and their options. + + `DoGetGestureOptions <Vcl.Controls.TControl.DoGetGestureOptions.htm>`__ is used internally to access the interactive gestures and their options associated with a `Control <Vcl.Controls.TControl.htm>`__. + ''' + def IsTouchPropertyStored(self, AProperty: TouchProperty) -> bool: + ''' + Checks whether the associated touch manager stored any of the given options. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used internally by the *VCL Framework* to check whether the associated touch manager component has stored the given options. Do not call `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ directly. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used primarily to ensure that controls that do not require gesturing are not storing useless data in the *DFMs* or executables. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Ensures that return characters are not entered into the text when `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ is ``False``. + + ``KeyPress()`` is called automatically when the user presses a key. After calling the inherited ``KeyPress()``, which calls the ``KeyPress()`` event handler, ``KeyPress()`` discards return characters when `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ is ``False``. + ''' + def Loaded(self) -> None: + ''' + Initializes the ``Memo`` control when it is first loaded into memory. + + ``Loaded()`` overrides the inherited method so that the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property is set to ``False`` when the ``Form`` containing the ``Memo`` is first loaded into memory. Derived classes can override the ``Loaded()`` method to perform additional initializations after the memo's form is loaded. + ''' + def SetCaretPos(self, Value: Point) -> None: + ''' + Sets the `CaretPos <Vcl.StdCtrls.TCustomMemo.CaretPos.htm>`__ property. + + ``SetCaretPos`` is the property write access method for the `CaretPos <Vcl.StdCtrls.TCustomMemo.CaretPos.htm>`__ property. The `CaretPos <Vcl.StdCtrls.TCustomMemo.CaretPos.htm>`__ property returns the coordinates of the cursor. ``SetCaretPos`` sets the cursor position to ``Value``. + ''' + def SetLines(self, Value: str) -> None: + ''' + Sets the `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ property. + + ``SetLines`` is the protected write implementation for the `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ property. + + ``SetLines`` is exposed as a protected method so derived classes can customize their implementation of the `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ property. + ''' + def SetScrollBars(self, Value: ScrollStyle) -> None: + ''' + Sets the `ScrollBars <Vcl.StdCtrls.TCustomMemo.ScrollBars.htm>`__ property. + + ``SetScrollBars`` is the property access method for the `ScrollBars <Vcl.StdCtrls.TCustomMemo.ScrollBars.htm>`__ property. + + ``SetScrollBars`` is exposed as a protected method so derived classes can customize their implementation of the `ScrollBars <Vcl.StdCtrls.TCustomMemo.ScrollBars.htm>`__ property. + ''' + def SetWordWrap(self, Value: bool) -> None: + ''' + Sets the `WordWrap <Vcl.StdCtrls.TCustomMemo.WordWrap.htm>`__ property. + + ``SetWordWrap`` is the property access method for the `WordWrap <Vcl.StdCtrls.TCustomMemo.WordWrap.htm>`__ property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__. + + Call ``Create()`` to instantiate a `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__ object. + + ``AOwner`` is the component, typically the ``Form``, that is responsible for freeing the ``Memo`` object. This becomes the value of the ``Owner()`` property. + + Derived objects that override the ``Create()`` method should call the inherited ``Create()`` before making any additional initializations. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` checks that the `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. + + ``Destroy()`` frees the ``Strings`` object that implements the `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ property before calling the inherited destructor. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomMemoryStream(Stream): + '''TCustomMemoryStream is an abstract base class used as the common ancestor for memory streams. + Use TCustomMemoryStream as a base class when defining a stream object that can transfer data that is stored in memory. Memory streams are useful for providing file-like access to data that is stored in a less accessible medium. Data can be moved to an internal memory buffer when the memory stream is created. After manipulating the data in a memory stream, the data can be written out to its actual storage medium when the memory stream is destroyed. + Do not instantiate an instance of TCustomMemoryStream. It is an abstract class that implements behavior common to all memory streams. To work with an instance of a memory stream, use one of the descendants of TCustomMemoryStream, such as TMemoryStream or TResourceStream.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + Memory: Pointer + '''Pointer: Provides direct access to the memory pool allocated for the memory stream. + Use Memory to get access to the memory for the stream. The memory for the stream holds the data that is being transferred by means of the memory stream. Size is the number of bytes of Memory that were allocated, and Position is the current position within Memory. + + Note: Memory is a read-only property. Memory can be used to change the contents of the memory, but to set the actual memory the stream works with, descendants of TCustomMemoryStream must assign a pointer to a memory buffer by calling the SetPointer method.''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def Read(self, Buffer, Count: int) -> int: + '''TCustomMemoryStream.Read(Buffer, Count: int) -> int + Reads up to Count bytes from the memory stream into Buffer and advances the current position of the stream by the number of bytes read. + Use Read to read the contents of the memory stream into a buffer, starting at the current position. Read will read up to Count bytes from the current position in Memory. If Count bytes extends beyond the end of the memory buffer, Read will only transfer the data up to the end of the associated memory buffer. Read returns the number of bytes actually transferred to Buffer, and advances the current position accordingly. If the return value is less than Count, it means that reading reached the end of the stream data. + All the other data-reading methods of the memory stream (ReadBuffer, ReadComponent) call Read to do the actual reading. + + Note: Read treats Count as an upper bound. The ReadBuffer method, by contrast, raises an exception if Count bytes cannot be read.''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def SaveToFile(self, FileName: str) -> None: + '''TCustomMemoryStream.SaveToFile(FileName: str) -> None + Writes the entire contents of the memory stream to the file with a given file name. + Use SaveToFile to write the contents of Memory to a file. SaveToFile allows an application to write out the contents of the memory stream without having to explicitly create and free a file stream object. In case the file already exists, the current file contents will be completely replaced with the new. If the named file cannot be created or opened, SaveToFile raises an EFCreateError exception.''' + def SaveToStream(self, Stream: Stream) -> None: + '''TCustomMemoryStream.SaveToStream(Stream: Stream) -> None + Writes the entire contents of the memory stream to the stream object specified by Stream. + Use SaveToStream to copy data that is stored in memory into another storage medium. SaveToStream writes the entire contents of Memory into the indicated stream object, starting at the current position in the stream that was passed as a parameter. + When the Stream parameter is a TFileStream object, SaveToStream does much the same thing as the SaveToFile method. However, SaveToStream writes to the current position in the target stream. Thus, for example, SaveToStream can be used to append the contents of Memory to a file stream, rather than replace the contents of the file the way SaveToFile does. + If the entire contents of the memory stream cannot be written to the target stream, SaveToStream raises an EWriteError exception.''' + def Seek(self, Offset: int, Origin: SeekOrigin) -> int: + '''TCustomMemoryStream.Seek(Offset: int, Origin: SeekOrigin) -> int + Moves the current position of the stream by Offset bytes, relative to the origin specified by Origin. + Use Seek to move the current position within the memory stream by the indicated offset. Seek allows an application to read from or write to a particular location within the Memory associated with the memory stream. + If Offset is a negative number, the seeking is backward from the specified origin. The following table shows the different values of Origin and their meanings for seeking: + + + + Value + + Meaning + + + + soBeginning + + + + Offset is from the beginning of Memory. Seek moves to the position Offset. Offset must be >= 0. + + + + + soCurrent + + + + Offset is from the current position. Seek moves to Position + Offset. + + + + + soEnd + + + + Offset is from the end of Memory. Offset must be <= 0 to indicate a number of bytes before the end of the memory buffer. + + + Seek returns the new value of the Position property. + + Note: Seek does no error checking on the value provided for Offset. Do not call Seek with an offset that would move the current position less than 0 (before the start of Memory) or greater than Size (beyond the end of the memory buffer).''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomMultiSelectListControl(CustomListControl): + ''' + ========================================== + Vcl.Controls.TCustomMultiSelectListControl + ========================================== + + ``CustomMultiSelectListControl`` is the base class for ``ListControl``\ s that allow multiple items to be selected. + + ``CustomMultiSelectListControl`` is the common base class for controls that represent a list of items where the user can select one or more of those items. Its descendants include ``ListBox``\ es and ``ListView``\ s. ``CustomMultiSelectListControl`` implements a common set of properties and methods for working with the items in the list. This includes the ability to: + + - Specify whether the control allows one or multiple items to be selected. + - Determine the number of selected items. + - Add items to the list. + - Delete items from the list. + - Select items in the list. + - Copy items to another ``ListControl``. + - Rearrange the order of items. + + ``CustomMultiSelectListControl`` is an abstract class and cannot be directly instantiated. + ''' + + __hash__: ClassVar[None] = ... + FMultiSelect: bool + ''' + Specifies whether the user can select more than one item. + + ``FMultiSelect`` is a protected field. ``FMultiSelect`` is ``True`` when the user can select multiple items in the control and ``False`` when the user can select only one item. + + ``FMultiSelect`` stores the actual data of the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. + ''' + MultiSelect: bool + ''' + Specifies whether the user can select more than one item. + + Use ``MultiSelect`` to specify whether the user can select more than one item. When ``MultiSelect`` is ``True``, the user can select multiple items in the control, and the `SelCount <Vcl.Controls.TCustomMultiSelectListControl.SelCount.htm>`__ property indicates the number of selected items. When ``MultiSelect`` is ``False``, the user can only select one item, which is indicated by the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + .. note:: To implement the ``MultiSelect`` property in a `CustomMultiSelectListControl <Vcl.Controls.TCustomMultiSelectListControl.htm>`__ descendant, override the protected `SetMultiSelect <Vcl.Controls.TCustomMultiSelectListControl.SetMultiSelect.htm>`__ method. + ''' + SelCount: int + ''' + Indicates the number of selected items. + + Read ``SelCount`` to determine the number of items that are currently selected. If the value of the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property is ``False``, ``SelCount`` is always -1. If `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``True``, the value of ``SelCount`` can be greater than 1 as well. + + .. note:: To implement the ``SelCount`` property in a `CustomMultiSelectListControl <Vcl.Controls.TCustomMultiSelectListControl.htm>`__ descendant, override the protected `GetSelCount <Vcl.Controls.TCustomMultiSelectListControl.GetSelCount.htm>`__ method. + ''' + + def GetSelCount(self) -> int: + ''' + Returns the value of the `SelCount <Vcl.Controls.TCustomMultiSelectListControl.SelCount.htm>`__ property. + + Override ``GetSelCount()`` to provide the read implementation for the `SelCount <Vcl.Controls.TCustomMultiSelectListControl.SelCount.htm>`__ property. ``GetSelCount()`` returns the number of items that are currently selected. + ''' + def SetMultiSelect(self, Value: bool) -> None: + ''' + Sets the value of the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. + + Override ``SetMultiSelect()`` to provide the write implementation for the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. + + ``Value`` is ``True`` if the control should allow the user to select more than one item at a time, ``False`` if the control should support at most one selected item. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomNumberBox(CustomEdit): + ''' + ============================== + Vcl.NumberBox.TCustomNumberBox + ============================== + + `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ is the base class from which all edit-box and ``Memo`` controls are derived. + + `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ encapsulates the behavior common to all components for editing text by introducing methods and properties that provide: + + Basic text editing functions such as selecting text, modifying selected text, and case conversions. + + Ability to respond to changes in the contents of the text. + + Access control of the text for making it read-only or introducing a password character to hide the actual value. + + Do not create instances of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. Use `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ as a base class when declaring control objects that permit the user to enter or modify text. Properties and methods of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ provide basic behavior that descendant classes inherit as well as behavior that components can override to customize their behavior. + ''' + + __hash__: ClassVar[None] = ... + Mode: NumberBoxMode + ''' + No have docs. + ''' + Value: float + ''' + No have docs. + ''' + ValueInt: int + ''' + No have docs. + ''' + ValueFloat: float + ''' + No have docs. + ''' + ValueCurrency: Currency + ''' + No have docs. + ''' + CurrencyString: str + ''' + No have docs. + ''' + CurrencyFormat: Byte + ''' + No have docs. + ''' + DisplayFormant: str + ''' + No have docs. + ''' + MinValue: float + ''' + No have docs. + ''' + MaxValue: float + ''' + No have docs. + ''' + Decimal: Byte + ''' + No have docs. + ''' + SmallStep: float + ''' + No have docs. + ''' + LargeStep: float + ''' + No have docs. + ''' + AcceptExpressions: bool + ''' + No have docs. + ''' + SpinButtonOptions: NumberBoxSpinButtonOptions + ''' + No have docs. + ''' + UseNaNValue: bool + ''' + No have docs. + ''' + UseMouseWheel: bool + ''' + No have docs. + ''' + UseUpDownKeys: bool + ''' + No have docs. + ''' + Wrap: bool + ''' + No have docs. + ''' + NegativeValueColor: Color + ''' + No have docs. + ''' + + def DrawButtons(self, ACanvas: Canvas) -> None: + ''' + No have docs. + ''' + def GetDisplayText(self) -> str: + ''' + No have docs. + ''' + def DrawDisplayText(self, AText: str, ACanvas: Canvas, ANegative: bool) -> None: + ''' + No have docs. + ''' + def DoButtonClick(self, AButtonType: NumberBoxButtonType) -> None: + ''' + No have docs. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + When a windowed control receives a key-down message (``WM_KEYDOWN``) from *Windows* , its message handler calls the `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ method. If `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ determines that the control should, in fact, process the character, it calls `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__, passing the key code and shift-key state in the ``Key`` and ``Shift`` parameters, respectively. + + `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ calls any event handler attached to the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Override `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ to provide other responses in addition to the event handler call. + + The ``Key`` parameter is the key on the keyboard. For nonalphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the *Shift*, *Alt*, or *Ctrl* keys are combined with the keystroke. + + Either `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__ or the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds to keyboard input. + + When a windowed control receives a key-press message (``WM_CHAR``) from *Windows* , its message handler calls the `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ method. If `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ determines that the control should, in fact, process the character, it calls `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__, passing the key code in the ``Key`` parameter. + + `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ calls any event handler attached to the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Override `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ to provide other responses in addition to the event handler call. + + Either `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ or the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler it calls can suppress further processing of a character by setting the ``Key`` parameter to zero. + + .. note:: The ``Key`` parameter is the character represented by the key that is pressed, not a *Windows* virtual key code. + ''' + def IsValidChar(self, AKey: str) -> bool: + ''' + No have docs. + ''' + @overload + def IsNumericText(self, AText: str) -> bool: + ''' + No have docs. + ''' + @overload + def IsNumericText(self) -> bool: ... + def GetValidCharSet(self, AAcceptExpressions: bool) -> SysCharSet: + ''' + No have docs. + ''' + def DoChangeValue(self) -> None: + ''' + No have docs. + ''' + def EvaluateExpression(self) -> None: + ''' + No have docs. + ''' + def Change(self) -> None: + ''' + Generates an `Change <Vcl.StdCtrls.TCustomEdit.Change.htm>`__ event. + + ``Application``\ s do not call the `Change <Vcl.StdCtrls.TCustomEdit.Change.htm>`__ method directly. It is triggered automatically by *Windows* events. `Change <Vcl.StdCtrls.TCustomEdit.Change.htm>`__ is exposed as a protected method so that derived classes can make additional responses when the text changes beyond invoking the `Change <Vcl.StdCtrls.TCustomEdit.Change.htm>`__ event handler. If Derived classes that override the `Change <Vcl.StdCtrls.TCustomEdit.Change.htm>`__ method do not call the inherited method, the `Change <Vcl.StdCtrls.TCustomEdit.Change.htm>`__ event handler will not be called. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ an instance of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. + + Call `Create <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ to create and initialize an instance of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. + + ``AOwner`` is another component, typically the ``Form``, that is responsible for freeing the ``Edit`` control. It becomes the value of the ``Owner()`` property. + + Derived objects that override the `Create <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ method should call the inherited `Create <Vcl.StdCtrls.TCustomEdit.Create.htm>`__ before performing any additional initialization. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TWinControl.Destroy.htm>`__ an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `WinControl <Vcl.Controls.TWinControl.htm>`__ reference is not ``nil``, and only then calls `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__. + ''' + + def OnChangeValue(self, Sender: Object) -> None: + ''' + OnChangeValue: NotifyEvent + No have docs. + ''' + def OnEvaluateExpression(self, Sender: Object) -> None: + ''' + OnEvaluateExpression: NotifyEvent + No have docs. + ''' + def OnValidateChar(self, AChar: str, AValidated: bool) -> None: + ''' + # OnValidateChar: NumberBoxValidateCharEvent + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomPrototypeBindSource(BaseObjectBindSource): + ''' + ================================================ + Data.Bind.ObjectScope.TCustomPrototypeBindSource + ================================================ + + Is a base class that implements a bind source for creating sample data. + + If you want to create your own custom prototype bind source, then you should derive your class from ``CustomPrototypeBindSource``. When designing applications, PrototypeBindSource <Data.Bind.ObjectScope.TPrototypeBindSource.htm>`__ is available from the *Tool Palette*. + ''' + + __hash__: ClassVar[None] = ... + AutoEdit: bool + ''' + No have docs. + ''' + AutoPost: bool + ''' + No have docs. + ''' + FieldDefs: GeneratorFieldDefs + ''' + No have docs. + ''' + RecordCount: int + ''' + No have docs. + ''' + DataGenerator: CustomDataGeneratorAdapter + ''' + No have docs. + ''' + + def GetInternalAdapter(self) -> BindSourceAdapter: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Allocates memory and constructs a safely initialized instance of a component. + + ``Data.Bind.ObjectScope.TCustomPrototypeBindSource.Create`` inherits from `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. All content below this line refers to `System.Classes.TComponent.Create <System.Classes.TComponent.Create.htm>`__. + + All objects have a `Create <System.Classes.TComponent.Create.htm>`__ method that constructs the object. `Component <System.Classes.TComponent.htm>`__ redefines `Create <System.Classes.TComponent.Create.htm>`__ so that, for components, `Create <System.Classes.TComponent.Create.htm>`__ also: + + - Establishes the relationship of a component and its `Owner <System.Classes.TComponent.Owner.htm>`__, as indicated by the ``AOwner`` parameter. + + - Sets the `ComponentStyle <System.Classes.TComponent.ComponentStyle.htm>`__ property to `csInheritable <System.Classes.TComponentStyle.htm>`__, meaning that the component can be inherited by a descendent form type. + + It is not necessary to explicitly create components added in the *Form Designer*. These components are created automatically when the application is run, and they are destroyed when the application is closed. + + For components created programmatically, that is, not created in the *Form Designer*, call `Create <System.Classes.TComponent.Create.htm>`__ and pass in an owner component as the ``AOwner`` parameter. The owner disposes of the component when it is destroyed. If the component is not owned, then use ``Free()`` when it needs to be destroyed. + + .. tip:: When passing in ``Self`` as the `Owner <System.Classes.TComponent.Owner.htm>`__ parameter, consider what ``Self`` references. If a component creates another component in one of its methods, then ``Self`` refers to the first component and not the component being created, which is then owned by the first component. + + .. note:: The `Component <System.Classes.TComponent.htm>`__ constructor is virtual in part to allow polymorphic instantiation of class references. This is critical to the streaming system and to the *Form Designer*. Do not forget to use the override directive when declaring a new component's `Create <System.Classes.TComponent.Create.htm>`__ constructor. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomStatusBar(WinControl): + '''TCustomStatusBar is the base class for objects that represent status bars. + TCustomStatusBar component is the base class for status bar controls. Status bars consist of a row of panels, usually aligned at the bottom of a form, that display information about an application as it runs. Each panel is represented by a TStatusPanel object listed in the Panels property. + TCustomStatusBar is intended only as a base class. To add a status bar to a form, use a TCustomStatusBar descendant such as TStatusBar.''' + __hash__: ClassVar[None] = ... + AutoHint: bool + '''bool: Specifies whether the status bar's text is set automatically to the current hint. + Use AutoHint to specify whether the status bar's text is set automatically to the current hint. When AutoHint is True, the status bar automatically responds to hint actions by displaying the long version of the hint's text in the first panel.''' + Canvas: Canvas + '''Canvas: Provides runtime access to the status bar's drawing surface. + The read-only Canvas property provides access to the status bar's drawing surface that you can use when implementing a handler for the OnDrawPanel event.''' + ControlCount: Any + '''Returns the count of contained controls''' + Controls: Any + '''Returns an iterator over contained controls''' + Focused: Any + '''Determines whether the control has input focus.''' + Handle: Any + '''Provides access to the underlying Windows screen object for the control.''' + HandleAllocated: Any + '''Reports whether a screen object handle exists for the control.''' + OnCreatePanelClass: Callable[[CustomStatusBar, StatusPanelClass], None] + '''Callable[[CustomStatusBar, StatusPanelClass], None]:''' + OnDrawPanel: Callable[[CustomStatusBar, StatusPanel, Rect], None] + '''Callable[[CustomStatusBar, StatusPanel, Rect], None]:''' + OnHint: Callable[[Object], None] + '''Callable[[Object], None]:''' + Panels: StatusPanels + '''StatusPanels: Lists the panels (TStatusPanel objects) in the status bar. + The Panels property holds a TStatusPanels, that is, a collection of TStatusPanel objects. At design time, you can add, remove, or modify panels with the Panels editor. To open the Panels editor, select the Panels property in the Object Inspector, then double-click in the Value column to the right or click the ellipsis (...) button. + At design time, you can add, remove, or modify panels with the Panels editor: + + To open the Panels editor from the the Object Inspector, select the Panels property and either double-click in the Value column to the right or click the ellipsis (...) button. + To open the Panels editor from the Form Designer, right-click TStatusBar and select Panels editor from the context menu.''' + ParentWindow: Any + '''Reference to parent's underlying control.''' + Showing: Any + '''Indicates whether the control is showing on the screen.''' + SimplePanel: bool + '''bool: Determines whether the status bar displays a single panel or multiple panels. + If SimplePanel is set to True, the status bar consists of a single panel displaying the text in SimpleText. If SimplePanel is set to False, the status bar displays a separate panel for each item in its Panels property. + + Note: When SimplePanel is False, you cannot use the SimpleText property to display text in the status bar. Instead, you must set the Text property on one of the panel objects.''' + SimpleText: str + '''str: Contains a text string to be displayed in the status panel when SimplePanel is True. + + Note: Microsoft Windows XP and earlier versions limited the size of the string to 127 chars. Under Microsoft Windows Vista, Windows 7, or later Windows operating systems, SimpleText has no such limit.''' + SizeGrip: bool + '''bool: Determines whether the status bar is resizable at run time. + If SizeGrip is set to True, the status bar has a triangular grip on the lower right corner. The user can resize the status bar by dragging the grip with the mouse. + A size grip will not be drawn unless the Parent property refers to the child of a TCustomForm descendant with a BorderStyle of bsSizeable or bsSizeToolWin. + + Note: If Align is set to alBottom, alRight, or alClient, the sizing grip will not work. If the Alignment property of the last panel in the status bar is set to taRightJustify, the sizing grip will truncate the panel's text.''' + UseSystemFont: bool + '''bool: Specifies whether the status bar uses the system font. + UseSystemFont specifies whether the status bar uses the system font. To change fonts, use the Font property.''' + + def CanFocus(self) -> Any: + '''TWinControl.CanFocus() + Indicates whether a control can receive focus.''' + def Create(self, AOwner: Component) -> None: + '''TCustomStatusBar.Create(AOwner: Component) -> None + Creates and initializes a TCustomStatusBar component. + The Create method creates a status bar along with its canvas and status panels. + AOwner is a component, typically the form, that becomes the value of the Owner property.''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys TCustomStatusBar and frees its memory. + Do not call Destroy directly. Instead, use the Free method, which checks for a nil object before calling Destroy. + The Destroy method destroys the status bar along with its canvas and status panels.''' + def ExecuteAction(self, Action: BasicAction) -> bool: + '''TCustomStatusBar.ExecuteAction(Action: BasicAction) -> bool + Processes actions for the status bar. + When an action executes, the application makes a series of calls to respond to that action. If, in the course of that processing, the application identifies the status bar as a potential target of the action, it calls the status bar's ExecuteAction method. + If the action in a hint action (THintAction), ExecuteAction checks the AutoHint property, and if it is true, displays the hint and returns true. Otherwise, it allows the inherited method to respond to any other actions. + The Action parameter specifies the action that was invoked. + ExecuteAction returns true if the action was successfully dispatched, and false if the component could not handle the action.''' + def FlipChildren(self, AllLevels: bool) -> None: + '''TCustomStatusBar.FlipChildren(AllLevels: bool) -> None + Reverses the positions of the status bar's panels. + FlipChildren iterates through the panels of the status bar, reversing their order but otherwise leaving their properties intact. + AllLevels specifies whether FlipChildren should be called recursively on the control's children. TCustomStatusBar ignores this parameter when reversing the panels.''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + '''TCustomStatusBar.SetBounds(ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None + Sets the Left, Top, Width, and Height properties all at once. + TCustomStatusBar overrides SetBounds in order to update the size grip. + ALeft, ATop, AWidth, and AHeight specify the new values for the Left, Top, Width, and Height properties, respectively.''' + def SetFocus(self) -> Any: + '''TWinControl.SetFocus() + Gives the input focus to the control.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomStyleServices(AbstractStyleServices): + ''' + =============================== + Vcl.Themes.TCustomStyleServices + =============================== + + ``CustomStyleServices`` is a class that provides access to style functionality. + + Use the methods and properties of ``CustomStyleServices`` to get information about a style or to perform painting of custom controls. + + Do not instantiate ``CustomStyleServices``; instead, call the `StyleServices <Vcl.Themes.StyleServices.htm>`__ function to access the methods and properties of ``CustomStyleServices``. + ''' + + __hash__: ClassVar[None] = ... + Available: bool + ''' + Determines whether the operating system supports styles. + + Use ``Available`` to check whether the operating system supports styles. + ''' + Enabled: bool + ''' + Determines whether styles are enabled for the current application. + + Use ``Enabled`` to check whether the current application has styles enabled. + ''' + Flags: StyleFlags + ''' + Returns the flags set for the current style. + + Use ``Flags()`` to obtain the flags that are set for the current style. + ''' + IsSystemStyle: bool + ''' + Determines whether the current style is a system style. + + ``IsSystemStyle()`` returns ``True`` if the current style is a default operating system style, and ``False`` if it is a custom style. + ''' + Name: str + ''' + Returns the name of the current style. + + Use ``Name()`` to obtain a string that represents the name of the current style. This is the same name you can use with `StyleManager.SetStyle <Vcl.Themes.TStyleManager.SetStyle.htm>`__ to activate the style. + ''' + Theme: list[int] + ''' + Represents the handles associated with the specified element. + + Use ``Theme`` to retrieve *Windows* handles for each user interface element. + ''' + ThemeForDPI: list[int] + ''' + No have docs. + ''' + + def DoOnThemeChange(self) -> None: + ''' + Triggers the `OnThemeChange <Vcl.Themes.TCustomStyleServices.OnThemeChange.htm>`__ event. + + ``DoOnThemeChange`` calls the user-supplied `OnThemeChange <Vcl.Themes.TCustomStyleServices.OnThemeChange.htm>`__ event, if it exists; otherwise nothing happens. + ''' + def GetFlags(self) -> StyleFlags: + ''' + Returns the flags set for the current style. + + Call ``GetFlags()`` to obtain the flags that are set for the current style. + + ``GetFlags`` is the read implementation for the `Flags <Vcl.Themes.TCustomStyleServices.Flags.htm>`__ property. + ''' + def Create(self) -> None: + ''' + Constructs an object and initializes its data before the object is first used. + + `Create <System.TObject.Create.htm>`__ constructs an object. The purpose, size, and behavior of objects differ greatly. The `Create <System.TObject.Create.htm>`__ constructor defined by `Object <System.TObject.htm>`__ allocates memory but does not initialize data. + + Descendant objects usually define a constructor that creates the particular kind of object and initializes its data. + + .. note:: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance. + ''' + def ApplyThemeChange(self) -> None: + ''' + Resets the application theme. + + ``ApplyThemeChange()`` is called automatically by the `Application <Vcl.Forms.TApplication.htm>`__ object whenever the operating system theme is changed. + + .. note:: ``ApplyThemeChange()`` is used internally by the VCL and should not be called manually by applications. + ''' + @overload + def ColorToRGB(self, Color: Color, Details: PThemedElementDetails) -> ColorRef: + ''' + Gets the color reference for a specified `Color <Vcl.Graphics.TColor.htm>`__. + + Use ``ColorToRGB()`` to convert the ``Color`` parameter to its RGB representation. If ``Details`` is not ``nil``, the function returns the system color that is defined for ``Color`` under the current style. For example, if ``Color`` is ``clBtnFace``, the function returns the system color defined for the button face in the current style, as a `ColorRef <System.UITypes.TColorRef.htm>`__ value. + ''' + @overload + def ColorToRGB(self, Color: Color, Details: ThemedElementDetails) -> ColorRef: ... + def ContentRect(self, DC: HDC, Details: ThemedElementDetails, BoundingRect: Rect) -> Rect: + ''' + .. warning:: ``ContentRect()`` is deprecated. Please use `GetElementContentRect <Vcl.Themes.TCustomStyleServices.GetElementContentRect.htm>`__. + + Gets the background rectangle of the content area of the element. + + Call ``ContentRect()`` to retrieve the rectangle that contains the background area of a control when styles are enabled. + + ``Details`` represents the user interface element from which the information is being retrieved. + + .. note:: ``ContentRect()`` is deprecated; use `GetElementContentRect <Vcl.Themes.TCustomStyleServices.GetElementContentRect.htm>`__ instead. + ''' + @overload + def DrawEdge(self, DC: HDC, Details: ThemedElementDetails, R: Rect, Edges: int, Flags: int, ContentRect: PRect) -> bool: + ''' + Draws the edge or edges of the rectangle that contains the element in the current style. + + Call ``DrawEdge`` to draw one or more edges of the given element. ``Edge`` indicates the types of inner and outer edges and ``Flags`` specifies the types of borders. + + .. note:: The first overload of this method is deprecated; use the second overload instead. + ''' + @overload + def DrawEdge(self, DC: HDC, Details: ThemedElementDetails, R: Rect, Edges: ElementEdges, Flags: ElementEdgeFlags, ContentRect: PRect) -> bool: ... + @overload + def DrawElement(self, DC: HDC, Details: ThemedElementDetails, R, ClipRect: Rect, DPI: int) -> bool: + ''' + Draws the specified element. + + Call ``DrawElement()`` to draw the element specified by ``Details``, using the current style. + + ``'R'`` is the rectangle where the element is drawn and ``ClipRect`` is a clipping rectangle. + ''' + @overload + def DrawElement(self, DC: HDC, Details: ThemedElementDetails, R: Rect, ClipRect: PRect, DPI: int) -> bool: ... + def DrawIcon(self, DC: HDC, Details: ThemedElementDetails, R: Rect, Images: HIMAGELIST, Index: int) -> bool: + ''' + Draws an icon over the given element. + + Call ``DrawIcon()`` to draw the image that resides at the ``Index`` index in the ``ImageList`` specified by ``Images``. The icon is drawn in the rectangle specified by ``'R'``, over the element indicated by ``Details``. + ''' + @overload + def DrawParentBackground(self, Window: HWND, Target: HDC, Details: PThemedElementDetails, OnlyIfTransparent: bool, Bounds: Rect) -> bool: + ''' + Draws the background of the given user interface element's parent. + + Call ``DrawParentBackground()`` to draw the background of a user interface element's parent, using the current style. If ``OnlyIfTransparent`` is ``True``, the drawing is performed only if the element is transparent in the current style. ``Bounds`` represents the area to be drawn. + ''' + @overload + def DrawParentBackground(self, Window: HWND, Target: HDC, Details: ThemedElementDetails, OnlyIfTransparent: bool, Bounds: PRect) -> bool: ... + @overload + def DrawParentBackground(self, Window: HWND, Target: HDC, Details: PThemedElementDetails, OnlyIfTransparent: bool, Bounds: PRect) -> bool: ... + @overload + def DrawText(self, DC: HDC, Details: ThemedElementDetails, S: str, R: Rect, Flags, Flags2: int, DPI: int) -> bool: + ''' + Draws text over an element, using the current style. + + Call ``DrawText()`` to draw the ``'S'`` string in the rectangle specified by ``'R'``. The ``'S'`` string has the format and additional options indicated by the ``Flags`` and ``Options`` parameters. The drawing is performed with the settings of the current style. + + .. note:: The first overload of this function is deprecated. Use the following two overloads that use `TextFormat <Vcl.Graphics.TTextFormat.htm>`__ to specify the text formatting. + ''' + @overload + def DrawText(self, DC: HDC, Details: ThemedElementDetails, S: str, R: Rect, Flags: TextFormat, Color: Color, DPI: int) -> bool: ... + @overload + def DrawText(self, DC: HDC, Details: ThemedElementDetails, S: str, R: Rect, Flags: TextFormat, Options: StyleTextOptions, DPI: int) -> bool: ... + def GetElementContentRect(self, DC: HDC, Details: ThemedElementDetails, BoundingRect: Rect, ContentRect: Rect) -> bool: + ''' + Gets the background rectangle of the content area of the element. + + Call ``GetElementContentRect`` to retrieve the rectangle that contains the background area of a control, when styles are enabled. + + ``Details`` represents the user interface element from which the information is being retrieved. + ''' + def GetElementColor(self, Details: ThemedElementDetails, ElementColor: ElementColor, Color: Color) -> bool: + ''' + Determines the color of the element specified by ``Details``. + + ``GetElementColor`` determines the color value used for the property determined by ``ElementColor``. + ''' + @overload + def GetElementMargins(self, DC: HDC, Details: ThemedElementDetails, ElementMargin: ElementMargin, Margins: ElementMargins, DPI: int) -> bool: + ''' + Determines the margins of the element in the current style. + + Call ``GetElementMargins`` to retrieve the margins of the control specified by ``Details``. + ''' + @overload + def GetElementMargins(self, DC: HDC, Details: ThemedElementDetails, Rect: Rect, ElementMargin: ElementMargin, Margins: ElementMargins, DPI: int) -> bool: ... + @overload + def GetElementRegion(self, Details: ThemedElementDetails, Rect: Rect, Region: HRGN) -> bool: + ''' + Determines the region of the element in the current style. + + Call ``GetElementRegion()`` to obtain the region of the element, bounded by the given rectangle. + ''' + @overload + def GetElementRegion(self, DC: HDC, Details: ThemedElementDetails, Rect: Rect, Region: HRGN) -> bool: ... + @overload + def GetElementSize(self, DC: HDC, Details: ThemedElementDetails, ElementSize: ElementSize, Size: Size, DPI: int) -> bool: + ''' + Determines the size for the specified part of a control. + + Call ``GetElementSize()`` to obtain the size of the rectangle that contains the part of the control specified by ``Details``. ``ElementSize`` represents the type of size to be returned: ``minimum``, ``actual``, or ``stretch``. + ''' + @overload + def GetElementSize(self, DC: HDC, Details: ThemedElementDetails, Rect: Rect, ElementSize: ElementSize, Size: Size, DPI: int) -> bool: ... + def GetStyleColor(self, Color: StyleColor) -> Color: + ''' + Returns the color defined in the style for the element specified by ``Color``. + + Use ``GetStyleColor()`` to obtain the color defined for a certain control. For example, if ``Color`` is ``scButtonPressed``, ``GetStyleColor()`` returns the color assigned for the button when it is pressed. + + The style colors give you access to the colors used for controls in the current style. There are two categories of style colors. The first category includes colors used for control parts that are rendered directly from an image. In this case, the style color offers you a way to access the color of that image and is purely informational. The second category includes the colors used for controls that are rendered from code at run time (``Panel``, ``ListBox``, ``Grid``, and so on). + ''' + def GetStyleFontColor(self, Font: StyleFont) -> Color: + ''' + Returns the font color for the element specified by ``Font``. + + Call ``GetStyleFontColor()`` to obtain the font color defined in the current style for a specific part and state of a control. For example, if ``Font`` is ``sfEditBoxDisabled``, ``GetStyleFontColor()`` returns the color of the text in an ``Edit`` box, when the ``Edit`` box is disabled. + ''' + def GetSystemColor(self, Color: Color) -> Color: + ''' + Returns the system color defined in the current style. + + The current style has a set of colors defined for system color constants that resemble the style colors. For instance, you can call ``GetSystemColor()`` with ``clBtnFace()`` to obtain the styled color of a ``Button`` face. + ''' + @overload + def GetTextExtent(self, DC: HDC, Details: ThemedElementDetails, Text: str, Flags: TextFormat, ExtentRect: Rect) -> bool: + ''' + Returns the rectangle that contains the given text, drawn in the current style. + + Call ``GetTextExtent()`` to obtain the rectangle required to draw the given text with the specified formatting in the current style. + ''' + @overload + def GetTextExtent(self, DC: HDC, Details: ThemedElementDetails, Text: str, Flags: TextFormat, BoundingRect: Rect, ExtentRect: Rect) -> bool: ... + def HasElementFixedPosition(self, Details: ThemedElementDetails) -> bool: + ''' + # HasFixedPosition + ''' + def HasTransparentParts(self, Details: ThemedElementDetails) -> bool: + ''' + Determines whether the given element has transparent parts. + + Call ``HasTransparentParts()`` to check whether the element specified by ``Details`` has transparent parts in the current style. + ''' + def LoadFromFile(self, FileName: str) -> CustomStyleServices: + ''' + Loads a style from the specified file. + + Call ``LoadFromFile()()`` to load a style from the specified file. + ''' + def PaintBorder(self, Control: WinControl, EraseLRCorner: bool) -> None: + ''' + Draws the border of a control. + + Call ``PaintBorder()`` to draw the border of a control using the current style. + ''' + def SaveToFile(self, FileName: str) -> None: + ''' + # SaveToFile + Saves the current style settings to the specified file. + + Call ``SaveToFile()()`` to save the current style in the specified filename. + ''' + def ThemesAvailable(self) -> bool: + ''' + # For backwards compatibility + .. warning:: ``ThemesAvailable`` is deprecated. Please use `Available <Vcl.Themes.TCustomStyleServices.Available.htm>`__. + + Specifies whether the current operation system supports themes (styles). + + .. note:: ``ThemesAvailable`` is deprecated; use the `Available <Vcl.Themes.TCustomStyleServices.Available.htm>`__ property instead. + ''' + def ThemesEnabled(self) -> bool: + ''' + # For backwards compatibility + .. warning:: ``ThemesEnabled()`` is deprecated. Please use `Enabled <Vcl.Themes.TCustomStyleServices.Enabled.htm>`__. + + Specifies whether themes (styles) are enabled for this application. + + Use ``ThemesEnabled()`` to check whether themes (styles) are enabled for this application. + + .. note:: ``ThemesEnabled()`` is deprecated. Use the `Enabled <Vcl.Themes.TCustomStyleServices.Enabled.htm>`__ property instead. + ''' + @overload + def IsValidStyle(self, Stream: Stream) -> bool: + ''' + # Tests if the stream contains a valid style + Checks whether the provided style is a valid style. + + Call ``IsValidStyle()`` to verify whether the style specified by ``Stream`` is a valid style. + ''' + @overload + def IsValidStyle(self, Stream: Stream, StyleInfo: StyleInfo) -> bool: ... + + def OnThemeChange(self, Sender: Object) -> None: + ''' + # OnThemeChange: NotifyEvent + Occurs when the operating system theme changes. + + Use the ``OnThemeChange`` event to implement custom processing that should occur whenever the operating system theme changes. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomTabControl(WinControl): + ''' + ============================== + Vcl.ComCtrls.TCustomTabControl + ============================== + + ``CustomTabControl`` is the base type for ``TabControl`` components such as ``TabControl`` and ``PageControl``. + + Use ``CustomTabControl`` as a base class when defining a control that includes a set of notebook style tabs across the top. ``CustomTabControl`` introduces many properties, methods, and events to manage appearance and behavior of the tabs, and to respond when the user selects one of the tabs. + + .. note:: When using one of the ``PageControl``s, if you want to restrict a user from switching to a tab, you cannot set ``TabSheet.Enabled`` to ``False`` to accomplish that restriction. Instead, use the ``OnChanging`` event to prevent the user from selecting a tab. + ''' + + __hash__: ClassVar[None] = ... + DisplayRect: Rect + ''' + Specifies the bounding rectangle of a ``TabControl`` client area. + + Use ``DisplayRect()`` to obtain the coordinates, in pixels, of the portion of the ``TabControl`` that represents the contents of the tab pages. The appearance of this portion of the ``TabControl`` does not change when different tabs are selected. + + Use ``DisplayRect`` rather than the ``ClientRect`` property to determine the portion of the ``TabControl`` that can contain other objects. + ''' + HotTrack: bool + ''' + Determines whether labels on the tab under the mouse are automatically highlighted. + + Set ``HotTrack`` to ``True`` to provide visual feedback to the user about which tab would be selected if the mouse button is clicked. ``HotTrack`` is especially useful when the ``TabControl`` contains multiple rows of tabs. + ''' + Images: CustomImageList + ''' + Specifies the images drawn in tabs. + + ``Images`` specifies the images that are drawn in tabs. For disabled tabs, grayed versions of the images are used. + + In the implementation of `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__, the order of images in ``ImageList`` properties directly corresponds to the associated tabs in the control. In the descendant class, `PageControl <Vcl.ComCtrls.TPageControl.htm>`__, this behavior is replaced by support for individual `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ objects, each with an `ImageIndex <Vcl.ComCtrls.TTabSheet.ImageIndex.htm>`__ property. In any case, the application programmer can define customized image displays by defining an `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event handler. + ''' + MultiLine: bool + ''' + Determines whether the tabs can appear on more than one row. + + Use ``MultiLine`` to determine how the tabs are displayed. If ``MultiLine`` is ``True``, the tabs are displayed on more than one row when the number of tabs exceeds the number that fits across the top of the ``TabControl``. How many rows is determined by how many tabs are in the ``TabControl``. If ``MultiLine`` is ``False``, the tabs are displayed on one row only, and the user must scroll the displayed scroll arrows to view all the tabs. + ''' + MultiSelect: bool + ''' + Specifies whether multiple tabs can be selected. + + Use ``MultiSelect`` to ``get`` or ``set`` whether multiple tabs can be selected. + + ``MultiSelect`` can only be ``True`` if ``Style`` is ``tsFlatButtons`` or ``tsButtons``. + ''' + OwnerDraw: bool + ''' + Specifies whether the ``TabControl`` handles its own painting. + + Set ``OwnerDraw`` to ``True`` to override any default painting behavior. + ''' + RaggedRight: bool + ''' + Specifies whether rows of tabs stretch to fill the width of the control. + + Use ``RaggedRight`` to ``get`` or ``set`` whether rows of tabs stretch to fill the width of the control. + ''' + ScrollOpposite: bool + ''' + Determines how the rows of tabs are scrolled in a multi-line ``TabControl``. + + Set ``ScrollOpposite`` to determine where previous rows of tabs in a multi-line ``TabControl`` move when the user selects a tab in another row. When ``ScrollOpposite`` is ``True``, previous rows of tabs are moved to the bottom of the ``TabControl`` if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is tpTop, or to the top if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is tpBottom. When ``ScrollOpposite`` is ``False``, previous rows of tabs are moved to the back of all other rows of tabs. + + For example, in a ``TabControl`` with three rows of tabs at the top, if the user selects a tab in the second row, ``ScrollOpposite`` determines where the first row moves. If ``ScrollOpposite`` is ``True``, the second row now appears at the front (bottom) row on top of the ``TabControl``, followed by the third row behind (above) it. The first row moves to the bottom of the ``TabControl``. If ``ScrollOpposite`` is ``False``, the first row moves to the back (top), so that the ``TabControl`` displays the second row in front (at the bottom of the tab region), followed by the third row (now in the middle), followed by the first row. + + .. note:: Setting ``ScrollOpposite`` to ``True`` automatically sets the `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ property to ``True``. + ''' + Style: TabStyle + ''' + Specifies the style of the ``TabControl``. + + Use ``Style`` to determine the appearance of the tabs. These can appear as notebook tabs or as buttons. + ''' + TabHeight: int + ''' + Specifies the height, in pixels, of the tabs in the ``TabControl``. + + Set ``TabHeight`` to control the height of the tabs that appear above the client region of the ``TabControl``. The ``TabHeight`` property is the vertical size in pixels of the individual tabs. If ``TabHeight`` is set to 0, the tabs automatically size themselves to fit their text. + ''' + TabIndex: int + ''' + Identifies the selected tab on a ``TabControl``. + + Read ``TabIndex`` to determine which tab was selected by the user. ``TabIndex`` is the index of the tab in the list of labels maintained by the Tabs property. The first (leftmost) tab has a ``TabIndex`` of 0, the next has 1, and so on. If no tabs are selected, ``TabIndex`` has a value of -1. + + Set ``TabIndex`` to programmatically change the selected tab in the ``TabControl``. + ''' + TabPosition: TabPosition + ''' + Determines whether tabs appear at the top or bottom. + + Set ``TabPosition`` to ``tpTop`` to display the tabs at the top of the ``TabControl``. Set ``TabPosition`` to ``tpBottom`` to display the tabs at the bottom. If the `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ property is ``True``, tabs can appear at both top and bottom, with the row containing the current tab and all subsequent rows on the side indicated by ``TabPosition``. + + Due to a limitation in the windows common control, if ``TabPosition`` is ``tpLeft`` or ``tpRight``, ``Font`` must be a ``TrueType`` font. Otherwise, tab text may paint incorrectly. + ''' + Tabs: Strings + ''' + Contains the list of text strings that label the tabs of the ``TabControl``. + + ``Tabs`` contains a `Strings <System.Classes.TStrings.htm>`__, a list of strings that label the tabs in the ``TabControl``. To add new tabs to the ``TabControl`` or to edit the tabs themselves, add a new string or edit the strings currently in the ``Tabs`` property. (To open the `String List editor <String_List_editor.htm>`__, double-click the ``Tabs`` property in the `Object Inspector <Object_Inspector.htm>`__.) To rearrange the tabs, rearrange the list of strings. + + ``Tabs`` can also contain objects associated with the ``Label``s, using the `System.Classes.TStrings.Objects <System.Classes.TStrings.Objects.htm>`__ property. + ''' + TabWidth: int + ''' + Specifies the horizontal size, in pixels, of the tabs in the ``TabControl``. + + ``TabWidth`` specifies a fixed width for all tabs. If ``TabWidth`` is 0, then each tab is automatically made wide enough to show its caption. + ''' + Canvas: Canvas + ''' + Gives access to the ``TabControl``\ s. canvas. + + Use ``Canvas`` to paint to the ``TabControl``\ s. canvas during the `OnDrawTab <Vcl.ComCtrls.TCustomTabControl.OnDrawTab.htm>`__ event. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + + def AdjustClientRect(self, Rect: Rect) -> None: + ''' + Calculates the control's display area given a rectangle. + + ``AdjustClientRect()`` is called internally when the ``TabControl`` needs accurate information on where to place child controls within the client area. As implemented in `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__, returns the ``DisplayRect`` property as the ``Rect`` parameter. + ''' + def CanChange(self) -> bool: + ''' + Change permission event dispatcher. + + ``CanChange()`` is called automatically when an attempt is made to change the selected tab. ``CanChange`` generates an ``OnChanging`` event so that an ``OnChanging`` event handler can prevent the selection from changing. If there is no ``OnChanging`` event handler, ``CanChange()`` returns ``True``, allowing the change. + + Override ``CanChange`` to specify additional processing before the ``OnChanging`` event handler executes or to block the ``OnChanging`` event. + ''' + def CanShowTab(self, TabIndex: int) -> bool: + ''' + ``Selection`` permission event dispatcher. + + ``CanShowTab()`` is called automatically when an attempt is made to show a tab. ``CanShowTab`` is exposed as a protected method so that descendants can override this method to provide application-specific criteria that determines whether a tab is accessible. + + ``TabIndex`` is the index of the tab in the list of labels maintained by the ``Tabs`` property. + + ``CanShowTab()`` returns a ``Boolean`` value that indicates whether the tab specified in ``TabIndex`` can be accessed. + + .. tip:: ``CanShowTab`` can be used with such methods as ``CanFocus()`` (``TWinControl``) to determine whether the tab can both be accessed and can receive focus. Criteria for an overridden ``CanShowTab`` might include checking whether the tab is enabled. + ''' + def Change(self) -> None: + ''' + Pending tab change event dispatcher. + + ``Change()`` is called automatically when the selected tab changes. Override ``Change()`` to specify additional processing before the `OnChange <Vcl.ComCtrls.TCustomTabControl.OnChange.htm>`__ event handler executes, or to block the `OnChange <Vcl.ComCtrls.TCustomTabControl.OnChange.htm>`__ event. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Sets up the window-creation parameters for the ``TabControl``. + + ``TabControl``\ s call ``CreateParams()`` internally when the window for the ``TabControl`` must be generated. ``CreateParams()`` overrides the inherited method to specify a ``TabControl`` window with the current property settings. + ''' + def CreateWnd(self) -> None: + ''' + Creates the window for a ``TabControl``. + + ``CreateWnd()`` is called automatically when the ``TabControl``\ s. window is recreated. ``CreateWnd()`` calls the inherited method, before assigning any saved tab text strings in internal storage. + ''' + def DrawTab(self, TabIndex: int, Rect: Rect, Active: bool) -> None: + ''' + Tab drawing event dispatcher. + + Override ``DrawTab`` in a derived class to control the painting of tabs. + + ``TabIndex`` is the index of the tab that requires painting. + + ``Rect`` is the area in which the tab should be painted. + + ``Active`` is whether the tab is active. + + Use the ``Canvas`` property to paint the tab. + ''' + def GetImageIndex(self, TabIndex: int) -> int: + ''' + Generates an `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event + + Override ``GetImageIndex`` in a derived class to specify the index of the image to display for a particular tab. + + ``TabIndex`` is the index of the tab that is about to be displayed. + + The return ``Value`` is an integer that is the index of the image in the `Images <Vcl.ComCtrls.TCustomTabControl.Images.htm>`__ property that will be displayed in the tab. + ''' + def Loaded(self) -> None: + ''' + ``Form`` load event dispatcher. + + The protected ``Loaded()`` method is called automatically when the ``Form`` that contains the ``TabControl`` is loaded into memory. It provides an opportunity for the ``TabControl`` to perform any initializations after the control and all other components in the ``Form`` are loaded into memory, but before the first paint operation. + + In `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__, ``Loaded()`` ensures that the layout of the tabs accommodate the images specified by the ``Images`` property. + ''' + def UpdateTabImages(self) -> None: + ''' + Updates the tab images. + + ``UpdateTabImages()`` is called automatically to update the tab images after streaming in the control. + ''' + def CheckTabImagesIndexAndName(self) -> None: + ''' + No have docs. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Event dispatcher for creation and destruction of child objects. + + ``Notification()`` checks whether the notification indicates that the component that implements the ``Images`` property is about to be destroyed, and if so, sets that property to ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def SetTabIndex(self, Value: int) -> None: + ''' + Sets the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property. + + ``SetTabIndex()`` is called to change the value of the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property. Descendant classes should override ``SetTabIndex`` to provide special implementations of this property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__. + + Call ``Create()`` to instantiate a ``TabControl`` at runtime. ``TabControl``\ s placed on forms at design time are created automatically. ``Create()`` calls the inherited ``Create()`` method and sets the initial values for the ``TabControl``, including the creation of a tab list that contains the text strings for the tabs. + + ``AOwner`` is a component, typically the ``Form``, that is responsible for freeing the ``TabControl``. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, use ``Free()``. ``Free()`` checks that the ``TabControl`` is not ``nil``, and only then calls ``Destroy()``. ``Destroy()`` frees the tab list that holds the list of text strings for the tabs and calls the inherited destructor. + ''' + def IndexOfTabAt(self, X: int, Y: int) -> int: + ''' + Indicates the index of the tab at a specified point. + + Use ``IndexOfTabAt`` to locate which tab is at the point specified by ``'X'`` and ``'Y'``. If the point with ``'X'``-coordinate ``'X'`` and ``'Y'``-coordinate Y is over a tab, ``IndexOfTabAt()`` returns the 0-offset index of that tab in the Tabs property (``TTabControl``) or in the ``Pages`` property (``TPageControl``). If the point defined by ``'X'`` and ``'Y'`` is not over a tab, ``IndexOfTabAt()`` returns -1. + ''' + def GetHitTestInfoAt(self, X: int, Y: int) -> HitTests: + ''' + Returns information about the location of a point relative to the client area of the ``TabControl``. + + Call ``GetHitTestInfoAt`` to determine what portion of the ``TabControl``, if any, sits under the point specified by the ``'X'`` and ``'Y'`` parameters. + + ``GetHitTestInfo()`` returns a ``HitTests`` type. This set describes the possible elements under the mouse. When interpreting these values, each tab can be considered an "item" of the ``TabControl``. + ''' + def TabRect(self, Index: int) -> Rect: + ''' + Returns the bounding rectangle for a specified tab. + + Use ``TabRect`` to determine the current position of the tab with the specified index. ``Index`` is the 0-offset index of a tab in the Tabs property (``TTabControl``) or in the ``Pages`` property (``TPageControl``). ``TabRect()`` returns the bounding rectangle (in client coordinates) of the specified tab. + ''' + def RowCount(self) -> int: + ''' + Sets ``TabIndex`` property. + + ``RowCount()`` is called to change the value of the ``TabIndex`` property. Descendant classes should override ``RowCount`` to provide special implementations of this property. + ''' + def ScrollTabs(self, Delta: int) -> None: + ''' + Scrolls the tabs that are visible when the ``TabControl`` is not multi-line. + + Call ``ScrollTabs`` to change the tabs that are visible in the ``TabControl``. When Delta is positive, Delta additional tabs to the right are scrolled into view. When Delta is negative, the tabs to the left are scrolled into view, with the absolute value of Delta indicating how many tabs are scrolled. If there are fewer than the absolute value of Delta tabs in the indicated direction, ``ScrollTabs`` scrolls as far as possible. + + ``ScrollTabs`` has no effect if there are no scrolled tabs, either because the control is wide enough to display all tabs or because the ``MultiLine`` property is ``True``. + + .. note:: ``ScrollTabs`` scrolls the visible tabs. It does not change the current selection. Calling ``ScrollTabs`` may scroll the selected tab out of view. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs after a new tab is selected. + + Write an ``OnChange`` event handler to take specific action immediately after the selected tab changes. Use the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property to determine which tab is now selected. This is the opportunity to make any changes to the control that reflect the new state implied by the selected tab. + + Before the value of `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ changes, an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event occurs. + + .. note:: The event is not called if you change the active page in code, for example, by setting the value of `ActivePage <Vcl.ComCtrls.TPageControl.ActivePage.htm>`__. + ''' + def OnChanging(self, Sender: Object, AllowChange: bool) -> None: + ''' + # OnChanging: TabChangingEvent + Occurs immediately before a new tab is selected. + + Write an ``OnChanging`` event handler to take specific action immediately before the selected tab changes. Set the ``AllowChange`` parameter to ``False`` to prevent the change. + + Use an ``OnChanging`` event handler to prevent the user from leaving a tab setting until certain conditions have been met. An ``OnChanging`` event handler can also be used to save information about the current state of the ``TabControl`` before it is changed by a new tab selection. + + .. note:: The event is not called if you change the active page in code, for example, by setting the value of `PageControl <Vcl.ComCtrls.TPageControl.htm>`__. `ActivePage <Vcl.ComCtrls.TPageControl.ActivePage.htm>`__. + + ``OnChanging`` is an event handler of type `Vcl.ComCtrls.TTabChangingEvent <Vcl.ComCtrls.TTabChangingEvent.htm>`__. + ''' + def OnDrawTab(self, Control: CustomTabControl, TabIndex: int, Rect: Rect, Active: bool) -> None: + ''' + # OnDrawTab: DrawTabEvent + Occurs when a tab is about to be drawn. + + Use ``OnDrawTab`` to customize the painting of tabs. + + You can paint the tab using the `Canvas <Vcl.ComCtrls.TCustomTabControl.Canvas.htm>`__ property. + + ``OnDrawTab`` is an event handler of type `Vcl.ComCtrls.TDrawTabEvent <Vcl.ComCtrls.TDrawTabEvent.htm>`__. See ``DrawTabEvent`` for a description of the parameters. + ''' + def OnGetImageIndex(self, Sender: Object, TabIndex: int, ImagelistIndex: int) -> None: + ''' + # OnGetImageIndex: TabGetImageEvent + Occurs when a tab is about to display its associated image. + + Write an ``OnGetImageIndex`` event handler to specify the ``ImageIndex`` for a given ``TabIndex``. + + On entry to the event handler, the ``ImageIndex`` parameter is the same as the ``TabIndex`` parameter, where ``TabIndex`` is the index of the tab which is about to display its image. Change the ``ImageIndex`` parameter to specify the index into the ``Images`` property that specifies the image that should be painted. + + ``OnGetImageIndex`` is an event handler of type `Vcl.ComCtrls.TTabGetImageEvent <Vcl.ComCtrls.TTabGetImageEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomToggleSwitch(CustomControl): + ''' + ================================= + Vcl.WinXCtrls.TCustomToggleSwitch + ================================= + + The base class for `ToggleSwitch <Vcl.WinXCtrls.TToggleSwitch.htm>`__. + + `ToggleSwitch <Vcl.WinXCtrls.TToggleSwitch.htm>`__ implements a clickable control that allows a user to toggle between an ``On`` state and an ``Off`` state. + ''' + + __hash__: ClassVar[None] = ... + FClicksDisabled: bool + ''' + Indicates whether this control processes mouse clicks. + + This field is used internally during the ``ToggleSwitch`` state changes. + ''' + FBackgroundBmp: Bitmap + ''' + The background image of this control. + + Used internaly to support transparency. + ''' + FUsingMouse: bool + ''' + Indicates that the ``ToggleSwitch`` is being manipulated with the mouse instead of the keyboard. + ''' + Alignment: LeftRight + ''' + Specifies whether the ``ToggleSwitch`` caption is displayed on the right or the left side. + + Default is ``taRightJustify``. + ''' + AutoSize: bool + ''' + Indicates whether the control adjusts its bounds based on the `SwitchHeight <Vcl.WinXCtrls.TCustomToggleSwitch.SwitchHeight.htm>`__, `SwitchWidth <Vcl.WinXCtrls.TCustomToggleSwitch.SwitchWidth.htm>`__, and `StateCaptions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ properties. + + Default is ``True``. + ''' + DisabledColor: Color + ''' + The color of the ``ToggleSwitch`` when it is disabled. + + Default is ``clBtnShadow``. + ''' + FrameColor: Color + ''' + The color of the ``ToggleSwitch`` frame. + + Default is ``clWindowText``. + ''' + ReadOnly: bool + ''' + Indicates whether the ``ToggleSwitch`` is in read-only mode. + + If ``True``, the user cannot change the state of the ``ToggleSwitch``. You can still change the `State <Vcl.WinXCtrls.TCustomToggleSwitch.State.htm>`__ programatically. + + Default is ``False``. + ''' + State: ToggleSwitchState + ''' + The current `state <Vcl.WinXCtrls.TToggleSwitchState.htm>`__ of the ``ToggleSwitch``. + + Possible values are: + + - ``tssOff``: Default. The ``ToggleSwitch`` is in the off state. + - ``tssOn``: The ``ToggleSwitch`` is in the on state. + ''' + StateCaptions: ToggleSwitchStateCaptions + ''' + The `captions <Vcl.WinXCtrls.TToggleSwitchStateCaptions.htm>`__ of the ``ToggleSwitch``. + ''' + ShowStateCaption: bool + ''' + Indicates whether to display the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ of the switch. + + Default is ``True``. + ''' + SwitchHeight: int + ''' + The `height <Vcl.WinXCtrls.TCustomToggleSwitch.Height.htm>`__ of the ``ToggleSwitch`` excluding the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. + ''' + SwitchWidth: int + ''' + The `width <Vcl.WinXCtrls.TCustomToggleSwitch.Width.htm>`__ of the ``ToggleSwitch`` excluding the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. + ''' + ThumbColor: Color + ''' + The color of the ``ToggleSwitch`` thumb. + + Default is ``clWindowText``. + ''' + ThumbWidth: int + ''' + The width of the thumb inside the ``ToggleSwitch`` frame. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + Do not call `Loaded <Vcl.Controls.TControl.Loaded.htm>`__. The *VCL Streaming* system calls `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + + `Loaded <Vcl.Controls.TControl.Loaded.htm>`__ overrides the inherited method in order to initialize the control from its associated ``Action``. To change the properties the control copies from its action, override the ``ActionChange()`` method. + ''' + def AdjustBounds(self) -> None: + ''' + Modifies the size of the ``ToggleSwitch``. + + ``AdjustBounds`` takes into account the size of the ``ToggleSwitch`` and the size of the `caption text <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def ChangeState(self) -> None: + ''' + Changes the current `state <Vcl.WinXCtrls.TToggleSwitchState.htm>`__ of the ``ToggleSwitch``. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Updates the control to reflect changes in its associated action. + + `ActionChange <Vcl.Controls.TWinControl.ActionChange.htm>`__ is called automatically when the associated action changes. It updates the control to reflect the action's current `Caption <Vcl.Controls.TControl.Caption.htm>`__, `Enabled <Vcl.Controls.TControl.Enabled.htm>`__, `Hint <Vcl.Controls.TControl.Hint.htm>`__, `Visible <Vcl.Controls.TControl.Visible.htm>`__, and `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ properties and its `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + The ``Sender`` parameter is the associated action. The ``CheckDefaults`` parameter specifies whether properties and event handlers should be changed if they differ from the default values. When ``CheckDefaults`` is ``True``, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When ``CheckDefaults`` is ``False``, properties and event handlers are changed, regardless of their current values. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the associated ``ActionLink`` class ToggleSwitchActionLink <Vcl.WinXCtrls.TToggleSwitchActionLink.htm>`__. + ''' + def GetGlyphPosition(self, X: int, Y: int) -> None: + ''' + Returns the position of the switch portion of the control. + + ``GetGlyphPosition`` takes into account the size of the switch, the size of the `caption <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ text and the `alignment <Vcl.WinXCtrls.TCustomToggleSwitch.Alignment.htm>`__. + ''' + def UpdateDisplay(self) -> None: + ''' + `Repaints <Vcl.WinXCtrls.TCustomToggleSwitch.Paint.htm>`__ the control when the keyboard toggles the switch. + ''' + def RepaintDisplay(self) -> None: + ''' + `Repaints <Vcl.Controls.TWinControl.Repaint.htm>`__ the ``ToggleSwitch``. + ''' + def GetActiveStateCaption(self) -> str: + ''' + The `caption <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ text of the current ``ToggleSwitch`` `state <Vcl.WinXCtrls.TCustomToggleSwitch.State.htm>`__. + ''' + def DrawSwitch(self, Canvas: Canvas) -> None: + ''' + Draws the ``ToggleSwitch``. + ''' + def Paint(self) -> None: + ''' + Responds to a mouse click. + + The `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method for `CustomControl <Vcl.Controls.TCustomControl.htm>`__ does nothing other than provide the interface for a method that responds to ``WM_PAINT`` messages. `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called by the `PaintWindow <Vcl.Controls.TCustomControl.PaintWindow.htm>`__ method, after that method has supplied the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ with the handle to a device context. When creating a custom control, always override `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ to draw the image of the control. + + .. tip:: To determine which portions of the control's canvas need to be repainted when `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called, use the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property of the canvas. + ''' + def Click(self) -> None: + ''' + Respond to user click. + + `Click <Vcl.Controls.TControl.Click.htm>`__ is called automatically when the user left-clicks the control. ``Component`` or application code can call `Click <Vcl.Controls.TControl.Click.htm>`__ to simulate a user mouse click. This is often done in menu actions and hotkey handlers. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `Click <Vcl.Controls.TControl.Click.htm>`__ queries whether the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler exists and is different from the ``OnExecute`` handler for the control's ``Action``. If this is ``True``, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler is called. If this is ``False``, and the ``Action`` ``OnExecute`` event handler exists, the Action's ``Execute()`` method is called. Override `Click <Vcl.Controls.TControl.Click.htm>`__ to provide additional behavior. + ''' + def DoExit(self) -> None: + ''' + Responds to losing input focus. + + `DoExit <Vcl.Controls.TWinControl.DoExit.htm>`__ is called automatically when the control loses the input focus. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, `DoExit <Vcl.Controls.TWinControl.DoExit.htm>`__ calls the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler, if defined. + + Descendant classes that override `DoExit <Vcl.Controls.TWinControl.DoExit.htm>`__ should always call the inherited method. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to a key press. + + If the ``Key`` is ``vk_Space``, ``KeyDown()`` sets a flag that `KeyUp <Vcl.WinXCtrls.TCustomToggleSwitch.KeyUp.htm>`__ uses. + ''' + def KeyUp(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to an end of a key press. + + If the ``Key`` is ``vk_Space``, the ``ToggleSwitch`` changes `state <Vcl.WinXCtrls.TCustomToggleSwitch.State.htm>`__. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Responds to a mouse click. + + If the ``Button`` is ``mbLeft``, ``MouseDown()`` sets a flag that `MouseUp <Vcl.WinXCtrls.TCustomToggleSwitch.MouseUp.htm>`__ uses. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Responds to a mouse click. + + If the ``Button`` is ``mbLeft``, the ``ToggleSwitch`` changes `state <Vcl.WinXCtrls.TCustomToggleSwitch.State.htm>`__. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Setter for the `AutoSize <Vcl.WinXCtrls.TCustomToggleSwitch.AutoSize.htm>`__ property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of the `CustomToggleSwitch <Vcl.WinXCtrls.TCustomToggleSwitch.htm>`__. + + ``Create()`` sets the default values for all the ``ToggleSwitch`` properties. + ''' + def Destroy(self) -> None: + ''' + `Destroys <Vcl.Controls.TCustomControl.Destroy.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Do not call `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ directly in an application. Instead, call `Free <System.TObject.Free.htm>`__. `Free <System.TObject.Free.htm>`__ verifies that the control is not ``nil``, and only then calls `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__. + + Applications should only free controls explicitly when the constructor was called without assigning an owner to the control. + + As the control is destroyed, it destroys the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object in its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + Override `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ to free any memory or resources allocated in the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. When declaring a `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ method in a descendent control type, always add the override directive to the declaration and call the inherited `Destroy <Vcl.Controls.TCustomControl.Destroy.htm>`__ as the last statement in the redeclared method. + + When a control is created, Delphi automatically provides exception handling around the constructor call. The destructor is called if an exception escapes from the constructor. This means that the destructor code must be prepared to clean up a partially constructed instance. Check all data fields for zero before disposing of their contents. + ''' + def GetControlsAlignment(self) -> Align: + ''' + Indicates how text is aligned within the control. + + Use `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ to determine the alignment of the control. For controls that do not have an ``Alignment`` property, `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ returns ``taLeftJustify``. + + .. note:: `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ returns the alignment of text before it is altered by the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. To check whether the alignment should be reversed to reflect the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property, call `UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__. + ''' + def IsOn(self) -> bool: + ''' + Indicates whether the ``ToggleSwitch`` is in the ``On`` state. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class CustomTreeView(WinControl): + ''' + ============================ + Vcl.ComCtrls.TCustomTreeView + ============================ + + ``CustomTreeView`` is the base type for tree-view components such as ``TreeView``. + + Use ``CustomTreeView`` as a base class when defining controls that present information in a hierarchical structure with nodes that can be expanded or collapsed. Most of the properties defined in ``CustomTreeView`` are protected so that you can choose whether to publish them in your own ``TreeView`` components. + + Do not create instances of ``CustomTreeView``. Use the generic descendant ``TreeView``, or create your own descendant class. + ''' + + __hash__: ClassVar[None] = ... + FChangeTimer: Timer + ''' + No have docs. + ''' + AutoExpand: bool + ''' + Specifies whether the nodes in the ``TreeView`` automatically expand and collapse depending on the selection. + + Set ``AutoExpand`` to ``True`` to cause the selected item to expand and the unselected items to collapse. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``TreeView`` control has a border. + + Set ``BorderStyle`` to specify whether the ``TreeView`` control should be outlined with a single-line border. These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + ''' + ChangeDelay: int + ''' + Specifies the delay between when a ``Node`` is selected and when the `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event occurs. + + Use ``ChangeDelay`` to ``get`` or ``set`` the delay, in milliseconds, between when a ``Node`` is selected and when the `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event occurs. + + Set the ``ChangeDelay`` to 50 milliseconds to emulate the behavior of the tree-view control used in Windows Explorer. + ''' + CreateWndRestores: bool + ''' + No have docs. + ''' + Encoding: Encoding + ''' + The value of the `encoding <System.SysUtils.TEncoding.htm>`__ that you can provide when you call `LoadFromStream <Vcl.ComCtrls.TCustomTreeView.LoadFromStream.htm>`__ or `LoadFromFile <Vcl.ComCtrls.TCustomTreeView.LoadFromFile.htm>`__. + + If you do not specify the `encoding <System.SysUtils.TEncoding.htm>`__, the value of ``Encoding`` is `Encoding.Default <System.SysUtils.TEncoding.Default.htm>`__. + ''' + HideSelection: bool + ''' + Determines whether a selected node appears selected when the focus shifts to another control. + + Use ``HideSelection`` to specify whether the user is given visual feedback about the current selection in the ``TreeView`` when it does not have focus. If ``True``, the selected ``Node`` is not visually distinct from other nodes until focus returns to the control. If ``False``, the node always appears selected. + ''' + HotTrack: bool + ''' + Specifies whether list items are highlighted when the mouse passes over them. + + Set ``HotTrack`` to ``True`` to provide visual feedback about which item is under the mouse. Set ``HotTrack`` to ``False`` to suppress the visual feedback about which item is under the mouse. + ''' + Images: CustomImageList + ''' + Determines which ``ImageList`` is associated with the ``TreeView``. + + Use ``Images`` to provide a customized list of bitmaps that can be displayed to the left of a node's label. Individual nodes specify the image from this list that should appear by setting their ``ImageIndex`` property. + ''' + Indent: int + ''' + Specifies the amount of indentation in pixels when a list of child nodes is expanded. + + Use ``Indent`` to determine how far child nodes are indented from their parent nodes when the parent is expanded. + ''' + Items: TreeNodes + ''' + Lists the individual nodes that appear in the ``TreeView`` control. + + Individual nodes in a ``TreeView`` are ``TreeNode`` objects. These individual nodes can be accessed by using the ``Items`` property along with the item's index into the ``TreeView``. For example, to access the second item in the ``TreeView``, you could use the following code. + + .. code-block:: python + + MyTreeNode := TreeView1.Items[1]; + + .. code-block:: python + + MyTreeNode = TreeView1->Items[1]; + + When setting this property at design-time in the *Object Inspector* the *TreeView Items Editor* appears. Use the *New Item* and *New SubItem* buttons to add items to the ``TreeView``. Use the ``Text`` property to modify what text is displayed in the ``Label`` of the item. + + At run-time nodes can be added and inserted by using the ``TreeNodes()`` methods ``AddChildFirst()``, ``AddChild()``, ``AddChildObjectFirst()``, ``AddChildObject()``, ``AddFirst()``, ``Add()``, ``AddObjectFirst()``, ``AddObject()``, and ``Insert()``. + + .. note:: Accessing ``TreeView`` items by ``Index`` can be time-intensive, particularly when the ``TreeView`` contains many items. For optimal performance, try to design your application so that it has as few dependencies on the ``TreeView``\ s. item index as possible. + ''' + MultiSelect: bool + ''' + Determines whether the user can select more than one tree node at a time. + + Set ``MultiSelect`` to specify whether users can select multiple nodes using the ``Control`` and *Shift* keys. A selection style must also be chosen in `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__. + ''' + MultiSelectStyle: MultiSelectStyle + ''' + Determines how multiple node selections work. + + ``MultiSelectStyle`` determines how multiple selections are made when `MultiSelect <Vcl.ComCtrls.TCustomTreeView.MultiSelect.htm>`__ is ``True``. ``MultiSelectStyle`` must include at least one of the following values. + + ====================== ========================================================================================================================================================================= + **Value** **Meaning** + ====================== ========================================================================================================================================================================= + ``msControlSelect`` Clicking on any node with the `Control <Vcl.ComCtrls.TCoolBand.Control.htm>`__ key pressed toggles the selection of that node. + ``msShiftSelect`` Clicking on any node with the *Shift* key pressed selects that node, the last single node selected, and the nodes in between. All other nodes are deselected. + ``msVisibleOnly`` Multiple selections with the *Shift* key do not include child nodes of collapsed nodes. + ``msSiblingOnly`` Selected nodes are restricted to a single set of siblings. + ====================== ========================================================================================================================================================================= + + If ``msControlSelect`` or ``msShiftSelect`` are in effect, the last singly-selected node becomes the primary selection, referenced by `Selections <Vcl.ComCtrls.TCustomTreeView.Selections.htm>`__ [0]. The primary selection is the anchor for extended selections using the *Shift* key. + ''' + Reading: bool + ''' + Returns whether the `CustomTreeView <Vcl.ComCtrls.TCustomTreeView.htm>`__ control is being read from. The ``Reading`` property returns a ``Boolean`` flag that is set to ``True`` if the `CustomTreeView <Vcl.ComCtrls.TCustomTreeView.htm>`__ control is being read from and to ``False``, otherwise. + ''' + ReadOnly: bool + ''' + Determines whether the user can edit the node labels. + + Use ``ReadOnly`` to specify whether the user can edit the nodes of the ``TreeView``. If ``ReadOnly`` is ``True``, the user can expand and collapse nodes, but can't edit their labels. If ``ReadOnly`` is ``False``, the user can edit the ``Label``\ s as well. The default ``Value`` is ``False``. + ''' + RightClickSelect: bool + ''' + Determines whether the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property returns nodes that are selected using the right mouse button. + + Use ``RightClickSelect`` to allow the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property to indicate nodes the user clicks with the right mouse button. If ``RightClickSelect`` is ``True``, the value of `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ is the value of the node last clicked with either the right or left mouse button. If ``RightClickSelect`` is ``False``, the value of `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ is the node last clicked using the left mouse button. + + ``RightClickSelect`` affects only the value of the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property. It does not cause the ``TreeView`` to highlight a new node if the ``Node`` is selected using the right mouse button. + + .. note:: ``RightClickSelect`` must be set to ``True`` before the user right-clicks the ``TreeView`` for it to affect the value of the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property. + ''' + RowSelect: bool + ''' + Specifies whether the entire row of the selected item is highlighted. + + Set ``RowSelect`` to ``True`` to cause the entire row of the selected item to be highlighted. + + ``RowSelect`` is ignored if `ShowLines <Vcl.ComCtrls.TCustomTreeView.ShowLines.htm>`__ is ``True``. + ''' + ShowButtons: bool + ''' + Specifies whether to display plus (``'+'``) and minus (``'-'``) buttons to the left side of each parent item. + + If ``ShowButtons`` is ``True``, a ``Button`` will appear to the left of each parent item. The user can click the button to expand or collapse the child items as an alternative to double-clicking the parent item. + ''' + ShowLines: bool + ''' + Specifies whether to display the lines that link child nodes to their corresponding parent nodes. + + If ``ShowLines`` is ``True``, lines linking child nodes to their parent nodes are displayed. ``Nodes`` at the root of the hierarchy are not automatically linked. To link nodes at the root, the `ShowRoot <Vcl.ComCtrls.TCustomTreeView.ShowRoot.htm>`__ property must also be set to ``True``. + ''' + ShowRoot: bool + ''' + Specifies whether lines connecting top-level nodes are displayed. To show lines connecting top-level nodes to a single root, set the ``TreeView``\ s. ``ShowRoot`` and `ShowLines <Vcl.ComCtrls.TCustomTreeView.ShowLines.htm>`__ properties to ``True``. + ''' + SortType: SortType + ''' + Determines if and how the nodes in a ``TreeView`` are automatically sorted. + + Once a ``TreeView`` is sorted, the original hierarchy is lost. That is, setting the ``SortType`` back to ``stNone`` will not restore the original order of items. These are the possible values: + + ============== ======================================================================================================== + **Value** **Meaning** + ============== ======================================================================================================== + ``stNone`` No sorting is done. + ``stData`` The items are sorted when the ``Data`` object or ``SortType`` is changed. + ``stText`` The items are sorted when the ``Caption`` or ``SortType`` is changed. + ``stBoth`` The items are sorted when either the ``Data`` object, the ``Caption`` or ``SortType`` is changed + ============== ======================================================================================================== + + Optionally, the ``OnCompare`` event can be hooked to handle comparisons. + ''' + StateImages: CustomImageList + ''' + Determines which ``ImageList`` to use for state images. + + Use ``StateImages`` to provide a set of bitmaps that reflect the state of ``TreeView`` nodes. The state image appears as an additional image to the left of the item's icon. + ''' + ToolTips: bool + ''' + Specifies whether the items in the ``TreeView`` have tool tips. + + Set ``ToolTips`` to ``True`` to specify that items in the ``TreeView`` control have tool tips (Help Hints). + + Specify the ``ToolTip`` text in an `OnHint <Vcl.ComCtrls.TCustomStatusBar.OnHint.htm>`__ event handler using the ``Hint`` property. + ''' + Canvas: Canvas + ''' + Provides access to the ``Canvas``. + + Use the ``Canvas`` property to paint to the ``Canvas`` from the `OnCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnCustomDraw.htm>`__ and `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event handlers. + ''' + DropTarget: TreeNode + ''' + Specifies which item in the ``TreeView`` appears as the target of a drag and drop operation. + + Read ``DropTarget`` to determine whether a node in the ``TreeView`` is drawn as the target of a drag and drop operation. Set ``DropTarget`` when specifying a particular node in the ``TreeView`` as the drop target of a dragged item. + + .. note:: When ``DropTarget`` is set, the application must still handle the actual logic of accepting the dragged object by the indicated node. + ''' + Selected: TreeNode + ''' + Specifies the selected node in the ``TreeView``. + + Read ``Selected`` to access the selected node of the ``TreeView``. If there is no selected node, the value of ``Selected`` is ``nil`` (Delphi) or ``NULL`` (C++). + + Set ``Selected`` to set a node in the ``TreeView``. When a node becomes selected, the ``TreeView``\ s. ``OnChanging`` and ``OnChange`` events occur. Also, if the specified ``Node`` is the child of a collapsed parent item, the parent's list of child items is expanded to reveal the specified node. In this case, the ``TreeView``\ s. ``OnExpanded`` and ``OnExpanding`` events occur as well. + + If the ``RightClickSelect`` property is ``True``, the value of ``Selected`` is the last node that was clicked in the ``TreeView``, even if it was clicked with the right mouse button. This may differ from the node that is highlighted to indicate selection. + + If the ``MultiSelect`` property is ``True`` and the ``MultiSelectStyle`` property includes ``msControlSelect``, then ``Selected()`` returns the last node clicked on, even if that click deselected the node. For a current selection status when ``MultiSelect`` is ``True``, refer to the ``Selections`` property. + ''' + TopItem: TreeNode + ''' + Specifies the topmost node that appears in the ``TreeView``. + + When ``TopItem`` is changed, the ``TreeView`` scrolls vertically so that the specified ``Node`` is topmost in the ``ListView``. + ''' + SelectionCount: int + ''' + Returns number of nodes selected. + + ``SelectionCount()`` returns the number of nodes currently selected. + ''' + Selections: list[TreeNode] + ''' + Returns nodes selected. + + ``Selections()`` returns one of selected nodes. The maximum value of ``Index`` is `SelectionCount <Vcl.ComCtrls.TCustomTreeView.SelectionCount.htm>`__-1. If more than one ``Node`` is selected, ``Selections[0]`` is the primary selected node. This ``Node`` is the starting point for extended selections if `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__ includes ``msShiftSelect``. + ''' + + def CanEdit(self, Node: TreeNode) -> bool: + ''' + ``Node`` editing event dispatcher. + + ``CanEdit()`` is called automatically whenever an attempt is made to edit the node specified by the ``Node`` parameter. ``CanEdit()`` returns ``True`` if the user can edit the specified node, false otherwise. + + If there is no ``OnEditing`` event handler, ``CanEdit()`` returns ``True``. + + Override this method to make additional, class-specific responses in addition to the ``OnEditing`` event or to suppress the ``OnEditing`` event. + ''' + def CanChange(self, Node: TreeNode) -> bool: + ''' + Pending node change event dispatcher. + + ``CanChange()`` is called automatically whenever an attempt is made to change the selected node. The ``Node`` parameter indicates the currently selected node. ``CanChange()`` returns ``True`` if selection can move away from the specified node, false otherwise. + + If there is no `OnChanging <Vcl.ComCtrls.TCustomTreeView.OnChanging.htm>`__ event handler, ``CanChange()`` returns ``True``. + + Override this method to make additional, class-specific responses in addition to the `OnChanging <Vcl.ComCtrls.TCustomTreeView.OnChanging.htm>`__ event or to suppress the `OnChanging <Vcl.ComCtrls.TCustomTreeView.OnChanging.htm>`__ event. + ''' + def CanCollapse(self, Node: TreeNode) -> bool: + ''' + Pending node collapse event dispatcher. + + ``CanCollapse()`` is called automatically whenever an attempt is made to collapse the node specified by the ``Node`` parameter. ``CanCollapse()`` returns ``True`` if node can be collapsed, false otherwise. + + If there is no ``OnCollapsing`` event handler, ``CanCollapse()`` returns ``True``. + + Override this method to make additional, class-specific responses in addition to the ``OnCollapsing`` event or to suppress the ``OnCollapsing`` event. + ''' + def CanExpand(self, Node: TreeNode) -> bool: + ''' + ``Node`` expand event dispatcher. + + ``CanExpand()`` is called automatically whenever an attempt is made to expand the node specified by the ``Node`` parameter. ``CanExpand()`` returns ``True`` if node can be expanded, false otherwise. + + If there is no ``OnExpanding`` event handler, ``CanExpand()`` returns ``True``. + + Override this method to make additional, class-specific responses in addition to the ``OnExpanding`` event or to suppress the ``OnExpanding`` event. + ''' + def Change(self, Node: TreeNode) -> None: + ''' + Completed node change event dispatcher. + + ``Change()`` is called automatically whenever the selected node changes. The ``Node`` parameter indicates the newly selected node. + + Override this method to make additional, class-specific responses in addition to the `OnChanging <Vcl.ComCtrls.TCustomTreeView.OnChanging.htm>`__ event or to suppress the `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event. + ''' + def Collapse(self, Node: TreeNode) -> None: + ''' + Completed node collapse event dispatcher. + + ``Collapse()`` is called automatically after the node specified by the ``Node`` parameter collapses. + + Override this method to make additional, class-specific responses in addition to the `OnCollapsed <Vcl.ComCtrls.TCustomTreeView.OnCollapsed.htm>`__ event or to suppress the `OnCollapsed <Vcl.ComCtrls.TCustomTreeView.OnCollapsed.htm>`__ event. + ''' + def CreateNode(self) -> TreeNode: + ''' + Creates a new ``TreeNode`` instance with the ``TreeNodes`` specified by `Items <Vcl.ComCtrls.TCustomTreeView.Items.htm>`__ as its ``Owner()``. + + Do not call ``CreateNode`` in application code. The ``TreeNodes`` object specified by the `Items <Vcl.ComCtrls.TCustomTreeView.Items.htm>`__ property uses this method in the implementation of its Add, `AddFirst <Vcl.ComCtrls.TTreeNodes.AddFirst.htm>`__, `AddChild <Vcl.ComCtrls.TTreeNodes.AddChild.htm>`__, `AddChildFirst <Vcl.ComCtrls.TTreeNodes.AddChildFirst.htm>`__, `AddObject <Vcl.ComCtrls.TTreeNodes.AddObject.htm>`__, `AddObjectFirst <Vcl.ComCtrls.TTreeNodes.AddObjectFirst.htm>`__, `AddChildObject <Vcl.ComCtrls.TTreeNodes.AddChildObject.htm>`__, and `AddChildObjectFirst <Vcl.ComCtrls.TTreeNodes.AddChildObjectFirst.htm>`__ methods. To create a new node for the ``TreeView``, use one of these methods instead. These methods ensure that the node is inserted properly and its properties reflect its position in the ``TreeView``. + ''' + def CreateNodes(self) -> TreeNodes: + ''' + No have docs. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.ComCtrls.TCustomTreeView.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to CreateWindowHandle. + + ``CreateParams()`` fills in the data structure that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling Windows to create a window handle. The fields of a `Vcl.Controls.TCreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the *CreateWindowEx API* function. + + ``CreateParams()`` sets the value of the ``Params`` parameter to reflect the current property settings of the ``TreeView``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the window used by the ``TreeView`` component. + + ``CreateWnd()`` is called automatically when the ``TreeView`` is first created or when the window must be destroyed and recreated to reflect property changes. + + ``CreateWnd()`` first calls the `CreateParams <Vcl.ComCtrls.TCustomTreeView.CreateParams.htm>`__ method to initialize the window-creation parameters, then calls ``CreateWindowHandle()`` to create the window for the control. If the ``TreeView``\ s. window was temporarily destroyed and recreated, ``CreateWnd()`` reads various property settings from an in-memory cache where they were stored while there was no window. ``CreateWnd()`` then sends a series of *Windows* messages to the newly-created ``TreeView`` control to initialize its property settings. + ''' + def CustomDraw(self, ARect: Rect, Stage: CustomDrawStage) -> bool: + ''' + Generates an `OnCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnCustomDraw.htm>`__ or `OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__ event. + + ``CustomDraw()`` is called automatically at discrete stages in the painting process. It determines what event handlers, if any, are appropriate for the current drawing stage, and generates the appropriate events. + + ``ARect`` is the boundaries of the ``TreeView`` in the coordinates of the `Canvas <Vcl.ComCtrls.TCustomTreeView.Canvas.htm>`__ property. + + ``Stage`` is the current stage of the painting process. + + ``CustomDraw()`` returns ``True`` if the ``TreeView`` should continue with the default painting process, ``False`` if the method has completely rendered the ``TreeView`` and there is no more painting to be done. + ''' + def CustomDrawItem(self, Node: TreeNode, State: CustomDrawState, Stage: CustomDrawStage, PaintImages: bool) -> bool: + ''' + Generates an `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ or `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ event. + + ``CustomDrawItem()`` is called automatically at discrete stages during the painting of tree nodes. It determines what event handlers, if any, are appropriate for the current drawing stage, and generates the appropriate events. + + ``Node`` is the item that is about to be painted. + + ``State`` is the item's current state: one or more of ``cdsSelected``, ``cdsGrayed``, ``cdsDisabled``, ``cdsChecked``, ``cdsFocused``, ``cdsDefault``, ``cdsHot``, ``cdsMarked``, ``cdsIndeterminate``. (of type `CustomDrawState <Vcl.ComCtrls.TCustomDrawState.htm>`__) + + ``Stage`` is the current stage of the painting process. + + ``PaintImages()`` returns a value that indicates whether the ``TreeView`` should paint the images associated with the current node. This value is only meaningful when ``Stage`` is ``csPrePaint``. + + ``CustomDrawItem()`` returns ``True`` if the ``TreeView`` should continue with the default rendering of the item, ``False`` if the method completely handled painting the item and there is nothing left to paint. + ''' + def Delete(self, Node: TreeNode) -> None: + ''' + Generates an ``OnDeletion`` event. + + ``Delete()`` is called automatically immediately before the node specified by the ``Node`` parameter is deleted. + + Override this method to make additional, class-specific responses in addition to the ``OnDeletion`` event or to suppress the ``OnDeletion`` event. + ''' + def Added(self, Node: TreeNode) -> None: + ''' + No have docs. + ''' + def DestroyWnd(self) -> None: + ''' + Destroys the control's window. + + ``DestroyWnd()`` is called when the ``TreeView`` needs to replace its window. For example, changing properties that are implemented by window parameter settings require the ``TreeView`` to be destroyed and then recreated using the `CreateWnd <Vcl.ComCtrls.TCustomTreeView.CreateWnd.htm>`__ method. + + Before the window is destroyed, ``DestroyWnd()`` saves information about the ``TreeView``\ s. items in memory, frees any device contexts, and finally calls DestroyWindowHandle. When the window is recreated, the stored items are added to the new window. + ''' + def DoEndDrag(self, Target: Object, X: int, Y: int) -> None: + ''' + End drag event dispatcher. + + ``DoEndDrag()`` is called automatically when the user stops dragging the ``TreeView`` or one of its items. The drag operation may end either because the ``TreeView`` was dropped on the object specified by ``Target``, or because the user canceled the drag operation (if ``Target`` is ``nil`` (Delphi) or ``NULL`` (C++)). + + Override ``DoEndDrag()`` to perform any additional adjustments when the user stops dragging the ``TreeView``. + ''' + def DoStartDrag(self, DragObject: DragObject) -> None: + ''' + Drag start event dispatcher. + + ``DoStartDrag()`` is called automatically when the user starts dragging the ``TreeView`` or one of its items. It generates an ``OnStartDrag`` event, and then identifies the node (if any) that is being dragged. If the user is dragging a node (as opposed to the entire ``TreeView``), ``DoStartDrag()`` generates an image for the node drag. + + Override ``DoStartDrag()`` to perform any additional adjustments when the user starts a drag-and-drop operation. + ''' + def Edit(self, Item: TVItem) -> None: + ''' + ``Edit`` event dispatcher. + + ``Edit()`` is called automatically when the user edits the text of a ``TreeView`` node. The ``Item`` parameter is the data structure supplied by the Windows control that identifies the node that was edited and the new value of its text. ``Edit`` unpacks this information into the parameters of an `OnEdited <Vcl.ComCtrls.TCustomTreeView.OnEdited.htm>`__ event handler, and allows the event handler to change the value of the node's text. + ''' + def Expand(self, Node: TreeNode) -> None: + ''' + Completed node expansion event dispatcher. + + ``Expand()`` is called automatically after the node specified by the ``Node`` parameter expands. + + Override this method to make additional, class-specific responses in addition to the `OnExpanded <Vcl.ComCtrls.TCustomTreeView.OnExpanded.htm>`__ event or to suppress the `OnExpanded <Vcl.ComCtrls.TCustomTreeView.OnExpanded.htm>`__ event. + ''' + def GetImageIndex(self, Node: TreeNode) -> None: + ''' + Obtain ``ImageIndex``. + + Call ``GetImageIndex`` to set the ``ImageIndex`` of a tree node. ``GetImageIndex`` as implemented in `CustomTreeView <Vcl.ComCtrls.TCustomTreeView.htm>`__ does nothing except invoke the handler for the `OnGetImageIndex <Vcl.ComCtrls.TCustomTreeView.OnGetImageIndex.htm>`__ event, if one is assigned. + + Descendants can override ``GetImageIndex`` to provide a class-specific implementation for setting the tree node's ``ImageIndex``. + + ``Node`` is the tree node in which the ``ImageIndex`` is set. + ''' + def GetSelectedIndex(self, Node: TreeNode) -> None: + ''' + Obtain selection index. + + Call ``GetSelectedIndex`` to set the ``ImageIndex`` of a tree node when the tree node is selected. ``GetSelectedIndex`` invokes the handler for the `OnGetSelectedIndex <Vcl.ComCtrls.TCustomTreeView.OnGetSelectedIndex.htm>`__ event, if one is assigned. + + Descendants can override ``GetSelectedIndex`` to implement a class-specific method of setting the selected tree node's ``ImageIndex``. + + ``Node`` is the tree node in which the ``ImageIndex`` is set. + ''' + def IsCustomDrawn(self, Target: CustomDrawTarget, Stage: CustomDrawStage) -> bool: + ''' + Specifies when the control should generate custom draw events. + + `CustomTreeView <Vcl.ComCtrls.TCustomTreeView.htm>`__ checks ``IsCustomDrawn()`` to determine when to generate an ``OnCustomDraw``, ``OnAdvancedCustomDraw``, ``OnCustomDrawItem``, or ``OnAdvancedCustomDrawItem`` event. ``IsCustomDrawn()`` returns ``True`` when the ``TreeView`` should generate an event. + + The ``Target`` parameter indicates whether the ``TreeView`` is about to draw the entire tree or about to draw a node. ``IsCustomDrawn()`` does not return true unless the ``TreeView`` has an appropriate event handler for the target. + + The ``Stage`` parameter indicates the current stage in the process of painting the ``TreeView``. ``IsCustomDrawn()`` returns ``True`` if the stage is ``cdPrePaint`` or if there is an advanced custom draw event handler for the target. + ''' + def Loaded(self) -> None: + ''' + Initializes the ``TreeView`` after it is loaded from a stream. + + Do not call ``Loaded()``. The *VCL Streaming* system calls ``Loaded()`` automatically after the ``TreeView``\ s. form is loaded into memory so that the ``TreeView`` can complete any initializations that depend on other objects in the form. + + ``Loaded()`` ensures that the ``TreeView`` appears fully expanded when it is first loaded into the designer. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def SetDragMode(self, Value: DragMode) -> None: + ''' + Sets the``DragMode``for the ``TreeView``. + + ``SetDragMode()`` is the protected write implementation for the ``DragMode`` property. It sends a message to the ``TreeView`` window to suppress automatic drag behavior when ``DragMode`` is set to ``dmManual``. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the control. + + ``WndProc()`` is the initial *Windows Message* handler for the control. The ``WindowProc()`` property is initialized to point to the ``WndProc()`` method. + + ``WndProc()`` adjusts for some *Windows Message* idiosyncrasies before calling the ``WndProc()`` method inherited from ``WinControl``. + ''' + def ValidateSelection(self) -> None: + ''' + No have docs. + ''' + def InvalidateSelectionsRects(self) -> None: + ''' + No have docs. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event dispatcher. + + Override the protected `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ method to provide other responses in addition to calling the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler when the user presses the mouse button down while the cursor's hotspot is over the control. + + The ``Button`` parameter determines which mouse button the user pressed. ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) were down when the user pressed the mouse button. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + A control calls `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ in response to any of the Windows mouse-down messages (``WM_LBUTTONDOWN``, ``WM_MBUTTONDOWN``, ``WM_RBUTTONDOWN``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was pressed down: left, right, or middle. + ''' + def DoEnter(self) -> None: + ''' + Respond to receiving input focus. + + `DoEnter <Vcl.Controls.TWinControl.DoEnter.htm>`__ is called automatically when the control receives the input focus. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, `DoEnter <Vcl.Controls.TWinControl.DoEnter.htm>`__ calls the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler, if defined. + + Descendant classes that override `DoEnter <Vcl.Controls.TWinControl.DoEnter.htm>`__ should always call the inherited method. + ''' + def DoExit(self) -> None: + ''' + Responds to losing input focus. + + `DoExit <Vcl.Controls.TWinControl.DoExit.htm>`__ is called automatically when the control loses the input focus. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, `DoExit <Vcl.Controls.TWinControl.DoExit.htm>`__ calls the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler, if defined. + + Descendant classes that override `DoExit <Vcl.Controls.TWinControl.DoExit.htm>`__ should always call the inherited method. + ''' + def IsTouchPropertyStored(self, AProperty: TouchProperty) -> bool: + ''' + Checks whether the associated touch manager stored any of the given options. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used internally by the *VCL Framework* to check whether the associated touch manager component has stored the given options. Do not call `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ directly. + + `IsTouchPropertyStored <Vcl.Controls.TControl.IsTouchPropertyStored.htm>`__ is used primarily to ensure that controls that do not require gesturing are not storing useless data in the DFMs or executables. + ''' + def SetEncoding(self, Value: Encoding) -> None: + ''' + Setter for the `Encoding <Vcl.ComCtrls.TCustomTreeView.Encoding.htm>`__ property. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of a ``TreeView`` control. + + Call ``Create()`` to instantiate a ``TreeView`` at runtime. ``TreeView`` controls placed on forms at design time are created automatically. After calling the inherited constructor, ``Create()`` initializes many properties the control, including setting ``BorderStyle`` to ``bsSingle`` and setting ``ShowButtons``, ``ShowRoot``, and ``ShowLines``, and ``HideSelection`` to ``True``. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the ``TreeView`` control and is called by the ``Delete()`` method. + + Do not call the destructor directly in an application. Instead, use the ``Free()`` method. ``Free()`` checks that the ``TreeView`` is not ``nil``, and only then calls ``Destroy()``. + ''' + def AlphaSort(self, ARecurse: bool) -> bool: + ''' + ``Sort`` tree nodes. + + ``AlphaSort`` triggers node sorting or resorting. If an ``OnCompare`` event handler is defined, that routine determines sort order. If no ``OnCompare`` handler is defined, nodes are sorted by a simple case-sensitive compare of their captions. + + The optional ``ARecurse`` parameter (default ``True``) specifies that sorting should recursively descend the node tree and sort each subtree in turn. + + Calling ``AlphaSort`` is equivalent to calling ``CustomSort()`` with a ``nil`` (Delphi) or ``NULL`` (C++) procedure parameter and a data parameter of 0. + + Calling ``AlphaSort`` has the same effect as calling the same method for the ``Items`` property, except that in ``TreeNodes``, ``AlphaSort`` is not recursive by default. + + To sort a subtree, use the ``AlphaSort()`` method in ``TreeNodes``. + ''' + def FullCollapse(self) -> None: + ''' + Collapses all the nodes within a ``TreeView`` control. + + Call ``FullCollapse`` to hide all the nodes in the ``TreeView`` except those at the first level. + ''' + def FullExpand(self) -> None: + ''' + Expands all nodes within the ``TreeView`` control. + + Call ``FullExpand`` to display all the nodes in the ``TreeView``. If ``ShowButtons`` is ``True``, all buttons will change from '+' to ``'-'``. + ''' + def GetHitTestInfoAt(self, X: int, Y: int) -> HitTests: + ''' + Returns information about the location of a point relative to the client area of the ``TreeView`` control. + + Call ``GetHitTestInfoAt`` to determine what portion of the ``TreeView``, if any, sits under the point specified by the ``'X'`` and ``'Y'`` parameters. For example, use ``GetHitTestInfoAt`` to provide feedback about how to expand or collapse nodes when the mouse is over the relevant portions of the ``TreeView``. + + ``GetHitTestInfo()`` returns a ``HitTests`` type. This set describes the possible ``TreeView`` elements under the mouse. + ''' + def GetNodeAt(self, X: int, Y: int) -> TreeNode: + ''' + Returns the node that is found at the specified position. + + Call ``GetNodeAt`` to access the node at the position specified by the ``'X'`` and ``'Y'`` parameters. ``'X'`` and ``'Y'`` specify the position in pixels relative to the top left corner of the ``TreeView``. If there is no node at the location, ``GetNodeAt()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def GetDragImages(self) -> DragImageList: + ''' + Returns the ``ImageList`` to be displayed during drag operations. + + ``GetDragImages()`` is called automatically during drag-and-drop operations to allow the ``TreeView`` to supply an image that is displayed while the ``TreeView`` or one of its items is dragged. If an item (and not the entire ``TreeView``) is being dragged, ``GetDragImages()`` returns the image for the node that was generated by the `DoStartDrag <Vcl.ComCtrls.TCustomTreeView.DoStartDrag.htm>`__ method. + ''' + def IsEditing(self) -> bool: + ''' + Indicates whether a ``Node`` is currently being edited by the user. + + ``IsEditing()`` returns ``True`` if any node label in the ``TreeView`` is being edited. + ''' + @overload + def LoadFromFile(self, FileName: str) -> None: + ''' + Reads the file specified in ``FileName`` and loads the data into the ``TreeView``. + + Use the ``LoadFromFile()`` method to retrieve ``TreeView`` nodes from a file and add them to the ``TreeView``. ``FileName`` should reference a file that was saved using the `SaveToFile <Vcl.ComCtrls.TCustomTreeView.SaveToFile.htm>`__ method. ``TreeView`` files are text files that list the ``Text`` property of each node in a ``TreeView``, one node per line. Each node text ``Value`` is preceded by spaces to indicate the depth of nesting. + + You can specify an optional parameter, `Encoding <System.SysUtils.TEncoding.htm>`__, which defines the encoding of the loaded file. If no encoding is specified, the default system encoding is used. + + .. note:: ``TreeView`` files contain only the text of the ``TreeView`` nodes. They do not contain any data associated with the nodes. + ''' + @overload + def LoadFromFile(self, FileName: str, AEncoding: Encoding) -> None: ... + @overload + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Reads ``TreeView`` data from a *Stream* and stores the contents in the ``TreeView``. + + Use ``LoadFromStream()`` to read the nodes of the ``TreeView`` from the specified stream. ``LoadFromStream()`` adds the nodes in the stream data to the ``TreeView``. + + In addition, you can specify the `Encoding <System.SysUtils.TEncoding.htm>`__ parameters, which define the encoding of the stream loaded. If no encoding is specified, the default system encoding is used. + + the format for ``TreeView`` data used by the `SaveToStream <Vcl.ComCtrls.TCustomTreeView.SaveToStream.htm>`__ and ``LoadFromStream()`` methods lists the ``Text`` property for each node. Data associated with the nodes is not saved or loaded. + + For example, an application can save the information displayed in a ``TreeView`` as the data in a *Binary Large Object* (BLOB) field of a dataset, using the `SaveToStream <Vcl.ComCtrls.TCustomTreeView.SaveToStream.htm>`__ method. ``LoadFromStream()`` can later retrieve the data using a BLOB stream. + ''' + @overload + def LoadFromStream(self, Stream: Stream, AEncoding: Encoding) -> None: ... + @overload + def SaveToFile(self, FileName: str) -> None: + ''' + Saves a ``TreeView`` to the file specified in ``FileName``. + + Use the ``SaveToFile()`` method to store ``TreeView`` data to a text file. The nodes can later be reloaded from the file into a new ``TreeView`` object, using the `LoadFromFile <Vcl.ComCtrls.TCustomTreeView.LoadFromFile.htm>`__ method. + + ``TreeView`` files are text files that list the ``Text`` property of each node in a ``TreeView``, one node per line. Each node text ``Value`` is preceded by spaces to indicate the depth of nesting. + + As an optional parameter, you can specify `Encoding <System.SysUtils.TEncoding.htm>`__, which defines the encoding of the resulting file. If no encoding is specified, the default system encoding is used. + + .. note:: ``TreeView`` files contain only the text of the ``TreeView`` nodes. They do not contain any data associated with the nodes. + ''' + @overload + def SaveToFile(self, FileName: str, AEncoding: Encoding) -> None: ... + @overload + def SaveToStream(self, Stream: Stream) -> None: + ''' + Writes the data in the ``TreeView`` to the stream passed as the ``Stream`` parameter. + + Use the ``SaveToStream()`` method to stream out the nodes in a ``TreeView``. It can be streamed back in to another ``TreeView`` object using the `LoadFromStream <Vcl.ComCtrls.TCustomTreeView.LoadFromStream.htm>`__ method. + + You can specify a `Encoding <System.SysUtils.TEncoding.htm>`__ parameter, which defines the encoding of the resulting stream. If no encoding is specified, the default system encoding is used. + + the format for ``TreeView`` data used by the ``SaveToStream()`` and `LoadFromStream <Vcl.ComCtrls.TCustomTreeView.LoadFromStream.htm>`__ methods lists the ``Text`` property for each node. Data associated with the nodes is not saved or loaded. + ''' + @overload + def SaveToStream(self, Stream: Stream, AEncoding: Encoding) -> None: ... + @overload + def Select(self, Nodes: list) -> None: + ''' + ``Select()`` specified nodes. + + The ``Select()`` method selects one or more tree nodes. + + In the first two forms, all nodes in the ``Nodes`` parameter are selected. Any other selected nodes are deselected. + + In the third form, ``Node`` is selected as if clicked with the mouse. To achieve the effect of using the `Control <Vcl.ComCtrls.TCoolBand.Control.htm>`__ key, the *Shift* key, or the right mouse button, include ``ssCtrl``, ``ssShift``, or ``ssRight`` in the Shift``State`` parameter. + ''' + @overload + def Select(self, Node: TreeNode, ShiftState: ShiftState) -> None: ... + @overload + def Select(self, Nodes: List) -> None: ... + def Deselect(self, Node: TreeNode) -> None: + ''' + ``Deselects`` a specified node. + + ``Deselect()`` removes the selection from ``Node``. This method has no effect unless `MultiSelect <Vcl.ComCtrls.TCustomTreeView.MultiSelect.htm>`__ is ``True`` and `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__ includes ``msControlSelect``. + ''' + def Subselect(self, Node: TreeNode, Validate: bool) -> None: + ''' + ``Toggle`` node selection. + + ``Subselect()`` toggles the selection state of ``Node``. If ``Validate`` is ``True``, ``Subselect()`` ensures that the selection state information in ``View``, ``List``, and ``Node`` objects are consistent, and that only those nodes allowed by `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__ are actually selected. + + If ``Subselect()`` is called when `MultiSelect <Vcl.ComCtrls.TCustomTreeView.MultiSelect.htm>`__ is ``False``, `ETreeViewError <Vcl.ComCtrls.ETreeViewError.htm>`__ is raised. + ''' + def ClearSelection(self, KeepPrimary: bool) -> None: + ''' + Deselect all selected nodes, optionally excluding primary selection. + + ``ClearSelection()`` deselects all selected nodes. If the ``KeepPrimary`` parameter is ``True``, the primary selection (in the first element of the `Selections <Vcl.ComCtrls.TCustomTreeView.Selections.htm>`__ property) is not toggled. + ''' + def GetSelections(self, AList: List) -> TreeNode: + ''' + Obtain selections list. + + ``GetSelections()`` clears ``AList`` and copies all selected node objects to it. The return ``Value`` is the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property. + ''' + def FindNextToSelect(self) -> TreeNode: + ''' + Returns next selectable node. + + Starting with the node indicated by the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property, ``FindNextToSelect`` searches for a deselected node, with preference given to subsequent siblings. If the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ node and all its siblings are selected, the search proceeds to the parent node and its siblings, and so on up the tree. If the top level is reached without finding a deselected node, nil is returned. + + Note that the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property can refer to a deselected node when `MultiSelect <Vcl.ComCtrls.TCustomTreeView.MultiSelect.htm>`__ is ``True``. In this case, ``FindNextToSelect()`` returns that node. + ''' + @overload + def CustomSort(self, SortProc: TVCompareProc, Data: Tag, ARecurse: bool) -> bool: + ''' + Sorts the nodes in the ``TreeView`` into a customized sort order. + + ``CustomSort()`` triggers node sorting or resorting, using a comparison routine indicated by the ``SortProc`` parameter. + + The ``Data`` parameter provides a way to pass information to a customized comparison routine. ``Data`` is not used by the ``CustomSort()`` method or the default comparison routine. + + The optional ``ARecurse`` parameter (default ``True``) specifies that sorting should recursively descend the node tree and sort each subtree in turn. + + The *Return Value* of ``CustomSort()`` indicates the success status of the sort. + + If ``SortProc`` is ``nil`` (Delphi) or ``NULL`` (C++), a default comparison routine is used. The default routine uses the `OnCompare <Vcl.ComCtrls.TCustomTreeView.OnCompare.htm>`__ event handler, if defined. If the `OnCompare <Vcl.ComCtrls.TCustomTreeView.OnCompare.htm>`__ event handler is not defined, the default routine uses a simple case-sensitive comparison of node captions. + + The comparison routine is defined like this: + + .. code-block:: python + + Delphi + type TTVCompare = function(lParam1, lParam2, lParamSort: Longint): int; + + .. code-block:: python + + C++ + typedef int (CALLBACK *PFNTVCOMPARE)(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort); + + The ``lParam1`` and ``lParam2`` parameters refer to two nodes when cast to ``TreeNode``. + + The ``lParamSort`` parameter is the value previously passed in the ``Data`` parameter of ``CustomSort()``. + + The *Return Value* of the comparison routine indicates the relative sort order of ``IParam1`` and ``IParam2``: + + ================ =========================================== + **Return_Value** **Meaning** + ================ =========================================== + ``< 0`` ``IParam1`` comes before ``IParam2``. + ``'0'`` ``IParam1`` and ``IParam2`` are equivalent. + ``> 0`` ``IParam2`` comes before ``IParam1``. + ================ =========================================== + + Calling ``CustomSort()`` has the same effect as calling the same method for the `Items <Vcl.ComCtrls.TCustomTreeView.Items.htm>`__ property, except that in ``TreeNodes``, ``CustomSort()`` is not recursive by default. To sort a subtree, call the ``CustomSort()`` method of the `Items <Vcl.ComCtrls.TCustomTreeView.Items.htm>`__ property. + ''' + @overload + def CustomSort(self, SortProc: TVCompare, Data: int, ARecurse: bool) -> bool: ... + + def OnAddition(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnAddition: TVExpandedEvent + Occurs when new ``Node`` is added. + + ``OnAddition`` occurs when a new ``Node`` is added to the control. + + ``OnAddition`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnAdvancedCustomDraw(self, Sender: CustomTreeView, ARect: Rect, Stage: CustomDrawStage, DefaultDraw: bool) -> None: + ''' + # OnAdvancedCustomDraw: VAdvancedCustomDrawEvent + Occurs at discrete stages during the painting of the ``TreeView`` control. + + Write an ``OnAdvancedCustomDraw`` event handler to paint an owner-drawn ``TreeView``. Use the `Canvas <Vcl.ComCtrls.TCustomTreeView.Canvas.htm>`__ property as a drawing surface when painting the image of the ``TreeView``. To paint individual items, use the `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ or `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event instead. + + .. note:: ``OnAdvancedCustomDraw`` occurs at several stages during the paint process, not just immediately prior to the default rendering. If you only need to use the ``cdPrePaint`` stage, it is more efficient to use the `OnCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnCustomDraw.htm>`__ event. + + ``OnAdvancedCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTVAdvancedCustomDrawEvent <Vcl.ComCtrls.TTVAdvancedCustomDrawEvent.htm>`__. + ''' + def OnAdvancedCustomDrawItem(self, Sender: CustomTreeView, Node: TreeNode, State: CustomDrawState, Stage: CustomDrawStage, PaintImages: bool, DefaultDraw: bool) -> None: + ''' + # OnAdvancedCustomDrawItem: VAdvancedCustomDrawItemEvent + Occurs at discrete stages during the painting of ``TreeView`` nodes. + + Write an ``OnAdvancedCustomDrawItem`` event handler to customize the painting of individual items in the ``TreeView``. + + .. note:: ``OnAdvancedCustomDrawItem`` occurs at several stages during the paint process and allows you to suppress the default painting of tree node images while still allowing the default painting of the node. If you only need to use the ``cdPrePaint`` stage and do not want to suppress only the painting of tree node images, it is more efficient to use the `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event. + + ``OnAdvancedCustomDrawItem`` is an event handler of type `Vcl.ComCtrls.TTVAdvancedCustomDrawItemEvent <Vcl.ComCtrls.TTVAdvancedCustomDrawItemEvent.htm>`__. + ''' + def OnCancelEdit(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnCancelEdit: VChangedEvent + Occurs when user cancels editing of a node's `Caption <Vcl.ListActns.TListControlItem.Caption.htm>`__. + + The ``OnCancelEdit`` event occurs when a user cancels a node-editing operation. + + ``OnCancelEdit`` is an event handler of type `Vcl.ComCtrls.TTVChangedEvent <Vcl.ComCtrls.TTVChangedEvent.htm>`__. + ''' + def OnChange(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnChange: VChangedEvent + Occurs whenever the selection has changed from one node to another. + + Write an ``OnChange`` event handler to take specific action when the selected node changes. The ``Sender`` parameter is the ``TreeView`` whose selected node changes, and the ``Node`` parameter is the newly selected node. + + .. note:: The ``OnChange`` event does not occur for nodes selected using the right mouse button when ``RightClickSelect`` is ``True``. To respond to changes in the value of the ``Selected`` property when ``RightClickSelect`` is ``True``, use the ``OnMouseUp`` event. + + ``OnChange`` is an event handler of type `Vcl.ComCtrls.TTVChangedEvent <Vcl.ComCtrls.TTVChangedEvent.htm>`__. + ''' + def OnChanging(self, Sender: Object, Node: TreeNode, AllowChange: bool) -> None: + ''' + # OnChanging: VChangingEvent + Occurs when the selection is about to change from one node to another. + + Write an ``OnChanging`` event handler to selectively prevent selection from moving to specific nodes. + + The ``VChangingEvent`` type points to a method that is called when the selection is about to be changed from one node to another. + + ``OnChanging`` is an event handler of type `Vcl.ComCtrls.TTVChangingEvent <Vcl.ComCtrls.TTVChangingEvent.htm>`__. + ''' + def OnCollapsed(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnCollapsed: TVExpandedEvent + Occurs after a node has been collapsed. + + Write an ``OnCollapsed`` event handler to respond after a node in the ``TreeView`` collapses. The ``Node`` parameter is the node whose children are no longer visible. + + ``OnAdvancedCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnCollapsing(self, Sender: Object, Node: TreeNode, AllowCollapse: bool) -> None: + ''' + # OnCollapsing: VCollapsingEvent + Occurs when a ``Node`` is about to be collapsed. + + The ``VCollapsingEvent`` type points to a method that is called when a ``Node`` is about to be collapsed. + + ``OnCollapsing`` is an event handler of type `Vcl.ComCtrls.TTVCollapsingEvent <Vcl.ComCtrls.TTVCollapsingEvent.htm>`__. + ''' + def OnCompare(self, Sender: Object, Node1: TreeNode, Node2: TreeNode, Data: int, Compare: int) -> None: + ''' + # OnCompare: VCompareEvent + Occurs when two nodes must be compared during a sort of the nodes in the ``TreeView``. + + Write an ``OnCompare`` event handler to customize the sort order of the nodes in the ``TreeView``. If an ``OnCompare`` event handler is not provided, ``TreeView`` nodes are sorted alphabetically, based on their labels. + + ``OnCompare`` is an event handler of type `Vcl.ComCtrls.TTVCompareEvent <Vcl.ComCtrls.TTVCompareEvent.htm>`__. + ''' + def OnCreateNodeClass(self, Sender: CustomTreeView, NodeClass: TreeNodeClass) -> None: + ''' + # OnCreateNodeClass: VCreateNodeClassEvent + ``OnCreateNodeClass`` occurs when a new node object is about to be created. + + ``OnCreateNodeClass`` is an event handler of type `Vcl.ComCtrls.TTVCreateNodeClassEvent <Vcl.ComCtrls.TTVCreateNodeClassEvent.htm>`__. + ''' + def OnCustomDraw(self, Sender: CustomTreeView, ARect: Rect, DefaultDraw: bool) -> None: + ''' + # OnCustomDraw: VCustomDrawEvent + Occurs immediately prior to painting the ``TreeView`` control. + + Write an ``OnCustomDraw`` event handler to paint an owner-drawn ``TreeView``. Use the `Canvas <Vcl.ComCtrls.TCustomTreeView.Canvas.htm>`__ property as a drawing surface when painting the image of the ``TreeView``. To paint individual items, use the `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event instead. + + .. note:: ``OnCustomDraw`` only occurs prior to painting the ``TreeView`` control. To customize the painting at other stages of the paint process (such as after the default drawing), use `OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__ instead. + + ``OnCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTVCustomDrawEvent <Vcl.ComCtrls.TTVCustomDrawEvent.htm>`__. + ''' + def OnCustomDrawItem(self, Sender: CustomTreeView, Node: TreeNode, State: CustomDrawState, DefaultDraw: bool) -> None: + ''' + # OnCustomDrawItem: VCustomDrawItemEvent + Occurs immediately prior to painting a node in a ``TreeView`` control. + + Write an ``OnCustomDrawItem`` event handler to paint individual items in the ``TreeView``, or to provide a background to the item before the default rendering of the item. + + .. note:: ``OnCustomDrawItem`` only occurs prior to painting individual tree items. To customize the painting of items at other stages of the paint process (such as after the item is painted), use `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ instead. + + ``OnCustomDrawItem`` is an event handler of type `Vcl.ComCtrls.TTVCustomDrawItemEvent <Vcl.ComCtrls.TTVCustomDrawItemEvent.htm>`__. + ''' + def OnDeletion(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnDeletion: TVExpandedEvent + Occurs when a node in the ``TreeView`` is deleted. + + Write an ``OnDeletion`` event handler to respond when a ``Node`` is deleted from the ``TreeView`` control. + + ``OnDeletion`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnEdited(self, Sender: Object, Node: TreeNode, S: str) -> None: + ''' + # OnEdited: VEditedEvent + Occurs after the user edits the ``Text`` property of a node. + + Write an ``OnEdited`` event handler to respond to changes the user makes to the node labels. The ``Node`` parameter is the node whose label was edited. The ``'S'`` parameter is the new value of the node's ``Text`` property. The node's label can be changed in an ``OnEdited`` event handler before the user's edits are committed. This event can occur only if ``ReadOnly`` is set to ``False``. + + ``OnEdited`` is an event handler of type `Vcl.ComCtrls.TTVEditedEvent <Vcl.ComCtrls.TTVEditedEvent.htm>`__. + ''' + def OnEditing(self, Sender: Object, Node: TreeNode, AllowEdit: bool) -> None: + ''' + # OnEditing: VEditingEvent + Occurs when the user starts to edit the ``Text`` property of a node. + + Write an ``OnEditing`` event handler to determine whether the user is allowed to edit the ``Label`` of a specific node in the ``TreeView``. Set the ``AllowEdit`` parameter to ``False`` to prevent the user from editing the node specified by the ``Node`` parameter. To disallow editing of all nodes in the ``TreeView``, use the ``ReadOnly`` property instead. + + ``OnEditing`` is an event handler of type `Vcl.ComCtrls.TTVEditingEvent <Vcl.ComCtrls.TTVEditingEvent.htm>`__. + ''' + def OnExpanded(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnExpanded: TVExpandedEvent + Occurs after a ``Node`` is expanded. + + Write an ``OnExpanded`` event handler to respond when a node in the ``TreeView`` is expanded. The ``Node`` parameter specifies the node whose children are now displayed to the user. + + ``OnExpanded`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnExpanding(self, Sender: Object, Node: TreeNode, AllowExpansion: bool) -> None: + ''' + # OnExpanding: TVExpandingEvent + Occurs when a ``Node`` is about to be expanded. + + Write an ``OnExpanding`` event handler to determine whether a node can be expanded. Set the ``AllowExpansion`` parameter to ``False`` to prevent the node from expanding. + + ``OnExpanding`` is an event handler of type `Vcl.ComCtrls.TTVExpandingEvent <Vcl.ComCtrls.TTVExpandingEvent.htm>`__. + ''' + def OnGetImageIndex(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnGetImageIndex: TVExpandedEvent + Occurs when the ``TreeView`` looks up the ``ImageIndex`` of a node. + + Write an ``OnGetImageIndex`` event handler to change the ``ImageIndex`` for the particular node before it is drawn. For example, the bitmap of a node can be changed to indicate a different state for the node. + + ``OnGetImageIndex`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnGetSelectedIndex(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnGetSelectedIndex: TVExpandedEvent + Occurs when the ``TreeView`` looks up the ``SelectedIndex`` of a node. + + Write an ``OnGetSelectedIndex`` event handler to change the selected ``ImageIndex`` of a node before it is drawn. + + ``OnGetSelectedIndex`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnHint(self, Sender: Object, Node: TreeNode, Hint: str) -> None: + ''' + # OnHint: VHintEvent + Occurs whenever a hint is about to be shown for a node. + + Write an ``OnHint`` event handler to take specific action when a hint is about to be shown for a node. + + .. note:: You can change the value of the ``Hint`` parameter. + + ``OnHint`` is an event handler of type `Vcl.ComCtrls.TTVHintEvent <Vcl.ComCtrls.TTVHintEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class DateTimePicker(CommonCalendar): + ''' + ============================ + Vcl.ComCtrls.TDateTimePicker + ============================ + + ``DateTimePicker`` displays a ``ListBox`` for entering dates or times. + + ``DateTimePicker`` is a visual component designed specifically for entering dates or times. In ``dmComboBox`` date mode, it resembles a ``ListBox`` or ``ComboBox``, except that the drop-down list is replaced with a calendar illustration; users can select a date from the calendar. Dates or times can also be selected by scrolling with Up and `Down <Vcl.ComCtrls.TToolButton.Down.htm>`__ arrows and by typing. + + Date-time picker ignores the ``BiDiMode`` setting for right-to-left reading, displaying dates according to the system locale. + + ``DateTimePicker`` formats date and time values according to the date and time settings in the *Regional Settings* of the Control Panel on the user's system. Because ``DateTimePicker`` is a wrapper for a *Windows* control, these formats can't be changed by changing the formatting variables in the ``SysUtils`` unit. However, you can use the *Windows API* call `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ _SetFormat to programmatically specify these settings. + + .. note:: The underlying *Windows* control is known to behave unpredictably when used to set dates in 1752, the year English-speaking countries changed to the Gregorian calendar. Similar problems may appear for different dates when a non-English locale is used. If an application might be used to specify dates on or before the changeover in the current locale (for example, 1918 or before in Russian locales), be sure to test the application using the dates affected. + ''' + + __hash__: ClassVar[None] = ... + DateTime: DateTime + ''' + Indicates the date that is marked on the calendar. + + Use `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ to ``get`` or ``set`` the date (and, if relevant, time) that is marked on the calendar control. The value of `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ must lie within the range specified by the `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ and `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ properties. + + If `MultiSelect <Vcl.ComCtrls.TCommonCalendar.MultiSelect.htm>`__ is ``True``, the selected range of dates goes from `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ to `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__. + + .. note:: You can also set the marked date with the `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ property. + ''' + DroppedDown: bool + ''' + Specifies whether the date time picker control is ``DroppedDown``. + + ``DroppedDown`` specifies whether the date time picker control is ``DroppedDown``. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + CalAlignment: DCalAlignment + ''' + Determines the alignment of the drop-down calendar. + + Set ``CalAlignment`` to ``dtaLeft`` or ``dtaRight`` to align the drop-down calendar on the left or right side of the component. This property is applicable only if the `Kind <Vcl.ComCtrls.TDateTimePicker.Kind.htm>`__ property is ``dtkDate`` and the `DateMode <Vcl.ComCtrls.TDateTimePicker.DateMode.htm>`__ property is ``dmComboBox``. + ''' + CalColors: MonthCalColors + ''' + Contains the colors used for each part of the calendar. + + Use the `CalColors <Vcl.ComCtrls.TCommonCalendar.CalColors.htm>`__ property to ``get`` or ``set`` the calendar's background color, month background color, text color, title background color, title text color, and trailing text color. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + + ''' + Date: Date + ''' + Indicates the date that is marked on the calendar. + + Use `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ to ``get`` or ``set`` the date that is marked on the calendar. The value of `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ must lie within the range specified by the `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ and `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ properties. + + If `MultiSelect <Vcl.ComCtrls.TCommonCalendar.MultiSelect.htm>`__ is ``True``, the selected range of dates goes from `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ to `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__. + + .. note:: You can also set the marked date with the `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ property. + ''' + Format: str + ''' + Specify format for date-time string. + + ``Format`` specifies custom format string for the date-time display, overriding the control panel strings. A custom format can include both date and time fields, but time fields are not editable unless the `Kind <Vcl.ComCtrls.TDateTimePicker.Kind.htm>`__ property is ``dtkTime``. The following format characters are understood. + + =========== ================================================================================= + *Element* *``Description``* + =========== ================================================================================= + ``'d'`` The one- or two-digit day. + ``'dd'`` The two-digit day. Single-digit day values are preceded by a zero. + ``'ddd'`` The three-character weekday abbreviation. + ``'dddd'`` The full weekday name. + ``'h'`` The one- or two-digit hour in 12-hour format. + ``'hh'`` The two-digit hour in 12-hour format. Single-digit values are preceded by a zero. + ``'H'`` The one- or two-digit hour in 24-hour format. + ``'HH'`` The two-digit hour in 24-hour format. Single-digit values are preceded by a zero. + ``'m'`` The one- or two-digit minute. + ``'mm'`` The two-digit minute. Single-digit values are preceded by a zero. + ``'M'`` The one- or two-digit month number. + ``'MM'`` The two-digit month number. Single-digit values are preceded by a zero. + ``'MMM'`` The three-character month abbreviation. + ``'MMMM'`` The full month name. + ``'t'`` The one-letter AM/PM abbreviation (that is, AM is displayed as "A"). + ``'tt'`` The two-letter AM/PM abbreviation (that is, AM is displayed as "AM"). + ``'yy'`` The last two digits of the year (that is, 2001 would be displayed as "01"). + ``'yyyy'`` The full year (that is, 2001 would be displayed as "2001"). + =========== ================================================================================= + + To include literal strings in the format, enclose them in single quotes. Failing to quote literal strings can have unpredictable results, even if they do not include formatting codes. Use two single quotes to represent one single quote character in a literal string. For example, + + Today's date: ``MMM dd, yyyy`` entered in the property editor, produces the following results for April 1, 2001: ``Today's date: Apr 01, 2001`` + + .. note:: When setting ``Format`` programmatically in Delphi code, double each single quote again: + + .. code-block:: python + + DateTimePicker1.Format := ''Today''s date:'' MMM dd, yyyy'; + ''' + Time: Time + ''' + Indicates the time entered by the user. + + ``Time`` represents the time entered by the user. Set ``Time`` in program code or in the *Object Inspector* to determine which time is selected by default. (Applies only when `Kind <Vcl.ComCtrls.TDateTimePicker.Kind.htm>`__ = ``dtkTime``.) + ''' + ShowCheckbox: bool + ''' + Displays a ``CheckBox`` next to the date or time. + + Set ``ShowCheckbox`` to ``True`` to display a ``CheckBox`` in the `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ component. + ''' + Checked: bool + ''' + Indicates whether the ``CheckBox`` next to the date or time is selected. + + ``Checked`` is ``True`` if the ``CheckBox`` in the `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ component is selected. Setting ``Checked`` to ``True`` at design time makes the ``CheckBox`` appear selected by default. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + DateFormat: DDateFormat + ''' + Specifies format in which the date is presented. + + If ``DateFormat`` is set to ``dfShort``, the date is formatted using the short date format specified in the *Windows* control panel. By default, it appears like this: 3/21/97. + + If ``DateFormat`` is set to ``dfLong``, the date is formatted using the long date format specified in the *Windows* control panel. By default, it appears like this: Friday, March 21, 1997. (Applies only when `Kind <Vcl.ComCtrls.TDateTimePicker.Kind.htm>`__ is ``dtkDate``.) + + For custom date formats, set the `Format <Vcl.ComCtrls.TDateTimePicker.Format.htm>`__ property. + ''' + DateMode: DDateMode + ''' + Determines the method of date selection used by the component. + + If ``DateMode`` is ``dmComboBox``, the component has a drop-down calendar illustration from which the user can select a date. If ``DateMode`` is ``dmUpDown``, the component has Up/Down arrows with which the user can adjust the date. (Applies only when `Kind <Vcl.ComCtrls.TDateTimePicker.Kind.htm>`__ is ``dtkDate``.) + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + Kind: DateTimeKind + ''' + Determines whether the component is a date selector or a time selector. + + If the ``Kind`` property is ``dtkDate``, the control is configured to support date editing. The default format gives only the date portion of the control value, and a drop-down calendar is available if the `DateMode <Vcl.ComCtrls.TDateTimePicker.DateMode.htm>`__ property is ``dmComboxBox``. + + If the ``Kind`` property is ``dtkTime``, the control is configured to support time editing. The default format give only the time portion of the control value, but the date portion can also be edited if the `Format <Vcl.ComCtrls.TDateTimePicker.Format.htm>`__ property includes date field codes. + ''' + MaxDate: Date + ''' + Indicates the maximum date to which users can scroll the calendar. + + Use `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ to ``get`` or ``set`` the maximum date to which users can scroll the calendar. The values of the `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ and `EndDate <Vcl.ComCtrls.TCommonCalendar.EndDate.htm>`__ properties cannot exceed `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__. + ''' + MinDate: Date + ''' + Indicates the minimum date that can be selected. + + Use `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ to ``get`` or ``set`` the minimum date that can be selected. + ''' + ParseInput: bool + ''' + Enables the `OnUserInput <Vcl.ComCtrls.TDateTimePicker.OnUserInput.htm>`__ event. + + If ``ParseInput`` is ``True``, the `OnUserInput <Vcl.ComCtrls.TDateTimePicker.OnUserInput.htm>`__ event occurs whenever the user types into the component's ``Edit`` box. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``VCL.ComCtrls.TDateTimePicker.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def CheckEmptyDate(self) -> None: + ''' + Clears the ``CheckBox`` associated with the calendar. + + `CheckEmptyDate <Vcl.ComCtrls.TCommonCalendar.CheckEmptyDate.htm>`__ is called automatically when `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ is assigned a value that represents a time and not a date value (or `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ is assigned a value of 0). As implemented in `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__, `CheckEmptyDate <Vcl.ComCtrls.TCommonCalendar.CheckEmptyDate.htm>`__ does nothing. + + ``DateTimePicker`` overrides `CheckEmptyDate <Vcl.ComCtrls.TCommonCalendar.CheckEmptyDate.htm>`__ to clear the ``CheckBox`` associated with the calendar, or raise an `EDateTimeError <Vcl.ComCtrls.EDateTimeError.htm>`__ if the `ShowCheckbox <Vcl.ComCtrls.TDateTimePicker.ShowCheckbox.htm>`__ property is ``False``. This allows `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ to represent time values that do not include a date portion. (When a ``DateTime`` value represents a time and not a date, the date portion is 0). + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the windows control for the calendar. + + `CreateWnd <Vcl.ComCtrls.TCommonCalendar.CreateWnd.htm>`__ is called automatically when the windowed control is first created or when the window must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.ComCtrls.TCommonCalendar.CreateWnd.htm>`__ to pass additional initialization messages to the window when it is first created. + + `CreateWnd <Vcl.ComCtrls.TCommonCalendar.CreateWnd.htm>`__ calls the ``WinControl`` `CreateWnd <Vcl.ComCtrls.TCommonCalendar.CreateWnd.htm>`__ method to generate the window, and then sends messages to initialize the control so that it reflects the current property settings. + ''' + def Change(self) -> None: + ''' + No have docs. + ''' + def GetCalendarHandle(self) -> HWND: + ''' + Returns the calendar control's window handle. + + ``Vcl.ComCtrls.TDateTimePicker.GetCalendarHandle`` inherits from `Vcl.ComCtrls.TCommonCalendar.GetCalendarHandle <Vcl.ComCtrls.TCommonCalendar.GetCalendarHandle.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCommonCalendar.GetCalendarHandle <Vcl.ComCtrls.TCommonCalendar.GetCalendarHandle.htm>`__. + + `GetCalendarHandle <Vcl.ComCtrls.TCommonCalendar.GetCalendarHandle.htm>`__ is the protected read implementation of the `CalendarHandle <Vcl.ComCtrls.TCommonCalendar.CalendarHandle.htm>`__ property. For `CommonCalendar <Vcl.ComCtrls.TCommonCalendar.htm>`__, this is an abstract method. It must be implemented in descendant classes. + ''' + def MsgSetCalColors(self, ColorIndex: int, ColorValue: Color) -> bool: + ''' + Sets the calendar's colors. + + `MsgSetCalColors <Vcl.ComCtrls.TCommonCalendar.MsgSetCalColors.htm>`__ implements the `CalColors <Vcl.ComCtrls.TCommonCalendar.CalColors.htm>`__ property by sending a message to the calendar window handle. `MsgSetCalColors <Vcl.ComCtrls.TCommonCalendar.MsgSetCalColors.htm>`__ is an abstract method, and must be overridden in descendant objects to send the appropriate message. + + The ``ColorIndex`` parameter indicates which of the MonthCalColors <Vcl.ComCtrls.TMonthCalColors.htm>`__ properties is being set. It is one of the following values: + + ========= ========================== + **Value** **Properrty** + ========= ========================== + 0 ``BackColor`` + 1 ``TextColor`` + 2 ``TitleBackColor`` + 3 ``TitleTextColor`` + 4 ``MonthBackColor`` + 5 ``TrailingTextColor`` + ========= ========================== + + The Color``Value`` parameter is the value that should be set. + + `MsgSetCalColors <Vcl.ComCtrls.TCommonCalendar.MsgSetCalColors.htm>`__ returns ``True`` if the color is set by the method. + ''' + def MsgSetDateTime(self, Value: SystemTime) -> bool: + ''' + Sets the calendar's date/time. + + `MsgSetDateTime <Vcl.ComCtrls.TCommonCalendar.MsgSetDateTime.htm>`__ implements the `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ property by sending a message to the calendar window handle. `MsgSetDateTime <Vcl.ComCtrls.TCommonCalendar.MsgSetDateTime.htm>`__ is an abstract method, and must be overridden in descendant objects to send the appropriate message. + + The ``Value`` parameter indicates the value of `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ as a ``SystemTime`` value. This can be obtained from the `DateTime <Vcl.ComCtrls.TCommonCalendar.DateTime.htm>`__ property value by calling ``DateTimeToSystemTime``. + + `MsgSetDateTime <Vcl.ComCtrls.TCommonCalendar.MsgSetDateTime.htm>`__ returns ``True`` if the date/time ``Value`` is set by the method. + ''' + @overload + def MsgSetRange(self, Flags: int, SysTime: SystemTimeRangeArray) -> bool: + ''' + Implements the `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ properties. + + `MsgSetRange <Vcl.ComCtrls.TCommonCalendar.MsgSetRange.htm>`__ implements the `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ properties by sending a message to the calendar window handle. + + `MsgSetRange <Vcl.ComCtrls.TCommonCalendar.MsgSetRange.htm>`__ is an abstract method, and must be overridden in descendant objects to send the appropriate message. + + The ``Flags`` parameter indicates what type of information is included in the ``SysTime`` array. It includes the ``GDTR_MIN`` flag if a minimum date is supplied and ``GDTR_MAX`` if a maximum date is supplied. + + The ``SysTime`` parameter is a two-element array containing the minimum date as the first element and the maximum date as the second element. These values can be obtained from the `MinDate <Vcl.ComCtrls.TCommonCalendar.MinDate.htm>`__ and `MaxDate <Vcl.ComCtrls.TCommonCalendar.MaxDate.htm>`__ properties by calling ``DateTimeToSystemTime``. + + `MsgSetRange <Vcl.ComCtrls.TCommonCalendar.MsgSetRange.htm>`__ returns ``True`` if the range is set by the method. + ''' + @overload + def MsgSetRange(self, Flags: int, SysTime: PSystemTime, Unused: int) -> bool: ... + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ instance. + + ``Create()`` calls the inherited constructor method and initializes the `Date <Vcl.ComCtrls.TCommonCalendar.Date.htm>`__ and `Time <Vcl.ComCtrls.TDateTimePicker.Time.htm>`__ properties to the current date and time. It also sets the following ControlStyle flags: ``csCaptureMouse``, ``csOpaque``, ``csClickEvents``, ``csDoubleClicks``, and ``csFixedHeight``. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when a date or time is entered. + + Write an ``OnChange`` event handler to take specific action whenever the date or time entered in the component changes. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnCloseUp(self, Sender: Object) -> None: + ''' + # OnCloseUp: NotifyEvent + Occurs when the drop-down calendar closes. + + Write an ``OnCloseUp`` event handler to implement special processing that needs to occur only when the drop-down calendar closes. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDropDown(self, Sender: Object) -> None: + ''' + # OnDropDown: NotifyEvent + Occurs when the user opens the drop-down calendar by clicking the arrow at the right of the control. + + Write an ``OnDropDown`` event handler to implement special processing that needs to occur only when the drop-down calendar is opened. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUserInput(self, Sender: Object, Userstr: str, DateAndTime: DateTime, AllowChange: bool) -> None: + ''' + # OnUserInput: DTParseInputEvent + Occurs when the user types directly into the component's ``Edit`` box. + + This event occurs only if `ParseInput <Vcl.ComCtrls.TDateTimePicker.ParseInput.htm>`__ is set to ``True``. Write an ``OnUserInput`` event handler implementing special processing that needs to occur when the user types directly into the `DateTimePicker <Vcl.ComCtrls.TDateTimePicker.htm>`__ (rather than Selecting with the drop-down calendar or scroll arrows). + + ``OnUserInput`` is an event handler of type `Vcl.ComCtrls.TDTParseInputEvent <Vcl.ComCtrls.TDTParseInputEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class DelphiDefaultContainer: + '''Abstract Container type for Delphi''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __delitem__(self, other) -> Any: + '''Delete self[key].''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __len__(self) -> int: + '''Return len(self).''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + def __setitem__(self, index, object) -> None: + '''Set self[key] to value.''' + +class DelphiDefaultIterator: + '''Iterator for Abstract Containers''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __next__(self) -> Any: + '''Implement next(self).''' + +class DelphiDefaultMapping: + '''Abstract Mapping type for Delphi''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __delitem__(self, other) -> Any: + '''Delete self[key].''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __len__(self) -> int: + '''Return len(self).''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + def __setitem__(self, index, object) -> None: + '''Set self[key] to value.''' + +class DelphiMethod: + '''Wrapper for Delphi methods''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __call__(self, *args, **kwargs) -> Any: + '''Call self as a function.''' + +class DragImageList(CustomImageList): + '''Wrapper for Delphi TDragImageList''' + __hash__: ClassVar[None] = ... + ColorDepth: ColorDepth + '''ColorDepth:''' + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + DragCursor: int + '''int:''' + DragHotspot: Point + '''Point:''' + Dragging: bool + '''bool:''' + Owner: Any + '''Returns the Component Owner''' + + def BeginDrag(self, Window: int, X: int, Y: int) -> bool: + '''TDragImageList.BeginDrag(Window: int, X: int, Y: int) -> bool''' + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def DragLock(self, Window: int, XPos: int, YPos: int) -> bool: + '''TDragImageList.DragLock(Window: int, XPos: int, YPos: int) -> bool''' + def DragMove(self, X: int, Y: int) -> bool: + '''TDragImageList.DragMove(X: int, Y: int) -> bool''' + def DragUnlock(self, *args, **kwargs) -> Any: ... + def EndDrag(self, *args, **kwargs) -> Any: ... + def GetHotSpot(self, *args, **kwargs) -> Any: ... + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + def HideDragImage(self, *args, **kwargs) -> Any: ... + def SetDragImage(self, Index: int, HotSpotX: int, HotSpotY: int) -> bool: + '''TDragImageList.SetDragImage(Index: int, HotSpotX: int, HotSpotY: int) -> bool''' + def ShowDragImage(self, *args, **kwargs) -> Any: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class DrawGrid(CustomDrawGrid): + ''' + =================== + Vcl.Grids.TDrawGrid + =================== + + ``DrawGrid`` represents a grid control that displays information in column and row format. + + Add a ``DrawGrid`` object to a form to present arbitrary information in a tabular format. ``DrawGrid`` provides many properties to control the appearance of the grid, as well as events and methods that take advantage of the tabular organization of the grid in responding to user actions. + + ``DrawGrid`` introduces several events and methods to allow applications to customize the appearance and behavior of the grid. + + If the cells of the grid contain text strings that represent objects, consider using a ``StringGrid`` object instead. If the grid displays field values from the records in a dataset, use ``DBGrid`` instead. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether a single line border is drawn around the grid. + + Set `BorderStyle <Vcl.Grids.TCustomGrid.BorderStyle.htm>`__ to ``bsSingle`` to add a single line border around the grid's image. Set `BorderStyle <Vcl.Grids.TCustomGrid.BorderStyle.htm>`__ to ``bsNone`` to omit the border. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + ColCount: int + ''' + Specifies the number of columns in the grid. + + Read `ColCount <Vcl.Grids.TCustomGrid-ColCount.htm>`__ to determine the number entries in the ``ColWidths`` array. Set `ColCount <Vcl.Grids.TCustomGrid-ColCount.htm>`__ to add or delete columns at the right side of the grid. The value of `ColCount <Vcl.Grids.TCustomGrid-ColCount.htm>`__ includes any fixed columns at the left of the grid as well as the scrollable columns in the body of the grid. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DefaultColWidth: int + ''' + Determines the width (in pixels) of all columns that have not been explicitly resized. + + Set `DefaultColWidth <Vcl.Grids.TCustomGrid.DefaultColWidth.htm>`__ to change the size of all columns in the grid. When `DefaultColWidth <Vcl.Grids.TCustomGrid.DefaultColWidth.htm>`__ is set, columns that have been resized using the mouse or by setting the ``ColWidths`` property are given the `DefaultColWidth <Vcl.Grids.TCustomGrid.DefaultColWidth.htm>`__ as well. + + When new columns are added to the grid using the ``ColCount`` property, they are created with a width of `DefaultColWidth <Vcl.Grids.TCustomGrid.DefaultColWidth.htm>`__. + ''' + DefaultColAlignment: Alignment + ''' + `DefaultColAlignment <Vcl.Grids.TCustomGrid.DefaultColAlignment.htm>`__ is the default text alignment for all columns where alignment is not explicitly specified using `CustomGrid.ColAlignments <Vcl.Grids.TCustomGrid-ColAlignments.htm>`__. + ''' + DefaultDrawing: bool + ''' + Determines whether the Cells are painted when the grid is drawn. + + Set `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ to ``True`` to have the grid automatically paint the cells in the grid, including adding the background color, the 3-D effects on the fixed cells, and the focus rectangle around the selected cell. Set `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ to ``False`` to skip the painting of the cells when the grid is drawn. + + When `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ is ``False``, the cells should be painted using the ``DrawCell()`` method. For `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__, ``DrawCell()`` is an abstract method. Descendants of `CustomGrid <Vcl.Grids.TCustomGrid.htm>`__ use ``DrawCell()`` to provide their own customized drawing code, or to generate an ``OnDrawCell`` event. + ''' + DefaultRowHeight: int + ''' + Specifies the height (in pixels) of all rows that have not been explicitly resized. + + Set `DefaultRowHeight <Vcl.Grids.TCustomGrid.DefaultRowHeight.htm>`__ to change the size of all rows in the grid. When `DefaultRowHeight <Vcl.Grids.TCustomGrid.DefaultRowHeight.htm>`__ is set, rows that have been resized using the mouse or by setting the ``RowHeights`` property are given the `DefaultRowHeight <Vcl.Grids.TCustomGrid.DefaultRowHeight.htm>`__ as well. + + When new rows are added to the grid using the ``RowCount`` property, they are created with a height of `DefaultRowHeight <Vcl.Grids.TCustomGrid.DefaultRowHeight.htm>`__. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + DrawingStyle: BDrawingStyle + ''' + Determines the style used when drawing the grid. + + `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ determines the style used to draw the grid. The following table lists the possible values of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__. + + ================= ========================================================= + **Value** **Meaning** + ================= ========================================================= + ``gdsClassic`` The grid control uses the standard, unthemed style. + ``gdsThemed`` The grid control uses the current operating system theme. + ``gdsGradient`` The grid control uses gradients for styling. + ================= ========================================================= + + *Notes about DrawingStyle for*\ `Vcl.Grids.TStringGrid <Vcl.Grids.TStringGrid.htm>`__: + + - Setting ``FixedColor`` has no effect unless you also set ``DrawingStyle`` to ``gdsClassic``. + - Setting ``GradientStartColor`` and ``GradientEndColor`` has no effect unless you set the value of ``DrawingStyle`` to ``gdsGradient``. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + FixedColor: Color + ''' + Specifies the background color of the fixed rows and columns in the grid. + + Set `FixedColor <Vcl.Grids.TCustomGrid.FixedColor.htm>`__ to specify the color for the nonscrolling cells in the grid. The scrolling region of the grid is drawn using the ``Color`` property. + ''' + FixedCols: int + ''' + Specifies the number of columns on the left of the grid that cannot be scrolled. + + Set `FixedCols <Vcl.Grids.TCustomGrid.FixedCols.htm>`__ to create or get rid of nonscrolling columns. Nonscrolling columns appear at the left of the grid, and are always visible, even when the user scrolls the other columns in the grid. Use nonscrolling columns for displaying row titles or row numbers, or to implement a scroll lock that the user can set. + + Nonscrolling columns are visually distinct from the scrollable columns in the grid. They are painted with a separate background color, and their cells have a raised, 3-D look. + + .. note:: Grids must include at least one scrolling column. Do not set `FixedCols <Vcl.Grids.TCustomGrid.FixedCols.htm>`__ to a value greater than ColCount - 1. + ''' + FixedRows: int + ''' + Specifies the number of rows on the top of the grid that cannot be scrolled. + + Set `FixedRows <Vcl.Grids.TCustomGrid.FixedRows.htm>`__ to create or get rid of nonscrolling rows. Nonscrolling rows appear at the top of the grid, and are always visible, even when the user scrolls the other rows in the grid. Use nonscrolling rows for displaying column titles or column numbers. + + Nonscrolling rows are visually distinct from the scrollable rows in the grid. They are painted with a separate background color, and their cells have a raised, 3-D look. + + .. note:: Grids must include at least one scrolling row. Do not set `FixedRows <Vcl.Grids.TCustomGrid.FixedRows.htm>`__ to a value greater than ``RowCount - 1``. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + GradientEndColor: Color + ''' + Determines the ending gradient color. + + `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ determines the ending gradient color. `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ is used when the value of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ is ``gdsGradient``. `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ and `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ define the color range used when drawing individual cells within the grid control. + ''' + GradientStartColor: Color + ''' + Determines the starting gradient color. + + `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ determines the starting gradient color. `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ is used when the value of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ is ``gdsGradient``. `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ and `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ define a color range used when drawing individual cells within the grid control. + ''' + GridLineWidth: int + ''' + Specifies the width (in pixels) of the lines that separate the cells of the grid. + + Set `GridLineWidth <Vcl.Grids.TCustomGrid.GridLineWidth.htm>`__ to make the lines that separate the cells in the grid heavier or lighter. When `GridLineWidth <Vcl.Grids.TCustomGrid.GridLineWidth.htm>`__ is zero, no separators are drawn between the cells of the grid. + + `GridLineWidth <Vcl.Grids.TCustomGrid.GridLineWidth.htm>`__ will have no effect if the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property does not include ``goFixedHorzLine``, ``goFixedVertLine``, ``goHorzLine``, or ``goVertLine``. + + .. note:: Values greater than 3 pixels are not recommended for applications that run on *Windows 9x* or *Windows ME* because of distortions that can appear. + ''' + Options: GridOptions + ''' + Specifies various display and behavioral properties of the grid. + + Set `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ to include the desired properties for the grid. See the type `Vcl.Grids.TGridOptions <Vcl.Grids.TGridOptions.htm>`__ for definitions of these properties. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ScrollBars: ScrollStyle + ''' + Specifies whether the grid includes horizontal and vertical ``ScrollBar``\ s. + + Use `ScrollBars <Vcl.Grids.TCustomGrid.ScrollBars.htm>`__ to give the grid horizontal or vertical ``ScrollBar``\ s. + + .. note:: If all the cells in the grid fit in the ``ClientWidth``, no horizontal ``ScrollBar`` appears, even if `ScrollBars <Vcl.Grids.TCustomGrid.ScrollBars.htm>`__ is ``ssHorizontal`` or ``ssBoth``. If all the cells fit in the ``ClientHeight``, no vertical ``ScrollBar`` appears, even if `ScrollBars <Vcl.Grids.TCustomGrid.ScrollBars.htm>`__ is ``ssVertical`` or ``ssBoth``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + VisibleColCount: int + ''' + Indicates the number of scrollable columns visible in the grid. + + Use `VisibleColCount <Vcl.Grids.TCustomGrid.VisibleColCount.htm>`__ to determine the number of scrollable columns fully visible in the grid. `VisibleColCount <Vcl.Grids.TCustomGrid.VisibleColCount.htm>`__ does not include the fixed columns counted by the ``FixedCols`` property. It does not include any partially visible columns on the right edge of the grid. + ''' + VisibleRowCount: int + ''' + Indicates the number of scrollable rows visible in the grid. + + Use `VisibleRowCount <Vcl.Grids.TCustomGrid.VisibleRowCount.htm>`__ to determine the number of scrollable rows fully visible in the grid. `VisibleRowCount <Vcl.Grids.TCustomGrid.VisibleRowCount.htm>`__ does not include the fixed rows counted by the ``FixedRows`` property. It does not include any partially visible rows on the bottom of the grid. + ''' + + def Create(self) -> None: + ''' + No have docs. + ''' + def Destroy(self) -> None: + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnColumnMoved(self, Sender: Object, FromIndex: int, TolistIndex: int) -> None: + ''' + # OnColumnMoved: MovedEvent + Occurs immediately after the position of a column changes. + + Use `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ to perform special processing when the position of a grid column changes. Columns can be moved programmatically or by user manipulation. `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goColMoving``. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDrawCell(self, Sender: Object, ACol: int, ARow: int, Rect: Rect, State: GridDrawState) -> None: + ''' + # OnDrawCell: DrawCellEvent + Occurs when a cell in the grid needs to be drawn. + + Write an `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler to draw the contents of all the cells in the grid. Draw on the cell using the methods of the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. The ``Rect`` parameter indicates the location of the cell on the canvas. The ``Col`` and ``Row`` parameters indicate the column and row indexes of the cell that should be drawn. The ``State`` parameter indicates whether the cell has input focus, whether the cell is selected, and whether the cell is a fixed (nonscrolling) cell. + + If the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler is not assigned, all cells in the ``DrawGrid`` will appear empty. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the ``DrawGrid`` paints the background color of the cell before the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event, and draws a focus rectangle around the selected cell after the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler finishes drawing the contents of the cell. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``False``, the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler should paint the background of the cell and provide all visual indication of selection and focus. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnFixedCellClick(self, Sender: Object, ACol: int, ARow: int) -> None: + ''' + # OnFixedCellClick: FixedCellClickEvent + Determines the event triggered when a user clicks in a fixed cell. + + Write an event handler for `OnFixedCellClick <Vcl.Grids.TCustomGrid.OnFixedCellClick.htm>`__ to supply custom logic to your application in response to a user clicking in a fixed cell. `OnFixedCellClick <Vcl.Grids.TCustomGrid.OnFixedCellClick.htm>`__ is only triggered if the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes either the ``goFixedColClick`` or ``goFixedRowClick`` option, or both options. + + `OnFixedCellClick <Vcl.Grids.TCustomGrid.OnFixedCellClick.htm>`__ can be useful when implementing sorting on columns. By clicking in a fixed cell, the applied sorting rule can be reversed. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetEditMask(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + # OnGetEditMask: GetEditEvent + Occurs when the in-place editor requests an `edit mask <Vcl.Mask.TCustomMaskEdit.EditMask.htm>`__. + + Write an `OnGetEditMask <Vcl.Grids.TCustomDrawGrid.OnGetEditMask.htm>`__ event handler to provide the in-place editor with an ``EditMask`` that describes the valid input strings a user can type into a cell. Set the ``Value`` parameter to the string that describes the ``EditMask`` for the cell specified by the ``ACol`` and ``ARow`` parameters. If the cell does not have an ``EditMask``, set the ``Value`` parameter to an empty string. + + `OnGetEditMask <Vcl.Grids.TCustomDrawGrid.OnGetEditMask.htm>`__ does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goEditing``. + ''' + def OnGetEditText(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + # OnGetEditText: GetEditEvent + Occurs when the in-place editor requests the value of a cell. + + Write an `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event handler to provide the in-place editor with a string representing the contents of the cell. Set the ``Value`` parameter to the string for the cell specified by the ``ACol`` and ``ARow`` parameters. When the cell enters edit mode, the contents of the cell are drawn as the ``Value`` string returned by the `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event handler. This image need not match the appearance of the cell when it is not in edit mode, which is drawn using the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler. + + `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ does not occur unless the ``Options`` property includes ``goEditing``. + + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return, ``#3`` for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseWheelDown(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelDown: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated downward. + + Write code in the `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event handler to perform actions when the mouse wheel is rotated downward. OnMouseWheelDown occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelDown`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnMouseWheelUp(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelUp: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated upward. + + Write code in the `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ event handler to perform actions when the mouse wheel is rotated upward. ``OnMouseWheelUp`` occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelUp`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnRowMoved(self, Sender: Object, FromIndex: int, TolistIndex: int) -> None: + ''' + # OnRowMoved: MovedEvent + Occurs immediately after the position of a row changes. + + Write an `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event handler to provide special processing whenever a row in the grid changes position. Rows can be moved programmatically or by user manipulation. `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goRowMoving``. + ''' + def OnSelectCell(self, Sender: Object, ACol: int, ARow: int, CanSelect: bool) -> None: + ''' + # OnSelectCell: SelectCellEvent + Occurs before a cell in the grid is selected. + + Write an `OnSelectCell <Vcl.Grids.TCustomDrawGrid.OnSelectCell.htm>`__ event handler to specify whether any particular cell in the grid can be selected. The ``Col`` and ``Row`` parameters indicate the column and row indexes of the cell that is about to be selected. Set the ``CanSelect`` parameter to ``False`` to prevent the cell being selected. + ''' + def OnSetEditText(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + # OnSetEditText: SetEditEvent + Occurs when the user edits the value of a cell. + + Write an `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event handler to perform any special processing of the text edited by the user in an in-place editor. For example, use the `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event to retrieve and store the value of a cell so that it can be displayed in an `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event handler. `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ occurs every time the user changes the text. + + The ``Value`` parameter is the new value for the cell specified by the ``ACol`` and ``ARow`` parameters. + + `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ does not occur unless the `Options <Vcl.Grids.TCustomGrid.Options.htm>`__ property includes ``goEditing``. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnTopLeftChanged(self, Sender: Object) -> None: + ''' + # OnTopLeftChanged: NotifyEvent + Occurs immediately after the `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ property or the `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ property changes. + + Use `OnTopLeftChanged <Vcl.Grids.TCustomDrawGrid.OnTopLeftChanged.htm>`__ to perform special processing when the non-fixed cells in the grid are scrolled. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Edit(CustomEdit): + ''' + ================== + Vcl.StdCtrls.TEdit + ================== + + ``Edit`` is a wrapper for a *Windows* single-line edit control. + + Use a ``Edit`` object to put a standard Windows edit control on a form. ``Edit`` controls are used to retrieve text that users type. ``Edit`` controls can also display text to the user. + + When only displaying text to the user, choose an edit control to allow users to select text and copy it to the ``Clipboard``. Choose a label object if the selection capabilities of an edit control are not needed. + + ``Edit`` implements the generic behavior introduced in `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__. ``Edit`` publishes many of the properties inherited from `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__, but does not introduce any new behavior. For specialized edit controls, use other descendant classes of `CustomEdit <Vcl.StdCtrls.TCustomEdit.htm>`__ or derive from it. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the text is aligned within the text ``Edit`` control. + + Use `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ to change the way the text is formatted in the text ``Edit`` control. `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ can take one of the following values: + + ==================== ================================================== + **Value** **Meaning** + ==================== ================================================== + ``taLeftJustify`` Align text to the left side of the control + ``taCenter`` Center text horizontally in the control. + ``taRightJustify`` Align text to the right side of the control. + ==================== ================================================== + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSelect: bool + ''' + Determines whether all the text in the ``Edit`` control is automatically selected when the control gets focus. + + Set `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ to select all the text when the ``Edit`` control gets focus. `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ only applies to single-line ``Edit`` controls. + + Use `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ when the user is more likely to replace the text in the ``Edit`` control than to append to it. + ''' + AutoSize: bool + ''' + Determines whether the height of the ``Edit`` control automatically resizes to accommodate the text. + + Use `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ to make the ``Edit`` control adjust its size automatically so the client area accommodates the height of the text. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``False``, the ``Edit`` control has a fixed height. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``True``, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style. + + .. note:: `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ only adjusts the height of the ``Edit`` control. Even with `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ set to ``True``, text in the ``Edit`` control may appear truncated if it extends beyond the width of the control. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``Edit`` control has a single line border around the client area. + + Use `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ to affect the sharpness with which the client area of the ``Edit`` control stands out. `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ can have a value of either ``bsSingle`` or ``bsNone``. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsSingle``, the ``Edit`` control has a single-line border around the client area. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsNone``, there will be no border. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text within the ``Edit`` control. + + Use `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to force the contents of the ``Edit`` control to assume a particular case. + + When `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types them into the ``Edit`` control. Changing the `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ property to ``ecLowerCase`` or ``ecUpperCase`` changes the actual contents of the text, not just the appearance. Any case information is lost and can't be recaptured by changing `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to ``ecNormal``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HideSelection: bool + ''' + Determines whether the visual indication of the selected text remains when focus shifts to another control. + + Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` to provide visual feedback of the selected portion of the text even when the ``Edit`` control does not have focus. Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``True`` to show the selection only when the ``Edit`` control has focus. `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ does not affect the actual value of the selection, only the visual indication. Always setting `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` can make forms with many ``Edit`` controls look too busy. + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + ``Vcl.StdCtrls.TEdit.ImeMode`` inherits from `Vcl.Controls.TWinControl.ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__. + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for *Asian* language characters. The *IME* hooks all keyboard input, converts it to *Asian* characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can enter into the ``Edit`` control. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the number of characters that can be entered into the ``Edit`` control. A value of 0 indicates that there is no application-defined limit on the length. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the length of the text in an ``Edit`` control if that text will be copied into a fixed-length buffer. + + .. note:: Setting `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ characters. + + .. note:: Even when `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an ``Edit`` control. + + .. note:: The unit of ``MaxLength`` is characters (not bytes) if the application is using themes. + ''' + NumbersOnly: bool + ''' + Allows only numbers to be typed into the text ``Edit``. + + ``Vcl.StdCtrls.TEdit.NumbersOnly`` inherits from `Vcl.StdCtrls.TCustomEdit.NumbersOnly <Vcl.StdCtrls.TCustomEdit.NumbersOnly.htm>`__. All content below this line refers to `Vcl.StdCtrls.TCustomEdit.NumbersOnly <Vcl.StdCtrls.TCustomEdit.NumbersOnly.htm>`__. + + Use `NumbersOnly <Vcl.StdCtrls.TCustomEdit.NumbersOnly.htm>`__ to prohibit entry of non-numeric characters in the ``textfield``. Note, however, that a user can paste non-numeric characters in the ``textfield`` even when this property is set. + ''' + OEMConvert: bool + ''' + Determines whether characters typed in the ``Edit`` control are converted from *ANSI* to *OEM* and then back to *ANSI*. To ensure that any characters typed in the ``Edit`` control can be unambiguously converted to the *OEM* character set, set `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ to ``True``. This causes all characters to be converted from *ANSI* to *OEM* and then back to *ANSI* as they are typed. Set `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ to ``False`` to avoid the overhead of this conversion when it does not matter whether the text can be unambiguously mapped to an *OEM* string. + + `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ is most useful for ``Edit`` controls used to enter file names when the application does not use Unicode file names. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PasswordChar: str + ''' + Indicates the character, if any, to display in place of the actual characters typed in the control. + + Use the `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ property to create an ``Edit`` control that displays a special character in place of any entered text. If `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ is set to the ``NULL`` character (*ANSI* character zero), the ``Edit`` control displays its text normally. If `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ is any other character, the ``Edit`` control displays `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ in place of each character typed. `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ affects the appearance of the ``Edit`` control only. The value of the ``Text`` property reflects the actual characters that are typed. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the ``Edit`` control. To restrict the ``Edit`` control to display only, set the `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ property to ``True``. Set `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``False`` to allow the contents of the ``Edit`` control to be edited. + + Setting `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Text: Caption + ''' + Contains a text string associated with the control. + + Use the `Text <Vcl.Controls.TControl.Text.htm>`__ property to read the `Text <Vcl.Controls.TControl.Text.htm>`__ of the control or to specify a new string for the `Text <Vcl.Controls.TControl.Text.htm>`__ value. By default, `Text <Vcl.Controls.TControl.Text.htm>`__ is the control name. For ``Edit`` controls and memos, the `Text <Vcl.Controls.TControl.Text.htm>`__ appears within the control. For ``ComboBox``\ es, the `Text <Vcl.Controls.TControl.Text.htm>`__ is the content of the ``Edit`` control portion of the ``ComboBox``. + + .. note:: Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. Which property is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + ''' + TextHint: str + ''' + A hint or message to be displayed when the ``Text`` property is empty. + + Use `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ to cue the user on what kind of entry is expected in the text field. Runtime themes must be enabled. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + Occurs when the text for the edit control may have changed. + + Write an `OnChange <Vcl.StdCtrls.TCustomEdit.OnChange.htm>`__ event handler to take specific action whenever the text for the edit control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the edit control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the edit control. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets Windows ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the Key to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like #13 for carriage return, #3 for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets Windows ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the Key to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like #13 for carriage return, #3 for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class FileOpenDialog(CustomFileOpenDialog): + ''' + =========================== + Vcl.Dialogs.TFileOpenDialog + =========================== + + Class for *Vista* and newer *Windows* operating systems style file ``OpenDialog``\ s. + + This class extends `CustomFileOpenDialog <Vcl.Dialogs.TCustomFileOpenDialog.htm>`__. It allows creating *Microsoft Windows Vista* (or newer *Windows* operating systems) style file ``OpenDialog``\ s ``CLSID_FileOpenDialog`` and implements the ``IFileOpenDialog`` interface. + ''' + + __hash__: ClassVar[None] = ... + ClientGuid: str + ''' + **GUID** associated with a dialog's persisted state. + + `ClientGuid <Vcl.Dialogs.TCustomFileDialog.ClientGuid.htm>`__ holds a **GUID** associated with a dialog's persisted state. Persisted states for a dialog can include such things as its position and size. Having a **GUID** allows an application to remember these persisted states for different versions of the dialog. + ''' + DefaultExtension: str + ''' + Default extension to be added to file names. + + ``Vcl.Dialogs.TFileOpenDialog.DefaultExtension`` inherits from `Vcl.Dialogs.TCustomFileDialog.DefaultExtension <Vcl.Dialogs.TCustomFileDialog.DefaultExtension.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.DefaultExtension <Vcl.Dialogs.TCustomFileDialog.DefaultExtension.htm>`__. + + `DefaultExtension <Vcl.Dialogs.TCustomFileDialog.DefaultExtension.htm>`__ contains the default extension to add to file names. + ''' + DefaultFolder: str + ''' + Default folder if there is no recently used folder. + + `DefaultFolder <Vcl.Dialogs.TCustomFileDialog.DefaultFolder.htm>`__ contains the name of the default folder if there is no recently used folder. + ''' + FavoriteLinks: FavoriteLinkItems + ''' + List of places available for the user to open or save items. + + `FavoriteLinks <Vcl.Dialogs.TCustomFileDialog.FavoriteLinks.htm>`__ contains a list of places available for the user to open or save items. This is an instance of `FavoriteLinkItems <Vcl.Dialogs.TFavoriteLinkItems.htm>`__. + ''' + FileName: FileName + ''' + Text in the dialog's file name ``Edit`` box. + + `FileName <Vcl.Dialogs.TCustomFileDialog.FileName.htm>`__ contains the text currently entered in the dialog's file name ``Edit`` box. + ''' + FileNameLabel: str + ''' + Text of the ``Label`` next to file name ``Edit`` box. + + `FileNameLabel <Vcl.Dialogs.TCustomFileDialog.FileNameLabel.htm>`__ holds the text of the ``Label`` next to the file name ``Edit`` box in the dialog. + ''' + FileTypes: FileTypeItems + ''' + Determines the file type masks (filters) available in the dialog. + + `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is an instance of `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__ containing a list of file types, each of which is an instance of `FileTypeItem <Vcl.Dialogs.TFileTypeItem.htm>`__. To add file types to a dialog, get the `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__ instance from `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ and use the `FileTypeItems <Vcl.Dialogs.TFileTypeItems.htm>`__. `Add <Vcl.Dialogs.TFileTypeItems.Add.htm>`__ method as in this sample: + + .. code-block:: python + + with FileOpenDialog1.FileTypes.Add do + begin + DisplayName := 'All Files'; + FileMask := '*.*''; + end; + ''' + FileTypeIndex: int + ''' + Determines which filter is selected by default when the dialog opens. + + `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ determines which of the file types in `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is selected by default when the dialog opens. Set `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ to 1 to choose the first file type in the list as the default, or set `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ to 2 to choose the second file type as the default, and so forth. If the value of `FileTypeIndex <Vcl.Dialogs.TCustomFileDialog.FileTypeIndex.htm>`__ is out or range, the first file type listed in `FileTypes <Vcl.Dialogs.TCustomFileDialog.FileTypes.htm>`__ is the default. + ''' + OkButtonLabel: str + ''' + Text of the ``Open`` or *Save* button. + + `OkButtonLabel <Vcl.Dialogs.TCustomFileDialog.OkButtonLabel.htm>`__ contains the text of the ``Open`` or *Save* button. + ''' + Options: FileDialogOptions + ''' + List of options that control the dialog. + + `Options <Vcl.Dialogs.TCustomFileDialog.Options.htm>`__ is a set of `FileDialogOption <Vcl.Dialogs.TFileDialogOption.htm>`__ options controlling the dialog's behavior. + ''' + Title: str + ''' + Dialog title. + + `Title <Vcl.Dialogs.TCustomFileDialog.Title.htm>`__ contains the dialog's title. + ''' + + def OnExecute(self, Sender: Object) -> None: + ''' + # OnExecute: NotifyEvent + Occurs when a ``FileDialog`` gets executed. + + `OnExecute <Vcl.Dialogs.TCustomFileDialog.OnExecute.htm>`__ occurs when an instance of `CustomFileDialog <Vcl.Dialogs.TCustomFileDialog.htm>`__ gets executed by the `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__ method. `Execute <Vcl.Dialogs.TCustomFileDialog.Execute.htm>`__ causes the dialog to be displayed. The `DoOnExecute <Vcl.Dialogs.TCustomFileDialog.DoOnExecute.htm>`__ method triggers this event. + ''' + def OnFileOkClick(self, Sender: Object, CanClose: bool) -> None: + ''' + # OnFileOkClick: FileDialogCloseEvent + Occurs when the user clicks the *OK* button. + + `OnFileOkClick <Vcl.Dialogs.TCustomFileDialog.OnFileOkClick.htm>`__ occurs when the user clicks the *OK* button. The event occurs just before the dialog returns with a result. If an event handler is defined, the property contains a pointer to a `FileDialogCloseEvent <Vcl.Dialogs.TFileDialogCloseEvent.htm>`__. The `DoOnFileOkClick <Vcl.Dialogs.TCustomFileDialog.DoOnFileOkClick.htm>`__ method triggers this event. + ''' + def OnFolderChange(self, Sender: Object) -> None: + ''' + # OnFolderChange: NotifyEvent + Occurs when a directory is opened or closed from the dialog. + + The `OnFolderChange <Vcl.Dialogs.TCustomFileDialog.OnFolderChange.htm>`__ event occurs when the user changes the directory whose contents are displayed in the dialog. This can happen when the user double-clicks a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. The event occurs after the folder changes. The `DoOnFolderChange <Vcl.Dialogs.TCustomFileDialog.DoOnFolderChange.htm>`__ method triggers this event. + ''' + def OnFolderChanging(self, Sender: Object, CanChange: bool) -> None: + ''' + # OnFolderChanging: FileDialogFolderChangingEvent + Occurs before a directory is opened or closed from the dialog. + + ``Vcl.Dialogs.TFileOpenDialog.OnFolderChanging`` inherits from `Vcl.Dialogs.TCustomFileDialog.OnFolderChanging <Vcl.Dialogs.TCustomFileDialog.OnFolderChanging.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.OnFolderChanging <Vcl.Dialogs.TCustomFileDialog.OnFolderChanging.htm>`__. + + `OnFileOkClick <Vcl.Dialogs.TCustomFileDialog.OnFileOkClick.htm>`__ occurs before a directory is opened or closed from the dialog. This can happen when the user double-clicks a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. If an event handler is defined, the property contains a pointer to a `FileDialogFolderChangingEvent <Vcl.Dialogs.TFileDialogFolderChangingEvent.htm>`__. The `DoOnFolderChanging <Vcl.Dialogs.TCustomFileDialog.DoOnFolderChanging.htm>`__ method triggers this event. + ''' + def OnSelectionChange(self, Sender: Object) -> None: + ''' + # OnSelectionChange: NotifyEvent + Occurs when the user changes the selection in the dialog. + + ``VCL.Dialogs.TFileOpenDialog.OnSelectionChange`` inherits from `Vcl.Dialogs.TCustomFileDialog.OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__. + + `OnSelectionChange <Vcl.Dialogs.TCustomFileDialog.OnSelectionChange.htm>`__ occurs when the user changes the selection in the dialog. The `DoOnSelectionChange <Vcl.Dialogs.TCustomFileDialog.DoOnSelectionChange.htm>`__ method triggers this event. + ''' + def OnShareViolation(self, Sender: Object, Response: FileDialogShareViolationResponse) -> None: + ''' + # OnShareViolation: FileDialogShareViolationEvent + Occurs when sharing violations arise from open or save operations. + + ``Vcl.Dialogs.TFileOpenDialog.OnShareViolation`` inherits from `Vcl.Dialogs.TCustomFileDialog.OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__. All content below this line refers to `Vcl.Dialogs.TCustomFileDialog.OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__. + + `OnShareViolation <Vcl.Dialogs.TCustomFileDialog.OnShareViolation.htm>`__ occurs when sharing violations arise from open or save operations. If an event handler is defined, the property contains a pointer to a `FileDialogShareViolationEvent <Vcl.Dialogs.TFileDialogShareViolationEvent.htm>`__. The `DoOnShareViolation <Vcl.Dialogs.TCustomFileDialog.DoOnShareViolation.htm>`__ method triggers this event. + ''' + def OnTypeChange(self, Sender: Object) -> None: + ''' + # OnTypeChange: NotifyEvent + Occurs when the user changes the file type selection in the dialog. + + `OnTypeChange <Vcl.Dialogs.TCustomFileDialog.OnTypeChange.htm>`__ occurs when the user changes the file type selection in the dialog. The `DoOnTypeChange <Vcl.Dialogs.TCustomFileDialog.DoOnTypeChange.htm>`__ method triggers this event. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class FileStream(HandleStream): + '''TFileStream enables applications to read from and write to a file on disk. + Use TFileStream to access the information in disk files. TFileStream will open a named file and provide methods to read from or write to it. If an application already has a handle to the file, opened in the appropriate mode, use THandleStream instead.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + FileName: str + '''str: Preserves the file name of the file associated with the file stream. + Use FileName to display the name of the file that TFileStream has accessed from disk. This is a read only property.''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Create(self, AFileName: str, Mode: int) -> None: + '''TFileStream.Create(AFileName: str, Mode: int) -> None + Creates an instance of TFileStream. + Call Create to instantiate a file stream for reading from or writing to the named file. Specify the name of the file and the way the file should be opened as parameters. + The Mode parameter indicates how the file is to be opened. The Mode parameter consists of an open mode and (possibly) a share mode or'ed together. The open mode must be one of the following values: + Value + Meaning + Declared In + fmCreate + + Create a file with the given name. If a file with the given name exists, override the existing file and open it in write mode. + System.Classes + fmOpenRead + Open the file for reading only. + + System.SysUtils + fmOpenWrite + Open the file for writing only. Writing to the file completely replaces the current contents. + System.SysUtils + fmOpenReadWrite + + Open the file to modify the current contents rather than replace them. + System.SysUtils + The share mode must be one of the following values: + Value + Meaning + Declared In + fmShareCompat + Sharing is compatible with the way FCBs are opened. + System.SysUtils + fmShareExclusive + Other applications cannot open the file for any reason. + System.SysUtils + fmShareDenyWrite + Other applications can open the file for reading but not for writing. + System.SysUtils + fmShareDenyRead + Other applications can open the file for writing but not for reading. + System.SysUtils + fmShareDenyNone + No attempt is made to prevent other applications from reading from or writing to the file. + System.SysUtils + + Note: On Windows, the Rights parameter is ignored. + If the file cannot be opened, Create raises an exception.\r + Creates an instance of TFileStream. + Call Create to instantiate a file stream for reading from or writing to the named file. Specify the name of the file and the way the file should be opened as parameters. + The Mode parameter indicates how the file is to be opened. The Mode parameter consists of an open mode and (possibly) a share mode or'ed together. The open mode must be one of the following values: + + Value + Meaning + Declared In + fmCreate + Create a file with the given name. If a file with the given name exists, override the existing file and open it in write mode. + System.Classes + fmOpenRead + Open the file for reading only. + System.SysUtils + fmOpenWrite + Open the file for writing only. Writing to the file completely replaces the current contents. + System.SysUtils + fmOpenReadWrite + Open the file to modify the current contents rather than replace them. + System.SysUtils + The share mode must be one of the following values: + Value + Meaning + Declared In + fmShareCompat + Sharing is compatible with the way FCBs are opened. + System.SysUtils + fmShareExclusive + Other applications cannot open the file for any reason. + System.SysUtils + fmShareDenyWrite + Other applications can open the file for reading but not for writing. + System.SysUtils + fmShareDenyRead + Other applications can open the file for writing but not for reading. + System.SysUtils + fmShareDenyNone + No attempt is made to prevent other applications from reading from or writing to the file. + System.SysUtils + + Note: On Windows, the Rights parameter is ignored. + If the file cannot be opened, Create raises an exception.''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys an instance of TFileStream. + Do not call Destroy directly in an application. Instead, call Free, which checks that the TFileStream reference is not nil and only then calls Destroy. + Destroy closes the Handle for the file stream before freeing the object.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Form(CustomForm): + ''' + =============== + Vcl.Forms.TForm + =============== + + ``Form`` represents a standard application window (form). + + When you create forms in the *Form Designer* at design time, they are implemented as descendants of ``Form``. ``Forms`` can represent the application's main window, or dialog boxes, or *MDI Children*. A form can contain other objects, such as ``Button``, ``CheckBox``, and ``ComboBox`` objects. + + Examples of forms include TLoginDialog and TPasswordDialog objects. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + ActiveControl: WinControl + ''' + Specifies the control that has focus on the ``Form``. + + Use `ActiveControl <Vcl.Forms.TCustomForm.ActiveControl.htm>`__ to ``get`` or ``set`` the control that has focus on the ``Form``. Only one control can have focus at a given time in an application. + + If the ``Form`` does not have focus, `ActiveControl <Vcl.Forms.TCustomForm.ActiveControl.htm>`__ is the control on the ``Form`` that will receive focus when the ``Form`` receives focus. + + .. note:: When focus shifts to another control, `ActiveControl <Vcl.Forms.TCustomForm.ActiveControl.htm>`__ is updated before the ``OnExit`` event occurs. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AlphaBlend: bool + ''' + Specifies whether the ``Form`` is translucent. + + Set `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ to specify that the ``Form`` represents a layered window that allows a translucent color. The `AlphaBlendValue <Vcl.Forms.TCustomForm.AlphaBlendValue.htm>`__ property specifies the degree of translucency. + + .. note:: `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ does not work on all systems. The application must be running under *Windows 2000* or better, and the machine must be a P90 or better. + ''' + AlphaBlendValue: Byte + ''' + Specifies the degree of translucency on a translucent form. + + Set `AlphaBlendValue <Vcl.Forms.TCustomForm.AlphaBlendValue.htm>`__ to a value between 0 and 255 to indicate the degree of translucency when the `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ property is ``True``. A value of 0 indicates a completely transparent window. A value of 255 indicates complete opacity. + + .. note:: `AlphaBlendValue <Vcl.Forms.TCustomForm.AlphaBlendValue.htm>`__ only has an effect when the `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ property is ``True``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoScroll: bool + ''' + Indicates whether ``ScrollBar``\ s appear automatically on the scrolling windowed control if it is not large enough to display all of its controls. + + If `AutoScroll <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is ``True``, the ``ScrollBar``\ s appear automatically when necessary. For example, if the user resizes the control so that some of its controls are partially obscured, ``ScrollBar``\ s appear. + + If `AutoScroll <Vcl.Forms.TScrollingWinControl.AutoScroll.htm>`__ is ``False``, ``ScrollBar``\ s don't appear automatically. In this case, use the `HorzScrollBar <Vcl.Forms.TScrollingWinControl.HorzScrollBar.htm>`__ and `VertScrollBar <Vcl.Forms.TScrollingWinControl.VertScrollBar.htm>`__ properties to make ``ScrollBar``\ s appear. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderIcons: BorderIcons + ''' + Specifies which icons appear on the ``TitleBar`` of the ``Form``. + + Use `BorderIcons <Vcl.Forms.TCustomForm.BorderIcons.htm>`__ to ``get`` or ``set`` the icons that appear on the ``TitleBar`` of the ``Form``. `BorderIcons <Vcl.Forms.TCustomForm.BorderIcons.htm>`__ can include any of the following `BorderIcons <Vcl.Forms.TCustomForm.BorderIcons.htm>`__ values: + + ================= =================================================================================================================================================================================================================================================== + **Value** **Meaning** + ================= =================================================================================================================================================================================================================================================== + ``biSystemMenu`` the ``Form`` has a ``Control`` menu (also known as a System menu). + ``biMinimize`` the ``Form`` has a ``Minimize()`` button + ``biMaximize`` the ``Form`` has a Maximize button + ``biHelp`` If ``BorderStyle`` is ``bsDialog`` or ``biMinimize`` and ``biMaximize`` are excluded, a question mark appears in the ``Form``\ s. ``TitleBar`` and when clicked, the cursor changes to ``crHelp``; otherwise,no question mark appears. + ================= =================================================================================================================================================================================================================================================== + + .. note:: Certain combinations of the `BorderIcons <Vcl.Forms.TCustomForm.BorderIcons.htm>`__ and ``BorderStyle`` properties are mutually exclusive. For example, `BorderIcons <Vcl.Forms.TCustomForm.BorderIcons.htm>`__ ``biMax``, ``biMin`` with ``BorderStyle`` of ``bsDialog`` are mutually exclusive. + ''' + BorderStyle: BorderStyle + ''' + Specifies the appearance and behavior of the ``Form`` border. + + Use `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ to ``get`` or ``set`` the appearance and behavior of the ``Form`` border. `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ can be any of the following ``Form`` `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ values: + + ===================== ============================================================ + **Value** **Meaning** + ===================== ============================================================ + ``bsDialog`` Not resizable; no minimize/maximize menu + ``bsSingle`` Not resizable; minimize/maximize menu + ``bsNone`` Not resizable; no visible border line + ``bsSizeable`` Standard resizable border + ``bsToolWindow`` like ``bsSingle`` but with a smaller caption + ``bsSizeToolWin`` like ``bsSizeable`` with a smaller caption + ===================== ============================================================ + + .. note:: Changing the border style of an *MDI Child* form to ``bsDialog`` or ``bsNone`` has no effect. + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the ``Caption``, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + ClientHeight: int + ''' + Specifies the height of the control's client area in pixels. + + Use `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ to read or change the height of the control's client area. + + For `Control <Vcl.Controls.TControl.htm>`__, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is the same as `Height <Vcl.Controls.TControl.Height.htm>`__. Derived classes may implement a `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ property that differs from `Height <Vcl.Controls.TControl.Height.htm>`__. For example, the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ of a form is the value of the `Height <Vcl.Controls.TControl.Height.htm>`__ property minus the height of the ``TitleBar``, resize border, and ``ScrollBar``\ s. + ''' + ClientWidth: int + ''' + Specifies the horizontal size of the control's client area in pixels. + + Use `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ to read or change the width of the control's client area. `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ is equivalent to `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__.Right. + + For `Control <Vcl.Controls.TControl.htm>`__, `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ is the same as `Width <Vcl.Controls.TControl.Width.htm>`__. Derived classes may implement a `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ property that differs from `Width <Vcl.Controls.TControl.Width.htm>`__. For example, the `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__ of a form is the value of the `Width <Vcl.Controls.TControl.Width.htm>`__ property minus the width of the resize border and ``ScrollBar``\ s. + ''' + ClientHandle: HWND + ''' + Provides access to the handle of the ``Form``\ s. internal MDI client window. + + Use `ClientHandle <Vcl.Forms.TCustomForm.ClientHandle.htm>`__ to get the handle for the ``Form``\ s. internal MDI client window. + + `ClientHandle <Vcl.Forms.TCustomForm.ClientHandle.htm>`__ is meaningful only if the ``Form`` is an *MDI* parent (that is, if the ``Form``\ s. ``FormStyle`` property is set to ``fsMDIForm``). + + .. note:: Use the ``Handle`` property instead to get the handle to the ``Form`` window itself. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + CustomTitleBar: TitleBar + ''' + Allows you to customize a VCL form's native ``TitleBar`` similar to Windows Explorer, Google Chrome, or other applications. It is supported on *Windows 7* and later. + + You can place *VCL Controls* on the ``TitleBar``, custom paint over it, as well as control the default painting of elements such as the window icon and caption. + + Enable the DWM (Desktop Window Manager) composition to use this property. + + This property uses the `GlassFrame <Vcl.Forms.TGlassFrame.htm>`__ property to extend the client area. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + UseDockManager: bool + ''' + Specifies whether the docking manager is used in drag-and-dock operations. + + Use `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``get`` or ``set`` whether a docking manager is used in drag-and-dock operations. + + The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control. + ''' + DefaultMonitor: DefaultMonitor + ''' + Specifies the monitor on which the ``Form`` appears. + + Use `DefaultMonitor <Vcl.Forms.TCustomForm.DefaultMonitor.htm>`__ to associate a form with a particular monitor in a multi-monitor application. The following table lists the possible values: + + ================== ===================================================================================================================================================================================== + **Value** **Meaning** + ================== ===================================================================================================================================================================================== + ``dmDesktop`` No attempt is made to position the ``Form`` on a specific monitor. + ``dmPrimary`` the ``Form`` is positioned on the first monitor listed in the global screen object's `Monitors <Vcl.Forms.TScreen.Monitors.htm>`__ property. + ``dmMainForm`` the ``Form`` appears on the same monitor as the application's main form. + ``dmActiveForm`` the ``Form`` appears on the same monitor as the currently active form. + ================== ===================================================================================================================================================================================== + + .. note:: `DefaultMonitor <Vcl.Forms.TCustomForm.DefaultMonitor.htm>`__ has no effect if the application does not have a main form. + ''' + DockManager: IDockManager + ''' + Specifies the control's docking manager interface. + + Use `DockManager <Vcl.Controls.TWinControl.DockManager.htm>`__ to specify the control's docking manager. The docking manager handles the layout of docking zones (where controls are docked) and any painting associated with docking zones. + + If you set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ and `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``True``, but do not assign a value to `DockManager <Vcl.Controls.TWinControl.DockManager.htm>`__, the windowed control generates a default docking manager, using the global `DefaultDockTreeClass <Vcl.Controls.DefaultDockTreeClass.htm>`__ variable. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + FormStyle: FormStyle + ''' + Determines the ``Form``\ s. style. + + Use `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ to ``get`` or ``set`` the ``Form``\ s. style. `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ is one of the following values: + + ================== ========================================================================================================================================================================================================================================================= + **Value** **Meaning** + ================== ========================================================================================================================================================================================================================================================= + ``fsNormal`` the ``Form`` is neither an *MDI* parent window nor an *MDI* child window. + ``fsMDIChild`` the ``Form`` is an *MDI* child window. + ``fsMDIForm`` the ``Form`` is an *MDI* parent window. + ``fsStayOnTop`` This form remains on top of the desktop and of other forms in the project, except any others that also have ``FormStyle`` set to ``fsStayOnTop``. If one ``fsStayOnTop`` form launches another, neither form will consistently remain on top. + ================== ========================================================================================================================================================================================================================================================= + + If the ``Form`` is the main form of an *MDI Application*, its `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property must be set to ``fsMDIForm``. + + .. note:: It is not advisable to change `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ at runtime. + + .. warning:: ``GraphicControl`` descendants placed in the client area of a form with `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ set to ``fsMDIForm`` will not paint. + ''' + GlassFrame: GlassFrame + ''' + Accesses the *Glass Frame* under *Windows Vista*, *Windows 7*, or later *Windows* operating systems. + + Use `GlassFrame <Vcl.Forms.TCustomForm.GlassFrame.htm>`__ to make your forms *Windows Vista* or *Windows 7* Aero-compatible, displaying a glass effect. + + `GlassFrame <Vcl.Forms.TCustomForm.GlassFrame.htm>`__ is a property of a `GlassFrame <Vcl.Forms.TGlassFrame.htm>`__ object created automatically for any form. + + .. note:: The property is only available for *Windows Vista* or *Windows 7* with Aero. Otherwise, the *Glass Frame* is ignored. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + HelpFile: str + ''' + Specifies the name of the ``Help`` file the ``Form`` uses to display the ``Help`` from. + + If your form should have a *Help* file different from the default *Help* file of the application specified using the `Application.HelpFile <Vcl.Forms.TApplication.HelpFile.htm>`__ property of the global ``Application`` type object, then use the `HelpFile <Vcl.Forms.TCustomForm.HelpFile.htm>`__ property of the ``Form`` to specify the name of the ``Help`` file the ``Form`` will use to display the ``Help`` from. + + The *Help* system specified by `Application.HelpSystem <Vcl.Forms.TApplication.HelpSystem.htm>`__ displays ``Help`` topics from the ``Help`` file specified by the `HelpFile <Vcl.Forms.TCustomForm.HelpFile.htm>`__ property of the ``Form`` when the ``Form`` has the focus. + ''' + HorzScrollBar: ControlScrollBar + ''' + Represents the horizontal ``ScrollBar`` for the scrolling windowed control. + + Use `HorzScrollBar <Vcl.Forms.TScrollingWinControl.HorzScrollBar.htm>`__ to hide, show, or manipulate the horizontal ``ScrollBar`` for the scrolling windowed control. + ''' + Icon: Icon + ''' + Specifies the icon that appears when the ``Form`` is minimized. + + Set the `Icon <Vcl.Forms.TCustomForm.Icon.htm>`__ property to provide an icon for the ``Form``. If `Icon <Vcl.Forms.TCustomForm.Icon.htm>`__ is not set, the system provides a default icon when the ``Form`` is minimized. + ''' + KeyPreview: bool + ''' + Specifies whether the ``Form`` should receive keyboard events before the active control. + + If `KeyPreview <Vcl.Forms.TCustomForm.KeyPreview.htm>`__ is ``True``, keyboard events occur on the ``Form`` before they occur on the active control. (The active control is specified by the ``ActiveControl`` property.) + + If `KeyPreview <Vcl.Forms.TCustomForm.KeyPreview.htm>`__ is ``False``, keyboard events occur only on the active control. + + Navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by `KeyPreview <Vcl.Forms.TCustomForm.KeyPreview.htm>`__ because they do not generate keyboard events. Similarly, when a ``Button`` has focus or when its ``Default`` property is ``True``, the *Enter* key is unaffected by `KeyPreview <Vcl.Forms.TCustomForm.KeyPreview.htm>`__ because it does not generate a keyboard events. + + `KeyPreview <Vcl.Forms.TCustomForm.KeyPreview.htm>`__ is ``False`` by default. + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + Menu: MainMenu + ''' + Specifies the ``Form``\ s. ``MainMenu``. + + Use `Menu <Vcl.Forms.TCustomForm.Menu.htm>`__ to ``get`` or ``set`` the ``Form``\ s. ``MainMenu``. At design time, `Menu <Vcl.Forms.TCustomForm.Menu.htm>`__ is set to the first TMain\ `Menu <Vcl.Forms.TCustomForm.Menu.htm>`__ component added to the ``Form``. + ''' + MDIChildren: Form + ''' + No have docs. + ''' + MDIChildCount: Form + ''' + Specifies the number of open *MDI Child* forms. + + Use `MDIChildCount <Vcl.Forms.TCustomForm.MDIChildCount.htm>`__ to get the number of open *MDI Child* forms. + + `MDIChildCount <Vcl.Forms.TCustomForm.MDIChildCount.htm>`__ is meaningful only if the ``Form`` is an *MDI* parent (that is, if the ``Form``\ s. ``FormStyle`` property is set to ``fsMDIForm``). + ''' + OldCreateOrder: bool + ''' + Specifies when `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ and `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ events occur. + + When `OldCreateOrder <Vcl.Forms.TCustomForm.OldCreateOrder.htm>`__ is ``False`` (the default) the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event occurs after all constructors are finished and the `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ event occurs before any destructors are called. + + This differs from earlier versions of the library (distributed with Delphi version 3 and previous and *C++Builder 1*), where the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event occurred when the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ constructor executed and the `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ event occurred when the `CustomForm <Vcl.Forms.TCustomForm.htm>`__ destructor executed. Applications that require the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event and `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ events to occur from the constructor and destructor of the ``Form`` can set `OldCreateOrder <Vcl.Forms.TCustomForm.OldCreateOrder.htm>`__ to ``True``. + ''' + ObjectMenuItem: MenuItem + ''' + Represents an *OLE* object ``MenuItem`` that reacts to selections of *OLE* objects. + + Use `ObjectMenuItem <Vcl.Forms.TCustomForm.ObjectMenuItem.htm>`__ to ``get`` or ``set`` a ``MenuItem`` that becomes enabled or disabled when an *OLE* object on the ``Form`` is selected or unselected respectively. + + The *OLE* object ``MenuItem`` can be used for standard OLE commands, such as `Activate <Vcl.Forms.TCustomForm.Activate.htm>`__ or ``Convert``. (The implementations of these commands are provided by the *OLE* server.) + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + PixelsPerInch: int + ''' + Represents the proportion of the font on the system on which the ``Form`` was designed. + + Use `PixelsPerInch <Vcl.Forms.TCustomForm.PixelsPerInch.htm>`__ at runtime to change how the ``Form`` is scaled to the current screen resolution. If `PixelsPerInch <Vcl.Forms.TCustomForm.PixelsPerInch.htm>`__ is changed from its default value, the ``Form`` will not have the same proportion on every screen resolution. + + At design time, `PixelsPerInch <Vcl.Forms.TCustomForm.PixelsPerInch.htm>`__ is set automatically when the ``Form`` is saved. Changes to `PixelsPerInch <Vcl.Forms.TCustomForm.PixelsPerInch.htm>`__ made in the *Object Inspector* only affect the ``Form`` at runtime. + + the ``Form``\ s. ``Scaled`` property must be ``True`` for `PixelsPerInch <Vcl.Forms.TCustomForm.PixelsPerInch.htm>`__ to have an effect. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + PopupMode: PopupMode + ''' + Controls how the top-level form behaves with respect to Window's ``WS_POPUP`` style. + + The `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property controls how the top-level form behaves with respect to Window's ``WS_POPUP`` style. A window that has the ``WS_POPUP`` style is always above its "owner" in Z-order. You can use the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property in conjunction with the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__ property to avoid the appearance of a hung application caused by a modal dialog showing up behind another form on the *Screen*. + + .. note:: Using the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is similar to specifying ``fsStayOnTop`` for the `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property, but allows better control over the layering. + + The `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is automatically set to ``pmAuto`` when the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ method is called. However, this causes the window handle to be recreated, which is not usually desirable. To avoid the re-creation of window handles, you can explicitly set the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property to ``pmAuto`` prior to calling the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ method (such as at design time). + + Set the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property to ``pmExplicit`` for non-modal design windows such as *Tool Palette*s and other floating ``ToolWindow``\ s. This causes the windows to always remain on top of the main form. In the case of a snapped together design (in which the window is docked to the main form), the design window remains on top of the designer. + + .. note:: For undocked windows, the design window remains above the main form, allowing other top-level forms to obscure the design window. + + Set the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property to ``pmNone`` if you want the pop-up window to have the pre-Delphi 8 behavior (except for the `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ item mentioned above). + + You can force the Z-Ordering of your forms and create a "stacked" appearance that the user cannot change by setting the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__ property to an explicit ``CustomForm``. If the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is ``pmExplicit`` and `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__ is ``nil``, then the ``Application.MainForm`` is implicitly used as the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__. If no ``Application.MainForm`` is assigned, then ``Application.Handle`` is used as the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__. If the PopupMode property is set to ``pmAuto``, ``Screen.ActiveForm`` is used as the `PopupParent <Vcl.Forms.TCustomForm.PopupParent.htm>`__. + ''' + PopupParent: CustomForm + ''' + Sets an order for stacked forms that users cannot change. + + If the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is set to ``pmExplicit`` and ``PopupParent`` is ``nil``, then the ``Application.MainForm`` is implicitly used as the ``PopupParent``. If no ``Application.MainForm`` is assigned, then ``Application.Handle`` is used as the ``PopupParent``. + + If the `PopupMode <Vcl.Forms.TCustomForm.PopupMode.htm>`__ property is set to ``pmAuto``, ``Screen.ActiveForm`` is used as the ``PopupParent`` property. + ''' + Position: int + ''' + Represents the size and placement of the ``Form``. + + Use `Position <Vcl.Forms.TCustomForm.Position.htm>`__ to ``get`` or ``set`` the size and placement of the ``Form``. `Position <Vcl.Forms.TCustomForm.Position.htm>`__ can have one of the following Position <Vcl.Forms.TCustomForm.Position.htm>`__ values: + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Value** | **Meaning** | + +========================+======================================================================================================================================================================+ + | ``poDesigned`` | the ``Form`` appears positioned on the *Screen* and with the same ``Height`` and ``Width`` as it had at design time. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDefault`` | the ``Form`` appears in a position on the *Screen* and with a ``Height`` and ``Width`` determined by the operating system. Each time you run the application, the | + | | form moves slightly down and to the right. The right side of the ``Form`` is always near the rightmost side of the *Screen*, and the bottom of the ``Form`` | + | | is always near the bottom of the *Screen*, regardless of the *Screen*'s resolution. | + | | | + | | The operating system only supports this for overlapped windows. For a pop-up or child window (that has a | + | | `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ of ``bsDialog`` or ``bsNone``, for example), the window is positioned in the upper-left corner of | + | | the *Screen*. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDefaultPosOnly`` | the ``Form`` displays with the size you created it at design time, but the operating system chooses its position on the *Screen*. Each time you run the | + | | application, the ``Form`` moves slightly down and to the right. When the ``Form`` can no longer move down and to the right and keep the same size while | + | | remaining entirely visible on the *Screen*, the ``Form`` displays at the upper-left corner of the *Screen*. | + | | | + | | The operating system only supports this for overlapped windows. For a pop-up or child window (that has a | + | | `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ of ``bsDialog`` or ``bsNone``, for example), the window is positioned in the upper-left corner of | + | | the *Screen*. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDefaultSizeOnly`` | the ``Form`` appears in the position you left it at design time, but the operating system chooses its size. The right side of the ``Form`` is always near | + | | the rightmost side of the *Screen*, and the bottom of the ``Form`` is always near the bottom of the *Screen*, regardless of the *Screen*'s resolution. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poScreenCenter`` | the ``Form`` remains the size you left it at design time, but is positioned in the center of the *Screen*. In multi-monitor applications, the ``Form`` may be | + | | moved from this center position so that it falls entirely on one monitor, as specified by the | + | | `DefaultMonitor <Vcl.Forms.TCustomForm.DefaultMonitor.htm>`__ property. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poDesktopCenter`` | the ``Form`` remains the size you left it at design time, but is positioned in the center of the *Screen*. No adjustments are made for multi-monitor | + | | applications. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poMainFormCenter`` | the ``Form`` remains the size you left it at design time, but is positioned in the center of the application's main form. No adjustments are made for | + | | multi-monitor applications. This position should only be used with secondary forms. If set for a main form, it acts like ``poScreenCenter``. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``poOwnerFormCenter`` | the ``Form`` remains the size you left it at design time, but is positioned in the center of the ``Form`` specified by the | + | | `Owner <System.Classes.TComponent.Owner.htm>`__ property. If the | + | | `Owner <System.Classes.TComponent.Owner.htm>`__ property does not specify a form, this position acts like ``poMainFormCenter``. | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + Note that if ``Position`` is set to ``poDefault``, ``poDefaultPosOnly`` or ``poDefaultSizeOnly``, and `BorderStyle <Vcl.Forms.TCustomForm.BorderStyle.htm>`__ is set to ``bsDialog`` or ``bsNone``, the ``Form`` will be positioned at ``(0, 0)``. + ''' + PrintScale: PrintScale + ''' + Represents the proportions of a printed form. + + Use `PrintScale <Vcl.Forms.TCustomForm.PrintScale.htm>`__ to ``get`` or ``set`` the proportions of the printed form. `PrintScale <Vcl.Forms.TCustomForm.PrintScale.htm>`__ can have one of the following `PrintScale <Vcl.Forms.TCustomForm.PrintScale.htm>`__ values: + + ==================== =================================================================================================================================================================================================================================================================== + **Value** **Meaning** + ==================== ================================================================================================================================================================================================================================================================ + ``poNone`` No special scaling occurs; therefore, the printed form and how the ``Form`` appears onscreen may appear squished or stretched. + ``poProportional`` the ``Form`` is printed so that the printed image is approximately the same visible size as on the *Screen* (WYSIWYG). the ``Form`` image is scaled so that the printed image is approximately the same visible size as on the *Screen*. + ``poPrintToFit`` the ``Form`` is printed using the same screen proportions, but in a size that just fits the printed page. + ==================== ================================================================================================================================================================================================================================================================ + ''' + Scaled: bool + ''' + Specifies whether the ``Form`` is sized according to the value of the ``PixelsPerInch`` property. + + `Scaled <Vcl.Forms.TCustomForm.Scaled.htm>`__ determines whether the ``Form`` adjusts itself to differences between the font used at design time and the current system font used by a system at runtime. If `Scaled <Vcl.Forms.TCustomForm.Scaled.htm>`__ is ``True``, the ``Form`` resizes itself and all its child controls to maintain the relationship between the size of controls and the height of ``Text`` displayed in the default font. If `Scaled <Vcl.Forms.TCustomForm.Scaled.htm>`__ is ``False``, no such resizing occurs. + + By setting `Scaled <Vcl.Forms.TCustomForm.Scaled.htm>`__ to ``True``, the ``Form`` can adjust to fonts that are not scalable (that is, fonts that only supply discrete point sizes) or to differences such as forms designed using small fonts at design time that are run on systems that use large fonts. + + The degree of resizing is determined by the ``PixelsPerInch`` property, which measures the proportion of the font on the system used when designing the ``Form``. + ''' + ScreenSnap: bool + ''' + Specifies whether form snaps to edge of screen. + + `ScreenSnap <Vcl.Forms.TCustomForm.ScreenSnap.htm>`__ determines whether the edges of the ``Form`` snap to the edge of the *Screen* when the user moves the ``Form``. To control the snap distance, set the `SnapBuffer <Vcl.Forms.TCustomForm.SnapBuffer.htm>`__ property. + ''' + TransparentColor: bool + ''' + Specifies whether a color on the ``Form`` appears transparent. + + Use `TransparentColor <Vcl.Forms.TCustomForm.TransparentColor.htm>`__ to indicate that one of the colors on the ``Form`` should be treated as transparent, allowing windows behind the ``Form`` to completely show through. The `TransparentColorValue <Vcl.Forms.TCustomForm.TransparentColorValue.htm>`__ property indicates the color that appears completely transparent. + + .. note:: To make the entire form transparent, or to make it translucent rather than transparent, use the `AlphaBlend <Vcl.Forms.TCustomForm.AlphaBlend.htm>`__ and `AlphaBlendValue <Vcl.Forms.TCustomForm.AlphaBlendValue.htm>`__ properties. + + .. note:: `TransparentColor <Vcl.Forms.TCustomForm.TransparentColor.htm>`__ does not work on all systems. The application must be running under *Windows 2000* or better, with adequate hardware. + ''' + TransparentColorValue: Color + ''' + Indicates the color on the ``Form`` that appears transparent when `TransparentColor <Vcl.Forms.TCustomForm.TransparentColor.htm>`__ is ``True``. + + Use `TransparentColorValue <Vcl.Forms.TCustomForm.TransparentColorValue.htm>`__ to indicate the color that appears transparent when the `TransparentColor <Vcl.Forms.TCustomForm.TransparentColor.htm>`__ property is ``True``. + + .. note:: If the application uses a 16-bit color palette, `TransparentColorValue <Vcl.Forms.TCustomForm.TransparentColorValue.htm>`__ must be a basic color. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + SnapBuffer: int + ''' + Specifies distance for screen snap. + + If `ScreenSnap <Vcl.Forms.TCustomForm.ScreenSnap.htm>`__ is ``True``, `SnapBuffer <Vcl.Forms.TCustomForm.SnapBuffer.htm>`__ determines the maximum number of pixels that be between the ``Form`` edge and the *Screen* edge before the ``Form`` snaps to the *Screen* edge. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + TileMode: TileMode + ''' + Represents how *MDI Child* forms are arranged when the `Tile <Vcl.Forms.TForm.Tile.htm>`__ method is called. + + `TileMode <Vcl.Forms.TCustomForm.TileMode.htm>`__ can have one of the following TileMode <Vcl.Forms.TCustomForm.TileMode.htm>`__ values: + + ================= ====================================================================== + **Value** **Meaning** + ================= ====================================================================== + ``tbHorizontal`` Each form stretches across the width of the parent form + ``tbVertical`` Each form stretches along the height of the parent form + ================= ====================================================================== + + `TileMode <Vcl.Forms.TCustomForm.TileMode.htm>`__ is meaningful only if the ``Form`` is an *MDI Child* (that is, if the ``Form``\ s. `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property is set to ``fsMDIChild``). + ''' + TipMode: TipMode + ''' + No have docs. + ''' + VertScrollBar: ControlScrollBar + ''' + Represents the vertical ``ScrollBar`` for the scrolling windowed control. + + Use `VertScrollBar <Vcl.Forms.TScrollingWinControl.VertScrollBar.htm>`__ to hide, show, or manipulate the vertical ``ScrollBar`` for the scrolling windowed control. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + WindowState: WindowState + ''' + Represents how the ``Form`` appears on the *Screen*. + + Set `WindowState <Vcl.Forms.TCustomForm.WindowState.htm>`__ to minimize, maximize, or restore the ``Form`` window. Read `WindowState <Vcl.Forms.TCustomForm.WindowState.htm>`__ to determine whether the ``Form`` is minimized, maximized, or in a normal state. + ''' + WindowMenu: MenuItem + ''' + Specifies the *Window* menu for an *MDI* parent form. + + Use `WindowMenu <Vcl.Forms.TCustomForm.WindowMenu.htm>`__ to ``get`` or ``set`` the *Window* menu for an *MDI* parent form. The *Window* menu is a standard menu in *MDI Application*s. It contains commands that let the user manage the windows in the application. Menu items usually include `Cascade <Vcl.Forms.TForm.Cascade.htm>`__, Arrange Icons, `Tile <Vcl.Forms.TForm.Tile.htm>`__, and so on. + + The *Window* menu also lists (at the bottom) the child windows that are currently open in the application. When the user selects one of these windows from the menu, the window becomes the active window in the application. + + Although this menu is commonly called the *Window* menu, it can have any name that corresponds to an existing ``MenuItem`` on the menu bar. The names of open child forms are merged onto the menu automatically at run-time. + + `WindowMenu <Vcl.Forms.TCustomForm.WindowMenu.htm>`__ is meaningful only if the ``Form`` is an *MDI* parent (that is, if the ``Form``\ s. `FormStyle <Vcl.Forms.TCustomForm.FormStyle.htm>`__ property is set to ``fsMDIForm``). + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def ArrangeIcons(self) -> None: + ''' + Arranges the icons of minimized *MDI Child* forms. + + Use ``ArrangeIcons()`` to arrange the icons of minimized *MDI Child* forms so they are evenly spaced and don't overlap. + + ``ArrangeIcons()`` works only if the form is an *MDI* parent form (that is, if the form's ``FormStyle`` property is ``fsMDIForm``). + ''' + def Cascade(self) -> None: + ''' + Arranges *MDI Child* forms so they overlap. + + Use ``Cascade()`` to ``arrange`` *MDI Child* forms so they overlap. + + ``Cascade()`` works only if the form is an *MDI* parent form (that is, if the form's ``FormStyle`` property is ``fsMDIForm``). + ''' + def Next(self) -> None: + ''' + Activates the next child form in the form sequence. + + Use ``Next()`` to change the active child form of an *MDI* parent. For example, if you have three child forms within a parent form and ``Form2`` is the active form, the Next method makes ``Form3`` the active form. Calling Next again makes ``Form4`` active. The next time your application calls ``Next()``, the sequence starts over again and ``Form2`` becomes the active form once again. + + The ``Next()`` method applies only to forms that are *MDI* parent forms (have a ``FormStyle`` property value of ``fsMDIForm``). + ''' + def Previous(self) -> None: + ''' + Activates the previous *MDI Child* form in the form sequence. + + Use ``Previous()`` to change the active child form of an *MDI* parent. For example, if you have three child forms within a parent form and ``Form4`` is the active form, the ``Previous()`` method makes ``Form3`` the active form. Calling ``Previous()`` again makes ``Form2`` active. The next time your application calls ``Previous()``, the sequence starts over again and ``Form4`` becomes the active form once again. + + The ``Previous()`` method applies only to forms that are *MDI* parent forms (have a ``FormStyle`` property value of ``fsMDIForm``). + ''' + def Tile(self) -> None: + ''' + Arranges *MDI Child* forms so that they are all the same size. + + Use ``Tile()`` to arrange *MDI Child* forms so that they are all the same size. Tiled forms completely fill up the client area of the parent form. How the forms arrange themselves depends upon the values of their ``TileMode`` properties. + + Tile works only if the form is an *MDI* parent form (that is, if the form's ``FormStyle`` property is ``fsMDIForm``). + ''' + + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if **C2** should be presented before **C1**, and false otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +====================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ TControl_Anchors | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ | | + | does nothing. | | + +--------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + Adjusts the resize constraints. + + Use `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ to adjust a control's constraints when an attempt is made to resize it. Upon entry to the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ handler is called immediately after the ``OnCanResize`` handler. + + `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Applications`` key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the ``AutoPopup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseWheelUp(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the mouse wheel is rotated upward. + + Write code in the `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ event handler to perform actions when the mouse wheel is rotated upward. ``OnMouseWheelUp`` occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelUp`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnMouseWheel(self, Sender: Object, Shift: ShiftState, WheelDelta: int, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the mouse wheel is rotated. + + Write code in the `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event handler to respond to mouse wheel messages. If there is no `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event handler, or if the mouse wheel message is not handled in the `OnMouseWheel <Vcl.Controls.TControl.OnMouseWheel.htm>`__ event handler, then an `OnMouseWheelUp <Vcl.Controls.TControl.OnMouseWheelUp.htm>`__ or `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event occurs, depending on the direction the mouse wheel was rotated. + + ``OnMouseWheel`` is an event handler of type `Vcl.Controls.TMouseWheelEvent <Vcl.Controls.TMouseWheelEvent.htm>`__. + ''' + def OnMouseWheelDown(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the mouse wheel is rotated downward. + + Write code in the `OnMouseWheelDown <Vcl.Controls.TControl.OnMouseWheelDown.htm>`__ event handler to perform actions when the mouse wheel is rotated downward. OnMouseWheelDown occurs only if the message is not already handled in an OnMouseWheel event handler. + + ``OnMouseWheelDown`` is an event handler of type `Vcl.Controls.TMouseWheelUpDownEvent <Vcl.Controls.TMouseWheelUpDownEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to Win32 applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + def OnActivate(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` becomes active. + + Use `OnActivate <Vcl.Forms.TCustomForm.OnActivate.htm>`__ to perform special processing when the ``Form`` receives focus. A form becomes active when focus is transferred to it (when the user clicks on the ``Form``, for example). + + .. note:: The `OnActivate <Vcl.Forms.TCustomForm.OnActivate.htm>`__ event of the application (``TApplication``), not the ``Form``, occurs when Windows switches control from another application. + ''' + def OnAfterMonitorDpiChanged(self, Sender: Object, OldDPI: int, NewDPI: int) -> None: + ''' + No have docs. + ''' + def OnBeforeMonitorDpiChanged(self, Sender: Object, OldDPI: int, NewDPI: int) -> None: + ''' + No have docs. + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new ``Width`` and ``Height`` of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnClose(self, Sender: Object, Action: CloseAction) -> None: + ''' + Occurs when the ``Form`` closes. + + Use `OnClose <Vcl.Forms.TCustomForm.OnClose.htm>`__ to perform special processing when the ``Form`` closes. The `OnClose <Vcl.Forms.TCustomForm.OnClose.htm>`__ event specifies which event handler to call when a form is about to close. The handler specified by `OnClose <Vcl.Forms.TCustomForm.OnClose.htm>`__ might, for example, test to make sure all fields in a data-entry form have valid contents before allowing the ``Form`` to close. + + A form is closed by the ``Close()`` method or when the user chooses ``Close()`` from the ``Form``\ s. system menu. + + The `CloseEvent <Vcl.Forms.TCloseEvent.htm>`__ type points to a method that handles the closing of a form. The value of the ``Action`` parameter determines if the ``Form`` actually closes. These are the possible values of Action: + + =============== ================================================================================================== + **Value** **Meaning** + =============== ================================================================================================== + ``caNone`` the ``Form`` is not allowed to close, so nothing happens. + ``caHide`` the ``Form`` is not closed, but just hidden. Your application can still access a hidden form. + ``caFree`` the ``Form`` is closed and all allocated memory for the ``Form`` is freed. + ``caMinimize`` the ``Form`` is minimized, rather than closed. This is the default action for *MDI* child forms. + =============== ================================================================================================== + + If a form is an *MDI Child* form, and its ``BorderIcons`` property is ``biMinimize``, then the default ``Action`` is ``caMinimize``. If a *MDI Child* form does not have these settings, the default ``Action`` is ``caNone``, meaning that nothing happens when the user attempts to close the ``Form``. + + If a form is an *SDI* child form, ``Action`` defaults to ``caHide``. To close the ``Form`` and free it in an `OnClose <Vcl.Forms.TCustomForm.OnClose.htm>`__ event, set ``Action`` to ``caFree``. + + .. note:: When the application shuts down, the main form receives an `OnClose <Vcl.Forms.TCustomForm.OnClose.htm>`__ event, but any child forms do not receive the `OnClose <Vcl.Forms.TCustomForm.OnClose.htm>`__ event. + ''' + def OnCloseQuery(self, Sender: Object, CanClose: bool) -> None: + ''' + Occurs when close is attempted. + + Use `OnCloseQuery <Vcl.Forms.TCustomForm.OnCloseQuery.htm>`__ to specify the conditions under which the ``Form`` can close. An `OnCloseQuery <Vcl.Forms.TCustomForm.OnCloseQuery.htm>`__ event handler returns a ``Boolean`` CanClose value that determines whether a form is allowed to close. Its default ``Value`` is ``True``. + + You can use an `OnCloseQuery <Vcl.Forms.TCustomForm.OnCloseQuery.htm>`__ event handler to ask users if they are sure they really want the ``Form`` closed immediately. For example, you can use the handler to display a ``MessageBox()`` that prompts the user to save a file before closing the ``Form``. + + The `CloseQueryEvent <Vcl.Forms.TCloseQueryEvent.htm>`__ type points to the method that determines whether a form can be closed. The value of the ``CanClose`` parameter determines if the ``Form`` can close or not. + ''' + def OnCreate(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` is created. + + Use `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ to perform special processing when the ``Form`` is created and is invoked by `CustomForm <Vcl.Forms.TCustomForm.htm>`__'s constructor. Either implement this event or override the constructor of the ``Form``; do not do both. Any objects created in the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event should be freed by the ``OnDestroy`` event. + + When a form is being created and its ``Visible`` property is ``True``, the following events occur in the order listed: + + #. `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ + #. ``OnShow`` + #. ``OnActivate`` + #. ``OnPaint`` + + .. note:: Use of the `OnCreate <Vcl.Forms.TCustomForm.OnCreate.htm>`__ event is discouraged in C++ code because it can interact badly with the ``Form``\ s. constructor (see ``OldCreateOrder``). It is recommended that you override the ``Form`` constructor instead. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDestroy(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` is destroyed. + + Use `OnDestroy <Vcl.Forms.TCustomForm.OnDestroy.htm>`__ to perform special processing when the ``Form`` is destroyed. Either implement this event or override the destructor of the class, but not both. This event should destroy any objects created in the ``OnCreate`` event. + ''' + def OnDeactivate(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` loses focus. + + Use `OnDeactivate <Vcl.Forms.TCustomForm.OnDeactivate.htm>`__ to perform special processing when the active form becomes inactive and another form in the same application becomes the active one. If activation goes to another application, this event is not triggered. To determine whether another application has become active, use the `Application <Vcl.Forms.TApplication.htm>`__ object's `OnDeactivate <Vcl.Forms.TCustomForm.OnDeactivate.htm>`__ event. + + .. note:: `OnDeactivate <Vcl.Forms.TCustomForm.OnDeactivate.htm>`__ is called differently than described, when the ``Form``\ s. parent is set to another component (for example, a panel). + ''' + def OnDragDrop(self, Sender, Source: Object, X: int, Y: int) -> None: + ''' + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnHide(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` is hidden (that is, when its ``Visible`` property is set to ``False``). + + Use `OnHide <Vcl.Forms.TCustomForm.OnHide.htm>`__ to perform special processing when the ``Form`` is hidden (that is, when the ``Form``\ s. ``Visible`` property is set to ``False``). + ''' + def OnHelp(self, Command: int, Data: int, CallHelp: bool) -> bool: + ''' + Occurs when the ``Form`` receives a request for *Help*. + + Write an `OnHelp <Vcl.Forms.TCustomForm.OnHelp.htm>`__ event handler to perform special processing when the user requests *Help*. The `HelpContext <Vcl.Forms.TApplication.HelpContext.htm>`__ and `HelpJump <Vcl.Forms.TApplication.HelpJump.htm>`__ methods automatically trigger the `OnHelp <Vcl.Forms.TCustomForm.OnHelp.htm>`__ event. + + The `HelpEvent <Vcl.Forms.THelpEvent.htm>`__ type has the following parameters: ``CallHelp``, ``Command``, and ``Data``. + + Set ``CallHelp`` to ``True`` if the application should still invoke the ``Help`` system after the event. Set ``CallHelp`` to ``False`` to prevent the default response given by the ``Help`` system. All application ``Help()`` methods go through `OnHelp <Vcl.Forms.TCustomForm.OnHelp.htm>`__. The application calls the ``Help`` system only if `OnHelp <Vcl.Forms.TCustomForm.OnHelp.htm>`__'s ``CallHelp`` parameter is ``True`` or if no `OnHelp <Vcl.Forms.TCustomForm.OnHelp.htm>`__ event handler is assigned. + + The event handler returns ``True`` if it succeeds, ``False`` if it fails. + + The possible values for the ``Data`` parameter depend upon the value of the ``Command`` parameter. To find the possible values of the ``Command`` and ``Data`` parameters, see the appropriate ``HTMLHelp`` topics in the *MSDN Library*. + + In order for the ``OnHelp`` event handler to work properly, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. The `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ unit provides a Delphi interface to the *HTMLHelp Windows* native ``Help`` handling function. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnPaint(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` is redrawn. + + Use `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ to perform special processing when the ``Form`` is redrawn. Any special painting on the ``Form`` should be done in this event. `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ occurs before any controls on the ``Form`` are painted. To determine which portions of the ``Form``\ s. ``Canvas`` need to be repainted, use the ``ClipRect`` property of the ``Canvas``. + + If you use the ``Form``\ s. ``Canvas`` property outside the `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ event, it will be erased and drawn-over by the next `OnPaint <Vcl.Forms.TCustomForm.OnPaint.htm>`__ event. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnShortCut(self, Msg: WMKey, Handled: bool) -> None: + ''' + Occurs when the user presses a key (before the ``OnKeyDown`` event). + + Use `OnShortCut <Vcl.Forms.TCustomForm.OnShortCut.htm>`__ to dispatch shortcut keystrokes before the ``Form`` handles them. When the user presses a key, the ``Form`` can dispatch it as a shortcut key instead of allowing the standard keystroke processing (``OnKeyDown``, ``OnKeyPress``, and ``OnKeyUp``). Built-in shortcut processing is provided for menu shortcuts and actions associated with the ``Form``. `OnShortCut <Vcl.Forms.TCustomForm.OnShortCut.htm>`__ allows the ``Form`` to implement additional shortcuts. + + If the `OnShortCut <Vcl.Forms.TCustomForm.OnShortCut.htm>`__ implements a response to the keystroke, set the ``Handled`` parameter of the event handler to ``True``. This prevents the keystroke from being passed on to menus or actions associated with the ``Form``. It also prevents the standard keystroke processing in the same way that a menu or action shortcut does. + ''' + def OnShow(self, Sender: Object) -> None: + ''' + Occurs when the ``Form`` is shown (that is, when its ``Visible`` property is set to ``True``). + + Use `OnShow <Vcl.Forms.TCustomForm.OnShow.htm>`__ to perform special processing when the ``Form`` is shown (that is, when the ``Form``\ s. ``Visible`` property is set to ``True``). + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Graphic(InterfacedPersistent, IStreamPersist): + ''' + ===================== + Vcl.Graphics.TGraphic + ===================== + + ``Graphic`` is the abstract base class type for objects such as icons, bitmaps, and metafiles that can store and display visual images. + + ``Graphic`` is an abstract class that cannot be instantiated. Descendant graphics objects override many of the methods of ``Graphic`` to address the needs of their particular file format and graphical characteristics. ``Graphic`` also introduces methods that work with ``Picture`` objects and the ``Clipboard``. Properties of ``Graphic`` provide information about the state and size of the graphic image. + + When the type of graphic is known, store the graphic in its specific type object. Otherwise, use a ``Picture`` object that can hold any type of ``Graphic``. + ''' + + __hash__: ClassVar[None] = ... + Empty: bool + ''' + Indicates whether the graphics object contains a graphic. + + Use ``Empty`` to determine whether the graphic is bound to an image. Each descendant graphic object defines its own Get method to access the ``Empty`` property. + ''' + Height: int + ''' + Specifies the vertical size of the graphic in pixels. + + Use ``Height`` to determine the height of the graphic image. Each descendant graphic object defines its own Get and Set methods to access the ``Height`` property. + ''' + Modified: bool + ''' + Indicates whether the graphics object has been changed or edited. + + If ``Modified`` is ``True``, the graphic object has changed. If ``Modified`` is ``False``, the graphics object is in the same state as when the object was loaded. + + The ``Modified`` property indicates only if ``Bitmap`` objects have been modified. ``Modified`` is not ``True`` if the graphics object contains an icon or metafile graphic, even if they have been modified. + + If the graphics object was modified, save the changes to a file with the ``SaveToFile()`` method. The next time the application runs, it can load the graphic from the file with the ``LoadFromFile()`` method. + ''' + Palette: HPALETTE + ''' + Indicates the color palette of the graphical image. + + Use ``Palette`` to get the color palette of a graphical image. If the graphic does not need or does not use a palette, the ``Palette`` property is zero. + ''' + PaletteModified: bool + ''' + Indicates whether the palette has changed. + + Use ``PaletteModified`` to determine if the palette used for a graphical image has changed. ``PaletteModified`` is used in the `OnChange <Vcl.Graphics.TGraphic.OnChange.htm>`__ event. ``PaletteModified`` remains ``True`` until whoever is responsible for realizing this new palette (for example, ``Image``) sets it to ``False``. + ''' + Transparent: bool + ''' + Indicates whether the image covers its rectangular area. + + Use ``Transparent`` to specify that the graphic be drawn transparently. Some descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ such as ``Icon`` and ``Metafile`` are always transparent, so setting the property for those objects does not change their behavior. However, the ``Bitmap`` graphic's drawing is affected by this property. The ``Image`` component sets this property to be the same as its ``Transparent`` property to achieve transparent painting. + + When the ``Transparent`` property is set to ``True``, you can either specify a color as the transparent color or you can use the default color, which is the pixel in the lower left. The specified color is not displayed in the graphic, which lets the background show through. This can be useful in layering and for non-rectangular graphics. + ''' + Width: int + ''' + Determines the maximum width of the graphics object in pixels. + + Each descendant graphic object defines its own Get and Set methods to access the ``Width`` property. + ''' + ScaledDrawer: ScaledGraphicDrawer + ''' + No have docs. + ''' + SupportsPartialTransparency: bool + ''' + Indicate whether graphic supports partial transparency or an alpha channel. + + ``SupportsPartialTransparency`` indicates whether the graphic supports partial transparency or an alpha channel. + + Some `Graphic <Vcl.Graphics.TGraphic.htm>`__ descendants, such as `Bitmap <Vcl.Graphics.TBitmap.htm>`__ and PngImage <Vcl.Imaging.pngimage.TPngImage.htm>`__, can support partial transparency or an alpha channel. When a graphic that supports partial transparency is drawn on a ``Canvas`` using `DrawTransparent <Vcl.Graphics.TGraphic.DrawTransparent.htm>`__, it should be blended with the pixels on the ``Canvas`` based on the value of the alpha channel. + ''' + def Changed(self, Sender: Object) -> None: + ''' + ``Graphic`` is the abstract base class type for objects such as icons, bitmaps, and metafiles that can store and display visual images. + + ``Graphic`` is an abstract class that cannot be instantiated. Descendant graphics objects override many of the methods of ``Graphic`` to address the needs of their particular file format and graphical characteristics. ``Graphic`` also introduces methods that work with ``Picture`` objects and the ``Clipboard``. Properties of ``Graphic`` provide information about the state and size of the graphic image. + + When the type of graphic is known, store the graphic in its specific type object. Otherwise, use a ``Picture`` object that can hold any type of ``Graphic``. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Set virtual property for reading and writing graphic data *Stream*. + + ``DefineProperties()`` overrides `Persistent <System.Classes.TPersistent.htm>`__. `DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__ for the `ReadData <Vcl.Graphics.TGraphic.ReadData.htm>`__ and `WriteData <Vcl.Graphics.TGraphic.WriteData.htm>`__ methods for reading and writing graphic data from and to a `Stream <System.Classes.TStream.htm>`__ object. It creates a virtual property ``Data`` that can be treated as a property to read or write graphic data to the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object. + ''' + def Draw(self, ACanvas: Canvas, Rect: Rect) -> None: + ''' + Render graphic onto ``Canvas`` at rectangle. + + `Canvas <Vcl.Graphics.TCanvas.htm>`__. `Draw <Vcl.Graphics.TCanvas.Draw.htm>`__ calls this function to render the graphic onto its ``Canvas`` at the coordinates specified by the ``Rect`` parameter. Descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ should override this function with a specific rendering implementation. + ''' + def DrawTransparent(self, ACanvas: Canvas, Rect: Rect, Opacity: Byte) -> None: + ''' + Render graphic onto ``Canvas`` at rectangle, blending with ``Canvas``\ s. background. + + ``DrawTransparent()`` renders the graphic onto a ``Canvas`` at the coordinates specified by the ``Rect`` parameter, blending it with the ``Canvas``\ s. background. + ''' + @overload + def Equals(self, Graphic: Graphic) -> bool: + ''' + Compare graphic to another `Graphic <Vcl.Graphics.TGraphic.htm>`__ object and return ``True`` if objects contain same graphic. + + ``Equals()`` compares the contents of two `Graphic <Vcl.Graphics.TGraphic.htm>`__ objects. ``Equals()`` returns ``False`` if the `Graphic <Vcl.Graphics.TGraphic.htm>`__ are different classes or if they contain different graphical data. + ''' + @overload + def Equals(self, Obj: Object) -> bool: ... + def GetEmpty(self) -> bool: + ''' + Indicates whether graphics object contains graphic. + + ``GetEmpty()`` indicates whether the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object contains a graphic. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class should override the ``GetEmpty()`` method to indicate whether a given `Graphic <Vcl.Graphics.TGraphic.htm>`__ object is bound to an image. + ''' + def GetHeight(self) -> int: + ''' + Get vertical size of graphic in pixels. + + ``GetHeight()`` gets the vertical size of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object in pixels. + + Each descendant of `Graphic <Vcl.Graphics.TGraphic.htm>`__ defines its own ``GetHeight()`` and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def GetPalette(self) -> HPALETE: + ''' + Get color palette of graphical image. + + ``GetPalette()`` gets the color palette of the graphical image. You can also use the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property to get the color palette of a graphical image. If the graphic does not need or use a palette, the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property is zero. + ''' + def GetTransparent(self) -> bool: + ''' + Specifies if graphic is drawn transparently. + + ``GetTransparent()`` specifies whether a graphic should be drawn transparently. + + Use the `Transparent <Vcl.Graphics.TGraphic.Transparent.htm>`__ property to specify that the graphic be drawn transparently. + ''' + def GetWidth(self) -> int: + ''' + Get horizontal size of graphic in pixels. + + ``GetWidth()`` gets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own ``GetWidth()`` and `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def Progress(self, Sender: Object, Stage: ProgressStage, PercentDone: Byte, RedrawNow: bool, R: Rect, Msg: str) -> None: + ''' + Generate `OnProgress <Vcl.Graphics.TGraphic.OnProgress.htm>`__ event when graphic is changing. + + ``Progress()`` generates an `OnProgress <Vcl.Graphics.TGraphic.OnProgress.htm>`__ event when the graphic is in the process of changing. + + For certain descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__, `OnProgress <Vcl.Graphics.TGraphic.OnProgress.htm>`__ occurs during slow processes such as loading, storing, or transforming image data. `OnProgress <Vcl.Graphics.TGraphic.OnProgress.htm>`__ allows applications to provide feedback to the user about the progress of the process. + + Component writers can generate `OnProgress <Vcl.Graphics.TGraphic.OnProgress.htm>`__ events for new descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ by calling the protected ``Progress()`` method. These events are propagated to the `Picture <Vcl.Graphics.TPicture.htm>`__ and `Image <Vcl.ExtCtrls.TImage.htm>`__ objects. + ''' + def ReadData(self, Stream: Stream) -> None: + ''' + Read graphic data from `Stream <System.Classes.TStream.htm>`__. + + ``ReadData()`` is used to read the binary graphic from the virtual property ``Data`` (created by `DefineProperties <Vcl.Graphics.TGraphic.DefineProperties.htm>`__) when streaming in a `Graphic <Vcl.Graphics.TGraphic.htm>`__ from the `Stream <System.Classes.TStream.htm>`__ ``Stream``. + ''' + def SetHeight(self, Value: int) -> None: + ''' + Set vertical size of graphic in pixels. + + ``SetHeight()`` sets the vertical size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and ``SetHeight()`` methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def SetPalette(self, Value: HPALETE) -> None: + ''' + Set color palette of graphical image. + + ``SetPalette()`` sets the color palette of the graphical image. + + Use the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property to get the color palette of a graphical image. If the graphic does not need or does not use a palette, the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property is zero. + ''' + def SetTransparent(self, Value: bool) -> None: + ''' + Specify if graphic should be drawn transparently. + + ``SetTransparent()`` specifies if a graphic should be drawn transparently. + ''' + def SetWidth(self, Value: int) -> None: + ''' + Set horizontal size of graphic in pixels. + + ``SetWidth()`` sets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ and ``SetWidth()`` methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def WriteData(self, Stream: Stream) -> None: + ''' + Write graphic data to `Stream <System.Classes.TStream.htm>`__. + + ``WriteData()`` is used to write the binary graphic to the virtual property ``Data`` (created by `DefineProperties <Vcl.Graphics.TGraphic.DefineProperties.htm>`__) when streaming a `Graphic <Vcl.Graphics.TGraphic.htm>`__ out to the `Stream <System.Classes.TStream.htm>`__ ``Stream``. + ''' + def GetSupportsPartialTransparency(self) -> bool: + ''' + Indicate whether graphic supports partial transparency. + + ``GetSupportsPartialTransparency()`` indicates whether the graphic supports partial transparency. + + `Graphic <Vcl.Graphics.TGraphic.htm>`__ descendants should override ``GetSupportsPartialTransparency()`` if they are capable of having partially transparent pixels. + ''' + def Create(self) -> None: + ''' + Create `Graphic <Vcl.Graphics.TGraphic.htm>`__ object. + + This method creates and intializes a `Graphic <Vcl.Graphics.TGraphic.htm>`__ object. + ''' + def Destroy(self) -> None: + ''' + Destroys the `Persistent <System.Classes.TPersistent.htm>`__ instance and frees its memory. + + Destroys the `Persistent <System.Classes.TPersistent.htm>`__ instance and frees its memory. + + Do not call `Destroy <System.Classes.TPersistent.Destroy.htm>`__ directly. Call `Free <System.TObject.Free.htm>`__ instead. `Free <System.TObject.Free.htm>`__ checks that the object reference is not ``nil`` before calling `Destroy <System.Classes.TPersistent.Destroy.htm>`__. + ''' + def LoadFromFile(self, Filename: str) -> None: + ''' + Loads a graphic image stored in a file. + + ``LoadFromFile()`` reads the file specified in ``FileName`` and loads the data into the graphics object. + ''' + def SaveToFile(self, Filename: str) -> None: + ''' + Saves a graphics image to a file. + + ``SaveToFile()`` writes the graphic to a file, specified by Filename. + ''' + def CanLoadFromStream(self, Stream: Stream) -> bool: + ''' + No have docs. + ''' + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Introduces an abstract method that loads the image from a *Stream*. + + Each descendant graphic object defines a ``LoadFromStream()`` method that loads a graphics object from Stream. + ''' + def SaveToStream(self, Stream: Stream) -> None: + ''' + Introduces an abstract method that saves the graphic image to a *Stream*. + + Each descendant graphic object defines a ``SaveToStream()`` method that saves the object to a ``Stream``. + ''' + def LoadFromClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETE) -> None: + ''' + Introduces an abstract method that loads the image from a variable in ``Clipboard`` format. + + Each descendant graphic object defines a ``LoadFromClipboardFormat()`` method that replaces the current graphic image with the graphic indicated by ``AData``, which it loads from the ``Clipboard``. + + the format for the new graphic object must be registered with the ``Clipboard`` in the `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method, or an exception is raised. + ''' + def SaveToClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETE) -> None: + ''' + Introduces an abstract method that assigns the graphic to a variable in clipboard format. + + Each descendant graphic object defines a ``SaveToClipboardFormat()`` method that saves that particular graphic image type to a ``Clipboard`` format. An application must have registered the format with the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object using the `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method. + ''' + def SetSize(self, AWidth: int, AHeight: int) -> None: + ''' + Specifies the size of the graphic. + + Use the ``SetSize()`` method to set both the height and width of the graphic. This results in better performance than setting the height and width separately. + ''' + def EnableScaledDrawer(self, AGraphicScalerClass: ScaledGraphicDrawerClass, AInitialize: bool) -> None: + ''' + No have docs. + ''' + def DisableScaledDrawer(self) -> None: + ''' + No have docs. + ''' + def UpdateScaledDrawer(self) -> None: + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs whenever a graphical image changes. + + Use ``OnChange`` to write a handler to perform an action then the graphical image changes. + ''' + def OnProgress(self, Sender: Object, Stage: ProgressStage, PercentDone: Byte, RedrawNow: bool, R: Rect, Msg: str) -> None: + ''' + # OnProgress: ProgressEvent + Occurs when a graphical image is in the process of changing. + + For certain descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__, ``OnProgress`` occurs during slow processes such as loading, storing, or transforming image data. ``OnProgress`` allows applications to provide feedback to the user about the progress of the slow process. + + Component writers can generate ``OnProgress`` events for new descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ by calling the protected Progress method. These events are propagated to the ``Picture`` and ``Image`` objects. + + ``OnProgress`` is an event handler of type `Vcl.Graphics.TProgressEvent <Vcl.Graphics.TProgressEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class GroupBox(CustomGroupBox): + ''' + ====================== + Vcl.StdCtrls.TGroupBox + ====================== + + ``GroupBox`` represents a *Windows* ``GroupBox``. + + The ``GroupBox`` component represents a standard *Windows* ``GroupBox``, used to group related controls on a form. When another control component is placed within a ``GroupBox``, the ``GroupBox`` becomes the parent of that component. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the ``Caption``, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.StdCtrls.TGroupBox.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and ``False`` otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +==================================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class HandleStream(Stream): + '''THandleStream enables applications to read from and write to communications resources identified by a handle. + Use THandleStream to access files, sockets, named pipes, mailslots, or other communications resources that provide a handle when opened. For example, the FileOpen function provides a handle for a file on disk. THandleStream allows applications to use a uniform stream interface when performing I/O using a handle. + To avoid the overhead of managing file handles, use TFileStream to work with disk files.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + Handle: int + '''int: Specifies the handle for the communications resource the stream reads from and writes to. + Read Handle to get the handle for file management functions. To read from or write to the resource, use the methods of the THandleStream object. + Handle is a read-only property. The handle property cannot be changed to allow the handle stream to switch from reading to writing or vice versa. For example, to change from a file handle that is opened in read-only mode to one that is opened in write mode: + + Free the stream object. + Call FileClose to close the file. + Reopen the file in write mode and use the handle to create a new instance of a handle stream. Alternately, open a TFileStream object for the file, specifying a write mode for the stream. + Note: Do not call the FileClose function on the Handle until after the THandleStream object has been destroyed.''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Create(self, AHandle: int) -> None: + '''THandleStream.Create(AHandle: int) -> None + Creates an instance of THandleStream. + Call Create to instantiate a THandleStream for a given handle. + The handle must be obtained by opening or creating the resource in the appropriate mode. For example, to create a handle stream for reading from a file, obtain the file handle by opening the file with an fmOpenRead or fmOpenReadWrite mode. To create a handle stream for writing to a file, obtain the file handle by opening the file with an fmOpenWrite or fmOpenReadWrite mode.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def Read(self, Buffer, Count: int) -> int: + '''THandleStream.Read(Buffer, Count: int) -> int + Reads up to Count bytes of data from the resource associated with the handle stream into Buffer. + Use Read to read data from the resource associated with the handle stream when the number of bytes in the file is not known. Read transfers up to Count bytes from the resource, starting at the current position, and then advances the current position in the resource by the number of bytes actually transferred. Read returns the number of bytes actually transferred, which may be less than Count if the end of file marker is encountered. + All other data-reading methods of a handle stream (ReadBuffer, ReadComponent) call Read to do the actual reading.''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def Seek(self, Offset: int, Origin: SeekOrigin) -> int: + '''THandleStream.Seek(Offset: int, Origin: SeekOrigin) -> int + Resets the current position of the handle stream. + Use Seek to move the current position within the resource associated with the handle stream by the indicated offset. Seek allows an application to read from or write to a particular location within the resource. + The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values: + + + + Value + + Meaning + + + + soFromBeginning + + + + Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0. + + + + + soFromCurrent + + + + Offset is from the current position in the resource. Seek moves to Position + Offset. + + + + + soFromEnd + + + + Offset is from the end of the resource. Offset must be <= 0 to indicate a number of bytes before the end of the file. + + + Or you can also use TSeekOrigin and its values to indicate where to start a seek operation. + Seek returns the new value of the Position property, the new current position in the resource.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def Write(self, Buffer, Count: int) -> int: + '''THandleStream.Write(Buffer, Count: int) -> int + Writes Count bytes from the Buffer to the current position in the resource. + Use Write to write Count bytes to the resource associated with the handle stream, starting at the current position. After writing to the resource, Write advances the current position by the number bytes written, and returns the number of bytes written. + All other data-writing methods of a handle stream (WriteBuffer, WriteComponent) call Write to do the actual writing.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Header(CustomControl): + ''' + ==================== + Vcl.ExtCtrls.THeader + ==================== + + ``Header`` is a sectioned visual control that displays text and allows each section to be resized with the mouse. + + ``Header`` is provided for backward compatibility. New applications should use ``HeaderControl`` instead. + ''' + + __hash__: ClassVar[None] = ... + SectionWidth: list[int] + ''' + Determines the width, in pixels, of the sections of a header. + + Use ``SectionWidth`` to specify the width of each header section. ``'X'`` is an index into the sections, from 0 to the number of sections - 1. For example, the index of the first section is 0, the second section is 1, and so on. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AllowResize: bool + ''' + Determines if the user can modify the size of the header at runtime with the mouse. + + If ``AllowResize`` is ``False``, the sections within a header can't be resized. If ``AllowResize`` is ``True``, clicking a border of a header section and dragging it left or right changes the width of the section. The default ``Value`` is ``True``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the header control has a border. + + These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + Sections: Strings + ''' + Lists the strings that contain the text for the sections of a header. + + The number of lines of the ``StringList`` determines the number of sections of the header. If the ``StringList`` is empty, the header has one blank section. If this ``StringList`` contains one or more lines, the text of each line is in its own section. The first line is in the leftmost section, the second line is in the next section to the right, and so on. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def Paint(self) -> None: + ''' + Responds to a mouse click. + + The `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method for `CustomControl <Vcl.Controls.TCustomControl.htm>`__ does nothing other than provide the interface for a method that responds to ``WM_PAINT`` messages. `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called by the `PaintWindow <Vcl.Controls.TCustomControl.PaintWindow.htm>`__ method, after that method has supplied the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ with the handle to a device context. When creating a custom control, always override `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ to draw the image of the control. + + .. tip:: To determine which portions of the control's ``Canvas`` need to be repainted when `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called, use the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property of the ``Canvas``. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event dispatcher. + + Override the protected `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ method to provide other responses in addition to calling the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler when the user presses the mouse button down while the cursor's hotspot is over the control. + + The ``Button`` parameter determines which mouse button the user pressed. ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) were down when the user pressed the mouse button. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + A control calls `MouseDown <Vcl.Controls.TControl.MouseDown.htm>`__ in response to any of the *Windows* mouse-down messages (``WM_LBUTTONDOWN``, ``WM_MBUTTONDOWN``, ``WM_RBUTTONDOWN``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was pressed down: left, right, or middle. + ''' + def MouseMove(self, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Responds to mouse moving over control area. + + Override the protected `MouseMove <Vcl.Controls.TControl.MouseMove.htm>`__ method to provide other responses in addition to calling the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler when the user moves the mouse. + + A control calls `MouseMove <Vcl.Controls.TControl.MouseMove.htm>`__ in response to any of the *Windows* mouse-move messages (WM_MOUSEMOVE), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. + + As the mouse cursor moves across a control, this method is called repeatedly. Each time it is called, it is with the new coordinates that reflect the continuous path of the mouse cursor across the *Screen* real estate covered by the control's visual representation. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Is an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event dispatcher. + + Override the protected `MouseUp <Vcl.Controls.TControl.MouseUp.htm>`__ method to provide other responses in addition to calling the `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler when the user releases a previously pressed mouse button while the cursor's hot spot is over the control. + + A control calls `MouseUp <Vcl.Controls.TControl.MouseUp.htm>`__ in response to any of the *Windows* mouse-up messages (``WM_LBUTTONUP``, ``WM_MBUTTONUP``, ``WM_RBUTTONUP``), decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively. The value of the ``Button`` parameter indicates which mouse button was released: left, right, or middle. + ''' + def Sizing(self, ASection: int, AWidth: int) -> None: + ''' + No have docs. + ''' + def Sized(self, ASection: int, AWidth: int) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` a new `Header <Vcl.ExtCtrls.THeader.htm>`__ object. + + Call ``Create()`` to instantiate a header at runtime. Headers added to forms at design time are created automatically. + + The ``AOwner`` parameter initializes the ``Owner()`` property of the header. + ''' + def Destroy(self) -> None: + ''' + Frees the memory associated with the `Header <Vcl.ExtCtrls.THeader.htm>`__ object. + + Do not call ``Destroy()`` directly. Instead, use the ``Free()`` method, which checks whether the `Header <Vcl.ExtCtrls.THeader.htm>`__ reference is ``nil`` before calling ``Destroy()``. + ''' + + def OnContextPopup(self, Sender: Header, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnGesture(self, Sender: Header, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnSized(self, Sender: Header, ASection: int, AWidth: int) -> None: + ''' + # OnSized: SectionEvent + Occurs after the header has been resized. + + Write an ``OnSized`` event handler to perform special processing after the header has been resized. In this event, the ``AWidth`` parameter is the width of the section before it was resized. Use the `SectionWidth <Vcl.ExtCtrls.THeader.SectionWidth.htm>`__ property to determine the new size of the section. + + ``OnSized`` is an event handler of type `Vcl.ExtCtrls.TSectionEvent <Vcl.ExtCtrls.TSectionEvent.htm>`__. + ''' + def OnSizing(self, Sender: Header, ASection: int, AWidth: int) -> None: + ''' + # OnSizing: SectionEvent + Occurs before the header is resized. + + Write an ``OnSizing`` event handler to perform special processing immediately before the header is resized. In this event, AWidth is the width that the section will have after it is resized. Use the `SectionWidth <Vcl.ExtCtrls.THeader.SectionWidth.htm>`__ property to determine the current size of the section. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Icon(Graphic): + ''' + ================== + Vcl.Graphics.TIcon + ================== + + ``Icon`` is an encapsulation of a *Windows* icon. + + Use ``Icon`` to represent one of the icons in an ``ImageList``. Assign an icon to objects that have an ``Icon`` property, such as ``Form`` or ``Picture``. + + ``Icon`` objects represent the value loaded from a *Windows* icon file (``.ico`` file). Draw an icon on a ``Canvas``, using the ``Draw()`` method of the ``Canvas`` object. Icons do not stretch, so do not use ``StretchDraw()`` (``TCanvas``) with an icon. + + .. note:: ``Icon`` can be used to display the value of a multi-resolution (>16 color) icon. However, it can not support the creation of multi-resolution icons, nor the resizing of the image after it is loaded from a file or stream. + ''' + + __hash__: ClassVar[None] = ... + Handle: HICON + ''' + Provides access to the *Windows GDI* icon handle. + + Use ``Handle`` to specify the icon when using a *Windows API* function that requires the handle of an icon object. The ``Handle`` property is ``nil`` (Delphi) or ``NULL`` (C++) if the icon has not been loaded. + + Call the `ReleaseHandle <Vcl.Graphics.TIcon.ReleaseHandle.htm>`__ method before changing the ``IconImage`` by setting the ``Handle`` property. The ``IconImage`` can also be loaded by assigning another icon object or using the `LoadFromClipboardFormat <Vcl.Graphics.TGraphic.LoadFromClipboardFormat.htm>`__, `LoadFromFile <Vcl.Graphics.TGraphic.LoadFromFile.htm>`__, or `LoadFromStream <Vcl.Graphics.TIcon.LoadFromStream.htm>`__ method. + ''' + + def Draw(self, ACanvas: Canvas, Rect: Rect) -> None: + ''' + Render graphic onto ``Canvas`` at rectangle. + + `Canvas <Vcl.Graphics.TCanvas.htm>`__. `Draw <Vcl.Graphics.TCanvas.Draw.htm>`__ calls this function to render the graphic onto its ``Canvas`` at the coordinates specified by the ``Rect`` parameter. Descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ should override this function with a specific rendering implementation. + ''' + def GetEmpty(self) -> bool: + ''' + Indicates whether graphics object contains graphic. + + `GetEmpty <Vcl.Graphics.TGraphic.GetEmpty.htm>`__ indicates whether the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object contains a graphic. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class should override the `GetEmpty <Vcl.Graphics.TGraphic.GetEmpty.htm>`__ method to indicate whether a given `Graphic <Vcl.Graphics.TGraphic.htm>`__ object is bound to an image. + ''' + def GetHeight(self) -> int: + ''' + Get vertical size of graphic in pixels. + + `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ gets the vertical size of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object in pixels. + + Each descendant of `Graphic <Vcl.Graphics.TGraphic.htm>`__ defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def GetWidth(self) -> int: + ''' + Get horizontal size of graphic in pixels. + + `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ gets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ and `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def SetHeight(self, Value: int) -> None: + ''' + Set vertical size of graphic in pixels. + + `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ sets the vertical size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def SetTransparent(self, Value: bool) -> None: + ''' + Specify if graphic should be drawn transparently. + + `SetTransparent <Vcl.Graphics.TGraphic.SetTransparent.htm>`__ specifies if a graphic should be drawn transparently. + ''' + def SetWidth(self, Value: int) -> None: + ''' + Set horizontal size of graphic in pixels. + + `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ sets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ and `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def Create(self) -> None: + ''' + ``Creates`` an instance of `Icon <Vcl.Graphics.TIcon.htm>`__. + + Call ``Create()`` to create an empty ``Icon`` object. Once an image has been read into the icon from a file or stream, or by assigning another ``Icon`` object, the icon can be drawn on a ``Canvas`` or added to an ``ImageList``. Do not create an ``Icon`` object for setting the ``Icon`` property of a form or picture. These objects create a `Icon <Vcl.Graphics.TIcon.htm>`__ object in their own constructors. Instead, use the ``LoadFromFile()``, ``LoadFromStream()``, or ``LoadFromClipboardFormat()`` method on the `Icon <Vcl.Graphics.TIcon.htm>`__ object that you can obtain by reading the ``Icon`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `Icon <Vcl.Graphics.TIcon.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `Icon <Vcl.Graphics.TIcon.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies an ``IconImage`` from another `Icon <Vcl.Graphics.TIcon.htm>`__ object. + + Call ``Assign()`` to copy another ``Icon`` object. ``Assign()`` copies the ``IconImage`` from the ``Source`` parameter if it is another `Icon <Vcl.Graphics.TIcon.htm>`__ object. Otherwise, ``Assign()`` calls the inherited method, which copies the ``IconImage`` from any source object that specifies how to copy to a `Icon <Vcl.Graphics.TIcon.htm>`__ in its `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies an ``IconImage`` to a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ graphical object. + + Call ``AssignTo()`` to copy an icon to a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. ``AssignTo()`` copies the ``IconImage`` to the ``Dest`` parameter if it is a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. Otherwise, ``AssignTo()`` fails. + + The preferred way to copy an ``IconImage`` to a bitmap is to use the `Assign <Vcl.Graphics.TBitmap.Assign.htm>`__ method of the `Bitmap <Vcl.Graphics.TBitmap.htm>`__ class, passing the ``Icon`` object as the ``Source`` parameter. + + .. note:: The bitmap resulted after a call to ``AssignTo()`` always has alpha channel (transparency) information and a 32-bit color depth. + ''' + def HandleAllocated(self) -> bool: + ''' + Indicates whether the `Icon <Vcl.Graphics.TIcon.htm>`__ object has acquired a handle to the underlying *GDI* object. + + Use ``HandleAllocated()`` to determine whether the `Handle <Vcl.Graphics.TIcon.Handle.htm>`__ property is set to an ``HICON`` value. ``HandleAllocated()`` indicates whether the underlying *GDI* object has already been created. Use ``HandleAllocated()`` rather than reading the `Handle <Vcl.Graphics.TIcon.Handle.htm>`__ property. When an application reads the `Handle <Vcl.Graphics.TIcon.Handle.htm>`__ property, it automatically creates an icon and returns its handle if the underlying *GDI* object does not already exist. + ''' + def LoadFromClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETTE) -> None: + ''' + Prevents applications from loading icons from the clipboard. + + ``LoadFromClipboardFormat()`` is overridden in `Icon <Vcl.Graphics.TIcon.htm>`__ because the clipboard format is not supported. + ''' + def CanLoadFromStream(self, Stream: Stream) -> bool: + ''' + No have docs. + ''' + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Loads the icon from a *Stream*. + + Use ``LoadFromStream()`` to read the ``IconImage`` from a *Stream*. Set the ``Stream`` parameter to a *Stream* object that provides access to the memory image of the icon. To load the icon from a ``.ico`` file, use the ``LoadFromFile()`` method. To load the icon from the ``Clipboard``, use the ``LoadFromClipboardFormat()`` method. + ''' + def ReleaseHandle(self) -> HICON: + ''' + Releases the *Windows* *GDI* object represented by the icon. + + Call ``ReleaseHandle()`` to release the resources used to represent the icon. ``ReleaseHandle()`` sets the `Handle <Vcl.Graphics.TIcon.Handle.htm>`__ property to ``nil`` (Delphi) or ``NULL`` (C++). + + ``ReleaseHandle()`` informs the `Icon <Vcl.Graphics.TIcon.htm>`__ instance that it is no longer responsible for destroying the icon handle. + ''' + def SaveToClipboardFormat(self, Format: int, Data: Handle, APalette: HPALETTE) -> None: + ''' + Prevents applications from saving icons to the clipboard. + + ``SaveToClipboardFormat()`` is overridden in `Icon <Vcl.Graphics.TIcon.htm>`__ because the format is not supported for the ``Clipboard``. + ''' + def SaveToStream(self, Stream: Stream) -> None: + ''' + Saves the icon to a *Stream*. + + Use ``SaveToStream()`` to write the ``IconImage`` to a *Stream*. Specify the ``Stream`` parameter as the stream object that receives the memory image of the icon. To write the icon to a ``.ico`` file, use the ``SaveToFile()`` method. To write the icon to the ``Clipboard``, use the ``SaveToClipboardFormat()`` method. + ''' + def SetSize(self, AWidth: int, AHeight: int) -> None: + ''' + Specifies the size of the icon. + + Use the ``SetSize()`` method to set both the height and width of the icon. This results in better performance than setting the height and width separately. + ''' + @overload + def LoadFromResourceName(self, ResName: str, BaseName: str, ResourceAssembly: Assembly, Culture: CultureInfo) -> None: + ''' + Loads an icon resource into the ``Icon`` object. + + ``LoadFromResourceName`` loads the specified icon resource from a module's executable file. + + ``Instance`` is the handle of the module that contains the resource. + + ``ResName`` is the name of the resource to load. + ''' + @overload + def LoadFromResourceName(self, ResName: str, BaseName: str, ResourceAssembly: Assembly, ResourceSet: Type, Culture: CultureInfo) -> None: ... + @overload + def LoadFromResourceName(self, ResName: str, AType: Type, Culture: CultureInfo) -> None: ... + @overload + def LoadFromResourceName(self, Instance: Handle, ResName: str) -> None: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Image(GraphicControl): + ''' + =================== + Vcl.ExtCtrls.TImage + =================== + + ``Image`` displays a graphical image. + + Use ``Image`` to display a graphical image on a ``Form``. Use the ``Picture`` object in the ``Picture`` property to specify the actual bitmap, con, ``MetaFile``, or other graphic object displayed by ``Image``. Properties and methods of ``Picture`` can be used for such things as loading an image from file, clearing the image in the ``Image``, and assigning an image for another control. ``Image`` introduces several properties to determine how the image is displayed within the boundaries of the ``Image`` object. To add an image to a form or data module so that it is available for display by other controls, such as ``ActionList``\ s and bitmap buttons, use a ``ImageList`` control instead. + + A ``Image`` may hold a *bitmap*, *icon*, *PNG*, *GIF* or *JPEG* image. A `ImageList <Vcl.Controls.TImageList.htm>`__ may hold any image type a ``Image`` holds. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Provides a drawing surface for embellishing bitmap images. + + ``Canvas`` is the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object on which the image for the `Image <Vcl.ExtCtrls.TImage.htm>`__ component is drawn. The painting of the image specified in the `Picture <Vcl.ExtCtrls.TImage.Picture.htm>`__ property is automatic and does not require manual intercession for the picture to appear. + + You can use properties and methods of `Canvas <Vcl.Graphics.TCanvas.htm>`__ to do such things as draw lines, draw images, and write text to the canvas of the `Image <Vcl.ExtCtrls.TImage.htm>`__ control. + + .. note:: ``Canvas`` is only available if the `Picture <Vcl.ExtCtrls.TImage.Picture.htm>`__ property represents a `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. Trying to read ``Canvas`` when ``Picture`` represents another type of graphic image causes `Image <Vcl.ExtCtrls.TImage.htm>`__ to raise an `EInvalidOperation <System.Classes.EInvalidOperation.htm>`__ exception. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the top, bottom, left, or right of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + Center: bool + ''' + Indicates whether the image is centered in the image control. + + When the image does not fit perfectly within the image control, use ``Center`` to specify how the image is positioned. When ``Center`` is ``True``, the image is centered in the control. When ``Center`` is ``False``, the upper left corner of the image is positioned at the upper left corner of the control. + + The default value for ``Center`` is ``False``. + + .. note:: ``Center`` has no effect if the ``AutoSize`` property is ``True`` or if the ``Stretch`` property is ``True`` and ``Picture`` does not specify an icon. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum width and height of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + IncrementalDisplay: bool + ''' + Specifies whether successive approximations of the image should be drawn during slow operations. + + Set ``IncrementalDisplay`` to ``True`` on large compressed images that take a long time to load or on images that may be altered by a computationally slow process. When ``IncrementalDisplay`` is ``True``, partial renderings of the image are drawn periodically during slow operations such as loading. Set ``IncrementalDisplay`` to ``False`` to wait until the entire operation is complete before drawing the image. + + For some classes of graphic objects, an ``OnProgress`` event occurs at various points during slow operations. If ``IncrementalDisplay`` is ``True``, the ``OnProgress`` event occurs immediately after the approximate image is drawn. If ``IncrementalDisplay`` is ``False``, ``OnProgress`` occurs but the image is not updated until the entire image has been loaded. + + The default value for ``IncrementalDisplay`` is ``False``. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + Picture: Picture + ''' + Specifies the image that appears on the image control. + + Use ``Picture`` to specify the image for the `Image <Vcl.ExtCtrls.TImage.htm>`__ component. ``Picture`` is a reference to a `Picture <Vcl.Graphics.TPicture.htm>`__ object. Use properties and methods of `Picture <Vcl.Graphics.TPicture.htm>`__ to specify a bitmap, icon, metafile, or user-defined graphic to be displayed by the image control. + + Setting ``Picture`` at design time brings up the `Picture Editor <Picture_editor.htm>`__, which can be used to specify the file that contains the image. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + Proportional: bool + ''' + Indicates whether the image should be changed, without distortion, so that it fits the bounds of the image control. + + Set ``Proportional`` to ``True`` to ensure that the image can be fully displayed in the image control without any distortion such as occurs with the `Stretch <Vcl.ExtCtrls.TImage.Stretch.htm>`__ property. When ``Proportional`` is ``True``, images that are too large to fit in the image control are scaled down (while maintaining the same aspect ratio) until they fit in the image control. ``Images`` that are too small are displayed normally. That is, ``Proportional`` can reduce the magnification of the image, but does not increase it. + + When the image control resizes, the image resizes also. To resize the image so that it fits exactly in the image control, even if that causes distortion, use the `Stretch <Vcl.ExtCtrls.TImage.Stretch.htm>`__ property instead. To resize the control to the image rather than resizing the image to the control, use the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property instead. + + The default value for ``Proportional`` is ``False``. + + .. note:: ``Proportional`` has no effect if the `Picture <Vcl.ExtCtrls.TImage.Picture.htm>`__ property contains an icon. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Stretch: bool + ''' + Indicates whether the image should be changed so that it exactly fits the bounds of the image control. + + Set ``Stretch`` to ``True`` to cause the image to assume the size and shape of the image control. When the image control resizes, the image resizes also. ``Stretch`` resizes the height and width of the image independently. Thus, unlike a simple change in magnification, ``Stretch`` can distort the image if the image control is not the same shape as the image. To resize the image without any distortion, use the ``Proportional`` property instead. To resize the control to the image rather than resizing the image to the control, use the ``AutoSize`` property instead. + + The default value for ``Stretch`` is ``False``. + + .. note:: ``Stretch`` has no effect if the ``Picture`` property contains an icon. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether the background of the image obscures objects below the image object. + + Set ``Transparent`` to ``True`` to allow objects behind the `Image <Vcl.ExtCtrls.TImage.htm>`__ object to show through the background of the image. Set ``Transparent`` to ``False`` to make the background of the image opaque. Setting ``Transparent`` sets the ``Transparent`` property of the Picture. + + .. note:: ``Transparent`` has no effect unless the ``Picture`` property specifies a TBitmap object. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `Image <Vcl.ExtCtrls.TImage.htm>`__. + + Call ``Create()`` to instantiate a `Image <Vcl.ExtCtrls.TImage.htm>`__ object at runtime. ``Images`` placed on forms at design time are created automatically. + + ``AOwner`` is the component that is responsible for freeing the `Image <Vcl.ExtCtrls.TImage.htm>`__ instance. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `Image <Vcl.ExtCtrls.TImage.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `Image <Vcl.ExtCtrls.TImage.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. + + As the control is destroyed, it frees the ``Picture`` object in the ``Picture`` property. + ''' + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Indicates whether the control can resize itself automatically to accommodate its contents. + + `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ is called automatically when the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True`` and an attempt is made to resize the control. It allows controls to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property before the resize sequence that begins with the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ and `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ events and ends with the `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event. + + When `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the control. `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ adjusts these values so that the control's size adjusts to its contents. If the adjustment results in values of ``NewWidth`` and ``NewHeight`` that differ from the control's current width and height, `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ returns ``True``, indicating that the resize sequence should proceed. If, after adjustment, ``NewWidth`` and ``NewHeight`` equal `Width <Vcl.Controls.TControl.Width.htm>`__ and `Height <Vcl.Controls.TControl.Height.htm>`__, `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ returns ``False``, and the resize sequence is aborted. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ always returns ``True`` without changing ``NewWidth`` or ``NewHeight``. Override `CanAutoSize <Vcl.Controls.TControl.CanAutoSize.htm>`__ to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property for a particular control class's contents. + ''' + def DestRect(self) -> Rect: + ''' + No have docs. + ''' + def DoPaletteChange(self) -> bool: + ''' + No have docs. + ''' + def GetPalette(self) -> HPALETTE: + ''' + Returns the handle to a palette for use by the control. + + As implemented in `Control <Vcl.Controls.TControl.htm>`__, `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ returns a null handle, indicating that the control does not have a palette. Override `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ to implement derived objects that use a palette. Create a palette handle for the control by a call to the *Windows API Function CreatePalette*. `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ should return the palette handle for the control. + + Specifying the palette for a control tells the application that the control's palette needs to be realized and designates the palette to use for realization. + + `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ is called only if the run-time video mode requires color palette support, for example, in 256-color mode. + ''' + def Paint(self) -> None: + ''' + Renders the control's surface. + + The `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method is called automatically when a lightweight control needs to update its display area. Code in the `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method uses the `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property to render the control surface. + + As implemented in `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__, `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ does nothing. Specific rendering logic is provided by `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ methods in descendent control classes. + ''' + def Progress(self, Sender: Object, Stage: ProgressStage, PercentDone: Byte, RedrawNow: bool, R: Rect, Msg: str) -> None: + ''' + No have docs. + ''' + def FindGraphicClass(self, Sender: Object, Context: FindGraphicClassContext, GraphicClass: GraphicClass) -> None: + ''' + No have docs. + ''' + def CMStyleChanged(self, Message: Message) -> None: + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses Alt+B. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnFindGraphicClass(self, Sender: Object, Context: FindGraphicClassContext, GraphicClass: GraphicClass) -> None: + ''' + No have docs. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how Windows processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnProgress(self, Sender: Object, Stage: ProgressStage, PercentDone: Byte, RedrawNow: bool, R: Rect, Msg: str) -> None: + ''' + # OnProgress: ProgressEvent + Occurs periodically during slow operations that affect the image. + + Write an ``OnProgress`` event handler to provide the user with feedback during slow operations such as loading large compressed images. + + .. note:: The ``PercentDone`` parameter of the event handler is only an approximation. With some image formats, the value of ``PercentDone`` may actually decrease from the value in previous events, as the graphic object discovers there is more work to do. + + ``OnProgress`` is an event handler of type `Vcl.Graphics.TProgressEvent <Vcl.Graphics.TProgressEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to Win32 applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying Windows control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ImageList(DragImageList): + '''Wrapper for Delphi TImageList''' + __hash__: ClassVar[None] = ... + AllocBy: int + '''int:''' + BkColor: int + '''int:''' + BlendColor: int + '''int:''' + ColorDepth: ColorDepth + '''ColorDepth:''' + ComponentCount: Any + '''Returns the owned component count''' + Components: Any + '''Returns an iterator over the owned components''' + DrawingStyle: DrawingStyle + '''DrawingStyle:''' + GrayscaleFactor: int + '''int:''' + Height: int + '''int:''' + ImageType: ImageType + '''ImageType:''' + Masked: bool + '''bool:''' + OnChange: Callable[[Object],None] + '''Callable[[Object], None]:''' + Owner: Any + '''Returns the Component Owner''' + ShareImages: bool + '''bool:''' + Width: int + '''int:''' + + def BindMethodsToEvents(self, prefix) -> Any: + '''TComponent.BindMethodsToEvents(prefix) + Connects methods to component events if they are named using the following pattern: Prefix_ComponentName_EventName. + Example: def handle_button1_OnClick(Sender): pass + The function returns a list of tuples. Each tuple contains the name of the component, the name of the event and the method object assigned to the event. + Note that the prefix parameter is optional and will default to "handle_".''' + def GetParentComponent(self) -> Any: + '''TComponent.GetParentComponent() + Returns the parent of a component.''' + def HasParent(self) -> Any: + '''TComponent.HasParent() + Indicates whether the component has a parent to handle its filing.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Label(CustomLabel): + ''' + =================== + Vcl.StdCtrls.TLabel + =================== + + ``Label`` is a nonwindowed control that displays text on a form. + + Use ``Label`` to add text that the user cannot edit on a form. This text can be used to label another control, and can set focus to that control when the user types an accelerator key. The `Caption <Vcl.StdCtrls.TLabel.Caption.htm>`__ property can be used `to define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to a ``Label`` control. + + Because ``Label`` is not a descendant of ``WinControl``, it does not have its own window and cannot receive direct input from the keyboard. To add an object to a form that can respond to keyboard input (other than setting focus to another object when an accelerator key is typed) in addition to displaying text, use `StaticText <Vcl.StdCtrls.TStaticText.htm>`__. To add an object to a form that displays text that a user can scroll or edit, use `Edit <Vcl.StdCtrls.TEdit.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Controls the horizontal placement of the text within the ``Label``. + + Set `Alignment <Vcl.StdCtrls.TCustomLabel.Alignment.htm>`__ to specify how the text of the ``Label`` is justified within the ``ClientRect`` of the ``Label`` control. + + The effect of the `Alignment <Vcl.StdCtrls.TCustomLabel.Alignment.htm>`__ property is more obvious if the `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ property is ``True`` and the ``Label`` includes more than one line of text. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Determines whether the size of the ``Label`` automatically resizes to accommodate the text. + + Use `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ to make the ``Label`` adjust its size automatically so the client area accommodates the height and width of the text. When `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is ``False``, the ``Label`` is fixed in size. When `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is ``True``, the size of the ``Label`` readjusts whenever the text changes. The size of the ``Label`` is also readjusts when the `Font <Vcl.Controls.TControl.Font.htm>`__ property changes. + + When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, the width of the ``Label`` is fixed. If `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is also ``True``, changes to the text cause the ``Label`` to change in height. When `AutoSize <Vcl.StdCtrls.TCustomLabel.AutoSize.htm>`__ is ``True`` and `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, the font determines the height of the ``Label``, and changes to the text cause the ``Label`` to change in width. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the ``Caption``, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + EllipsisPosition: EllipsisPosition + ''' + Specifies how ellipsis is placed in text not fitting in allocated rectangle. + + Set `EllipsisPosition <Vcl.StdCtrls.TCustomLabel.EllipsisPosition.htm>`__ to determine how an ellipsis is placed in text that does not fit in its allocated rectangle. This is a `EllipsisPosition <Vcl.StdCtrls.TEllipsisPosition.htm>`__ constant and its value corresponds to constants specifying ellipsis placement in the ``dwDTFormat`` parameter of the *Windows* ``DrawText`` and ``DrawTextEx()`` functions. + + The following table lists values for `EllipsisPosition <Vcl.StdCtrls.TEllipsisPosition.htm>`__: + + +------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Value** | **Meaning** | + +========================+===========================================================================================================================================================+ + | ``epNone`` | An ellipsis is not inserted. | + +------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``epPathEllipsis`` | Replaces text in the middle with an ellipsis so that the resulting text fits in the rectangle specified. If the text contains backslash (``'\'``) | + | | characters, treat the text as a path and attempt to preserve as much text as possible after the last backslash. Corresponds to a value of | + | | ``DT_PATH_ELLIPSIS`` in the ``dwDTFormat`` parameter. | + +------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``epEndEllipsis`` | Replaces text at the end with an ellipsis so that the resulting text fits in the rectangle specified. Any word not fitting in the | + | | rectangle is truncated without adding an ellipsis. Corresponds to a value of ``DT_END_ELLIPSIS`` in the ``dwDTFormat`` parameter. | + +------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``epWordEllipsis`` | Truncates any word that doesn't fit in the rectangle and adds ellipses. Corresponds to a value of ``DT_WORD_ELLIPSIS`` in the ``dwDTFormat`` parameter. | + +------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + FocusControl: WinControl + ''' + Designates a windowed control associated with the ``Label``. + + Set `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ to the windowed control that should receive focus when the user presses the accelerator key specified by the ``Label``. Specify an accelerator key by preceding a character in the ``Label`` text with an ampersand (``'&'``) and setting the `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ property to ``True``. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + GlowSize: int + ''' + Specifies the radius of the glow around the ``Label``. + + Set the value of `GlowSize <Vcl.StdCtrls.TCustomLabel.GlowSize.htm>`__ to specify the radius of the glow around the ``Label``. + + .. note:: This is available only for *Windows Vista* or later, with the Aero theme enabled. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowAccelChar: bool + ''' + Determines how an ampersand in the ``Label`` text is displayed. + + Set `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ to ``True`` to allow the ``Label`` to display an underlined accelerator key value. When `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``True``, any character preceded by an ampersand (``'&'``) appears underlined. If the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is set, the windowed control specified by the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property receives input focus when the user types that underlined character. To display an ampersand when `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``True``, use two ampersands (``'&&'``) to stand for the single ampersand that is displayed. + + Set `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ to ``False`` to display the ``Label`` ``Text`` with all ampersands appearing as ampersands. When `ShowAccelChar <Vcl.StdCtrls.TCustomLabel.ShowAccelChar.htm>`__ is ``False``, the value of the `FocusControl <Vcl.StdCtrls.TCustomLabel.FocusControl.htm>`__ property is not used. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether controls that sit below the ``Label`` on a form can be seen through the ``Label``. + + Set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``True`` to prevent the ``Label`` from obscuring other controls on the ``Form``. For example, if the ``Label`` is used to add text to a graphic, set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``True`` so that the ``Label`` does not stand out as a separate object. + + When `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``True``, the ``Label`` always displays in the background color, and any `Color <Vcl.Controls.TControl-Color.htm>`__ setting is ignored. Also, when `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``True``, writing text is slower than writing text when `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ is ``False``. If the ``Label`` is not obscuring a complicated image, you might choose to optimize performance by doing both of the following things: + + - Set `Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``, and + - Set the `background color <Vcl.Controls.TControl-Color.htm>`__ of the ``Label`` to match the object beneath it. + ''' + Layout: ButtonLayout + ''' + Specifies the vertical placement of the text within the ``Label``. + + Set `Layout <Vcl.StdCtrls.TCustomLabel.Layout.htm>`__ to specify how the text of the ``Label`` is placed within the ``ClientRect`` of the ``Label`` control. `Layout <Vcl.StdCtrls.TCustomLabel.Layout.htm>`__ is the vertical analog to the `Alignment <Vcl.StdCtrls.TCustomLabel.Alignment.htm>`__ property. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the ``Label`` text wraps when it is too long for the width of the ``Label``. + + Set `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ to ``True`` to allow the ``Label`` to display multiple line of text. When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``True``, text that is too wide for the ``Label`` control wraps at the right margin and continues in additional lines. + + Set `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ to ``False`` to limit the ``Label`` to a single line. When `WordWrap <Vcl.StdCtrls.TCustomLabel.WordWrap.htm>`__ is ``False``, text that is too wide for the ``Label`` appears truncated. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LabeledEdit(CustomLabeledEdit): + ''' + ========================= + Vcl.ExtCtrls.TLabeledEdit + ========================= + + ``LabeledEdit`` is an edit control that has an associated label. + + Use ``LabeledEdit`` to add an edit control with a ``Label`` to a form. ``LabeledEdit`` works with an associated label control, which is the value of its `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ property. The position of that label relative to the edit control is determined by the `LabelPosition <Vcl.ExtCtrls.TCustomLabeledEdit.LabelPosition.htm>`__ and `LabelSpacing <Vcl.ExtCtrls.TCustomLabeledEdit.LabelSpacing.htm>`__ properties. + + Use the ``Text`` property to work with the text in the control, and the ``Label``\ s. ``Caption`` property to work with the text in the ``Label``. + ''' + + __hash__: ClassVar[None] = ... + Alignment: Alignment + ''' + Determines how the text is aligned within the text edit control. + + Use `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ to change the way the text is formatted in the text edit control. `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ can take one of the following values: + + ==================== ============================================ + **Value** **Meaning** + ==================== ============================================ + ``taLeftJustify`` Align text to the left side of the control + ``taCenter`` Center text horizontally in the control. + ``taRightJustify`` Align text to the right side of the control. + ==================== ============================================ + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSelect: bool + ''' + Determines whether all the text in the ``Edit`` control is automatically selected when the control gets focus. + + Set `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ to select all the text when the ``Edit`` control gets focus. `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ only applies to single-line ``Edit`` controls. + + Use `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ when the user is more likely to replace the text in the ``Edit`` control than to append to it. + ''' + AutoSize: bool + ''' + Determines whether the height of the ``Edit`` control automatically resizes to accommodate the text. + + Use `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ to make the ``Edit`` control adjust its size automatically so the client area accommodates the height of the text. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``False``, the ``Edit`` control has a fixed height. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``True``, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style. + + .. note:: `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ only adjusts the height of the ``Edit`` control. Even with `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ set to ``True``, text in the ``Edit`` control may appear truncated if it extends beyond the width of the control. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the edit control has a single line border around the client area. + + Use `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ to affect the sharpness with which the client area of the edit control stands out. `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ can have a value of either ``bsSingle`` or ``bsNone``. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsSingle``, the edit control has a single-line border around the client area. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsNone``, there will be no border. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text within the edit control. + + Use `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to force the contents of the edit control to assume a particular case. + + When `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types them into the edit control. Changing the `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ property to ``ecLowerCase`` or ``ecUpperCase`` changes the actual contents of the text, not just the appearance. Any case information is lost and can't be recaptured by changing `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to ``ecNormal``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + EditLabel: BoundLabel + ''' + Specifies the control that implements the ``Label``. + + Use `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ to work with the ``Label`` that is associated with this ``LabeledEdit`` control. Use this label's properties to specify the caption that appears on the ``Label``, the position of the ``Caption`` within the ``Label``, the font used to write that caption, and so on. At design time, expand the `EditLabel <Vcl.ExtCtrls.TCustomLabeledEdit.EditLabel.htm>`__ property in the *Object Inspector* to set its properties. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HideSelection: bool + ''' + Determines whether the visual indication of the selected text remains when focus shifts to another control. + + Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` to provide visual feedback of the selected portion of the text even when the edit control does not have focus. Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``True`` to show the selection only when the edit control has focus. `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ does not affect the actual value of the selection, only the visual indication. Always setting `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` can make forms with many ``Edit`` controls look too busy. + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + LabelPosition: LabelPosition + ''' + Specifies the position of the ``Label`` relative to the edit control. + + Set `LabelPosition <Vcl.ExtCtrls.TCustomLabeledEdit.LabelPosition.htm>`__ to indicate where the ``Label`` sits relative to the edit control. + ''' + LabelSpacing: int + ''' + Specifies the distance, in pixels, between the ``Label`` and the edit region. + + Set `LabelSpacing <Vcl.ExtCtrls.TCustomLabeledEdit.LabelSpacing.htm>`__ to indicate the distance, in pixels, between the ``Label`` and the edit control. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters that can appear in the edit control. + + `MaxLength <Vcl.Mask.TCustomMaskEdit.MaxLength.htm>`__ is the length of the EditText. Set `MaxLength <Vcl.Mask.TCustomMaskEdit.MaxLength.htm>`__ to limit the number of characters that can appear in the edit control when there is no EditMask. If there is an EditMask, `MaxLength <Vcl.Mask.TCustomMaskEdit.MaxLength.htm>`__ is implied by the mask itself, and cannot be changed. The EditText contains blank characters for each character that has not been entered, padding the end or beginning of every optional section, so it remains constant in length. + ''' + OEMConvert: bool + ''' + Determines whether characters typed in the edit control are converted from *ANSI* to *OEM* and then back to *ANSI*. To ensure that any characters typed in the edit control can be unambiguously converted to the *OEM* character set, set `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ to ``True``. This causes all characters to be converted from *ANSI* to *OEM* and then back to *ANSI* as they are typed. Set `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ to ``False`` to avoid the overhead of this conversion when it does not matter whether the text can be unambiguously mapped to an *OEM* string. + + `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ is most useful for ``Edit`` controls used to enter file names when the application does not use Unicode file names. + ''' + NumbersOnly: bool + ''' + Allows only numbers to be typed into the text ``Edit``. + + Use `NumbersOnly <Vcl.StdCtrls.TCustomEdit.NumbersOnly.htm>`__ to prohibit entry of non-numeric characters in the ``textfield``. Note, however, that a user can paste non-numeric characters in the ``textfield`` even when this property is set. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TLabeledEdit.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PasswordChar: str + ''' + Indicates the character, if any, to display in place of the actual characters typed in the control. + + Use the `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ property to create an edit control that displays a special character in place of any entered text. If `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ is set to the ``NULL`` character (*ANSI* character zero), the edit control displays its text normally. If `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ is any other character, the edit control displays `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ in place of each character typed. `PasswordChar <Vcl.StdCtrls.TCustomEdit.PasswordChar.htm>`__ affects the appearance of the edit control only. The value of the ``Text`` property reflects the actual characters that are typed. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the edit control. To restrict the edit control to display only, set the `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ property to ``True``. Set `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``False`` to allow the contents of the edit control to be edited. + + Setting `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Text: Caption + ''' + Denotes the underlying text for the masked edit control before the mask has been applied. + + Use `Text <Vcl.Mask.TCustomMaskEdit.Text.htm>`__ to determine the underlying value of the text before it has been formatted by the mask. `Text <Vcl.Mask.TCustomMaskEdit.Text.htm>`__ may differ from the Edi`TText <Vcl.Mask.TCustomMaskEdit.Text.htm>`__ visible in the masked edit control if the mask specifies that literal characters should be removed, if the mask includes spaces, or if the mask includes characters that have not yet been filled in by the user. `Text <Vcl.Mask.TCustomMaskEdit.Text.htm>`__ will not contain the blank characters, spaces will not be replaced by _, and literal characters in the mask will be removed if the mask indicates they should be. + + When setting `Text <Vcl.Mask.TCustomMaskEdit.Text.htm>`__, the value of the text is formatted using the mask, and the resulting Edi`TText <Vcl.Mask.TCustomMaskEdit.Text.htm>`__ is used to update the window. + + If there is no mask, `Text <Vcl.Mask.TCustomMaskEdit.Text.htm>`__ is the text that appears in the edit control. + ''' + TextHint: str + ''' + A hint or message to be displayed when the ``Text`` property is empty. + + Use `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ to cue the user on what kind of entry is expected in the text field. Runtime themes must be enabled. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the text for the edit control may have changed. + + Write an `OnChange <Vcl.StdCtrls.TCustomEdit.OnChange.htm>`__ event handler to take specific action whenever the text for the edit control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the edit control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the edit control. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def CanFocus(self) -> Any: + '''TWinControl.CanFocus() + Indicates whether a control can receive focus.''' + def SetFocus(self) -> Any: + '''TWinControl.SetFocus() + Gives the input focus to the control.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkControlDelegate(BindComponentDelegate, IBindActivate): + ''' + ========================================= + Data.Bind.Components.TLinkControlDelegate + ========================================= + + Is a binding component that wraps another binding component and references a control. + + The ``LinkControlDelegate`` class implements a binding component that wraps another binding component and references a control. + + For more information regarding the delegates, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + + __hash__: ClassVar[None] = ... + + def GetControlComponent(self) -> Component: + ''' + Protected getter method for the `ControlComponent <Data.Bind.Components.TContainedBindComponent.ControlComponent.htm>`__ property. + ''' + def SetControlComponent(self, Value: Component) -> None: + ''' + Protected setter method for the `ControlComponent <Data.Bind.Components.TContainedBindComponent.ControlComponent.htm>`__ property. + ''' + def GetControlComponentMemberName(self) -> str: + ''' + Returns a `string <System.String.htm>`__ containing the name of the control component member. When a control member is specified, expressions execute against the member rather than against the control component. + ''' + def SetActive(self, AValue: bool) -> None: + ''' + Activates or deactivates the bind control value of this link delegate wrapper. + ''' + def BindActivate(self, AValue: bool) -> None: + ''' + No have docs. + ''' + def CanSetControlComponent(self, Value: Component) -> bool: + ''' + Returns whether the given parameter can be used as the control component of this binding component. + + ``CanSetControlComponent()`` returns whether the given ``Value`` (that is itself a `Component <System.Classes.TComponent.htm>`__) can be used as the control component of this binding component. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkControlToField(CustomLinkControlToField): + ''' + ======================================== + Data.Bind.Components.TLinkControlToField + ======================================== + + Links a control to a field. + + The ``LinkControlToField`` class extends `CustomLinkControlToField <Data.Bind.Components.TCustomLinkControlToField.htm>`__ with published properties. + + .. tip:: If the direction is bidirectional, then the control must support the ``IEditLinkObserver`` interface. + ''' + + __hash__: ClassVar[None] = ... + DataSource: BaseLinkingBindSource + ''' + Specifies a `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object to which this delegate component links. + + ``Data.Bind.Components.TLinkControlToField.DataSource`` inherits from `Data.Bind.Components.TLinkControlToFieldDelegate.DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkControlToFieldDelegate.DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__. + + Use `DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__ to determine or set the `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object that connects to a specific dataset. + ''' + FieldName: str + ''' + No have docs. + ''' + Control: Component + ''' + No have docs. + ''' + AutoActivate: bool + ''' + No have docs. + ''' + Direction: LinkControlToFieldDirection + ''' + No have docs. + ''' + Track: bool + ''' + Indicates that notifications are sent more frequently between the bound controls and fields. + + The ``Track`` option means that notifications are sent more frequently. Here is a run-time example using a `CheckBox <FMX.StdCtrls.TCheckBox.htm>`__ that is bound to a field in a database table: + + - If ``Track`` is set for the ``CheckBox``, then the change occurs immediately when you click the ``CheckBox``. + - If ``Track`` is not set, the change does not occur until the ``CheckBox`` control loses focus. + ''' + CustomFormat: str + ''' + No have docs. + ''' + CustomParse: str + ''' + No have docs. + ''' + LookupDataSource: BaseLinkingBindSource + ''' + No have docs. + ''' + LookupKeyFieldName: str + ''' + No have docs. + ''' + LookupValueFieldName: str + ''' + No have docs. + ''' + UseEvalShortcuts: bool + ''' + Determines whether this binding component delegate `uses evaluation shortcuts <LiveBindings_in_RAD_Studio.htm#Using_Evaluation_Shortcuts>`__ (``True``) or not (``False``). + + ``Data.Bind.Components.TLinkControlToField.UseEvalShortcuts`` inherits from `Data.Bind.Components.TCustomLinkControlToField.UseEvalShortcuts <Data.Bind.Components.TCustomLinkControlToField.UseEvalShortcuts.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkControlToField.UseEvalShortcuts <Data.Bind.Components.TCustomLinkControlToField.UseEvalShortcuts.htm>`__. + ''' + + def OnAssignedValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value) -> None: + ''' + # OnAssignedValue: BindCompAssignedValueEvent + Event that occurs after an expression has been evaluated and has assigned a value to an object member. + + ``Data.Bind.Components.TLinkControlToField.OnAssignedValue`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnAssignedValue <Data.Bind.Components.TBindComponentDelegate.OnAssignedValue.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnAssignedValue <Data.Bind.Components.TBindComponentDelegate.OnAssignedValue.htm>`__. + ''' + def OnAssigningValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value, Handled: bool) -> None: + ''' + # OnAssigningValue: BindCompAssigningValueEvent + ``Data.Bind.Components.TLinkControlToField.OnAssigningValue`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnAssigningValue <Data.Bind.Components.TBindComponentDelegate.OnAssigningValue.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnAssigningValue <Data.Bind.Components.TBindComponentDelegate.OnAssigningValue.htm>`__. + + Event that occurs as an expression is evaluated and is assigning to a value of an object member. Event handlers can intercede in the assignment operation. + ''' + def OnEvalError(self, Sender: Object, AException: Exception) -> None: + ''' + # OnEvalError: BindCompEvalErrorEvent + Event that occurs when an exception is raised while evaluating an expression, such as a conversion error. + + ``Data.Bind.Components.TLinkControlToField.OnEvalError`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnEvalError <Data.Bind.Components.TBindComponentDelegate.OnEvalError.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnEvalError <Data.Bind.Components.TBindComponentDelegate.OnEvalError.htm>`__. + + Event handlers can intercede and raise a different exception. + ''' + def OnActivating(self, Sender: Object) -> None: + ''' + # OnActivating: NotifyEvent + Event that occurs when activating the binding expressions of this delegate wrapper. + + ``Data.Bind.Components.TLinkControlToField.OnActivating`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnActivating <Data.Bind.Components.TBindComponentDelegate.OnActivating.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnActivating <Data.Bind.Components.TBindComponentDelegate.OnActivating.htm>`__. + ''' + def OnActivated(self, Sender: Object) -> None: + ''' + # OnActivated: NotifyEvent + Event that occurs when the binding expressions of this delegate wrapper have been activated. + + ``Data.Bind.Components.TLinkControlToField.OnActivated`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnActivated <Data.Bind.Components.TBindComponentDelegate.OnActivated.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnActivated <Data.Bind.Components.TBindComponentDelegate.OnActivated.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkControlToFieldDelegate(LinkControlDelegate): + ''' + ================================================ + Data.Bind.Components.TLinkControlToFieldDelegate + ================================================ + + Is a binding component that wraps another binding component and references a control, ``DataSource``, and field. + + The ``LinkControlToFieldDelegate`` class implements a binding component that wraps another binding component and references a control, a ``DataSource``, and a field. + + For more information regarding the delegates, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + + __hash__: ClassVar[None] = ... + DataSource: BaseLinkingBindSource + ''' + Specifies a `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object to which this delegate component links. + + Use ``DataSource`` to determine or set the `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object that connects to a specific dataset. + ''' + + def SetDataSource(self, Value: BaseLinkingBindSource) -> None: + ''' + Protected setter implementation for the `DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__ property. + ''' + def GetDataSource(self) -> BaseLinkingBindSource: + ''' + Protected getter implementation for the `DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__ property. + ''' + def SetSourceMember(self, Value: str) -> None: + ''' + Protected setter implementation for the ``FieldName`` property defined in subclasses. + + Both `CustomLinkControlToField <Data.Bind.Components.TCustomLinkControlToField.htm>`__ and `CustomLinkListControlToField <Data.Bind.Components.TCustomLinkListControlToField.htm>`__ use **SetSourceMember** as the setter implementation. + ''' + def GetSourceMember(self) -> str: + ''' + Protected getter implementation for the ``FieldName`` property defined in subclasses. + + Both `CustomLinkControlToField <Data.Bind.Components.TCustomLinkControlToField.htm>`__ and `CustomLinkListControlToField <Data.Bind.Components.TCustomLinkListControlToField.htm>`__ use **GetSourceMember** as the getter implementation. + ''' + def GetDisplaysMultipleSourceMembers(self) -> bool: + ''' + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkLabel(CustomLinkLabel): + ''' + ======================= + Vcl.ExtCtrls.TLinkLabel + ======================= + + Implements a label containing an HTML link. + + ``LinkLabel`` is a `CustomLinkLabel <Vcl.ExtCtrls.TCustomLinkLabel.htm>`__ that can contain an HTML link via the standard ``<a href="http://www.somelink.com">SomeLink</a>`` tag. The HTML tag is to be declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property at run time or at design time. + + The link appears as underlined text. The `OnLinkClick <Vcl.ExtCtrls.TCustomLinkLabel.OnLinkClick.htm>`__ event is triggered by clicking the link. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: LinkAlignment + ''' + Controls the horizontal placement of the text within the link label. + + Set `Alignment <Vcl.ExtCtrls.TCustomLinkLabel.Alignment.htm>`__ to specify how the text of the link label is justified within the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property of the link label control. The default value of `Alignment <Vcl.ExtCtrls.TCustomLinkLabel.Alignment.htm>`__ property is ``taLeftJustify``. The possible values for the `Alignment <Vcl.ExtCtrls.TCustomLinkLabel.Alignment.htm>`__ property are ``taLeftJustify`` and ``taRightJustify``. + + .. note:: This is available for *Windows Vista* only, *Windows 7*, or later *Windows* operating systems. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + UseVisualStyle: bool + ''' + Indicates whether the link label can use visual styles. + + `UseVisualStyle <Vcl.ExtCtrls.TCustomLinkLabel.UseVisualStyle.htm>`__ specifies whether the link label supports visual styles. The default value of the `UseVisualStyle <Vcl.ExtCtrls.TCustomLinkLabel.UseVisualStyle.htm>`__ property is ``False``. + + .. note:: This is available on *Windows Vista*, *Windows 7*, or later *Windows* operating systems only. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def Create(self, AControl: WinControl) -> None: + ''' + No have docs. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnLinkClick(self, Sender: Object, Link: str, LinkType: SysLinkType) -> None: + ''' + # OnLinkClick: SysLinkEvent + Event for click on `CustomLinkLabel <Vcl.ExtCtrls.TCustomLinkLabel.htm>`__ HTML link. + + `OnLinkClick <Vcl.ExtCtrls.TCustomLinkLabel.OnLinkClick.htm>`__ is triggered by a click on a `CustomLinkLabel <Vcl.ExtCtrls.TCustomLinkLabel.htm>`__'s HTML link. The event identifies the link URI and link type. + + ``OnLinkClick`` is an event handler of type `Vcl.ExtCtrls.TSysLinkEvent <Vcl.ExtCtrls.TSysLinkEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkListControlToField(CustomLinkListControlToField): + ''' + ============================================ + Data.Bind.Components.TLinkListControlToField + ============================================ + + Links a ``ListControl`` to a field. + + The ``LinkListControlToField`` class extends `CustomLinkListControlToField <Data.Bind.Components.TCustomLinkListControlToField.htm>`__ with published properties. + + .. tip:: If the direction is bidirectional, then the control must support the ``IEditLinkObserver`` interface. + ''' + + __hash__: ClassVar[None] = ... + DataSource: BaseLinkingBindSource + ''' + Specifies a `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object to which this delegate component links. + + ``Data.Bind.Components.TLinkListControlToField.DataSource`` inherits from `Data.Bind.Components.TLinkControlToFieldDelegate.DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkControlToFieldDelegate.DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__. + + Specifies a `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object to which this delegate component links. + + Use `DataSource <Data.Bind.Components.TLinkControlToFieldDelegate.DataSource.htm>`__ to determine or set the `BaseLinkingBindSource <Data.Bind.Components.TBaseLinkingBindSource.htm>`__ object that connects to a specific dataset. + ''' + FieldName: str + ''' + No have docs. + ''' + Control: Component + ''' + No have docs. + ''' + AutoActivate: bool + ''' + No have docs. + ''' + CustomFormat: str + ''' + No have docs. + ''' + FillExpressions: FormatExpressions + ''' + Specifies additional optional expressions to use when filling the ``ListControl``. + + ``Data.Bind.Components.TLinkListControlToField.FillExpressions`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillExpressions <Data.Bind.Components.TCustomLinkListControlToField.FillExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillExpressions <Data.Bind.Components.TCustomLinkListControlToField.FillExpressions.htm>`__. + + Use this collection when multiple expressions are needed to fill an item in the list. + + For instance, you can use `FillExpressions <Data.Bind.Components.TCustomLinkListControlToField.FillExpressions.htm>`__ in order to populate a *FireMonkey* ``ListBox`` item ``Text`` and ``Detail`` properties. Use the `FillDisplayCustomFormat <Data.Bind.Components.TCustomLinkFillControlToField.FillDisplayCustomFormat.htm>`__ and `FillDisplayCustomFormat <Data.Bind.Components.TCustomLinkFillControlToField.FillDisplayCustomFormat.htm>`__ properties in order to fill the ``Text`` property and add an item to the `FillExpressions <Data.Bind.Components.TCustomLinkFillControlToField.FillExpressions.htm>`__ collection, for the ``Detail`` property. + ''' + ListItemStyle: str + ''' + No have docs. + ''' + FillHeaderExpressions: FormatExpressions + ''' + Specifies a collection of expressions to fill a list header. + + ``Data.Bind.Components.TLinkListControlToField.FillHeaderExpressions`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillHeaderExpressions <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderExpressions.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillHeaderExpressions <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderExpressions.htm>`__. + + This property is optional. + ''' + FillBreakFieldName: str + ''' + Specifies the field used to determine a break. + + ``Data.Bind.Components.TLinkListControlToField.FillBreakFieldName`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName.htm>`__. + + Specifies the field used to determine a break. This property is optional. + ''' + FillBreakCustomFormat: str + ''' + Specifies a custom expression that is used with the field defined by the `FillBreakFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName.htm>`__ property. + + ``Data.Bind.Components.TLinkListControlToField.FillBreakCustomFormat`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat.htm>`__. + + For instance, the expression ``StrCopy(%s, 0, 1);`` causes a break when the first character of the field is different. This property is optional. + ''' + FillHeaderFieldName: str + ''' + Specifies the field to display in the list header. + + ``Data.Bind.Components.TLinkListControlToField.FillHeaderFieldName`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName.htm>`__. + + If `FillBreakFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillBreakFieldName.htm>`__ and `FillBreakCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat.htm>`__ are blank, then the value determined using `FillHeaderFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName.htm>`__ and `FillBreakCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillBreakCustomFormat.htm>`__ controls breaks. This is the only required field to cause breaking. + ''' + FillHeaderCustomFormat: str + ''' + Specifies a custom expression that is used with the field defined by the `FillHeaderFieldName <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderFieldName.htm>`__ property. + + ``Data.Bind.Components.TLinkListControlToField.FillHeaderCustomFormat`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillHeaderCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderCustomFormat.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillHeaderCustomFormat <Data.Bind.Components.TCustomLinkListControlToField.FillHeaderCustomFormat.htm>`__. + + For instance, the expression ``StrCopy(%s, 0, 1);`` displays the first character of the field in the header. This property is optional. + ''' + FillBreakGroups: FillBreakGroups + ''' + Specifies a collection of break value ranges. + + ``Data.Bind.Components.TLinkListControlToField.FillBreakGroups`` inherits from `Data.Bind.Components.TCustomLinkListControlToField.FillBreakGroups <Data.Bind.Components.TCustomLinkListControlToField.FillBreakGroups.htm>`__. All content below this line refers to `Data.Bind.Components.TCustomLinkListControlToField.FillBreakGroups <Data.Bind.Components.TCustomLinkListControlToField.FillBreakGroups.htm>`__. + + The break value falls within an item in this collection. The display value associated with the item is displayed in the header. This property is optional. + ''' + + def OnFillingList(self, Sender: Object) -> None: + ''' + # OnFillingListItem: FillListItemEvent + No have docs. + ''' + def OnFilledList(self, Sender: Object) -> None: + ''' + # OnFilledListItem: FillListItemEvent + No have docs. + ''' + def OnFillingListItem(self, Sender: Object, AEditor: IBindListEditorItem) -> None: + ''' + # OnFillingListItem: FillListItemEvent + No have docs. + ''' + def OnAssignedValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value) -> None: + ''' + # OnAssignedValue: BindCompAssignedValueEvent + Event that occurs after an expression has been evaluated and has assigned a value to an object member. + + ``Data.Bind.Components.TLinkListControlToField.OnAssignedValue`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnAssignedValue <Data.Bind.Components.TBindComponentDelegate.OnAssignedValue.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnAssignedValue <Data.Bind.Components.TBindComponentDelegate.OnAssignedValue.htm>`__. + ''' + def OnAssigningValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value, Handled: bool) -> None: + ''' + # OnAssigningValue: BindCompAssigningValueEvent + Event that occurs as an expression is evaluated and is assigning to a value of an object member. + + ``Data.Bind.Components.TLinkListControlToField.OnAssigningValue`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnAssigningValue <Data.Bind.Components.TBindComponentDelegate.OnAssigningValue.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnAssigningValue <Data.Bind.Components.TBindComponentDelegate.OnAssigningValue.htm>`__. + + Event handlers can intercede in the assignment operation. + ''' + def OnEvalError(self, Sender: Object, AException: Exception) -> None: + ''' + # OnEvalError: BindCompEvalErrorEvent + Event that occurs when an exception is raised while evaluating an expression, such as a conversion error. + + ``Data.Bind.Components.TLinkListControlToField.OnEvalError`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnEvalError <Data.Bind.Components.TBindComponentDelegate.OnEvalError.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnEvalError <Data.Bind.Components.TBindComponentDelegate.OnEvalError.htm>`__. + + Event handlers can intercede and raise a different exception. + ''' + def OnActivating(self, Sender: Object) -> None: + ''' + # OnActivating: NotifyEvent + Event that occurs when activating the binding expressions of this delegate wrapper. + + ``Data.Bind.Components.TLinkListControlToField.OnActivating`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnActivating <Data.Bind.Components.TBindComponentDelegate.OnActivating.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnActivating <Data.Bind.Components.TBindComponentDelegate.OnActivating.htm>`__. + ''' + def OnActivated(self, Sender: Object) -> None: + ''' + # OnActivated: NotifyEvent + Event that occurs when the binding expressions of this delegate wrapper have been activated. + + ``Data.Bind.Components.TLinkListControlToField.OnActivated`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnActivated <Data.Bind.Components.TBindComponentDelegate.OnActivated.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnActivated <Data.Bind.Components.TBindComponentDelegate.OnActivated.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkPropertyToField(CustomLinkPropertyToField): + ''' + ========================================= + Data.Bind.Components.TLinkPropertyToField + ========================================= + + Links the property of a component to a field. + + The ``LinkPropertyToField`` class extends `CustomLinkPropertyToField <Data.Bind.Components.TCustomLinkPropertyToField.htm>`__ with published properties. + + .. tip:: The user input to this component is not monitored using an observer. + ''' + + __hash__: ClassVar[None] = ... + DataSource: BaseLinkingBindSource + ''' + Specifies a `DataSource <Data.DB.TDataSource.htm>`__ object to which this delegate component links. + + ``Data.Bind.Components.TLinkPropertyToField.DataSource`` inherits from `Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource <Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource <Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource.htm>`__. + + Use `DataSource <Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource.htm>`__ to determine or set the `DataSource <Data.DB.TDataSource.htm>`__ object that connects to a specific dataset. + ''' + FieldName: str + ''' + Specifies the field name that this wrapping binding component references. + + ``Data.Bind.Components.TLinkPropertyToField.FieldName`` inherits from `Data.Bind.Components.TLinkPropertyToFieldDelegate.FieldName <Data.Bind.Components.TLinkPropertyToFieldDelegate.FieldName.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkPropertyToFieldDelegate.FieldName <Data.Bind.Components.TLinkPropertyToFieldDelegate.FieldName.htm>`__. + ''' + Component: Component + ''' + Specifies the component that this wrapping binding component references. + + ``Data.Bind.Components.TLinkPropertyToField.Component`` inherits from `Data.Bind.Components.TLinkPropertyToFieldDelegate.Component <Data.Bind.Components.TLinkPropertyToFieldDelegate.Component.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkPropertyToFieldDelegate.Component <Data.Bind.Components.TLinkPropertyToFieldDelegate.Component.htm>`__. + ''' + CustomFormat: str + ''' + No have docs. + ''' + ComponentProperty: str + ''' + Specifies the name of the property of the component that this wrapping binding component references. + + ``Data.Bind.Components.TLinkPropertyToField.ComponentProperty`` inherits from `Data.Bind.Components.TLinkPropertyToFieldDelegate.ComponentProperty <Data.Bind.Components.TLinkPropertyToFieldDelegate.ComponentProperty.htm>`__. All content below this line refers to `Data.Bind.Components.TLinkPropertyToFieldDelegate.ComponentProperty <Data.Bind.Components.TLinkPropertyToFieldDelegate.ComponentProperty.htm>`__. + ''' + AutoActivate: bool + ''' + No have docs. + ''' + LookupDataSource: BaseLinkingBindSource + ''' + No have docs. + ''' + LookupKeyFieldName: str + ''' + No have docs. + ''' + LookupValueFieldName: str + ''' + No have docs. + ''' + + def OnAssignedValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value) -> None: + ''' + # OnAssignedValue: BindCompAssignedValueEvent + Event that occurs after an expression has been evaluated and has assigned a value to an object member. + + ``Data.Bind.Components.TLinkPropertyToField.OnAssignedValue`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnAssignedValue <Data.Bind.Components.TBindComponentDelegate.OnAssignedValue.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnAssignedValue <Data.Bind.Components.TBindComponentDelegate.OnAssignedValue.htm>`__. + ''' + def OnAssigningValue(self, Sender: Object, AssignValueRec: BindingAssignValueRec, Value: Value, Handled: bool) -> None: + ''' + # OnAssigningValue: BindCompAssigningValueEvent + Event that occurs as an expression is evaluated and is assigning to a value of an object member. + + ``Data.Bind.Components.TLinkPropertyToField.OnAssigningValue`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnAssigningValue <Data.Bind.Components.TBindComponentDelegate.OnAssigningValue.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnAssigningValue <Data.Bind.Components.TBindComponentDelegate.OnAssigningValue.htm>`__. + + Event handlers can intercede in the assignment operation. + ''' + def OnEvalError(self, Sender: Object, AException: Exception) -> None: + ''' + # OnEvalError: BindCompEvalErrorEvent + Event that occurs when an exception is raised while evaluating an expression, such as a conversion error. + + ``Data.Bind.Components.TLinkPropertyToField.OnEvalError`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnEvalError <Data.Bind.Components.TBindComponentDelegate.OnEvalError.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnEvalError <Data.Bind.Components.TBindComponentDelegate.OnEvalError.htm>`__. + + Event handlers can intercede and raise a different exception. + ''' + def OnActivating(self, Sender: Object) -> None: + ''' + # OnActivating: NotifyEvent + Event that occurs when activating the binding expressions of this delegate wrapper. + + ``Data.Bind.Components.TLinkPropertyToField.OnActivating`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnActivating <Data.Bind.Components.TBindComponentDelegate.OnActivating.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnActivating <Data.Bind.Components.TBindComponentDelegate.OnActivating.htm>`__. + ''' + def OnActivated(self, Sender: Object) -> None: + ''' + # OnActivated: NotifyEvent + Event that occurs when the binding expressions of this delegate wrapper have been activated. + + ``Data.Bind.Components.TLinkPropertyToField.OnActivated`` inherits from `Data.Bind.Components.TBindComponentDelegate.OnActivated <Data.Bind.Components.TBindComponentDelegate.OnActivated.htm>`__. All content below this line refers to `Data.Bind.Components.TBindComponentDelegate.OnActivated <Data.Bind.Components.TBindComponentDelegate.OnActivated.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class LinkPropertyToFieldDelegate(BindComponentDelegate, IBindActivate): + ''' + ================================================= + Data.Bind.Components.TLinkPropertyToFieldDelegate + ================================================= + + Is a binding component that wraps another binding component and references a component property, ``DataSource``, and field name. + + The ``LinkPropertyToFieldDelegate`` class implements a binding component that wraps another binding component and references a component property, a ``DataSource``, and a field name. + + For more information regarding the delegates, please refer to the `New LiveBinding <New_LiveBinding.htm>`__ topic, the *Quick Binding Components Reference* section. + ''' + + __hash__: ClassVar[None] = ... + DataSource: BaseLinkingBindSource + ''' + Specifies a `DataSource <Data.DB.TDataSource.htm>`__ object to which this delegate component links. + + Use ``DataSource`` to determine or set the `DataSource <Data.DB.TDataSource.htm>`__ object that connects to a specific dataset. + ''' + Component: Component + ''' + Specifies the component that this wrapping binding component references. + ''' + ComponentProperty: str + ''' + Specifies the name of the property of the component that this wrapping binding component references. + ''' + FieldName: str + ''' + Specifies the field name that this wrapping binding component references. + ''' + + def SetDataSource(self, Value: BaseLinkingBindSource) -> None: + ''' + Protected setter implementation for the `DataSource <Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource.htm>`__ property. + ''' + def GetDataSource(self) -> BaseLinkingBindSource: + ''' + Protected getter implementation for the `DataSource <Data.Bind.Components.TLinkPropertyToFieldDelegate.DataSource.htm>`__ property. + ''' + def SetSourceMember(self, Value: str) -> None: + ''' + Protected setter implementation for the `FieldName <Data.Bind.Components.TLinkPropertyToFieldDelegate.FieldName.htm>`__ property. + ''' + def GetSourceMember(self) -> str: + ''' + Protected getter implementation for the `FieldName <Data.Bind.Components.TLinkPropertyToFieldDelegate.FieldName.htm>`__ property. + ''' + def GetControlComponent(self) -> Component: + ''' + Protected getter implementation for the `Component <Data.Bind.Components.TLinkPropertyToFieldDelegate.Component.htm>`__ property. + ''' + def SetControlComponent(self, Value: Component) -> None: + ''' + Protected setter implementation for the `Component <Data.Bind.Components.TLinkPropertyToFieldDelegate.Component.htm>`__ property. + ''' + def SetComponentProperty(self, Value: str) -> None: + ''' + Protected setter implementation for the `ComponentProperty <Data.Bind.Components.TLinkPropertyToFieldDelegate.ComponentProperty.htm>`__ property. + ''' + def SetActive(self, AValue: bool) -> None: + ''' + Protected setter implementation for the `Active <Data.Bind.Components.TCustomLinkPropertyToField.Active.htm>`__ property. + ''' + def BindActivate(self, AValue: bool) -> None: + ''' + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ListBox(CustomListBox): + ''' + ===================== + Vcl.StdCtrls.TListBox + ===================== + + ``ListBox`` displays a collection of items in a scrollable list. + + Use ``ListBox`` to display a scrollable list of items that users can select, add, or delete. ``ListBox`` is a wrapper for the *Windows* ``ListBox`` control. For specialized ``ListBox``\ es, use other descendant classes of `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__ or derive your own class from `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__. + + ``ListBox`` implements the generic behavior introduced in `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__. ``ListBox`` publishes many of the properties inherited from `CustomListBox <Vcl.StdCtrls.TCustomListBox.htm>`__, but does not introduce any new behavior. + + ''' + + __hash__: ClassVar[None] = ... + Style: TabStyle + ''' + Determines whether the ``ListBox`` is standard or owner-draw and whether it is virtual. + + Use `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ to specify whether the ``ListBox`` is a standard ``ListBox`` that displays text strings, or an owner-draw ``ListBox`` that can display graphical images. Owner-draw ``ListBox``\ es let you display items in some nonstandard way. In this case, you must write the code to paint items in the ``ListBox``. + + In addition, `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ controls whether the ``ListBox`` is virtual, which means that items are supplied dynamically using event handlers. By default, `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ is ``lbStandard``, meaning that the ``ListBox`` is not virtual and it displays each item as a string. + ''' + AutoComplete: bool + ''' + Determines whether the user can give focus to items by typing in the list. + + Use `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ to specify whether the ``ListBox`` automatically updates the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property in response to user keystrokes. When `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ is ``True``, the item with focus changes to the first item that begins with the sequence of characters that the user typed. As the user types more characters, `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ may change to a later item because the string to match becomes longer. + ''' + AutoCompleteDelay: bool + ''' + Specifies the delay between a key press and an attempt to autocomplete the field. + + Specifies the delay in milliseconds between a key press and an attempt to autocomplete the field. Autocomplete will position to matching list values as you type, sometimes saving you keystrokes. + + `AutoCompleteDelay <Vcl.StdCtrls.TCustomListBox.AutoCompleteDelay.htm>`__ is only in effect when `AutoComplete <Vcl.StdCtrls.TCustomListBox.AutoComplete.htm>`__ is ``True``. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``ListBox`` has a border. + + Use `BorderStyle <Vcl.StdCtrls.TCustomListBox.BorderStyle.htm>`__ to change the appearance of the outer boundary of the ``ListBox`` control. A ``ListBox`` can have a single border (bsSingle) or no visible border (bsNone). + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Columns: int + ''' + Specifies the number of columns, in a multi-column ``ListBox``, that are visible without having to scroll. + + Use `Columns <Vcl.StdCtrls.TCustomListBox-Columns.htm>`__ to specify the number of columns, in a multi-column ``ListBox``, that are visible without having to use the horizontal ``ScrollBar``. + + Multi-column ``ListBox``\ es have a horizontal ``ScrollBar`` that allows users to view multiple columns as they wrap. The default value for `Columns <Vcl.StdCtrls.TCustomListBox-Columns.htm>`__ is 0, meaning that the ``ListBox`` is not multi-column. That is, users can scroll only vertically and the list of items will not wrap. + + For `Columns <Vcl.StdCtrls.TCustomListBox-Columns.htm>`__ values greater than 0, multiple columns accommodate the items as they wrap beyond the bottom of the ``ListBox``. The `Columns <Vcl.StdCtrls.TCustomListBox-Columns.htm>`__ property specifies the number of columns that are visible without having to horizontally scroll the ``ListBox``. + + The width of each column depends upon both the ``Width`` property and the number of `Columns <Vcl.StdCtrls.TCustomListBox-Columns.htm>`__. + + .. tip:: To add data to specific columns, you need to use the ``^I`` parameter, as shown in `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + ExtendedSelect: bool + ''' + Determines whether the user can select a sequential range of items in the ``ListBox``. + + `ExtendedSelect <Vcl.StdCtrls.TCustomListBox.ExtendedSelect.htm>`__ works with the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property. If `ExtendedSelect <Vcl.StdCtrls.TCustomListBox.ExtendedSelect.htm>`__ is ``True`` and `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``True``, the user can select an item, then hold down the *Shift* key and select another, and all the items in between the two selected items also become selected. + + If the user does not hold down the *Shift* or *Ctrl* key while selecting a second item, the first selected item becomes unselected--in other words, the user must use the *Ctrl* key to select multiple noncontiguous items, or the *Shift* key, to select a range of items. + + If `ExtendedSelect <Vcl.StdCtrls.TCustomListBox.ExtendedSelect.htm>`__ is ``False`` and `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``True``, the user can select multiple items without using the *Shift* or *Ctrl* key, but they cannot select a range of items in one operation. + + If `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``False``, the setting of `ExtendedSelect <Vcl.StdCtrls.TCustomListBox.ExtendedSelect.htm>`__ has no effect, as the user will not be able to select more than one item at a time in the ``ListBox``. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + IntegralHeight: bool + ''' + Determines whether the ``ListBox`` displays the partial items. + + `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ controls the height of the ``ListBox`` itself. + + When `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ is ``True``, and the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lsOwnerDrawFixed``, the ``ListBox`` height will always be a multiple of the `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ property value. In this case, items will never be partially displayed. + + If `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ is ``False``, the ``ListBox`` height can be set to any value, but the last item may not be fully displayed. + + If the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property value of the ``ListBox`` is ``lbOwnerDrawVariable``, setting the `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ property to ``True`` has no effect. + ''' + ItemHeight: int + ''' + Specifies the height in pixels of an item in an owner-draw ``ListBox``. + + Use `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ to control the height of an item in a ``ListBox`` when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbOwnerDrawFixed``. The `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ property can also affect the height of the ``ListBox`` itself. When the `IntegralHeight <Vcl.StdCtrls.TCustomListBox.IntegralHeight.htm>`__ property is ``True``, the height of the ``ListBox`` is always an increment of the `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ value. + + If the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbStandard`` or ``lbOwnerDrawVariable``, the value of `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ is ignored. + ''' + Items: Strings + ''' + Contains the strings that appear in the ``ListBox``. + + Use `Items <Vcl.StdCtrls.TCustomListBox.Items.htm>`__ to add, insert, delete and move items. By default, the items in a ``ListBox`` are of type ``Strings``. Use this item type to access its methods or properties to manipulate the items in the list. + + For example, the following code snippet shows how to add the text in the ``Edit`` box to the ``ListBox`` as an item: + + .. code-block:: python + + ListBox1.Items.Add(Edit1.Text); + + .. code-block:: python + + ListBox1->Items->Add(Edit1->Text); + + .. tip:: If you have a ``ListBox`` with multiple columns and you want to add data to specific columns, then you need to use the ``^I`` parameter (that is, capital ``i``; Delphi-only) in the ``Add()`` statement, as shown in the snippet below. + + .. code-block:: python + + ListBox1.Items.Add('First Column'^I'Second Column'); + ListBox1.Items.Add('1'^I'2'); + ListBox1.Items.Add('4'^I'5'); + + And the result would be: + + .. image:: ListBoxIParam.png + :alt: ListBoxIParam.png + :width: 245px + :height: 101px + ''' + MultiSelect: bool + ''' + Specifies whether the user can select more than one item. + + ``Vcl.StdCtrls.TListBox.MultiSelect`` inherits from `Vcl.Controls.TCustomMultiSelectListControl.MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__. All content below this line refers to `Vcl.Controls.TCustomMultiSelectListControl.MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__. + + Specifies whether the user can select more than one item. + + Use `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ to specify whether the user can select more than one item. When `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``True``, the user can select multiple items in the control, and the `SelCount <Vcl.Controls.TCustomMultiSelectListControl.SelCount.htm>`__ property indicates the number of selected items. When `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ is ``False``, the user can only select one item, which is indicated by the `ItemIndex <Vcl.Controls.TCustomListControl.ItemIndex.htm>`__ property. + + .. note:: To implement the `MultiSelect <Vcl.Controls.TCustomMultiSelectListControl.MultiSelect.htm>`__ property in a `CustomMultiSelectListControl <Vcl.Controls.TCustomMultiSelectListControl.htm>`__ descendant, override the protected `SetMultiSelect <Vcl.Controls.TCustomMultiSelectListControl.SetMultiSelect.htm>`__ method. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ScrollWidth: int + ''' + Specifies the width, in pixels, by which the ``ListBox`` can scroll horizontally. + + Use `ScrollWidth <Vcl.StdCtrls.TCustomListBox.ScrollWidth.htm>`__ to ``get`` or ``set`` the logical width of the ``ListBox``. When `ScrollWidth <Vcl.StdCtrls.TCustomListBox.ScrollWidth.htm>`__ is greater than the client width of the ``ListBox``, the ``ListBox`` gets a horizontal ``ScrollBar``. When `ScrollWidth <Vcl.StdCtrls.TCustomListBox.ScrollWidth.htm>`__ is less than or equal to ``ClientWidth``, the horizontal ``ScrollBar`` disappears. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Sorted: bool + ''' + Specifies whether the items in a ``ListBox`` are arranged alphabetically. + + Use `Sorted <Vcl.StdCtrls.TCustomListBox.Sorted.htm>`__ to sort the items by setting its value to ``True``. If `Sorted <Vcl.StdCtrls.TCustomListBox.Sorted.htm>`__ is ``False``, the items are unsorted. When `Sorted <Vcl.StdCtrls.TCustomListBox.Sorted.htm>`__ is ``True``, items are automatically added or inserted into the ``ListBox`` in alphabetical order. + + .. note:: `Sorted <Vcl.StdCtrls.TCustomListBox.Sorted.htm>`__ has no effect if ``ListBox``\ s. style is ``lbVirtual`` or ``lbVirtualOwnerDraw`` + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + TabWidth: int + ''' + Specifies the size of the tabs in the ``ListBox``. + + Set `TabWidth <Vcl.StdCtrls.TCustomListBox.TabWidth.htm>`__ to control the number of dialog base units displayed for each tab character that appears in the strings of a ``ListBox``. + + If `TabWidth <Vcl.StdCtrls.TCustomListBox.TabWidth.htm>`__ is set to 0, which is the default setting, the tabs default to the width specified by *Windows*, which is two dialog base units. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnData(self, Control: WinControl, Index: int, Data: str) -> None: + ''' + # OnData: LBGetDataEvent + Occurs when a virtual ``ListBox`` needs to supply the text of an item. + + You must supply an `OnData <Vcl.StdCtrls.TCustomListBox.OnData.htm>`__ event handler to dynamically supply the items in the ``ListBox`` when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``. + + ``OnData`` is an event handler of type `Vcl.StdCtrls.TLBGetDataEvent <Vcl.StdCtrls.TLBGetDataEvent.htm>`__. + ''' + def OnDataFind(self, Control: WinControl, Findstr: str) -> int: + ''' + # OnDataFind: int + Occurs when a virtual ``ListBox`` needs to identify the index of an item given its text. + + You must supply an `OnDataFind <Vcl.StdCtrls.TCustomListBox.OnDataFind.htm>`__ event handler to dynamically provide the mapping from list item to index when the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property is ``lbVirtual`` or ``lbVirtualOwnerDraw``. + + ``OnDataFind`` is an event handler of type `Vcl.StdCtrls.TLBFindDataEvent <Vcl.StdCtrls.TLBFindDataEvent.htm>`__. + ''' + def OnDataObject(self, Control: WinControl, Index: int, DataObject: Object) -> None: + ''' + # OnDataObject: LBGetDataObjectEvent + Occurs when a virtual ``ListBox`` needs to supply the object associated with an item. + + Supply an `OnDataObject <Vcl.StdCtrls.TCustomListBox.OnDataObject.htm>`__ event handler to dynamically provide objects associated with the items in a virtual ``ListBox``. + + ``OnDataObject`` is an event handler of type `Vcl.StdCtrls.TLBGetDataObjectEvent <Vcl.StdCtrls.TLBGetDataObjectEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDrawItem(self, Control: WinControl, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + # OnDrawItem: DrawItemEvent + Occurs when an item in an owner-draw ``ListBox`` needs to be redisplayed. + + Use `OnDrawItem <Vcl.StdCtrls.TCustomListBox.OnDrawItem.htm>`__ to write a handler for drawing of the items in ``ListBox``\ es with the `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ values ``lbOwnerDrawFixed``, ``lbOwnerDrawVariable``, or ``lbVirtualOwnerDraw``. `OnDrawItem <Vcl.StdCtrls.TCustomListBox.OnDrawItem.htm>`__ occurs when the ``ListBox`` needs to display an item. `OnDrawItem <Vcl.StdCtrls.TCustomListBox.OnDrawItem.htm>`__ occurs only for owner-draw ``ListBox``\ es. + + The size of the rectangle that contains the item is determined either by the `ItemHeight <Vcl.StdCtrls.TCustomListBox.ItemHeight.htm>`__ property for fixed owner-draw ``ListBox``\ es or by the response to the `OnMeasureItem <Vcl.StdCtrls.TCustomListBox.OnMeasureItem.htm>`__ event for variable owner-draw ``ListBox``\ es. + + ``OnDrawItem`` is an event handler of type `Vcl.StdCtrls.TDrawItemEvent <Vcl.StdCtrls.TDrawItemEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMeasureItem(self, Control: WinControl, Index: int, Height: int) -> None: + ''' + # OnMeasureItem: MeasureItemEvent + Occurs when the application needs to redisplay an item in a variable height owner-draw ``ListBox``. + + Use `OnMeasureItem <Vcl.StdCtrls.TCustomListBox.OnMeasureItem.htm>`__ to write a handler to measure items to be drawn in a ``ListBox`` with a `Style <Vcl.StdCtrls.TCustomListBox.Style.htm>`__ property value of ``lbOwnerDrawVariable``. + + `OnMeasureItem <Vcl.StdCtrls.TCustomListBox.OnMeasureItem.htm>`__ is of type `Vcl.StdCtrls.TMeasureItemEvent <Vcl.StdCtrls.TMeasureItemEvent.htm>`__ which contains three parameters describing the item to measure. + + After the `OnMeasureItem <Vcl.StdCtrls.TCustomListBox.OnMeasureItem.htm>`__ event occurs, the `OnDrawItem <Vcl.StdCtrls.TCustomListBox.OnDrawItem.htm>`__ event occurs, rendering the item with the measured size. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ListItem(Persistent): + '''Wrapper for Delphi TListItem''' + __hash__: ClassVar[None] = ... + Caption: str + '''str:''' + Checked: bool + '''bool:''' + ClassName: Any + '''Returns the TObject.ClassName''' + Cut: bool + '''bool:''' + Data: Pointer + '''Pointer:''' + Deleting: bool + '''bool:''' + DropTarget: bool + '''bool:''' + Focused: bool + '''bool:''' + GroupID: int + '''int:''' + Handle: int + '''int:''' + ImageIndex: int + '''int:''' + Indent: int + '''int:''' + Index: int + '''int:''' + Left: int + '''int:''' + ListView: CustomListView + '''CustomListView:''' + OverlayIndex: int + '''int:''' + Owner: ListItems + '''ListItems:''' + Position: Point + '''Point:''' + Selected: bool + '''bool:''' + StateIndex: int + '''int:''' + SubItemImages: int + '''int:''' + SubItems: Strings + '''Strings:''' + Top: int + '''int:''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Assign(self, persistent) -> Any: + '''TPersistent.Assign(persistent) + Assigns to this object the values of another TPersistent object''' + def CancelEdit(self, *args, **kwargs) -> Any: ... + def Create(self, AOwner: ListItems) -> None: + '''TListItem.Create(AOwner: ListItems) -> None + Constructs an object and initializes its data before the object is first used. + Create constructs an object. The purpose, size, and behavior of objects differ greatly. The Create constructor defined by TObject allocates memory but does not initialize data. + Descendant objects usually define a constructor that creates the particular kind of object and initializes its data. + + Note: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance.''' + def Delete(self, *args, **kwargs) -> Any: ... + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys the TPersistent instance and frees its memory. + Do not call Destroy directly. Call Free instead. Free checks that the object reference is not nil before calling Destroy.''' + def DisplayRect(self, Code: DisplayCode) -> Rect: + '''TListItem.DisplayRect(Code: DisplayCode) -> Rect''' + def EditCaption(self, *args, **kwargs) -> Any: ... + def GetNamePath(self) -> Any: + '''TPersistent.GetNamePath() + Returns the name of the object as it appears in the Object Inspector.''' + def GetPosition(self, *args, **kwargs) -> Any: ... + def MakeVisible(self, PartialOK: bool) -> None: + '''TListItem.MakeVisible(PartialOK: bool) -> None''' + def SetPosition(self, Value: Point) -> None: + '''TListItem.SetPosition(Value: Point) -> None''' + def Update(self, *args, **kwargs) -> Any: ... + def WorkArea(self, *args, **kwargs) -> Any: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ListView(CustomListView): + '''Wrapper for Delphi TListView''' + __hash__: ClassVar[None] = ... + Action: BasicAction + '''BasicAction: Specifies the action associated with the control. + Action is the action object that is associated with the control. Actions allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an OnClick event). + To create actions at design time, place an action list component on a form or data module. Double-click the action list to bring up the action list editor. Add actions in the editor using its context menu. Once the actions have been added using the Action List editor, they appear in the drop-down list for the Action property in the Object Inspector.''' + Align: Align + '''Align: Determines how the control aligns within its container (parent control). + Use Align to align a control to the top, bottom, left, or right of a form or panel and have it remain there even if the size of the form, panel, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. + For example, to use a panel component with various controls on it as a tool palette, change the panel's Align value to alLeft. The value of alLeft for the Align property of the panel guarantees that the tool palette remains on the left side of the form and always equals the client height of the form. + The default value of Align is alNone, which means a control remains where it is positioned on a form or panel. + + Tip: If Align is set to alClient, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the form and pressing ESC, or by using the Object Inspector. + Any number of child components within a single parent can have the same Align value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + Note: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the Anchors property instead.''' + AllocBy: int + '''int:''' + Anchors: Anchors + '''Anchors: Specifies how the control is anchored to its parent. + Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its Anchors property set to [akLeft, akRight], the control stretches when the width of its parent changes. + Anchors is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the form is created in a maximized state, the control is not stretched because the form is not resized after the control is created. + + Note: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the Align property instead. Unlike Anchors, Align allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size.''' + BevelEdges: BevelEdges + '''BevelEdges: Specifies which edges of the control are beveled. + Use BevelEdges to get or set which edges of the control are beveled. The BevelInner, BevelOuter, and BevelKind properties determine the appearance of the specified edges.''' + BevelInner: BevelCut + '''BevelCut: Specifies the cut of the inner bevel. + Use BevelInner to specify whether the inner bevel has a raised, lowered, or flat look. + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (BevelOuter is bvNone), the inner bevel appears immediately inside the border.''' + BevelKind: BevelKind + '''BevelKind: Specifies the control's bevel style. + Use BevelKind to modify the appearance of a bevel. BevelKind influences how sharply the bevel stands out. + BevelKind, in combination with BevelWidth and the cut of the bevel specified by BevelInner or BevelOuter, can create a variety of effects. Experiment with various combinations to get the look you want.''' + BevelOuter: BevelCut + '''BevelCut: Specifies the cut of the outer bevel. + Use BevelOuter to specify whether the outer bevel has a raised, lowered, or flat look. + The outer bevel appears immediately inside the border and outside the inner bevel.''' + BevelWidth: int + '''int: Specifies the width of the inner and outer bevels. + Use BevelWidth to specify the width, in pixels, of the inner and outer bevels.''' + BiDiMode: BiDiMode + '''BiDiMode: Specifies the bidirectional mode for the control. + Use BiDiMode to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from right to left instead of left to right. The bidirectional mode controls the reading order for the text, the placement of the vertical scroll bar, and whether the alignment is changed. + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ftSmallint, ftInteger, ftWord, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftAutoInc.''' + BorderStyle: BorderStyle + '''BorderStyle:''' + BorderWidth: int + '''int: Specifies the width of the control's border. + Use BorderWidth to get or set the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border.''' + Checkboxes: bool + '''bool:''' + Color: int + '''int: Specifies the background color of the control. + Use Color to read or change the background color of the control. + If a control's Vcl.Controls.TControl.ParentColor property is True, then changing the Color property of the control's parent automatically changes the Color property of the control. When the value of the Color property is changed, the control's ParentColor property is automatically set to False. + The Color of a TLabel is always the color of the background unless you set TLabel.Transparent to False.''' + ColumnClick: bool + '''bool:''' + Columns: ListColumns + '''ListColumns:''' + Constraints: SizeConstraints + '''SizeConstraints: Specifies the size constraints for the control. + Use Constraints to specify the minimum and maximum width and height of the control. When Constraints contains maximum or minimum values, the control cannot be resized to violate those constraints. + + Note: Constraints apply to the height of the form. However, the height of the form depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the ClientHeight when you design your form and set the constraints in the FormCreate event. In the following example, ClientHeight is represented by x: Constraints.MinHeight?:= x + Height - ClientHeight. + Warning: Do not set up constraints that conflict with the value of the Align or Anchors property. When these properties conflict, the response of the control to resize attempts is not well-defined.''' + ControlCount: Any + '''Returns the count of contained controls''' + Controls: Any + '''Returns an iterator over contained controls''' + Ctl3D: bool + '''bool: Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + Ctl3D is provided for backward compatibility. It is not used by 32-bit versions of Windows or NT4.0 and later, with the exception of Windows XP Home, where it is used on occasion. + On earlier platforms, Ctl3D controlled whether the control had a flat or beveled appearance. + + + Note RAD Studio no longer supports Windows Vista or earlier.''' + DoubleBuffered: bool + '''bool: Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + When DoubleBuffered is false, the windowed control paints itself directly to the window. When DoubleBuffered is true, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + Note: Some controls, such as TRichEdit, can't paint themselves into a bitmap. For such controls, DoubleBuffered must be set to false.''' + DragCursor: int + '''int: Specifies the image used to represent the mouse pointer when the control is being dragged. + Use the DragCursor property to change the cursor image presented when the control is being dragged. + + Note: To make a custom cursor available for the DragCursor property, see the Cursor property.''' + DragKind: DragKind + '''DragKind: Specifies whether the control is being dragged normally or for docking. + Use DragKind to get or set whether the control participates in drag-and-drop operations or drag-and-dock operations.''' + DragMode: DragMode + '''DragMode: Specifies how the control initiates drag-and-drop or drag-and-dock operations. + Use DragMode to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the DragMode property value to dmManual. Enable automatic dragging by setting DragMode to dmAutomatic. For more information about dmManual and dmAutomatic, see TDragMode.''' + Enabled: bool + '''bool: Controls whether the control responds to mouse, keyboard, and timer events. + Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. + To re-enable a control, set Enabled to True. + + Note: This property applies to all TControl descendants.''' + FlatScrollBars: bool + '''bool:''' + Focused: Any + '''Determines whether the control has input focus.''' + Font: Font + '''Font: Specifies the attributes of text written on or in the control. + To change to a new font, specify a new TFont object. To modify a font, change the value of the Charset, Color, Height, Name , Pitch, Size, or Style of the TFont object. + + Note: Changing the font color of the Caption is not supported for some controls (such as TButton). In most cases, there is an alternate control you can use whose Font property will change the color of the caption or text (such as TBitBtn or TSpeedButton).''' + FullDrag: bool + '''bool:''' + GridLines: bool + '''bool:''' + GroupHeaderImages: CustomImageList + '''CustomImageList:''' + GroupView: bool + '''bool:''' + Groups: ListGroups + '''ListGroups:''' + Handle: Any + '''Provides access to the underlying Windows screen object for the control.''' + HandleAllocated: Any + '''Reports whether a screen object handle exists for the control.''' + HideSelection: bool + '''bool:''' + HotTrack: bool + '''bool:''' + HotTrackStyles: ListHotTrackStyles + '''ListHotTrackStyles:''' + HoverTime: int + '''int:''' + IconOptions: IconOptions + '''IconOptions:''' + Items: ListItems + '''ListItems:''' + LargeImages: CustomImageList + '''CustomImageList:''' + MultiSelect: bool + '''bool:''' + OnAdvancedCustomDraw: Callable[[CustomListView, Rect, CustomDrawStage, bool], None] + '''Callable[[CustomListView, Rect, CustomDrawStage, bool], None]:''' + OnAdvancedCustomDrawItem: Callable[[CustomListView, ListItem, CustomDrawState, CustomDrawStage, bool], None] + '''Callable[[CustomListView, ListItem, CustomDrawState, CustomDrawStage, bool], None]:''' + OnAdvancedCustomDrawSubItem: Callable[[CustomListView, ListItem, int, CustomDrawState, CustomDrawStage, bool], None] + '''Callable[[CustomListView, ListItem, int, CustomDrawState, CustomDrawStage, bool], None]:''' + OnChange: Callable[[Object, ListItem, ItemChange], None] + '''Callable[[Object, ListItem, ItemChange], None]:''' + OnChanging: Callable[[Object, ListItem, ItemChange, bool], None] + '''Callable[[Object, ListItem, ItemChange, bool], None]:''' + OnClick: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnColumnClick: Callable[[Object, ListColumn], None] + '''Callable[[Object, ListColumn], None]:''' + OnColumnDragged: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnColumnRightClick: Callable[[Object, ListColumn, Point], None] + '''Callable[[Object, ListColumn, Point], None]:''' + OnCompare: Callable[[Object, ListItem, ListItem, int, int], None] + '''Callable[[Object, ListItem, ListItem, int, int], None]:''' + OnContextPopup: Callable[[Object, Point, bool], None] + '''Callable[[Object, Point, bool], None]:''' + OnCreateItemClass: Callable[[CustomListView, ListItemClass], None] + '''Callable[[CustomListView, ListItemClass], None]:''' + OnCustomDraw: Callable[[CustomListView, Rect, bool], None] + '''Callable[[CustomListView, Rect, bool], None]:''' + OnCustomDrawItem: Callable[[CustomListView, ListItem, CustomDrawState, bool], None] + '''Callable[[CustomListView, ListItem, CustomDrawState, bool], None]:''' + OnCustomDrawSubItem: Callable[[CustomListView, ListItem, int, CustomDrawState, bool], None] + '''Callable[[CustomListView, ListItem, int, CustomDrawState, bool], None]:''' + OnData: Callable[[Object, ListItem], None] + '''Callable[[Object, ListItem], None]:''' + OnDataFind: Callable[[Object, ItemFind, str, Point, Pointer, int, SearchDirection, bool, int], None] + '''Callable[[Object, ItemFind, str, Point, Pointer, int, SearchDirection, bool, int], None]:''' + OnDataHint: Callable[[Object, int, int], None] + '''Callable[[Object, int, int], None]:''' + OnDataStateChange: Callable[[Object, int, int, ItemStates, ItemStates], None] + '''Callable[[Object, int, int, ItemStates, ItemStates], None]:''' + OnDblClick: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnDeletion: Callable[[Object, ListItem], None] + '''Callable[[Object, ListItem], None]:''' + OnDragDrop: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnDragOver: Callable[[Object, Object, int, int, DragState, bool], None] + '''Callable[[Object, Object, int, int, DragState, bool], None]:''' + OnDrawItem: Callable[[CustomListView, ListItem, Rect, OwnerDrawState], None] + '''Callable[[CustomListView, ListItem, Rect, OwnerDrawState], None]:''' + OnEdited: Callable[[Object, ListItem, str], None] + '''Callable[[Object, ListItem, str], None]:''' + OnEditing: Callable[[Object, ListItem, bool], None] + '''Callable[[Object, ListItem, bool], None]:''' + OnEndDock: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnEndDrag: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnEnter: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnExit: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnGesture: Callable[[Object, GestureEventInfo, bool], None] + '''Callable[[Object, GestureEventInfo, bool], None]:''' + OnGetImageIndex: Callable[[Object, ListItem], None] + '''Callable[[Object, ListItem], None]:''' + OnGetSubItemImage: Callable[[Object, ListItem, int, int], None] + '''Callable[[Object, ListItem, int, int], None]:''' + OnInfoTip: Callable[[Object, ListItem, str], None] + '''Callable[[Object, ListItem, str], None]:''' + OnInsert: Callable[[Object, ListItem], None] + '''Callable[[Object, ListItem], None]:''' + OnItemChecked: Callable[[Object, ListItem], None] + '''Callable[[Object, ListItem], None]:''' + OnKeyDown: Callable[[Object, int, ShiftState], None] + '''Callable[[Object, int, ShiftState], None]:''' + OnKeyPress: Any + '''Callable[[Object, unicodechr(str)], None]:''' + OnKeyUp: Callable[[Object, int, ShiftState], None] + '''Callable[[Object, int, ShiftState], None]:''' + OnMouseActivate: Callable[[Object, MouseButton, ShiftState, int, int, int, MouseActivate], None] + '''Callable[[Object, MouseButton, ShiftState, int, int, int, MouseActivate], None]:''' + OnMouseDown: Callable[[Object, MouseButton, ShiftState, int, int], None] + '''Callable[[Object, MouseButton, ShiftState, int, int], None]:''' + OnMouseEnter: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseLeave: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseMove: Callable[[Object, ShiftState, int, int], None] + '''Callable[[Object, ShiftState, int, int], None]:''' + OnMouseUp: Callable[[Object, MouseButton, ShiftState, int, int], None] + '''Callable[[Object, MouseButton, ShiftState, int, int], None]:''' + OnResize: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnSelectItem: Callable[[Object, ListItem, bool], None] + '''Callable[[Object, ListItem, bool], None]:''' + OnStartDock: Callable[[Object, DragDockObject], None] + '''Callable[[Object, DragDockObject], None]:''' + OnStartDrag: Callable[[Object, DragObject], None] + '''Callable[[Object, DragObject], None]:''' + OwnerData: bool + '''bool:''' + OwnerDraw: bool + '''bool:''' + ParentBiDiMode: bool + '''bool: Specifies whether the control uses its parent's BiDiMode. + Use ParentBiDiMode to get or set whether the control uses its parent's BiDiMode. When ParentBiDiMode is true, the control's BiDiMode property is always equal to that of its parent. If ParentBiDiMode is false, the control uses its own BiDiMode property. + Set ParentBiDiMode to true for all controls in a form to ensure that the entire user interface adjusts to Middle Eastern locales in a uniform manner. + When the value of the control's BiDiMode property changes, ParentBiDiMode becomes false automatically.''' + ParentColor: bool + '''bool: Specifies where a control looks for its color information. + To have a control use the same color as its parent control, set ParentColor to True. If ParentColor is False, the control uses its own Color property. + Set ParentColor to True for all controls to ensure that all the controls on a form have a uniform appearance. For example, if ParentColor is True for all controls in a form, changing the background color of the form to gray causes all the controls on the form to also have a gray background. + When the value of a control's Color property changes, ParentColor becomes False automatically.''' + ParentDoubleBuffered: bool + '''bool: ParentDoubleBuffered defers the DoubleBuffered property of this component to the value of the parent's DoubleBuffered property. + ParentDoubleBuffered is a boolean indicating that the DoubleBuffered property of this component is overridden by the value of the parent's DoubleBuffered property.''' + ParentFont: bool + '''bool: Specifies where a control looks for its font information. + To have a control use the same font as its parent control, set ParentFont to true. If ParentFont is false, the control uses its own Font property. Many controls default ParentFont to true so that all the controls in a form or other container present a uniform appearance. When the value of a control's Font property changes, ParentFont becomes false automatically. + When ParentFont is true for a form, the form uses the default font. Currently, the default font is Tahoma 8 pt.''' + ParentShowHint: bool + '''bool: Specifies where a control looks to find out if its Help Hint should be shown. + Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them. + If ParentShowHint is True, the control uses the ShowHint property value of its parent. If ParentShowHint is False, the control uses the value of its own ShowHint property. + To provide Help Hints only for selected controls on a form, set the ShowHint property for those controls that should have Help Hints to True, and ParentShowHint becomes False automatically. + + Note: Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.''' + ParentWindow: Any + '''Reference to parent's underlying control.''' + PopupMenu: PopupMenu + '''PopupMenu: Specifies the pop-up menu associated with the control. + Assign a value to PopupMenu to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the TPopupMenu's AutoPopup property is True, the pop-up menu appears automatically. If the menu's AutoPopup property is False, display the menu with a call to its Popup method from the control's OnContextPopup event handler.''' + ReadOnly: bool + '''bool:''' + RowSelect: bool + '''bool:''' + ShowColumnHeaders: bool + '''bool:''' + ShowHint: bool + '''bool: ShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control. + ShowHint determines whether the Help Hint appears for the control. The Help Hint is the value of the TControl.Hint property. The Help Hint appears in a box just beneath the control when the mouse pointer moves over the control. + To enable Help Hints for a particular control, two conditions must be satisfied: + + The application's ShowHint property must be True. + Either the control's own ShowHint property must be True, or the control's ParentShowHint property must be True and its parent's ShowHint property must be True. + For example, imagine a check box within a group box. If the ShowHint property of the group box is True and the ParentShowHint property of the check box is True, but the ShowHint property of the check box is False, the check box still displays its Help Hint. + Changing the ShowHint value automatically sets the ParentShowHint property to False.''' + ShowWorkAreas: bool + '''bool:''' + Showing: Any + '''Indicates whether the control is showing on the screen.''' + SmallImages: CustomImageList + '''CustomImageList:''' + SortType: SortType + '''SortType:''' + StateImages: CustomImageList + '''CustomImageList:''' + StyleElements: StyleElements + '''StyleElements: Specifies the style elements that are used by the control. + Use StyleElements to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + StyleElements is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled.''' + StyleName: str + '''str: Embarcadero Technologies does not currently have any additional information.''' + TabOrder: int + '''int: Indicates the position of the control in its parent's tab order. + TabOrder is the order in which child windows are visited when the user presses the Tab key. The control with the TabOrder value of 0 is the control that has the focus when the form first appears. + Initially, the tab order is always the order in which the controls were added to the form. The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and so on. Change this by changing the TabOrder property. + Each control has a unique tab-order value within its parent. If you change the TabOrder property value of one control to be the same as the value of a second control, the TabOrder value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's TabOrder property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + Assigning TabOrder a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of TabOrder, but instead is given the number that assures the control is the last in the tab order. + + Note: TabOrder is meaningful only if the TabStop property is True and if the control has a parent. (The TabOrder property of a form is not used unless the form is the child of another form.) A control with a TabOrder of -1 has no parent, and therefore cannot be reached by pressing the Tab key. To remove a parented control from the Tab order, set its TabStop property to False.''' + TabStop: bool + '''bool: Determines whether the user can tab to a control. + Use the TabStop to allow or disallow access to the control using the Tab key. + If TabStop is True, the control is in the tab order. If TabStop is False, the control is not in the tab order and the user cannot press the TAB key to move to the control. + + Note: TabStop is not meaningful for a form unless the form assigns another form to be its parent.''' + Touch: TouchManager + '''TouchManager: Specifies the touch manager component associated with the control. + Use the Touch property to access gesturing options associated with a control. Touch specifies a class of type TTouchManager. + Touch is used to: + + Associate a TGestureManager. + (TGestureManager manages all the gestures that can be used by the control.) + Select the standard, interactive, or custom gestures to associate with the control. + (You can also connect each gesture to an action; see Assigning Actions to Gestures.) + Specify a set of options for interactive or tablet gestures.''' + ViewStyle: ViewStyle + '''ViewStyle:''' + Visible: bool + '''bool: Specifies whether the component appears onscreen. + Use the Visible property to control the visibility of the control at run time. If Visible is True, the control appears. If Visible is False, the control is not visible. + Calling the Show method sets the control's Visible property to True. Calling the Hide method sets it to False. + For TCustomForm descendants, the Show and ShowModal methods set Visible to True and bring the form to the front of all open windows. + For TTabSheet descendants, Visible does not control the visibility of the control at run time. For more information, see the description of the TabVisible property.''' + + def CanFocus(self) -> Any: + '''TWinControl.CanFocus() + Indicates whether a control can receive focus.''' + def SetFocus(self) -> Any: + '''TWinControl.SetFocus() + Gives the input focus to the control.''' + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class MainMenu(Menu): + ''' + =================== + Vcl.Menus.TMainMenu + =================== + + ``MainMenu`` encapsulates a menu bar and its accompanying drop-down menus for a form. + + Use ``MainMenu`` to provide the ``MainMenu`` for a form. To begin designing a menu, add a ``MainMenu`` to a form, and double-click the component. + + ``MainMenu`` introduces properties and methods for merging the drop-down menus of the ``MainMenu`` with the ``MainMenu`` of another form. + + ``MainMenu`` introduces properties and methods for assisting in the menu negotiation process of an *OLE* container. + + .. tip:: To create a menu that users can configure at runtime, use the ``ActionMainMenuBar`` component with an action manager instead. + ''' + + __hash__: ClassVar[None] = ... + AutoHotkeys: MenuAutoFlag + ''' + Determines whether the accelerator keys for menu items can be reset automatically. + + Set `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ to indicate whether the menu should automatically ensure that accelerator keys for its items are reset if necessary so that every menu item has an accelerator key and no two items have the same accelerator key. This ensures that menu items added dynamically at runtime can have accelerator keys that do not introduce conflicts. `Menu <Vcl.Menus.TMenu.htm>`__ tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator. + + Before the menu is displayed, the menu checks and adjusts the accelerator key mappings if `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ is maAutomatic. When `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ is ``maManual``, the menu does not alter the top-level menu items, but may adjust the accelerator keys for submenus, depending on the `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ property of the menu item that is the parent of the submenu. + + When `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ is ``maManual``, an application can still adjust the menu items by calling the ``Items`` property's ``RethinkHotkeys()`` method. `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ merely controls whether this adjustment occurs automatically. + + .. note:: The `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ property of a menu is linked to the `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ property of the `Menu <Vcl.Menus.TMenu.htm>`__ ``Items`` object that implements its ``Items`` property. Setting one sets the other. + ''' + AutoLineReduction: MenuAutoFlag + ''' + Determines whether redundant separator bars are automatically removed from the menu. + + Set `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ to indicate whether the menu should automatically ensure that the menu does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at runtime do not have separator bars in undesired positions. + + Before the menu is displayed, it removes superfluous separator bars when `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ is maAutomatic. When `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ is ``maManual``, the menu does not remove separators from the top-level menu items, but may remove superfluous separators from submenus, depending on the `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ property of the menu item that is the parent of the submenu. + + When `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ is ``maManual``, an application can still remove superfluous separators by calling the `Items <Vcl.Menus.TMenu.Items.htm>`__ property's `RethinkLines <Vcl.Menus.TMenuItem.RethinkLines.htm>`__ method. `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ merely determines whether this adjustment occurs automatically. + + .. note:: The `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ property of a menu is linked to the `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ property of the `Menu <Vcl.Menus.TMenu.htm>`__ ``Items`` object that implements its `Items <Vcl.Menus.TMenu.Items.htm>`__ property. Setting one sets the other. + ''' + AutoMerge: bool + ''' + Determines if the ``MainMenu``\ s of secondary forms merge with the ``MainMenu`` of the main form in non-*MDI Application*s at runtime. To merge a form's menus with the ``MainMenu`` in the main form, set the ``AutoMerge`` property of each ``MainMenu`` you want merged to ``True``. Make sure that the ``AutoMerge`` property of the ``MainMenu`` of the main form (the one other menus are merged into) remains ``False``. How menus merge depends on the value of the ``GroupIndex`` property for each menu item. + + If the application is an *MDI Application* (the ``FormStyle`` properties are set so the main form is a parent form and subsequent forms are child forms), menu merging occurs automatically without using the ``AutoMerge`` property. + ''' + BiDiMode: BiDiMode + ''' + Determines the layout of the menu in *Middle East* locales. + + Set `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ to control the layout of menu items. `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ controls whether the menu items read from ``Left`` to ``Right`` or ``Right`` to ``Left``. + ''' + Images: CustomImageList + ''' + Lists the images that can appear beside individual menu items. + + Use `Images <Vcl.Menus.TMenu.Images.htm>`__ to hold the set of images that can appear beside menu items in the menu. Individual menu items set their ``ImageIndex`` property to indicate which image in the list appears to the left of the menu item caption. + + `Images <Vcl.Menus.TMenu.Images.htm>`__ in the list should be 16x16. + + .. tip:: If the application uses ``ActionList``s, this property should be the value of the ``ActionList``\ s. `Images <Vcl.Menus.TMenu.Images.htm>`__ property. This way, menu items and buttons that do the same thing can display the same image. + ''' + OwnerDraw: bool + ''' + Specifies whether the menu items are drawn by the application. + + Set `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ to ``True`` to indicate that the application will draw menu items in an `OnDrawItem <Vcl.Menus.TMenuItem.OnDrawItem.htm>`__ event handler. When `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ is ``True``, menu items receive an `OnMeasureItem <Vcl.Menus.TMenuItem.OnMeasureItem.htm>`__ and an `OnDrawItem <Vcl.Menus.TMenuItem.OnDrawItem.htm>`__ event when they need to be rendered on screen. + + Set `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ to ``False`` to accept the default drawing. When `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ is ``False``, menu items display the caption with an optional image to the left (If the `Images <Vcl.Menus.TMenu.Images.htm>`__ and `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ properties are set). + + Owner-draw menus are useful for displaying the value that appears when selecting a menu item. For example, in a menu that allows users to choose a color, an owner-draw menu could display rectangles drawn in the designated color, rather than color names. + ''' + ParentBiDiMode: bool + ''' + Indicates whether the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property is inherited from the control that uses the menu. + + By default, `ParentBiDiMode <Vcl.Menus.TMenu.ParentBiDiMode.htm>`__ is ``True``, indicating that the layout of menu items follows the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ setting of the associated form or control. Change `ParentBiDiMode <Vcl.Menus.TMenu.ParentBiDiMode.htm>`__ to ``False`` to override the default `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ setting and control the menu's layout independently. + ''' + + def MenuChanged(self, Sender: Object, Source: MenuItem, Rebuild: bool) -> None: + ''' + Responds when the menu changes. + + `MenuChanged <Vcl.Menus.TMenu.MenuChanged.htm>`__ is called automatically when changes occur that affect the structure of the menu. The ``Sender`` parameter indicates the object that originates the change. Its value can be ``nil`` (Delphi) or ``NULL`` (C++). ``Source`` indicates which menu item is affected. Rebuild indicates whether the menu must be rebuilt to reflect the change (for example when items are added or deleted). + + `MenuChanged <Vcl.Menus.TMenu.MenuChanged.htm>`__ calls the ``DoChange()`` method, which generates an ``OnChange`` event. + + .. note:: Changes that affect individual items rather than the menu as a whole trigger the ``UpdateItems()`` method instead of `MenuChanged <Vcl.Menus.TMenu.MenuChanged.htm>`__. For example, when the ``Images`` property changes, ``UpdateItems()`` is called rather than `MenuChanged <Vcl.Menus.TMenu.MenuChanged.htm>`__. + ''' + def GetHandle(self) -> HMENU: + ''' + Returns the value of the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ property. + + `GetHandle <Vcl.Menus.TMenu.GetHandle.htm>`__ is the protected implementation of the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ property. Override this method to change the implementation of the handle property. For example, ``MainMenu`` overrides `GetHandle <Vcl.Menus.TMenu.GetHandle.htm>`__ to adjust for menus added by embedded *OLE* objects. + ''' + def Merge(self, Menu: MainMenu) -> None: + ''' + Combines the ``MainMenu`` of one form with the ``MainMenu`` of another in non-*MDI Application*s. + + Call ``Merge`` to merge another ``MainMenu`` with this one. Specify the menu you want merged with this menu as the ``Menu`` parameter. + + For example, to use the ``MainMenu`` of the first form in an application as the ``MainMenu`` for the application, call ``Merge`` to merge the ``MainMenu`` of any additional forms in the application with the ``MainMenu`` of the first form. + + Depending on the value of the ``GroupIndex`` property of menu items on the ``MainMenu``, the merged menu items can replace menu items on the menu bar, or insert menu items into the menu bar. See ``GroupIndex`` for information on how to do these things. To merge and unmerge ``MainMenu``\ s automatically when other forms are displayed, change the value of the ``AutoMerge`` property to ``True`` on all forms whose menus should be merged in. + ''' + def Unmerge(self, Menu: MainMenu) -> None: + ''' + Reverses the merging of two menus in a non-*MDI Application*. + + Call ``Unmerge()`` to remove items from another ``MainMenu`` that were added using the Merge method. The ``Menu`` parameter is the merged menu whose items should be removed from the ``MainMenu``. + ''' + def PopulateOle2Menu(self, SharedMenu: HMenu, Groups: list[int], Widths: list[int]) -> None: + ''' + Populates an *OLE* menu with items from the ``MainMenu``. + + Call ``PopulateOle2Menu`` to merge the menu items with `GroupIndex <Vcl.Menus.TMenuItem.GroupIndex.htm>`__ values specified by the ``Groups`` parameter into the menu that uses the ``SharedMenu`` handle. ``PopulateOle2Menu`` appends all menu items in the specified groups to the menu, and increments the corresponding entries in the ``Widths`` array for every menu item appended. ``PopulateOle2Menu`` is used by *OLE* containers when merging menus. + + .. note:: ``PopulateOle2Menu`` populates the menu specified by the ``SharedMenu`` parameter but does not set this as the *OLE* menu associated with the menu. + ''' + def GetOle2AcceleratorTable(self, AccelTable: HAccel, AccelCount: int, Groups: list[int]) -> None: + ''' + Returns the ``MainMenu``\ s. accelerator table. + + Call ``GetOle2AcceleratorTable()`` to obtain a handle to an accelerator table for all menu items with a `GroupIndex <Vcl.Menus.TMenuItem.GroupIndex.htm>`__ value that appears in the ``Groups`` parameter. The ``AccelTable`` parameter is set to the accelerator table handle, and the ``AccelCount`` is set to the number of entries in the table. ``GetOle2AcceleratorTable`` is used by *OLE* containers when merging menus. + ''' + def SetOle2MenuHandle(self, Handle: HMENU) -> None: + ''' + Associates the handle for an *OLE* menu with the ``MainMenu``. + + Call ``SetOle2MenuHandle`` to temporarily replace the menu of a form with the menu represented by the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ parameter. To restore the original menu, call ``SetOle2MenuHandle`` with the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ parameter set to 0. ``SetOle2MenuHandle`` allows an *OLE* container to use menu items provided by an *OLE* server. + ''' + + def OnChange(self, Sender: Object, Source: MenuItem, Rebuild: bool) -> None: + ''' + Occurs when the menu changes. + + Write an `OnChange <Vcl.Menus.TMenu.OnChange.htm>`__ event handler to respond to changes in the menu's structure. `OnChange <Vcl.Menus.TMenu.OnChange.htm>`__ occurs when the menu is loaded into memory, and in response to property changes that affect the menu's structure. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class MediaPlayer(CustomControl): + '''TMediaPlayer controls devices that provide a Media Control Interface (MCI) driver. + The TMediaPlayer component includes a set of buttons (Play, Stop, Eject, and so on) that control a multimedia device such as a CD-ROM drive, MIDI sequencer, or VCR. A multimedia device may be hardware or software. + The media player component contains of multiple buttons. These buttons can be clicked with the mouse, but are not separate objects or button components. + + + + + + Button + + Value + + Action + + + + Play + + + + btPlay + + + + Plays the media player + + + + + Pause + + + + btPause + + + + Pauses playing or recording. If already paused when clicked, resumes playing or recording. + + + + + Stop + + + + btStop + + + + Stops playing or recording + + + + + Next + + + + btNext + + + + Skips to the next track, or to the end if the medium doesn't use tracks + + + + + Prev + + + + btPrev + + + + Skips to the previous track, or to the beginning if the medium doesn't use tracks + + + + + Step + + + + btStep + + + + Moves forward a number of frames + + + + + Back + + + + btBack + + + + Moves backward a number of frames + + + + + Record + + + + btRecord + + + + Starts recording + + + + + Eject + + + + btEject + + + + Ejects the medium + + + + + The multimedia device is played, paused, stopped, and so on when the user clicks the corresponding button on the TMediaPlayer component. The device can also be controlled by the control methods that correspond to the buttons (Play, Pause, Stop, Next, Previous, Step, Back, StartRecording, and Eject). + The type of multimedia device (such as dtWaveAudio or dtVideodisc) is specified by the DeviceType property. If the device stores its media in a file, the name of the media file is specified by the FileName property. If DeviceType is dtAutoSelect, the media player attempts to determine the type of device from the extension of the file specified by FileName. + To have the media player attempt to open the device specified by DeviceType automatically when the media player component is created at runtime, set the AutoOpen property to true.''' + __hash__: ClassVar[None] = ... + Align: Align + '''Align: Determines how the control aligns within its container (parent control). + Use Align to align a control to the top, bottom, left, or right of a form or panel and have it remain there even if the size of the form, panel, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. + For example, to use a panel component with various controls on it as a tool palette, change the panel's Align value to alLeft. The value of alLeft for the Align property of the panel guarantees that the tool palette remains on the left side of the form and always equals the client height of the form. + The default value of Align is alNone, which means a control remains where it is positioned on a form or panel. + + Tip: If Align is set to alClient, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the form and pressing ESC, or by using the Object Inspector. + Any number of child components within a single parent can have the same Align value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + Note: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the Anchors property instead.''' + Anchors: Anchors + '''Anchors: Specifies how the control is anchored to its parent. + Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its Anchors property set to [akLeft, akRight], the control stretches when the width of its parent changes. + Anchors is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the form is created in a maximized state, the control is not stretched because the form is not resized after the control is created. + + Note: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the Align property instead. Unlike Anchors, Align allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size.''' + AutoEnable: bool + '''bool: Determines whether the media player automatically enables and disables individual buttons in the component. + Use AutoEnable to automatically enable or disable the control buttons on the media player. If AutoEnable is true, the media player automatically enables or disables its control buttons. The media player determines which buttons to enable or disable by the current mode specified in the Mode property, and the current multimedia device type specified in the DeviceType property. + AutoEnable overrides the EnabledButtons property. The buttons enabled or disabled automatically by the media player supersede any buttons enabled or disabled with EnabledButtons. + If AutoEnable is false, the media player does not enable or disable buttons. The buttons must enabled or disabled with the EnabledButtons property. + The following table shows whether buttons are automatically enabled or disabled for each device mode: + + + + + + Button + + Play + + Record + + Pause + + Stop + + Not Open + + + + Back + + + + Enabled + + + + Enabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Eject + + + + Enabled + + + + Enabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Next + + + + Enabled + + + + Enabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Pause + + + + Enabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + Disabled + + + + + Play + + + + Disabled + + + + Disabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Prev + + + + Enabled + + + + Enabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Record + + + + Disabled + + + + Disabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Step + + + + Enabled + + + + Enabled + + + + Enabled + + + + Enabled + + + + Disabled + + + + + Stop + + + + Enabled + + + + Enabled + + + + Disabled + + + + Disabled + + + + Disabled''' + AutoOpen: bool + '''bool: Determines if the media player is opened automatically when the application is run. + Use AutoOpen to have the media player automatically open at runtime. + If AutoOpen is true, the media player attempts to open the multimedia device specified by the DeviceType property (or FileName if DeviceType is dtAutoSelect) when the form containing the media player component is created at runtime. + If AutoOpen is false, the device must be opened with a call to the Open method. + If an error occurs when opening the device, an exception of type EMCIDeviceError exception is raised that contains the error message. Upon completion, a numerical error code is stored in the Error property, and the corresponding error message is stored in the ErrorMessage property. + The Wait property determines whether control is returned to the application before opening the multimedia device. The Notify property determines whether opening the device generates an OnNotify event.''' + AutoRewind: bool + '''bool: Determines if the media player control rewinds before playing or recording. + If AutoRewind is true and the current position is at the end of the medium, Play or StartRecording moves the current position to the beginning of the medium before playing or recording. If AutoRewind is false, the user must click the Prev button or write code to call Previous to move to the beginning. + If values have been assigned to StartPos or EndPos or if the multimedia device uses tracks, AutoRewind has no effect on playing or recording. When calling Play or StartRecording, the current position remains at the end of the medium.''' + Capabilities: MPDevCapsSet + '''MPDevCapsSet: Determines the capabilities of the open multimedia device. + The various capabilities specified in Capabilities are determined when the device is opened with the Open method. + + Note: Currently, there is no way to check whether a device can step forward or backward. Capabilities includes mpCanStep only if the device type (specified in the DeviceType property) is Animation, AVI Video, Digital Video, Overlay, or VCR.''' + ColoredButtons: ButtonSet + '''ButtonSet: Determines which buttons on the media player control have color. + ColoredButtons controls which buttons on the media player are colored. + If a button is not colored with ColoredButtons, it appears in black-and-white when visible. All media player control buttons are colored by default.''' + Constraints: SizeConstraints + '''SizeConstraints: Specifies the size constraints for the control. + Use Constraints to specify the minimum and maximum width and height of the control. When Constraints contains maximum or minimum values, the control cannot be resized to violate those constraints. + + Note: Constraints apply to the height of the form. However, the height of the form depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the ClientHeight when you design your form and set the constraints in the FormCreate event. In the following example, ClientHeight is represented by x: Constraints.MinHeight?:= x + Height - ClientHeight. + Warning: Do not set up constraints that conflict with the value of the Align or Anchors property. When these properties conflict, the response of the control to resize attempts is not well-defined.''' + DeviceID: int + '''int: Specifies the device ID for the currently open multimedia device. + The value of DeviceID is determined when a device is opened with the Open method. If no device is open, DeviceID is 0.''' + DeviceType: MPDeviceTypes + '''MPDeviceTypes: Specifies a multimedia device type to open with the media player. + DeviceType specifies a multimedia device type to open with the Open method. The default is dtAutoSelect. + If DeviceType is dtAutoSelect, the device type is determined by the file extension specified in the FileName property. If no device type is associated with the extension, the correct device type must be explicitly specified by setting DeviceType to a value other than dtAutoSelect. + A multimedia device is typically associated with an appropriate file name extension when the device is installed. Associations are specified in the registry or SYSTEM.INI file. See the documentation for the specific device for instructions about how to associate file name extensions with the device.''' + Display: WinControl + '''WinControl: Specifies the display window for a multimedia device that uses a window for output. + To use Display, assign the name of a windowed control such as a form or panel to Display to display output in that control. + The default value of Display is nil (Delphi) or NULL (C++), meaning that the device creates its own window to display output. Also, by freeing the control assigned to Display after the device has been opened, video output will be in its own default window. + Examples of multimedia devices that use a window to display output are Animation, AVI Video, Digital Video, Overlay, and VCR.''' + DisplayRect: Rect + '''Rect: Specifies a rectangular area in the control specified by the Display property that is used to display output from a multimedia device. + To display output in a specific rectangle area on a form assign a TRect record to DisplayRect. The Rect function can be used to create a TRect record. + Media that use a rectangle to display output usually perform best if the default DisplayRect size is used. To set DisplayRect to the default size, position the rectangle in the upper left corner and use 0, 0 for the lower right corner. + DisplayRect is ignored if Display is nil (Delphi) or NULL (C++). + Examples of multimedia devices that use a window to display output are Animation, AVI Video, Digital Video, Overlay, and VCR. + + Note: DisplayRect can be set only after the media device is opened.''' + DoubleBuffered: bool + '''bool: Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + When DoubleBuffered is false, the windowed control paints itself directly to the window. When DoubleBuffered is true, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + Note: Some controls, such as TRichEdit, can't paint themselves into a bitmap. For such controls, DoubleBuffered must be set to false.''' + Enabled: bool + '''bool: Controls whether the control responds to mouse, keyboard, and timer events. + Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. + To re-enable a control, set Enabled to True. + + Note: This property applies to all TControl descendants.''' + EnabledButtons: ButtonSet + '''ButtonSet: Determines which buttons on the media player are usable. + EnabledButtons controls which buttons on the media player are enabled and usable. + An enabled button is colored and usable. A disabled button is dimmed and not usable. If a button is not enabled with EnabledButtons, it is disabled. By default, all buttons are enabled. + If the AutoEnable property is true, AutoEnable supersedes EnabledButtons. The buttons automatically enabled or disabled by the media player override any buttons enabled or disabled with the EnabledButtons property.''' + EndPos: int + '''int: Specifies the position within the currently loaded medium at which to stop playing or recording. + EndPos is specified using the current time format, which is specified in the TimeFormat property. + The EndPos property affects only the next Play or StartRecording method called after setting EndPos. Reset EndPos to affect any subsequent calls to Play or StartRecording.''' + Error: int + '''int: Specifies the MCI error code returned by the media control method. + Error specifies the MCI error code returned by the most recent media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop). The ErrorMessage property describes the Error. + The error code returned by media control methods are the same error code returned by the mciSendCommand function. The message describing the error code is stored in the ErrorMessage property. + The value of Error is zero if the most recent media control method didn't cause an error. If a method results in an error, a value other than zero is stored in Error. If the error occurs during the opening of the device, an EMCIDeviceError exception occurs.''' + ErrorMessage: str + '''str: Describes the error code stored in the Error property. + ErrorMessage specifies the error message that describes the error code returned from the most recent media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop). + The error code described by the message is stored in the Error property.''' + FileName: str + '''str: Specifies the opened or saved media file. + FileName specifies the media file to be opened by the Open method, or the file to save by the Save method. + At design time, use a file open dialog box to specify the FileName property by clicking the ellipsis button (...) in the Object Inspector.''' + Frames: int + '''int: Specifies the number of frames moved forward or backward. + Frames specifies the number of frames the Step method steps forward or the Back method steps backward. Frames defaults to ten percent of the length of the currently loaded medium, which is specified by the Length property. + The definition of a frame varies by multimedia device. For display media, a frame is one still image.''' + Length: int + '''int: Specifies the length of the medium in the open multimedia device. + Length is specified using the current time format, which is specified by the TimeFormat property.''' + Mode: MPModes + '''MPModes: Indicates the state of the currently open multimedia device. + Mode specifies the current state or mode of the currently open multimedia device. + The TMPModes type defines the modes for a multimedia device used with a TMediaPlayer.''' + Notify: bool + '''bool: Determines whether an OnNotify event is generated. + Notify determines whether the next call to a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) generates an OnNotify event when the method has completed. + If Notify is true, the next media control method generates OnNotify event upon completion and stores the notification message in the NotifyValue property. If Notify is false, the method does not generate an OnNotify event and NotifyValue remains unchanged. + Notify affects only the next call to a media control method. After an OnNotify event, Notify must be reset to affect any subsequent media control methods. + By default, Play and StartRecording function as if Notify is true. Set Notify to false before calling Play or StartRecording to prevent an OnNotify event from being generated when playing or recording has finished. By default, all other media control methods function as if Notify is false. + + Tip: Set Notify to true if the next media control is expected to take a long time, so the application is notified when the media control method has completed. If Notify is set to true, it is recommended to set Wait to false so that control returns to the application before the media control method is finished. + Note: When trying to resume a device that doesn't support Resume, the device is resumed as if the Play method was called. If Notify was assigned true before calling Resume (or any other media control method), Notify doesn't affect the call to Resume. Resume does not generate an OnNotify event upon completion, and NotifyValue remains unchanged.''' + NotifyValue: MPNotifyValues + '''MPNotifyValues: Indicates the result of the last media control method that requested a notification. + NotifyValue reports the result of the last media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) that requested a notification. + To request notification, set Notify to true before calling a media control method.''' + OnClick: Callable[[Object, MPBtnType, bool], None] + '''Callable[[Object, MPBtnType, bool], None]:''' + OnContextPopup: Callable[[Object, Point, bool], None] + '''Callable[[Object, Point, bool], None]:''' + OnEnter: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnExit: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseEnter: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseLeave: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnNotify: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnPostClick: Callable[[Object, MPBtnType], None] + '''Callable[[Object, MPBtnType], None]:''' + Parent: Any + '''Returns/Sets the Control Parent''' + ParentDoubleBuffered: bool + '''bool: ParentDoubleBuffered defers the DoubleBuffered property of this component to the value of the parent's DoubleBuffered property. + ParentDoubleBuffered is a boolean indicating that the DoubleBuffered property of this component is overridden by the value of the parent's DoubleBuffered property.''' + ParentShowHint: bool + '''bool: Specifies where a control looks to find out if its Help Hint should be shown. + Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them. + If ParentShowHint is True, the control uses the ShowHint property value of its parent. If ParentShowHint is False, the control uses the value of its own ShowHint property. + To provide Help Hints only for selected controls on a form, set the ShowHint property for those controls that should have Help Hints to True, and ParentShowHint becomes False automatically. + + Note: Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.''' + PopupMenu: PopupMenu + '''PopupMenu: Specifies the pop-up menu associated with the control. + Assign a value to PopupMenu to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the TPopupMenu's AutoPopup property is True, the pop-up menu appears automatically. If the menu's AutoPopup property is False, display the menu with a call to its Popup method from the control's OnContextPopup event handler.''' + Position: int + '''int: Specifies the current position within the currently loaded medium. + The value of Position is specified according to the current time format, which is specified in the TimeFormat property. + Position defaults to the beginning of the medium. If the medium supports multiple tracks, Position defaults to the beginning of the first track.''' + Shareable: bool + '''bool: Determines whether more than one application can share a multimedia device. + If Shareable is false, no other components or applications can access the device. If Shareable is true, more than one component or application can access the device. Shareable defaults to false. + Be sure to set Shareable before opening a device. + Some devices are not shareable. If Shareable is set to true for a device that isn't shareable, the Open method fails and the error code is returned to the Error property.''' + ShowHint: bool + '''bool: ShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control. + ShowHint determines whether the Help Hint appears for the control. The Help Hint is the value of the TControl.Hint property. The Help Hint appears in a box just beneath the control when the mouse pointer moves over the control. + To enable Help Hints for a particular control, two conditions must be satisfied: + + The application's ShowHint property must be True. + Either the control's own ShowHint property must be True, or the control's ParentShowHint property must be True and its parent's ShowHint property must be True. + For example, imagine a check box within a group box. If the ShowHint property of the group box is True and the ParentShowHint property of the check box is True, but the ShowHint property of the check box is False, the check box still displays its Help Hint. + Changing the ShowHint value automatically sets the ParentShowHint property to False.''' + Start: int + '''int: Specifies the starting position within the currently loaded medium. + Start is the beginning of the medium for devices that don't use tracks, or the beginning of the first track for devices that use tracks. Start is defined when a multimedia device is opened with the Open method. Start is specified according to the current time format, which is stored in the TimeFormat property. Start is read-only at runtime and is unavailable at design time.''' + StartPos: int + '''int: Specifies the position within the currently loaded medium from which to begin playing or recording. + StartPos is specified using the current time format, which is specified in the TimeFormat property. + The StartPos property affects only the next Play or StartRecording method called after setting StartPos. Reset must be set to StartPos to affect any subsequent calls to Play or StartRecording. + StartPos does not affect the current position of the medium (specified in the Position property) until the next Play or StartRecording method is called.''' + StyleName: str + '''str: Embarcadero Technologies does not currently have any additional information.''' + TabOrder: int + '''int: Indicates the position of the control in its parent's tab order. + TabOrder is the order in which child windows are visited when the user presses the Tab key. The control with the TabOrder value of 0 is the control that has the focus when the form first appears. + Initially, the tab order is always the order in which the controls were added to the form. The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and so on. Change this by changing the TabOrder property. + Each control has a unique tab-order value within its parent. If you change the TabOrder property value of one control to be the same as the value of a second control, the TabOrder value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's TabOrder property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + Assigning TabOrder a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of TabOrder, but instead is given the number that assures the control is the last in the tab order. + + Note: TabOrder is meaningful only if the TabStop property is True and if the control has a parent. (The TabOrder property of a form is not used unless the form is the child of another form.) A control with a TabOrder of -1 has no parent, and therefore cannot be reached by pressing the Tab key. To remove a parented control from the Tab order, set its TabStop property to False.''' + TabStop: bool + '''bool: Determines whether the user can tab to a control. + Use the TabStop to allow or disallow access to the control using the Tab key. + If TabStop is True, the control is in the tab order. If TabStop is False, the control is not in the tab order and the user cannot press the TAB key to move to the control. + + Note: TabStop is not meaningful for a form unless the form assigns another form to be its parent.''' + TimeFormat: MPTimeFormats + '''MPTimeFormats: Determines the format used to specify position information. + TimeFormat determines how the StartPos, Length, Position, Start, and EndPos properties are interpreted. For example, if Position is 180 and TimeFormat is tfMilliseconds, the current position is 180 milliseconds into the medium. If Position is 180 and TimeFormat is tfMSF, the current position is 180 minutes into the medium. + Not all formats are supported by every device. When trying to set an unsupported format, the assignment is ignored. + The current timing information is always passed in a 4-byte integer. In some formats, the timing information returned is not really one integer, but single bytes of information packed in the long integer.''' + TrackLength: int + '''int:''' + TrackPosition: int + '''int:''' + Tracks: int + '''int: Specifies the number of playable tracks on the open multimedia device. + Tracks indicates how many of playable tracks are available on the open multimedia device. + Tracks is undefined for devices that don't use tracks.''' + Visible: bool + '''bool: Specifies whether the component appears onscreen. + Use the Visible property to control the visibility of the control at run time. If Visible is True, the control appears. If Visible is False, the control is not visible. + Calling the Show method sets the control's Visible property to True. Calling the Hide method sets it to False. + For TCustomForm descendants, the Show and ShowModal methods set Visible to True and bring the form to the front of all open windows. + For TTabSheet descendants, Visible does not control the visibility of the control at run time. For more information, see the description of the TabVisible property.''' + VisibleButtons: ButtonSet + '''ButtonSet: Indicates which of the buttons on the media player are visible. + VisibleButtons determines which buttons on the media player that are visible. If a button is not made visible with VisibleButtons, it does not appear on the media player control. By default, all buttons are visible when a media player component is added to a form.''' + Wait: bool + '''bool: Determines whether a media control method returns control to the application only after it has been completed. + Wait determines whether a media control method (Back, Close, Eject, Next, Open, Pause, PauseOnly, Play, Previous, StartRecording, Resume, Rewind, Step, or Stop) returns control to the application only after it has been completed. + Wait is unavailable at design time. + If Wait is true, the media player component waits until the next media control method has completed before returning control to the application. If Wait is false, the application won't wait for the next media control method to finish before continuing. + Wait affects only the next media control method called after setting Wait. Wait must be reset to affect any subsequent call to a media control method. + By default, Play and StartRecording function as if Wait is false. Wait must be set to true before calling Play or StartRecording to prevent control from returning to the application before playing or recording has finished. By default, all other media control methods function as if Wait is true. + + Note: Wait is usually set to false only if the next media control is expected to take a long time, so that the application can execute other code before the media control method has completed. If Wait is set to false, you should set Notify to true so the application is notified when the media control method completes.''' + + def Back(self, *args, **kwargs) -> Any: + '''Steps backward a number of frames (determined by the value of the Frames property) in the currently loaded medium. + Back is called when the Back button on the media player control is clicked at runtime. + Upon completion, Back stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Back method has been completed. The Notify property determines whether Back generates an OnNotify event.''' + def BringToFront(self) -> Any: + '''TControl.BringToFront() + Puts the control in front of all other controls in its parent control.''' + def ClientToScreen(self) -> Any: + '''TControl.ClientToScreen() + Translates a given point from client area coordinates to global screen coordinates.''' + def Close(self, *args, **kwargs) -> Any: + '''Closes the open multimedia device. + Upon completion, Close stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Close method is completed. The Notify property determines whether Close generates an OnNotify event. + Close is called automatically when the application is terminated.''' + def Create(self, AOwner: Component) -> None: + '''TMediaPlayer.Create(AOwner: Component) -> None + Creates a media player object. + Call Create to instantiate a media player at runtime. For media players created at design time, Create is called automatically. + Create allocates memory for a media player and calls the inherited Create. Then it loads the bitmaps for the media player's buttons and initializes its properties, setting AutoEnable, AutoRewind, Colored, Enabled, and Visible to true, AutoOpen to false, and DeviceType to dtAutoSelect.''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys an instance of the media player. + Do not call Destroy directly in an application. Call Free instead. Free checks that the TMediaPlayer reference is not nil before it calls Destroy. + Destroy first verifies that no device is open, then destroys the bitmaps used for the media player's buttons and calls the inherited Destroy.''' + def Eject(self, *args, **kwargs) -> Any: + '''Releases the loaded medium from the open multimedia device. + Eject is called when the Eject button on the media player control is clicked at runtime. It ejects the loaded medium from the open multimedia device. + Upon completion, Eject stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Eject method has been completed. The Notify property determines whether Eject generates an OnNotify event.''' + def Hide(self) -> Any: + '''TControl.Hide() + Hides the wrapped Control''' + def Invalidate(self) -> Any: + '''TControl.Invalidate() + Completely repaint control.''' + def Next(self, *args, **kwargs) -> Any: + '''Moves to the beginning of the next track of the currently loaded medium. + If the current position is at the last track when Next is called, Next makes the current position the beginning of the last track. If the multimedia device doesn't use tracks, Next goes to the end of the medium. Next is called when the Next button on the media player control is clicked at runtime. + Upon completion, Next stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Next method has completed. The Notify property determines whether Next generates an OnNotify event.''' + def Open(self, *args, **kwargs) -> Any: + '''Opens a multimedia device. + Use Open to open a multimedia device. The multimedia device type must be specified in the DeviceType property before a device can be opened. + Upon completion, Open stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Open method is completed. The Notify property determines whether Open generates an OnNotify event.''' + def Pause(self, *args, **kwargs) -> Any: + '''Toggles the open multimedia device on or off. + If the device is already paused when Pause is called, the device resumes playing or recording by calling the Resume method. Pause is called when the Pause button on the media player control is clicked at runtime. + Upon completion, Pause stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Pause method has completed. The Notify property determines whether Pause generates an OnNotify event.''' + def PauseOnly(self, *args, **kwargs) -> Any: + '''Pauses the open multimedia device. + If the device is already paused when PauseOnly is called, the device will remain paused. + Upon completion, PauseOnly stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the PauseOnly method has completed. The Notify property determines whether PauseOnly generates an OnNotify event.''' + def Play(self, *args, **kwargs) -> Any: + '''Plays the media loaded in the open multimedia device. + Play is called when the Play button on the media player control is clicked at runtime. + Upon completion, Play stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Play method has completed. The Notify property determines whether Play generates an OnNotify event. + If the StartPos property is set, playing starts at the position specified in StartPos. Otherwise, playing starts at the current position, specified in the Position property. Similarly, if the EndPos property is set, playing stops at the position specified in EndPos. Otherwise, playing stops at the end of the medium. + Whether the medium (specified in the Position property) is rewound before playing starts depends on the AutoRewind property.''' + def Previous(self, *args, **kwargs) -> Any: + '''Sets the current position to the beginning of the previous track if the position was at the beginning of a track when Previous was called. + If the position is at the first track or somewhere other than the beginning of a track when Previous was called, Previous sets the current position to the beginning of the current track. If the device doesn't use tracks, Previous sets the current position to the beginning of the medium, which is specified in the Start property. Previous is called when the Previous button on the media player control is clicked at runtime. + Upon completion, Previous stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Previous method has completed. The Notify property determines whether Previous generates an OnNotify event.''' + def Repaint(self) -> Any: + '''TControl.Repaint() + Forces the control to repaint its image on the screen.''' + def Resume(self, *args, **kwargs) -> Any: + '''Resumes playing or recording the currently paused multimedia device. + Resume is called when the Pause button on the media player control is clicked at runtime, when the device is paused. + Upon completion, Resume stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Resume method has completed. The Notify property determines whether Resume generates an OnNotify event.''' + def Rewind(self, *args, **kwargs) -> Any: + '''Sets the current position to the beginning of the the medium, which is stored in the Start property. + Upon completion, Rewind stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Rewind method has completed. The Notify property determines whether Rewind generates an OnNotify event.''' + def Save(self, *args, **kwargs) -> Any: + '''Saves the currently loaded medium to the file specified in the FileName property. + Save is ignored for devices that don't use media stored in files (videodiscs, for example). + Upon completion, Save stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Save method has completed. The Notify property determines whether Save generates an OnNotify event.''' + def ScreenToClient(self) -> Any: + '''TControl.ScreenToClient() + Converts the screen coordinates of a specified point on the screen to client coordinates.''' + def SendToBack(self) -> Any: + '''TControl.SendToBack() + Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.''' + def SetBounds(self, Left, Top, Width, Height) -> Any: + '''TControl.SetBounds(Left, Top, Width, Height) + Sets the Left, Top, Width, and Height properties all at once.''' + def Show(self) -> Any: + '''TControl.Show() + Shows the wrapped Control''' + def StartRecording(self, *args, **kwargs) -> Any: + '''Begins recording from the current Position or from the position specified in StartPos. + StartRecording is called when the Record button on the media player control is clicked at runtime. + Upon completion, StartRecording stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the StartRecording method has completed. The Notify property determines whether StartRecording generates an OnNotify event. + By default, the Notify property becomes true, and the Wait property becomes false upon completion of the StartRecording method. However, if these properties have been set to specific values prior to calling StartRecording, they remain unchanged.''' + def Step(self, *args, **kwargs) -> Any: + '''Moves forward a number of frames (determined by the Frames property) in the currently loaded medium. + Step is called when the Step button on the media player control is clicked at runtime. + Upon completion, Step stores a numerical error code in the Error property and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Step method has completed. The Notify property determines whether Step generates an OnNotify event.''' + def Stop(self, *args, **kwargs) -> Any: + '''Halts playing or recording. + Stop is called when the Stop button on the media player control is clicked at runtime. + Upon completion, Stop stores a numerical error code in the Error property, and the corresponding error message in the ErrorMessage property. + The Wait property determines whether control is returned to the application before the Stop method has completed. The Notify property determines whether Stop generates an OnNotify event.''' + def Update(self) -> Any: + '''TControl.Update() + Processes any pending paint messages immediately.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Memo(CustomMemo): + ''' + ================== + Vcl.StdCtrls.TMemo + ================== + + ``Memo`` is a wrapper for a Windows multiline edit control. + + Use ``Memo`` to put a standard Windows multiline edit control on a form. Multiline edit boxes allow the user to enter more than one line of text. They are appropriate for representing lengthy information. + + ``Memo`` implements the generic behavior introduced in `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__. ``Memo`` publishes many of the properties inherited from `CustomMemo <Vcl.StdCtrls.TCustomMemo.htm>`__, but does not introduce any new behavior. + + .. note:: Under Win 9x, there is a limit of 64k of text for this control. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the text is aligned within the text edit control. + + Use `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ to change the way the text is formatted in the text edit control. `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ can take one of the following values: + + ==================== =========================================================== + **Value** **Meaning** + ==================== =========================================================== + ``taLeftJustify`` Align text to the left side of the control + ``taCenter`` Center text horizontally in the control. + ``taRightJustify`` Align text to the right side of the control. + ==================== =========================================================== + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the edit control has a single line border around the client area. + + Use `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ to affect the sharpness with which the client area of the edit control stands out. `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ can have a value of either ``bsSingle`` or ``bsNone``. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsSingle``, the edit control has a single-line border around the client area. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsNone``, there will be no border. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text within the edit control. + + Use `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to force the contents of the edit control to assume a particular case. + + When `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types them into the edit control. Changing the `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ property to ``ecLowerCase`` or ``ecUpperCase`` changes the actual contents of the text, not just the appearance. Any case information is lost and can't be recaptured by changing `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to ``ecNormal``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HideSelection: bool + ''' + Determines whether the visual indication of the selected text remains when focus shifts to another control. + + Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` to provide visual feedback of the selected portion of the text even when the edit control does not have focus. Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``True`` to show the selection only when the edit control has focus. `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ does not affect the actual value of the selection, only the visual indication. Always setting `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` can make forms with many ``Edit`` controls look too busy. + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + Lines: Strings + ''' + Contains the individual lines of text in the ``Memo`` control. + + Use `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ to manipulate text in an ``Memo`` control on a line-by-line basis. `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ is a `Strings <System.Classes.TStrings.htm>`__ object, so the `Strings <System.Classes.TStrings.htm>`__ methods may be used for `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ to perform manipulations such as counting the lines of text, adding new lines, deleting lines, or replacing lines with new text. For example: + + .. code-block:: python + :caption: Delphi + + MyMemo.Lines.Add(...); + + To work with all the text at once, use the ``Text`` property. To manipulate individual lines of text, the `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ property works better. + + .. note:: Although `Lines <Vcl.StdCtrls.TCustomMemo.Lines.htm>`__ is implemented as a `Strings <System.Classes.TStrings.htm>`__ descendant, it does not implement the support for associating objects with the strings in the list. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can enter into the edit control. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the number of characters that can be entered into the edit control. A value of 0 indicates that there is no application-defined limit on the length. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the length of the text in an edit control if that text will be copied into a fixed-length buffer. + + .. note:: Setting `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ characters. + + .. note:: Even when `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an edit control. + + .. note:: The unit of ``MaxLength`` is characters (not bytes) if the application is using themes. + ''' + OEMConvert: bool + ''' + Determines whether characters typed in the edit control are converted from *ANSI* to *OEM* and then back to *ANSI*. To ensure that any characters typed in the edit control can be unambiguously converted to the *OEM* character set, set `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ to ``True``. This causes all characters to be converted from *ANSI* to *OEM* and then back to *ANSI* as they are typed. Set `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ to ``False`` to avoid the overhead of this conversion when it does not matter whether the text can be unambiguously mapped to an *OEM* string. + + `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ is most useful for ``Edit`` controls used to enter file names when the application does not use Unicode file names. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the edit control. To restrict the edit control to display only, set the `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ property to ``True``. Set `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``False`` to allow the contents of the edit control to be edited. + + Setting `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + ScrollBars: ScrollStyle + ''' + Determines whether the ``Memo`` control has ``ScrollBar``\ s. + + Use `ScrollBars <Vcl.StdCtrls.TCustomMemo.ScrollBars.htm>`__ to give a multiline edit control horizontal or vertical ``ScrollBar``\ s. `ScrollBars <Vcl.StdCtrls.TCustomMemo.ScrollBars.htm>`__ can take one of the following values: + + =================== ================================================================ + **Value** **Meaning** + =================== ================================================================ + ``ssNone`` The control has no ``ScrollBar``\ s. + ``ssHorizontal`` The control has a single ``ScrollBar`` on the bottom edge. + ``ssVertical`` The control has a single ``ScrollBar`` on the right edge. + ``ssBoth`` The control has a ``ScrollBar`` on both the bottom and right edges. + =================== ================================================================ + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WantReturns: bool + ''' + Determines whether the user can insert return characters into the text. + + Set `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ to ``True`` to allow users to enter return characters into the text. Set `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ to ``False`` to allow the ``Form`` to handle return characters instead. + + For example, in a form with a default button (such as an *OK* button) and a ``Memo`` control, if `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ is ``False``, pressing *Enter* chooses the default button. If `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ is ``True``, pressing *Enter* inserts a return character in the text. + + .. note:: If `WantReturns <Vcl.StdCtrls.TCustomMemo.WantReturns.htm>`__ is ``False``, users can still enter return characters into the text by pressing Ctrl+Enter. + ''' + WantTabs: bool + ''' + Determines whether the user can insert tab characters into the text. + + Set `WantTabs <Vcl.StdCtrls.TCustomMemo.WantTabs.htm>`__ to ``True`` to allow users to enter tab characters into the text. Set `WantTabs <Vcl.StdCtrls.TCustomMemo.WantTabs.htm>`__ to ``False`` if you want the tab character to select the next control on the ``Form`` instead. + + .. note:: If `WantTabs <Vcl.StdCtrls.TCustomMemo.WantTabs.htm>`__ is ``True``, users can tab into the edit control, but they can't tab out. + ''' + WordWrap: bool + ''' + Determines whether the edit control inserts soft carriage returns so that the text wraps at the right margin. + + Set `WordWrap <Vcl.StdCtrls.TCustomMemo.WordWrap.htm>`__ to ``True`` to make the edit control wrap text at the right margin so that it fits in the client area. The wrapping has cosmetic purposes only. The text does not include any return characters that were not explicitly entered. Set `WordWrap <Vcl.StdCtrls.TCustomMemo.WordWrap.htm>`__ to ``False`` to have the edit control display a separate line only where return characters were explicitly entered into the text. + + .. note:: Most of the times when `WordWrap <Vcl.StdCtrls.TCustomMemo.WordWrap.htm>`__ is ``True``, the horizontal ``ScrollBar`` is not necessary. However, exceptions appear; when the line cannot be cut into pieces, the wrapping cannot occur. In these cases, the ``ScrollBar`` is still required. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + Occurs when the text for the edit control may have changed. + + Write an `OnChange <Vcl.StdCtrls.TCustomEdit.OnChange.htm>`__ event handler to take specific action whenever the text for the edit control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the edit control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the edit control. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute`` method, the action's ``OnExecute`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a button or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a button or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses Alt+B. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the form. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Applications`` key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. + + To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the TPanel and the TGroupBox controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the TPanel and the TGroupBox controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets Windows ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the Key to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like #13 for carriage return, #3 for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets Windows ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the Key to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like #13 for carriage return, #3 for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a button down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the form: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how Windows processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to left, right, or center mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to Win32 applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying Windows control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class MemoryStream(CustomMemoryStream): + '''TMemoryStream is a stream that stores its data in dynamic memory. + Use TMemoryStream to store data in a dynamic memory buffer that is enhanced with file-like access capabilities. TMemoryStream provides the general I/O capabilities of a stream object while introducing methods and properties to manage a dynamic memory buffer. + Memory streams are useful as intermediary objects that can hold information as well as read it from or write it to another storage medium. They provide a useful format for comparing the contents of streams, or for manipulating data that is stored in a less accessible medium.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Clear(self, *args, **kwargs) -> Any: + '''Frees the memory buffer, discarding all data associated with the memory stream. + Use Clear to empty the memory buffer for the memory stream and free all associated memory. In addition to freeing the memory associated with the memory buffer, Clear: + + Sets the Memory property to nil (Delphi) or NULL (C++). + Sets the Position property to 0. + Sets the Size property to 0.''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys an instance of TMemoryStream. + Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMemoryStream reference is not nil, and only then calls Destroy. + Destroy a TMemoryStream object when it is no longer needed to store or write data. Destroy calls Clear to free the memory buffer before calling the inherited destructor.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def LoadFromFile(self, FileName: str) -> None: + '''TMemoryStream.LoadFromFile(FileName: str) -> None + Loads the entire contents of a file into the memory buffer. + Use LoadFromFile to fill the memory stream with the contents of a file. Pass the name of the file as the FileName parameter. LoadFromFile allows an application to read the contents of a file into the memory stream without having to explicitly create and free a file stream object. + LoadFromFile reallocates the memory buffer so that the contents of the file will exactly fit. It sets the Size property accordingly, and then reads the entire contents of the file into the memory buffer. Thus, LoadFromFile will discard any pre-existing data stored in the memory stream.''' + def LoadFromStream(self, Stream: Stream) -> None: + '''TMemoryStream.LoadFromStream(Stream: Stream) -> None + Loads the entire contents of a stream into the memory buffer. + Use LoadFromStream to fill the memory stream with the contents of the stream specified by the Stream parameter. LoadFromStream always sets the Position of the source stream to 0, before streaming in the number of bytes indicated by the source stream's Size property. + LoadFromStream reallocates the memory buffer so that the contents of the source stream will exactly fit. It sets the Size property accordingly, and then reads the entire contents of the source stream into the memory buffer. Thus, LoadFromStream will discard any pre-existing data stored in the memory stream. + If the source stream is a TFileStream object, LoadFromStream does the same thing as LoadFromFile, except that the application must create and free the TFileStream object. LoadFromStream also allows applications to fill a memory stream object from other types of stream objects.''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def SetSize(self, NewSize: int) -> None: + '''TMemoryStream.SetSize(NewSize: int) -> None + Sets the Size property of the memory stream. + Use SetSize to set the Size of a memory stream before filling it with data. SetSize allocates the memory buffer to hold NewSize bytes, preserving as much of the existing data as possible. + Use SetSize before filling the memory buffer with data from various sources, or from a portion of another stream. If the intended contents of the memory stream is exactly the same as the contents of another stream or file, use LoadFromStream or LoadFromFile instead.\r + Sets the Size property of the memory stream. + Use SetSize to set the Size of a memory stream before filling it with data. SetSize allocates the memory buffer to hold NewSize bytes, preserving as much of the existing data as possible. + Use SetSize before filling the memory buffer with data from various sources, or from a portion of another stream. If the intended contents of the memory stream is exactly the same as the contents of another stream or file, use LoadFromStream or LoadFromFile instead.''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def Write(self, Buffer, Count: int) -> int: + '''TMemoryStream.Write(Buffer, Count: int) -> int + Writes Count bytes from Buffer to the current position in the memory buffer and updates the current position by Count bytes. + Use Write to insert Count bytes into the memory buffer of the memory stream, starting at the current position. Write will increase the size of the memory buffer, if necessary, to accommodate the data being written in. If the current position is not the end of the memory buffer, Write will overwrite the data following the current position. + Write updates the Size property to Position + Count, and sets the Position property to the new value of Size. Thus, any data that was stored in the memory stream in the Count bytes after the current position is lost when calling Write. + Write always writes the Count bytes in the Buffer, unless there is a memory failure. Thus, for TMemoryStream, Write is equivalent to the WriteBuffer method. + All other data-writing methods of a memory stream (WriteBuffer, WriteComponent) call Write to do the actual writing.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Menu(Component): + ''' + =============== + Vcl.Menus.TMenu + =============== + + ``Menu`` is the base type for menu components such as ``MainMenu`` and ``PopupMenu``. + + Use ``Menu`` as a base class when defining a component that represents a collection of ``MenuItems``. ``Menu`` introduces properties and methods to create a *Windows* menu that represents a set of ``MenuItems``, dispatch commands associated with those ``MenuItems``, and locate the help context id for any of those ``MenuItems``. + ''' + + __hash__: ClassVar[None] = ... + Images: CustomImageList + ''' + Lists the images that can appear beside individual menu items. + + Use ``Images`` to hold the set of images that can appear beside menu items in the menu. Individual menu items set their ``ImageIndex`` property to indicate which image in the list appears to the left of the menu item caption. + + ``Images`` in the list should be 16x16. + + .. tip:: If the application uses ``ActionList``s, this property should be the value of the ``ActionList``\ s. ``Images`` property. This way, menu items and buttons that do the same thing can display the same image. + ''' + AutoHotkeys: MenuAutoFlag + ''' + Determines whether the accelerator keys for menu items can be reset automatically. + + Set ``AutoHotkeys`` to indicate whether the menu should automatically ensure that accelerator keys for its items are reset if necessary so that every menu item has an accelerator key and no two items have the same accelerator key. This ensures that menu items added dynamically at runtime can have accelerator keys that do not introduce conflicts. `Menu <Vcl.Menus.TMenu.htm>`__ tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator. + + Before the menu is displayed, the menu checks and adjusts the accelerator key mappings if ``AutoHotkeys`` is maAutomatic. When ``AutoHotkeys`` is ``maManual``, the menu does not alter the top-level menu items, but may adjust the accelerator keys for submenus, depending on the ``AutoHotkeys`` property of the menu item that is the parent of the submenu. + + When ``AutoHotkeys`` is ``maManual``, an application can still adjust the menu items by calling the ``Items`` property's ``RethinkHotkeys()`` method. ``AutoHotkeys`` merely controls whether this adjustment occurs automatically. + + .. note:: The ``AutoHotkeys`` property of a menu is linked to the ``AutoHotkeys`` property of the `Menu <Vcl.Menus.TMenu.htm>`__ ``Items`` object that implements its ``Items`` property. Setting one sets the other. + ''' + AutoLineReduction: MenuAutoFlag + ''' + Determines whether redundant separator bars are automatically removed from the menu. + + Set ``AutoLineReduction`` to indicate whether the menu should automatically ensure that the menu does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at runtime do not have separator bars in undesired positions. + + Before the menu is displayed, it removes superfluous separator bars when ``AutoLineReduction`` is maAutomatic. When ``AutoLineReduction`` is ``maManual``, the menu does not remove separators from the top-level menu items, but may remove superfluous separators from submenus, depending on the ``AutoLineReduction`` property of the menu item that is the parent of the submenu. + + When ``AutoLineReduction`` is ``maManual``, an application can still remove superfluous separators by calling the `Items <Vcl.Menus.TMenu.Items.htm>`__ property's `RethinkLines <Vcl.Menus.TMenuItem.RethinkLines.htm>`__ method. ``AutoLineReduction`` merely determines whether this adjustment occurs automatically. + + .. note:: The ``AutoLineReduction`` property of a menu is linked to the ``AutoLineReduction`` property of the `Menu <Vcl.Menus.TMenu.htm>`__ ``Items`` object that implements its `Items <Vcl.Menus.TMenu.Items.htm>`__ property. Setting one sets the other. + ''' + BiDiMode: BiDiMode + ''' + Determines the layout of the menu in *Middle East* locales. + + Set ``BiDiMode`` to control the layout of menu items. ``BiDiMode`` controls whether the menu items read from ``Left`` to ``Right`` or ``Right`` to ``Left``. + ''' + Handle: HMENU + ''' + Provides access to the *Windows* menu handle for the menu. + + Use ``Handle`` to call a *Windows API* function that requires a menu handle. ``Handle`` is the handle for the menu that contains only the items described by the `Items <Vcl.Menus.TMenu.Items.htm>`__ property. + ''' + OwnerDraw: bool + ''' + Specifies whether the menu items are drawn by the application. + + Set ``OwnerDraw`` to ``True`` to indicate that the application will draw menu items in an `OnDrawItem <Vcl.Menus.TMenuItem.OnDrawItem.htm>`__ event handler. When ``OwnerDraw`` is ``True``, menu items receive an `OnMeasureItem <Vcl.Menus.TMenuItem.OnMeasureItem.htm>`__ and an `OnDrawItem <Vcl.Menus.TMenuItem.OnDrawItem.htm>`__ event when they need to be rendered on screen. + + Set ``OwnerDraw`` to ``False`` to accept the default drawing. When ``OwnerDraw`` is ``False``, menu items display the caption with an optional image to the left (If the `Images <Vcl.Menus.TMenu.Images.htm>`__ and `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ properties are set). + + Owner-draw menus are useful for displaying the value that appears when selecting a menu item. For example, in a menu that allows users to choose a color, an owner-draw menu could display rectangles drawn in the designated color, rather than color names. + ''' + ParentBiDiMode: bool + ''' + Indicates whether the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property is inherited from the control that uses the menu. + + By default, ``ParentBiDiMode`` is ``True``, indicating that the layout of menu items follows the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ setting of the associated form or control. Change ``ParentBiDiMode`` to ``False`` to override the default `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ setting and control the menu's layout independently. + ''' + WindowHandle: HWND + ''' + Provides access to the handle of the window that uses the menu. + + Read ``WindowHandle`` to get the window handle of the control that receives ``WM_COMMAND`` messages when the user clicks on an item in the menu. When menu items are selected, use this handle in an `OnClick <Vcl.Menus.TMenuItem.OnClick.htm>`__ event handler to send messages to the control that uses the menu or to make *Windows API* calls that affect the control. + + Set ``WindowHandle`` to associate the menu with a control. + ''' + Items: MenuItem + ''' + Describes the elements of the menu. + + Use ``Items`` to access information about the elements in the menu. ``Items`` is a single `Menu <Vcl.Menus.TMenu.htm>`__ ``Item`` object that describes the elements of the menu in its own ``Items`` property. + + .. note:: Because ``Items`` is the default property of `Menu <Vcl.Menus.TMenu.htm>`__ Item, the ``Items`` property of `Menu <Vcl.Menus.TMenu.htm>`__ can be treated as an indexed array of menu items that describe the individual items in the menu. That is, instead of writing + + .. note:: ``FirstItem := Menu1.Items.Items[0];`` + + .. note:: you can use + + .. note:: ``FirstItem := Menu1.Items[0];`` + + Set the ``Items`` property at design time by clicking on the ``Items`` property in the Property Inspector. The *Menu Designer* automatically inserts a menu item. As each menu item is entered, outlined regions appear at the possible locations of additional menu items. Click in those regions to specify additional menu items. At runtime, create a `Menu <Vcl.Menus.TMenu.htm>`__ ``Item`` that describes the elements of the menu programmatically, and set the ``Items`` property of the menu. + ''' + + def AdjustBiDiBehavior(self) -> None: + ''' + Applies the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property to the menu when the *Windows* control is created. + + ``AdjustBiDiBehavior()`` is called automatically when the *Windows* control for the menu is created. It ensures that the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property is properly reflected in the menu if the application is running in a *Middle Eastern* locale. + ''' + def DoChange(self, Source: MenuItem, Rebuild: bool) -> None: + ''' + Generates an ``OnChange`` event. + + ``DoChange()`` is called automatically when the properties of any menu items change. The ``Source`` parameter specifies the menu item (if any) that changed. The ``Rebuild`` parameter indicates whether the change requires the menu to regenerate its items. + ''' + def DoBiDiModeChanged(self) -> None: + ''' + Updates the menu when the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property changes. + + Do not call ``DoBiDiModeChanged``. It is called automatically when the menu's `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property changes to update the menu to reflect the current setting. + ''' + def GetHandle(self) -> HMENU: + ''' + Returns the value of the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ property. + + ``GetHandle()`` is the protected implementation of the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ property. Override this method to change the implementation of the handle property. For example, ``MainMenu`` overrides ``GetHandle()`` to adjust for menus added by embedded *OLE* objects. + ''' + def IsOwnerDraw(self) -> bool: + ''' + Indicates whether menu items can contain more than simple captions. + + ``IsOwnerDraw()`` returns ``True`` when the `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ property is ``True`` or the `Images <Vcl.Menus.TMenu.Images.htm>`__ property is not ``nil`` (Delphi) or ``NULL`` (C++). This is used internally to determine how the menu should be painted. + ''' + def Loaded(self) -> None: + ''' + Calls the ``DoChange()`` method when the menu is first loaded into memory. + + ``Loaded()`` is called automatically immediately after the menu is loaded into memory. It calls the ``DoChange()`` method to allow any necessary fixup. + ''' + def MenuChanged(self, Sender: Object, Source: MenuItem, Rebuild: bool) -> None: + ''' + Responds when the menu changes. + + ``MenuChanged()`` is called automatically when changes occur that affect the structure of the menu. The ``Sender`` parameter indicates the object that originates the change. Its value can be ``nil`` (Delphi) or ``NULL`` (C++). ``Source`` indicates which menu item is affected. Rebuild indicates whether the menu must be rebuilt to reflect the change (for example when items are added or deleted). + + ``MenuChanged()`` calls the ``DoChange()`` method, which generates an ``OnChange`` event. + + .. note:: Changes that affect individual items rather than the menu as a whole trigger the ``UpdateItems()`` method instead of ``MenuChanged()``. For example, when the ``Images`` property changes, ``UpdateItems()`` is called rather than ``MenuChanged()``. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds when components are added or deleted. + + `Menu <Vcl.Menus.TMenu.htm>`__ overrides the inherited method to set the ``Images`` property to ``nil`` (Delphi) or ``NULL`` (C++) if the ``ImageList`` is deleted. + ''' + def SetChildOrder(self, Child: Component, Order: int) -> None: + ''' + Ensures that the menu item indexes reflect the order in which they are loaded and saved. + + ``SetChildOrder()`` is called automatically when menus are loaded into memory. The ``Child`` parameter specifies the child object that was just loaded. The ``Order`` parameter specifies the order in which it was loaded. ``SetChildOrder()`` assigns the ``MenuIndex`` for each child to match the order in which the items are loaded. + ''' + def UpdateItems(self) -> None: + ''' + Causes all menu items to update themselves. + + ``UpdateItems()`` is called automatically when changes occur that must be reflected by individual menu items. Changes that affect the menu as a whole trigger the `MenuChanged <Vcl.Menus.TMenu.MenuChanged.htm>`__ method instead. + ''' + def DoGetMenuString(self, Menu: HMENU, ItemID: int, Flag: int) -> str: + ''' + Returns the caption for an item in the menu. + + ``DoGetMenuString()`` is used internally to obtain menu item captions, given the *Windows* menu handle. The ``Menu`` parameter indicates the menu's handle. The ``ItemID`` parameter specifies the menu item whose caption is desired. If the ``Flag`` parameter is ``MF_BYCOMMAND``, ``ItemID`` is the `Command <Vcl.Menus.TMenuItem.Command.htm>`__ property of the menu item. If ``Flag`` is ``MF_BYPOSITION``, ``ItemID`` is the 0-based index of the menu item. The ``Caption`` is returned in a buffer pointed to by the ``Str`` parameter. ``MaxCount`` indicates the size of that buffer. + + Unlike the *Windows API* function ``GetMenuString``, ``DoGetMenuString()`` returns the correct caption for owner-draw menu items. + ''' + def DoGetMenuString(self, Menu: HMENU, ItemID: int, Str: PChar, MaxCount: int, Flag: int) -> int: + ''' + Returns the caption for an item in the menu. + + ``DoGetMenuString()`` is used internally to obtain menu item captions, given the *Windows* menu handle. The ``Menu`` parameter indicates the menu's handle. The ``ItemID`` parameter specifies the menu item whose caption is desired. If the ``Flag`` parameter is ``MF_BYCOMMAND``, ``ItemID`` is the `Command <Vcl.Menus.TMenuItem.Command.htm>`__ property of the menu item. If ``Flag`` is ``MF_BYPOSITION``, ``ItemID`` is the 0-based index of the menu item. The ``Caption`` is returned in a buffer pointed to by the ``Str`` parameter. ``MaxCount`` indicates the size of that buffer. + + Unlike the *Windows API* function ``GetMenuString``, ``DoGetMenuString()`` returns the correct caption for owner-draw menu items. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `Menu <Vcl.Menus.TMenu.htm>`__. + + Call ``Create()`` to create a menu at runtime. Menus placed on forms at design time are created automatically. ``Create()`` calls the inherited ``Create()`` method, then sets the initial values for the menu component, including creating an ``Items`` property. + + The ``AOwner`` parameter indicates the component (usually a form) that is responsible for managing the memory associated with the menu. + ''' + def CreateMenuItem(self) -> MenuItem: + ''' + No have docs. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the menu component. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `Menu <Vcl.Menus.TMenu.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. ``Destroy()`` frees the ``Items`` property, and then calls the inherited ``Destroy()`` method. + ''' + def DispatchCommand(self, ACommand: int) -> bool: + ''' + Calls the `Click <Vcl.Menus.TMenuItem.Click.htm>`__ method of the menu item with the specified value as its `Command <Vcl.Menus.TMenuItem.Command.htm>`__ property. + + Call ``DispatchCommand()`` to simulate a click on the menu item associated with a command ``ID``. If ``DispatchCommand()`` locates a menu item that matches the command ``ID``, it calls the `Click <Vcl.Menus.TMenuItem.Click.htm>`__ method for that menu item and returns ``True``. If there is no such item, ``DispatchCommand()`` returns ``False``. + ''' + def DispatchPopup(self, AHandle: HMENU) -> bool: + ''' + Dispatches a pop-up menu command. + + Call ``DispatchPopup()`` to simulate a click on the menu item associated with the pop-up menu handle. If ``DispatchPopup()`` locates a menu item that matches the pop-up menu handle, it calls the `Click <Vcl.Menus.TMenuItem.Click.htm>`__ method for that menu item and returns ``True``. If there is no such item, ``DispatchPopup()`` returns ``False``. + ''' + def FindItem(self, Value: int, Kind: FindItemKind) -> MenuItem: + ''' + Locates and returns a menu item. + + Call ``FindItem()`` to locate a menu item in the menu or one of its submenus. The menu item is identified by either a pop-up menu handle, command ``ID``, or menu shortcut value. The ``Kind`` parameter specifies how the menu item is to be identified. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Executes a *callback* for child menu items. + + ``GetChildren()`` is called automatically by the streaming system so that child menu items are saved and read with their parent menu. + ''' + def GetHelpContext(self, Value: int, ByCommand: bool) -> HelpContext: + ''' + Returns the help context ``ID`` associated with a menu item. + + Call ``GetHelpContext()`` to obtain the ``ID`` for context-sensitive help on a particular menu item. Identify the menu item as the item that matches the ``Value`` property. If ``ByCommand`` is ``True``, ``Value`` is the `Command <Vcl.Menus.TMenuItem.Command.htm>`__ property of the `Menu <Vcl.Menus.TMenu.htm>`__ Item. If ``ByCommand`` is ``False``, ``Value`` is the `Handle <Vcl.Menus.TMenu.Handle.htm>`__ property. + ''' + def IsRightToLeft(self) -> bool: + ''' + Indicates whether menu items read from ``Right`` to ``Left``. + + Call ``IsRightToLeft()`` to determine the layout of ``MainMenu`` items. ``IsRightToLeft()`` returns ``True`` if the application is running on a system with a *Middle Eastern* locale and the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property is not ``bdLeftToRight``. + ''' + def IsShortCut(self, Message: WMKey) -> bool: + ''' + Dispatches a key message if it represents a shortcut key for an item in the menu. + + Call ``IsShortCut()`` when processing a ``KeyDown()`` message to identify shortcut keys and trigger the appropriate menu action. ``IsShortCut()`` decodes the key message passed in the ``Message`` parameter. It then encodes the state of the *Shift*, *Control*, and *Alt* keys with the value of the character that was typed to obtain the ``ShortCut`` property of a menu item. If ``IsShortCut()`` locates a menu item associated with the shortcut key combination, it calls the item's ``Click()`` method and returns ``True``. If no item in the menu has a shortcut corresponding to the message, ``IsShortCut()`` returns ``False``. + ''' + @overload + def ParentBiDiModeChanged(self) -> None: + ''' + Ensures that the menu's layout follows the current settings of the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ and `ParentBiDiMode <Vcl.Menus.TMenu.ParentBiDiMode.htm>`__ properties. + + ``ParentBiDiMode`` changed is called when the menu's `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property must be updated to reflect the bi-directional mode of its associated control. + ''' + @overload + def ParentBiDiModeChanged(self, AControl: Object) -> None: ... + def ProcessMenuChar(self, Message: WMMenuChar) -> None: + ''' + Responds to keyboard input for the menu. + + ``ProcessMenuChar`` handles keyboard messages from Windows. It checks whether the character typed is an accelerator character from one of the menu's items. If so, ``ProcessMenuChar`` executes the menu item (or, if the item is disabled, selects it). If the key is not an accelerator, ``ProcessMenuChar`` checks for captions that begin with the character. If there is only one, it is treated like an accelerator. Otherwise, the first item beginning with that character is selected. + + When calling ``ProcessMenuChar`` programmatically, the *User*, *MenuFlag*, and *Menu* fields of ``Message`` parameter must be supplied. + ''' + + def OnChange(self, Sender: Object, Source: MenuItem, Rebuild: bool) -> None: + ''' + # OnChange: MenuChangeEvent + Occurs when the menu changes. + + Write an ``OnChange`` event handler to respond to changes in the menu's structure. ``OnChange`` occurs when the menu is loaded into memory, and in response to property changes that affect the menu's structure. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class MenuItem(Component): + ''' + =================== + Vcl.Menus.TMenuItem + =================== + + ``MenuItem`` describes the properties of an item in a menu. + + Use ``MenuItem`` to specify the appearance and behavior of an item in a menu. Each ``MainMenu`` or ``PopupMenu`` component can contain multiple ``MenuItems``. When a menu is defined at design time, the *Menu Designer* automatically creates ``MenuItem`` objects for each command on the menu. + + The `Caption <Vcl.Menus.TMenuItem.Caption.htm>`__ property can be used to `define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to the ``MenuItem`` of a `MainMenu <Vcl.Menus.TMainMenu.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + ActionLink: MenuActionLink + ''' + No have docs. + ''' + Merged: MenuItem + ''' + No have docs. + ''' + Command: int + ''' + Specifies the *Windows* ``Command`` ``ID`` associated with the ``MenuItem``. + + Use ``Command`` in an application that directly handles ``WM_COMMAND`` messages. When the user selects the ``MenuItem``, Windows sends a ``WM_COMMAND`` to the window associated with the menu. The ``ItemID`` of the message contains the value of the ``Command`` property of the ``MenuItem`` that was selected. + ''' + Handle: HMENU + ''' + Indicates the *Windows* menu handle of the drop-down menu associated with the ``MenuItem``. + + Use ``Handle`` when calling a *Windows API* function that requires a menu handle. ``Handle`` is only valid if the ``Count`` property is greater than 0. + ''' + Count: int + ''' + Indicates the number of subitems of the ``MenuItem``. + + Read ``Count()`` to determine the number of subitems listed in the ``Items`` property array. When the user clicks on a ``MenuItem`` that has subitems, a dropdown menu appears which displays those subitems. Each subitem can, in turn, contain additional subitems. The ``Count()`` property counts only the immediate subitems of the ``MenuItem``. + ''' + Items: list[MenuItem] + ''' + Lists the ``MenuItems`` in the submenu of the ``MenuItem``. + + Use ``Items`` to access to a subitem by its position in the list of subitems. The value of ``Index`` is the position of the subitem within the ``Items`` array. For example, if an application has a File drop-down menu that contains the ``MenuItems`` New, Open, and Save, in that order, the expression + + .. code-block:: python + :caption: Delphi + + FileMenu.Items[2] + + .. code-block:: python + :caption: C++ + + FileMenu->Items[2] + + refers to the *Save* command. + + .. note:: In Delphi, ``Items`` is the default property for ``MenuItem`` <Vcl.Menus.TMenuItem.htm>`__. This means you can leave off the property name. Thus, instead of writing ``FileMenu.Items[2]``, you can write ``FileMenu[2]``. + + .. note:: In C++, ``Items`` can be accessed using the ``'[]'`` ``operator``, to achieve an affect similar to the default property in Delphi. + ''' + MenuIndex: int + ''' + Indicates the ``Index`` of the ``MenuItem`` within its parent menu. + + Use ``MenuIndex`` to locate the ``MenuItem`` in the ``Items`` property of its parent ``MenuItem``. Changing this value moves the ``MenuItem`` within its menu. + + .. note:: ``MenuIndex`` may not correspond to the position of the item in the menu the user sees. The menu can include items that are not visible. + ''' + Parent: MenuItem + ''' + Identifies the parent ``MenuItem`` of this ``MenuItem``. + + Read ``Parent`` to determine the ``MenuItem`` that represents the dropdown menu that contains this ``MenuItem``. If the ``MenuItem`` is a top level ``MenuItem`` in a ``MainMenu`` or pop-up menu, *``Parent`` is the value of that menu's ``Items`` property. + ''' + Action: BasicAction + ''' + Designates the ``Action`` associated with the ``MenuItem``. + + ``Action`` designates the ``Action`` object that is associated with the ``MenuItem``. ``Actions`` can be associated with a ``MenuItem`` by using the ``ActionList`` editor at design-time. ``Actions`` are a way of centralizing user responses to commands. + ''' + AutoCheck: bool + ''' + Indicates whether the ``MenuItem``\ s. checked state toggles automatically when the item is clicked. + + When ``AutoCheck`` is ``True``, then every time the ``MenuItem`` is clicked, the value of the `Checked <Vcl.Menus.TMenuItem.Checked.htm>`__ property toggles automatically before the `OnClick <Vcl.Menus.TMenuItem.OnClick.htm>`__ event occurs. When ``AutoCheck`` is ``False``, the application must explicitly set the value of the `Checked <Vcl.Menus.TMenuItem.Checked.htm>`__ property (for example, in an `OnClick <Vcl.Menus.TMenuItem.OnClick.htm>`__ event handler). + ''' + AutoHotkeys: MenuItemAutoFlag + ''' + Determines whether the accelerator keys for sub``MenuItems`` can be reset automatically. + + Set ``AutoHotkeys`` to indicate whether the accelerator keys for the items in the ``Items`` property can be reset if necessary to ensure that every ``MenuItem`` has an accelerator key and no two items have the same accelerator key. This ensures that ``MenuItems`` added dynamically at runtime can have accelerator keys that do not introduce conflicts. `MenuItem <Vcl.Menus.TMenuItem.htm>`__ tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator. + + Before the menu is displayed, it checks and adjusts the accelerator key mappings if ``AutoHotkeys`` is maAutomatic or if ``AutoHotkeys`` is maParent and the parent ``MenuItem`` adjusts accelerator key mappings. Otherwise, the menu does not alter the items listed in the ``Items`` property, but may adjust the accelerator keys for submenus, depending on the ``AutoHotkeys`` property of the ``MenuItem`` that is the parent of the submenu. + + .. note:: When ``AutoHotkeys`` disallows automatic adjustment of accelerator keys, an application can still adjust the ``MenuItems`` by calling the ``RethinkHotkeys()`` method. ``AutoHotkeys`` merely controls whether this adjustment occurs automatically. + ''' + AutoLineReduction: MenuItemAutoFlag + ''' + Determines whether redundant separator bars are automatically removed from the submenu. + + Set ``AutoLineReduction`` to indicate whether the ``MenuItem`` should automatically ensure that the submenu defined by its `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at run time do not have separator bars in undesired positions. + + Before the menu is displayed, the ``MenuItem`` removes superfluous separator bars if ``AutoLineReduction`` is maAutomatic or ``AutoLineReduction`` is maParent and the parent ``MenuItem`` removes superfluous separator bars. Otherwise, the ``MenuItem`` does not remove separators from the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property, but may remove superfluous separators from submenus, depending on the ``AutoLineReduction`` property of the ``MenuItem`` that is the parent of the submenu. + + .. note:: When ``AutoLineReduction`` disallows automatic removal of separator bars, an application can still remove superfluous separators by calling the `RethinkLines <Vcl.Menus.TMenuItem.RethinkLines.htm>`__ method. ``AutoLineReduction`` merely controls whether this adjustment occurs automatically. + ''' + Bitmap: Bitmap + ''' + Designates a bitmap that is drawn for the ``MenuItem``. + + Use ``Bitmap`` to provide a custom image that appears next to the ``Caption`` in the ``MenuItem``. On owner-draw menus, ``Bitmap`` can be used from an OnDrawItem event handler to represent the entire ``MenuItem`` or a portion of the ``MenuItem``. + + .. note:: If the ``ImageIndex`` property is set and the parent menu has a non-``nil`` (Delphi) or ``NULL`` (C++) ``Images`` property, the image identified by ``ImageIndex`` is used instead of ``Bitmap``. + ''' + Break: MenuBreak + ''' + Determines whether the ``MenuItem`` starts a new column in the menu. + + Set ``Break`` to break a long menu into columns at the item described by this ``MenuItem``. The value of ``Break`` indicates whether the menu is broken into columns, and if so, whether a bar appears between the columns of the parent menu. + + The default is ``mbNone`` (no breaking into columns). + ''' + Caption: str + ''' + Specifies the text of the ``MenuItem``. + + Set ``Caption`` to the string the user sees for this item in the menu. To underline a character in a string, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. If ``Caption`` includes an accelerator character, the user can select the ``MenuItem`` by pressing Alt while typing the underlined character. + + .. tip:: To automatically assign or adjust the accelerator characters in ``MenuItem`` ``Caption``s, use the ``RethinkHotkeys()`` method. + + Use the ``Caption`` property to identify the ``MenuItem`` as a line that separates the menu into parts. Specify a hyphen character (``'-'``) as the value of ``Caption`` for the ``MenuItem`` to indicate that the ``MenuItem`` is a separator. To separate the menu into multiple columns, use the ``Break`` property instead. + + .. note:: This property is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + Checked: bool + ''' + Specifies whether a check mark should appear beside the ``Caption``. + + Use ``Checked`` to allow a ``MenuItem`` to work like a ``CheckBox``. If ``Checked`` is ``True``, the ``MenuItem`` appears checked. If ``Checked`` is ``False``, the ``MenuItem`` remains unchecked. + + .. note:: This property is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + SubMenuImages: CustomImageList + ''' + Lists the images that can appear beside individual items in a submenu of this ``MenuItem``. + + Use ``SubMenuImages`` to supply a set of images that can appear beside items listed in the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property. Individual ``MenuItems`` set their `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ property to indicate which image in the list appears to the left of the ``MenuItem`` ``Caption``. + + .. tip:: If the application uses ``ActionList``s, this property can be the value of the command list's `Images <Vcl.Menus.TMenu.Images.htm>`__ property. This way, ``MenuItems`` and buttons that do the same thing can display the same image. + ''' + Default: bool + ''' + Specifies whether the ``MenuItem`` is invoked when the parent item is double clicked. + + Set ``Default`` to specify whether a ``MenuItem`` is The ``Default`` item in a submenu. ``Default`` ``MenuItems`` are executed when the parent item is double-clicked, allowing users to avoid navigating the submenus that contain them. + + The ``Default`` item appears in boldface. A submenu can have only one default item. If the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ list of the parent ``MenuItem`` already contains a default ``MenuItem``, setting the ``Default`` property to ``True`` sets the ``Default`` property of the previous default item to ``False``. + ''' + Enabled: bool + ''' + Specifies whether the ``MenuItem`` is enabled. + + Use ``Enabled`` to enable or disable a ``MenuItem``. If ``Enabled`` is ``True``, the ``Click()`` method is called when the user selects the item with the mouse. If ``Enabled`` is ``False``, the ``MenuItem`` appears dimmed and the user cannot select it. However, calling the ``Click()`` method works even when ``Enabled`` is ``False``. + + .. note:: This property is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + GroupIndex: Byte + ''' + Identifies the logical group to which the ``MenuItem`` belongs. + + Use ``GroupIndex`` to control how menus are merged. In applications that contain multiple forms, items from the menus of secondary forms can be merged into the application's ``MainMenu`` as those forms become active. *MDI Application*s always merge the menus of child windows with the ``MainMenu`` of the parent window. + + By default, all ``MenuItems`` in a menu bar (``MainMenu``) have the same ``GroupIndex`` value. To use ``GroupIndex`` to merge menus, set the ``GroupIndex`` value of each successive ``MenuItem`` to a value equal to or greater than that of the previous ``MenuItem``. + + When a ``MenuItem`` in a menu bar that is merged into the application's ``MainMenu`` has the same ``GroupIndex`` value as a ``MenuItem`` in the ``MainMenu``, the ``MenuItem`` in the application's ``MainMenu`` is replaced by the corresponding ``MenuItem``. If multiple ``MenuItems`` in the application's ``MainMenu`` have the same ``GroupIndex`` value, they can be replaced only by separate ``MenuItems`` from the other form's menu that also have repeated ``GroupIndex`` values. Thus, the first main ``MenuItem`` with a given ``Value`` is replaced by the first item in the second form with that value, the second item in the main form is replaced by the second item in the second form, and so on. + + When a ``MenuItem`` in a menu bar that is merged into the application's ``MainMenu`` has a ``GroupIndex`` that falls between the ``GroupIndex`` values of two adjacent items on the application's ``MainMenu``, that ``MenuItem`` is inserted between the two adjacent items. If the item's ``GroupIndex`` ``Value`` is greater than all other ``GroupIndex`` values in the application's ``MainMenu``, the item appears at the end of the ``MainMenu``. If the ``GroupIndex`` ``Value`` is less than all other ``GroupIndex`` values in the application's ``MainMenu``, the ``MenuItem`` appears at the beginning of the ``MainMenu`` bar. + + When an object created by an *OLE* 2.0 server application is activated, the server can try to merge its menus with the menus of the container application. The ``GroupIndex`` property is used to replace up to three main ``MenuItems`` with items from the server, in the manner described above. The server application uses the following predefined ``GroupIndex`` values to locate ``MenuItems`` to replace: + + ========= ========= ========================================================================== + ..Group.. ..Index.. *``Description``* + ========= ========= ========================================================================== + Edit 1 Server ``MenuItems`` for editing the active *OLE* object + View 3 Server ``MenuItems`` for modifying the view of the *OLE* object. + Help 5 Server ``MenuItems`` for accessing the server's online Help. + ========= ========= ========================================================================== + + .. note:: See the documentation for the *OLE* server for information about whether it attempts menu merge during in-place activation. + + ``GroupIndex`` can also be used to define groups of ``MenuItems`` that act like ``RadioButton``\ s.. To allow ``MenuItems`` to behave like ``RadioButton``\ s., set the ``RadioItem`` property to all ``MenuItems`` in the group to ``True``, and assign each ``MenuItem`` the same value of ``GroupIndex``. Checking any ``MenuItem`` in the group will then uncheck the others. + ''' + HelpContext: HelpContext + ''' + Specifies the help context ``ID`` associated with the ``MenuItem``. + + Use ``HelpContext()`` to associate the ``MenuItem`` with a *Screen* in the ``Help`` system of the application. Each *Screen* in the ``Help`` system should have a unique context ``ID``. When a ``MenuItem`` is selected using the keyboard, pressing *F1* displays a Help screen. Which Help screen appears depends on the value of the ``HelpContext()`` property. + + .. note:: This property is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + Hint: str + ''' + Specifies the text string that can appear when the user moves the mouse pointer over a ``MenuItem``. + + Set ``Hint`` to a string that provides more information about the meaning of the ``MenuItem`` than the ``Caption``. The hint text appears in the ``StatusBar`` when the user pauses with the mouse over the ``MenuItem`` if Help ``Hints`` are enabled (that is, if the ``Form``\ s. and the ``Application``\ s. `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ properties are ``True``). It is also available for the code in the application's `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler. + + The value of ``Hint`` can specify both a short value for the ``Help`` ``Hint`` window and a longer string to be used by the `OnValidate``Hint`` event handler. To provide both a short and a long hint, set ``Hint`` to the short string, followed by a vertical bar (|), followed by the long string. + + .. note:: This property is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + ImageIndex: ImageIndex + ''' + Indicates which image maintained by the parent menu appears next to the ``MenuItem``. + + Set ``ImageIndex`` to designate an image that should appear next to the ``Caption`` when the ``MenuItem`` is drawn. On top-level ``MenuItems``, ``ImageIndex`` specifies a zero-offset index into the ``Images`` property of the parent menu (TMenu or TPopupMenu). On sub``MenuItems``, ``ImageIndex`` is the zero-offset index into the parent item's ``SubMenuImages`` property. + + If the parent menu or item does not maintain a list of images, use the ``Bitmap`` property to provide an image for a single ``MenuItem``. However, any image specified by ``ImageIndex`` takes precedence over the ``Bitmap`` property. ``Bitmap`` is only used when ``ImageIndex`` has a negative value or the parent's ``Images`` or ``SubMenuImages`` property is ``nil`` (Delphi) or ``NULL`` (C++). + + .. note:: This property is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + RadioItem: bool + ''' + Specifies whether the ``MenuItem`` is mutually exclusive with other ``MenuItems`` in its group. + + Use ``RadioItem`` to make the ``MenuItem`` behave like a ``RadioButton`` with a group of other ``MenuItems``. The group of ``MenuItems`` is the set of all ``MenuItems`` in a pop-up or drop-down menu that have the same value of GroupIndex. When ``RadioItem`` is ``True``, only one ``MenuItem`` in the group that contains the ``MenuItem`` can be checked at a time. The single selected ``MenuItem`` in the group is indicated by a round dot next to the ``Caption``. + + .. note:: ``RadioItem`` does not automatically select the item when the user clicks it at runtime: you must still explicitly set the ``Checked`` property to ``True`` in response to the ``OnClick`` event. ``RadioItem`` simply changes the appearance of the ``Checked`` state (from a check mark to a round dot) and automatically unchecks other ``MenuItems`` in the same group when you set the ``Checked`` property to ``True``. + + ``RadioItem`` does not work for the top-level items in a ``MainMenu``. + + .. note:: Under Windows *NT 3.51*, the round dot indicator only appears if the "new shell" has been installed. + ''' + ShortCut: ShortCut + ''' + `Shortcut <System.Classes.TShortCut.htm>`__ that opens the `MenuItem <Vcl.Menus.TMenuItem.htm>`__. + + The `string representation <Vcl.Menus.ShortCutToText.htm>`__ of this shortcut appears to the right of the ``MenuItem`` in the menu. + + .. note:: ``ShortCut`` is not stored with the ``MenuItem`` if it is `supplied by an action <System.Actions.TContainedAction.ShortCut.htm>`__. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + ``FMX.Menus.TMenuItem.Visible`` inherits from `FMX.Controls.TControl.Visible <FMX.Controls.TControl.Visible.htm>`__. All content below this line refers to `FMX.Controls.TControl.Visible <FMX.Controls.TControl.Visible.htm>`__. + + Use the `Visible <FMX.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <FMX.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <FMX.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + ''' + + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + No have docs. + ''' + def AdvancedDrawItem(self, ACanvas: Canvas, ARect: Rect, State: OwnerDrawState, TopLevel: bool) -> None: + ''' + No have docs. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of an object to a destination object. + + Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method to extend the functionality of the `Assign <System.Classes.TPersistent.Assign.htm>`__ method of destination objects so that they handle newly created object classes. When defining a new object class, override the `Assign <System.Classes.TPersistent.Assign.htm>`__ method for every existing object class that should be able to copy its properties to the new class. Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method for every existing class to which the new class can copy. + + The `Assign <System.Classes.TPersistent.Assign.htm>`__ method of `Persistent <System.Classes.TPersistent.htm>`__ calls `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ if the descendant object does not succeed in copying the properties of a source object. The `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method defined by `Persistent <System.Classes.TPersistent.htm>`__ raises an ``EConvertError`` exception. + + For example, given the following code in which ``'A'`` and ``'B'`` are instance variables: + + .. code-block:: python + :caption: Delphi + + A.Assign(B); {Delphi} + + .. code-block:: python + :caption: C++ + + A->Assign(B); // C++ + + if ``'A'`` knows how to handle ``'B'``, then it does so and returns. If ``'A'`` doesn't know how to handle ``'B'``\ s type, execution will trickle to the `Persistent <System.Classes.TPersistent.htm>`__ version of `Assign <System.Classes.TPersistent.Assign.htm>`__, which calls: + + .. code-block:: python + :caption: Delphi + + B.AssignTo(A); {Delphi} + + .. code-block:: python + :caption: C++ + + B->AssignTo(A); // C++ + + If ``'B'`` knows how to copy to ``'A'``, the assignment succeeds. Otherwise, `Persistent <System.Classes.TPersistent.htm>`__ raises an exception. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Designates methods for storing an object's unpublished data on a stream such as a form file. + + ``Vcl.Menus.TMenuItem.DefineProperties`` inherits from `System.Classes.TComponent.DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__. All content below this line refers to `System.Classes.TComponent.DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__. + + Designates methods for storing an object's unpublished data on a stream such as a form file. + + `Component <System.Classes.TComponent.htm>`__ overrides the `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ method defined in `Persistent <System.Classes.TPersistent.htm>`__ to define "fake" ``Top`` and ``Left`` properties. These are defined so that components that are not controls can be manipulated at design time. However, the ``Top`` and ``Left`` properties are hidden, that is, they are not published, because only controls appear at run time. + + `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ is virtual; descendent classes can override it. When overriding `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__, be aware that the `Ancestor <System.Classes.TFiler.Ancestor.htm>`__ property of ``Filer`` might be set, and that this property can determine whether or not it is appropriate to write properties. + + `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ is called automatically as part of the component streaming system; do not call it directly. + ''' + def DoDrawText(self, ACanvas: Canvas, ACaption: str, Rect: Rect, Selected: bool, Flags: int) -> None: + ''' + No have docs. + ''' + def DrawItem(self, ACanvas: Canvas, ARect: Rect, Selected: bool) -> None: + ''' + No have docs. + ''' + def GetActionLinkClass(self) -> MenuActionLinkClass: + ''' + No have docs. + ''' + def GetHandle(self) -> HMENU: + ''' + No have docs. + ''' + def GetCount(self) -> int: + ''' + No have docs. + ''' + def GetItem(self, Index: int) -> MenuItem: + ''' + No have docs. + ''' + def GetMenuIndex(self) -> int: + ''' + No have docs. + ''' + def GetAutoHotkeys(self) -> bool: + ''' + No have docs. + ''' + def GetAutoLineReduction(self) -> bool: + ''' + No have docs. + ''' + def InsertNewLine(self, ABefore: bool, AItem: MenuItem) -> int: + ''' + No have docs. + ''' + def MeasureItem(self, ACanvas: Canvas, Width, Height: int) -> None: + ''' + No have docs. + ''' + def MenuChanged(self, Rebuild: bool) -> None: + ''' + No have docs. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + Do not call the protected `Loaded <System.Classes.TComponent.Loaded.htm>`__ method. The streaming system calls this method after it loads the component's form from a stream. + + When the streaming system loads a form or data module from its form file, it first constructs the ``Form`` component by calling its constructor, then reads its property values from the ``Form`` file. After reading all the property values for all the components, the streaming system calls the `Loaded <System.Classes.TComponent.Loaded.htm>`__ methods of each component in the order the components were created. This gives the components a chance to initialize any data that depends on the values of other components or other parts of itself. + + .. note:: All references to sibling components are resolved by the time `Loaded <System.Classes.TComponent.Loaded.htm>`__ is called. `Loaded <System.Classes.TComponent.Loaded.htm>`__ is the first place that sibling pointers can be used after being streamed in. + + As implemented in `Component <System.Classes.TComponent.htm>`__, `Loaded <System.Classes.TComponent.Loaded.htm>`__ clears the ``csLoading`` flag in the `ComponentState <System.Classes.TComponent.ComponentState.htm>`__ property, indicating that the component is no longer loading. + + .. warning:: `Loaded <System.Classes.TComponent.Loaded.htm>`__ may be called multiple times on inherited forms. It is called every time a level of inheritance is streamed in. Do not allocate memory in an overridden `Loaded <System.Classes.TComponent.Loaded.htm>`__ method without first checking that the memory has not been allocated in a previous call. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Forwards notification messages to all owned components. + + ``Vcl.Menus.TMenuItem.Notification`` inherits from `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. All content below this line refers to `System.Classes.TComponent.Notification <System.Classes.TComponent.Notification.htm>`__. + + Forwards notification messages to all owned components. + + Do not call the `Notification <System.Classes.TComponent.Notification.htm>`__ method in an application. `Notification <System.Classes.TComponent.Notification.htm>`__ is called automatically when the component specified by ``AComponent`` is about to be inserted or removed, as specified by ``Operation``. By default, components pass along the notification to their owned components, if any. + + A component can, if needed, act on the notification that a component is being inserted or removed. For example, if a component has object fields or properties that contain references to other components, it can check the notifications of component removals and invalidate those references as needed. + + .. note:: `Notification <System.Classes.TComponent.Notification.htm>`__ is not called for components that are freed implicitly (because their `Owner <System.Classes.TComponent.Owner.htm>`__ is freed). + ''' + def SetBreak(self, Value: MenuBreak) -> None: + ''' + No have docs. + ''' + def SetCaption(self, Value: str) -> None: + ''' + No have docs. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + No have docs. + ''' + def SetChildOrder(self, Child: Component, Order: int) -> None: + ''' + Sets the visual ordering of a child control. + + ``Vcl.Menus.TMenuItem.SetChildOrder`` inherits from `System.Classes.TComponent.SetChildOrder <System.Classes.TComponent.SetChildOrder.htm>`__. All content below this line refers to `System.Classes.TComponent.SetChildOrder <System.Classes.TComponent.SetChildOrder.htm>`__. + + Sets the visual ordering of a child control. + + `SetChildOrder <System.Classes.TComponent.SetChildOrder.htm>`__ is used internally in the component streaming system. It is not necessary to call it directly. + + Derived classes override this method to actually implement the ordering. `WinControl <Vcl.Controls.TWinControl.htm>`__ uses this ordering information to Z-align the controls. + ''' + def SetDefault(self, Value: bool) -> None: + ''' + No have docs. + ''' + def SetEnabled(self, Value: bool) -> None: + ''' + No have docs. + ''' + def SetGroupIndex(self, Value: Byte) -> None: + ''' + No have docs. + ''' + def SetImageIndex(self, Value: ImageIndex) -> None: + ''' + No have docs. + ''' + def SetImageName(self, Value: ImageName) -> None: + ''' + No have docs. + ''' + def SetMenuIndex(self, Value: int) -> None: + ''' + No have docs. + ''' + def SetRadioItem(self, Value: bool) -> None: + ''' + No have docs. + ''' + def SetShortCut(self, Value: ShortCut) -> None: + ''' + No have docs. + ''' + def SetVisible(self, Value: bool) -> None: + ''' + No have docs. + ''' + def UpdateItems(self) -> None: + ''' + Iterates through all the ``MenuItems`` of this ``MenuItem`` and updates them. + + ``UpdateItems()`` is called whenever the ``ImageList`` attached to the menu is changed or when `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ is changed. + ''' + def CheckImageIndex(self) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `MenuItem <Vcl.Menus.TMenuItem.htm>`__. + + Use ``Create()`` to create a ``MenuItem`` at runtime. Menu items defined at design time using the *Menu Designer* are created automatically. + + ``AOwner`` is the component that is responsible for freeing the ``MenuItem``. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `MenuItem <Vcl.Menus.TMenuItem.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `MenuItem <Vcl.Menus.TMenuItem.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. + ''' + def InitiateAction(self) -> None: + ''' + Calls the ``ActionLink``\ s. ``Update()`` method if the ``MenuItem`` is associated with an ``ActionLink``. + + ``InitiateAction()`` calls the ``ActionLink``, if there is one for the ``MenuItem``, to update the association between the action and the ``MenuItem``. + ''' + def Insert(self, Index: int, Item: MenuItem) -> None: + ''' + ``Inserts`` a ``MenuItem`` into a specified position in the ``Items`` array. + + Use ``Insert()`` to insert a new ``MenuItem`` to the dropdown menu for this ``MenuItem``. If this ``MenuItem`` is the value of the ``Items`` property of a ``MainMenu`` or pop-up menu, ``Insert()`` inserts an item into that menu. Specify the new ``MenuItem`` to add as the value of the ``Item`` parameter, and the position in the ``Items`` array as the value of the ``Index`` parameter. + ''' + def Delete(self, Index: int) -> None: + ''' + Removes a ``MenuItem`` from the ``Items`` property array. + + Call ``Delete()`` to remove a ``MenuItem`` and all its submenus from a menu. The ``Index`` parameter is the index of the item to be deleted, where 0 specifies the first item in the menu, 1 specifies the second item, and so on. + + ``Delete()`` does not free the removed item's memory. To remove an item from the menu and free its memory, call the ``Free()`` method in the item you want to remove. To temporarily hide a ``MenuItem``, without deleting it, use the ``Visible`` property. + ''' + def Clear(self) -> None: + ''' + Removes and frees all ``MenuItems`` listed in the ``Items`` property. + + Use ``Clear()`` to free all the items listed in the ``Items`` property array. + ''' + def Click(self) -> None: + ''' + Simulates a mouse click. + + ``Click()`` generates an ``Click()`` event, as if the user had clicked the ``MenuItem``. Unlike a real mouse click, ``Click()`` does not generate a ``WM_COMMAND`` message to the window associated with the menu. + + Component writers can override click to provide a different response when the user selects the ``MenuItem``. + ''' + def Find(self, ACaption: str) -> MenuItem: + ''' + Locates a ``MenuItem`` in the ``Items`` property array given its caption. + + Use ``Find()`` to locate the ``MenuItem`` in the ``Items`` property array with the caption specified by the ``ACaption`` parameter. ``Find()`` ignores accelerator characters when comparing item ``Caption``\ s to the ``ACaption`` parameter. + + ``Find()`` returns the first ``MenuItem`` in the ``Items`` property array with the specified caption. If no item is found, ``Find()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def IndexOf(self, Item: MenuItem) -> int: + ''' + Returns the position of a ``MenuItem`` within the ``Items`` array. + + Call ``IndexOf()`` to locate a ``MenuItem`` in the submenu headed by this ``MenuItem``. ``IndexOf()`` returns 0 for the first ``MenuItem``, 1 for the second ``MenuItem``, and so on. If the ``MenuItem`` is not in the submenu, ``IndexOf()`` returns -1. + + .. note:: ``IndexOf()`` may not correspond to the position of the item in the menu the user sees if the menu includes some items that are not visible. + ''' + def IsLine(self) -> bool: + ''' + Indicates whether the ``MenuItem`` represents a separator bar. + + Call ``IsLine()`` to determine whether the ``MenuItem`` is a separator bar. ``IsLine()`` checks the ``Caption`` of the ``MenuItem`` and returns ``True`` if the value of ``Caption`` is ``'-'``. Menu items with this ``Caption`` appear as separator bars. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Enumerates all child components. + + `GetChildren <System.Classes.TComponent.GetChildren.htm>`__ is used internally in the component streaming system. It is not necessary to call it directly. + + `GetChildren <System.Classes.TComponent.GetChildren.htm>`__ expects a `GetChildProc <System.Classes.TGetChildProc.htm>`__ routine that receives all enumerated components. + + Root represents the owner of the components that will be enumerated. + + This method does nothing in `Component <System.Classes.TComponent.htm>`__ and is expected to be overridden in descendants. + ''' + def GetEnumerator(self) -> MenuItemEnumerator: + ''' + Returns a ``Component`` enumerator. + + ``Vcl.Menus.TMenuItem.GetEnumerator`` inherits from `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. All content below this line refers to `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. + + `GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__ returns a `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ reference, which enumerates the components contained within a specified containing component. To process all these subcomponents, call the `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ `GetCurrent <System.Classes.TComponentEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TComponentEnumerator.MoveNext.htm>`__ do loop. + ''' + def GetImageList(self) -> CustomImageList: + ''' + Returns the ``ImageList`` that supplies an image for the ``MenuItem``. + + Use ``GetImageList()`` to access the list of images that contains the image for this ``MenuItem``. The `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ property identifies a specific image from the list that ``GetImageList()`` returns. + + ``GetImageList()`` first checks the `Parent <Vcl.Menus.TMenuItem.Parent.htm>`__ of this ``MenuItem`` for a `SubMenuImages <Vcl.Menus.TMenuItem.SubMenuImages.htm>`__ property. If the parent ``MenuItem`` does not maintain a list of images, it checks that ``MenuItem``\ s. parent, and so on until reaching a top-level ``MenuItem`` (a ``MenuItem`` where `Parent <Vcl.Menus.TMenuItem.Parent.htm>`__ is not set). If none of the parent ``MenuItems`` has a `SubMenuImages <Vcl.Menus.TMenuItem.SubMenuImages.htm>`__ property, ``GetImageList()`` checks the top-level menu for an `Images <Vcl.Menus.TMenu.Images.htm>`__ property. + + ``GetImageList()`` returns the first ``ImageList`` it finds. If it doesn't find an ``ImageList``, ``GetImageList()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def GetParentComponent(self) -> Component: + ''' + Returns the parent component of the ``MenuItem``. + + ``GetParentComponent()`` is called by the streaming system that loads and saves components. It ensures that objects are loaded and saved with their parent objects. ``GetParentComponent()`` is overridden in descendant classes to return the appropriate parent for their particular type of component. `MenuItem <Vcl.Menus.TMenuItem.htm>`__ overrides it to identify its associated menu, if it has one, as its parent. + ''' + def GetParentMenu(self) -> Menu: + ''' + Returns the ``MainMenu`` of which the ``MenuItem`` is part. + + ``GetParentMenu()`` returns the menu that contains the ``MenuItem``. + ''' + def HasParent(self) -> bool: + ''' + Indicates that the ``MenuItem`` has a parent that is responsible for loading and saving its data. + + `MenuItem <Vcl.Menus.TMenuItem.htm>`__ overrides ``HasParent()()()`` to return ``True``, indicating that ``MenuItems`` have a parent. Applications seldom call the ``HasParent()`` method. It is used by the streaming system that loads and saves forms to determine when another object is responsible for writing a component to a stream. + ''' + def NewTopLine(self) -> int: + ''' + Inserts a separator bar at the beginning of the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property array. + + Use ``NewTopLine()`` to insert a separator bar at the beginning of the items property array. This is useful when building up submenus dynamically at runtime. + + ``NewTopLine()`` returns the index of the newly inserted separator item in the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property array. + + .. tip:: When inserting separator bars at runtime, it is a good idea to set `AutoLineReduction <Vcl.Menus.TMenuItem.AutoLineReduction.htm>`__ to ``True`` so that superfluous separators can be automatically removed. + ''' + def NewBottomLine(self) -> int: + ''' + Inserts a separator bar at the end of the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property array. + + Use ``NewBottomLine()`` to insert a separator bar at the end of the items property array. This is useful when building up submenus dynamically at runtime. + + ``NewBottomLine()`` returns the index of the newly inserted separator item in the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property array. + + .. tip:: When inserting separator bars at runtime, it is a good idea to set `AutoLineReduction <Vcl.Menus.TMenuItem.AutoLineReduction.htm>`__ to ``True`` so that superfluous separators can be automatically removed. + ''' + def InsertNewLineBefore(self, AItem: MenuItem) -> int: + ''' + Inserts a separator bar before a specified item from the ``Items`` property array. + + Use ``InsertNewLineBefore()`` to insert a separator bar before the ``MenuItem`` specified by AItem. If ``AItem`` is not an item in the ``Items`` property array, ``InsertNewLineBefore()`` raises an exception. + + ``InsertNewLineBefore()`` returns the index of the newly inserted separator item in the ``Items`` property array. + + .. tip:: When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to ``True`` so that superfluous separators can be automatically removed. + ''' + def InsertNewLineAfter(self, AItem: MenuItem) -> int: + ''' + Inserts a separator bar after a specified item from the ``Items`` property array. + + Use ``InsertNewLineAfter()`` to insert a separator bar after the ``MenuItem`` specified by AItem. If ``AItem`` is not an item in the ``Items`` property array, ``InsertNewLineAfter()`` raises an exception. + + ``InsertNewLineAfter()`` returns the index of the newly inserted separator item in the ``Items`` property array. + + .. tip:: When inserting separator bars at runtime, it is a good idea to set AutoLineReduction to ``True`` so that superfluous separators can be automatically removed. + ''' + @overload + def Add(self, Item: MenuItem) -> None: + ''' + ``Adds`` one or more ``MenuItems`` to the end of the ``Items`` property array. + + Use ``Add()`` to add new ``MenuItems`` to the dropdown menu for this ``MenuItem``. If this ``MenuItem`` is the value of the ``Items`` property of a ``MainMenu`` or pop-up menu, ``Add()`` adds the items to the end of the menu. + + Specify a single new ``MenuItem`` to add as the value of the ``Item`` parameter, or an array of new ``MenuItems`` as the value of the ``AItems`` parameter. ``AItems_Size`` is the index of the last item in the ``AItems`` array (one less than the number of items). + ''' + @overload + def Add(self, AItems: list[MenuItem]) -> None: ... + def Remove(self, Item: MenuItem) -> None: + ''' + ``Removes`` a ``MenuItem`` from the ``Items`` property array + + Call ``Remove()`` to remove a ``MenuItem`` and all its submenus from a menu. The ``Item`` parameter is the item to be removed. If ``Item`` is not a ``MenuItem`` in the ``Items`` array, ``Remove()`` raises an exception. + + ``Remove()`` does not free the item's memory. To remove an item from the menu and free its memory, call the ``Free()`` method in the item you want to remove. To temporarily hide a ``MenuItem``, without deleting it, use the ``Visible`` property. + ''' + def RethinkHotkeys(self) -> bool: + ''' + Adjusts the captions of subitems so that every item has an accelerator and there are no duplicate accelerator keys. + + Call ``RethinkHotkeys()`` to adjust the accelerator keys for the items in the ``Items`` property and in any submenu of those items. ``RethinkHotkeys()`` checks for items that do not have an accelerator key or that have duplicate accelerator keys. It then replaces any duplicate accelerators with unique characters and adds accelerator keys to items that don't have them. ``RethinkHotkeys()`` gives first priority to existing accelerator key mappings, but may change them if necessary to ensure uniqueness. + + ``RethinkHotkeys()`` lets a menu adjust the accelerator keys when the AutoHotkeys property is ``False``. For any menu or submenu that has AutoHotkeys set to ``True``, this adjustment occurs automatically. + + ``RethinkHotkeys()`` returns ``True`` if ``RethinkHotkeys()`` changed the ``Caption`` property of any ``MenuItems``, ``False`` otherwise. + ''' + def RethinkLines(self) -> bool: + ''' + Removes superfluous separator lines from the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property array. + + Call ``RethinkLines()`` to remove superfluous separators from the items in the `Items <Vcl.Menus.TMenuItem.Items.htm>`__ property and in any submenu of those items. ``RethinkLines()`` removes separators that appear at the very beginning or end of a submenu and separators that immediately follow another separator. + + ``RethinkLines()`` lets a menu remove superfluous separators when the `AutoLineReduction <Vcl.Menus.TMenuItem.AutoLineReduction.htm>`__ property is ``False``. For any menu or submenu that has `AutoLineReduction <Vcl.Menus.TMenuItem.AutoLineReduction.htm>`__ set to ``True``, this adjustment occurs automatically. + + ``RethinkLines()`` returns ``True`` if ``RethinkLines()`` removed any ``MenuItems``, ``False`` otherwise. + ''' + def SetParentComponent(self, Value: Component) -> None: + ''' + Sets the parent component. + + ``Vcl.Menus.TMenuItem.SetParentComponent`` inherits from `System.Classes.TComponent.SetParentComponent <System.Classes.TComponent.SetParentComponent.htm>`__. All content below this line refers to `System.Classes.TComponent.SetParentComponent <System.Classes.TComponent.SetParentComponent.htm>`__. + + `SetParentComponent <System.Classes.TComponent.SetParentComponent.htm>`__ is used internally in the component streaming system. It is not necessary to call it directly. + + Derived classes override this method to implement proper handling for parenting. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks ``MenuItem``. + + Write an ``OnClick`` event handler to implement the desired behavior for when the user selects the ``MenuItem``. An advantage of using the ``OnClick`` event handler over directly handling ``WM_COMMAND`` messages sent when the user selects the ``MenuItem``, is that only the ``OnClick`` event occurs when the ``Click()`` method is called. + + .. note:: This event handler is not stored with the ``MenuItem`` if it is supplied by a ``Action`` object. + ''' + def OnDrawItem(self, Control: WinControl, Index: int, Rect: Rect, State: OwnerDrawState) -> None: + ''' + # OnDrawItem: MenuDrawItemEvent + Occurs when an owner-draw menu needs to be drawn. + + Write an ``OnDrawItem`` event handler to render the image of a ``MenuItem`` in an owner-draw menu. In the event handler, use the `Bitmap <Vcl.Menus.TMenuItem.Bitmap.htm>`__ property or the `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ property to access a bitmap that represents the ``MenuItem``. + + .. note:: ``OnDrawItem`` will only occur if the parent menu's `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ property is ``True`` or the parent menu's `Images <Vcl.Menus.TMenu.Images.htm>`__ property has been set. + + .. tip:: For more precise information about the ``MenuItem``\ s. state, use the `OnAdvancedDrawItem <Vcl.Menus.TMenuItem.OnAdvancedDrawItem.htm>`__ event instead. + ''' + def OnAdvancedDrawItem(self, Sender: Object, ACanvas: Canvas, ARect: Rect, State: OwnerDrawState) -> None: + ''' + # OnAdvancedDrawItem: AdvancedMenuDrawItemEvent + Occurs when an owner-draw menu needs to be drawn. + + Write an ``OnAdvancedDrawItem`` event handler to render the image of a ``MenuItem`` in an owner-draw menu. + + In the event handler, use the `Bitmap <Vcl.Menus.TMenuItem.Bitmap.htm>`__ property or the `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ property to access a bitmap that represents the ``MenuItem``. + + .. note:: ``OnAdvancedDrawItem`` will only occur if the parent menu's `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ property is ``True`` or the parent menu's `Images <Vcl.Menus.TMenu.Images.htm>`__ property has been set. + ''' + def OnMeasureItem(self, Control: WinControl, Index: int, Height: int) -> None: + ''' + # OnMeasureItem: MenuMeasureItemEvent + Occurs on owner-draw ``MenuItems`` to determine ``MenuItem`` size before the menu is drawn. + + Write an ``OnMeasureItem`` event handler to indicate the size of owner-draw ``MenuItems``. If the ``MenuItem`` is using a bitmap image, the event handler can use the `Bitmap <Vcl.Menus.TMenuItem.Bitmap.htm>`__ property or the `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ property to access the bitmap to determine its size. + + .. note:: ``OnMeasureItem`` will only occur if the parent menu's `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ property is ``True`` or the parent menu's `Images <Vcl.Menus.TMenu.Images.htm>`__ property has been set. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Metafile(Graphic): + ''' + ====================== + Vcl.Graphics.TMetafile + ====================== + + ``Metafile`` is an encapsulation of the Win32 `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ metafile. + + ``Metafile`` contains a metafile graphic (*EMF* file format). + + Properties of ``Metafile`` indicate the size and characteristics of the metafile. To draw a metafile on a ``Canvas``, call the `Draw <Vcl.Graphics.TCanvas.Draw.htm>`__ or `StretchDraw <Vcl.Graphics.TCanvas.StretchDraw.htm>`__ methods of a ``Canvas`` object, passing a ``Metafile`` as a parameter. The `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ property determines how the metafile will be stored on disk. If `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ is ``True``, the metafile is stored as an ``.emf`` (*Win32* `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ `Metafile <Vcl.Graphics.TPicture.Metafile.htm>`__) file. If `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ is ``False``, the metafile is stored as a ``.wmf`` (*Windows 3.1* `Metafile <Vcl.Graphics.TPicture.Metafile.htm>`__, with *Aldus* header). + ''' + + __hash__: ClassVar[None] = ... + CreatedBy: str + ''' + Specifies the name of the author or application used to create the ``MetaFile``. + + Use ``CreatedBy`` to set the string to an optional name of the author or application used to create the ``MetaFile``. To set the ``CreatedBy`` string of a new ``MetaFile``, call the `MetafileCanvas <Vcl.Graphics.TMetafileCanvas.htm>`__ `CreateWithComment <Vcl.Graphics.TMetafileCanvas.CreateWithComment.htm>`__ constructor (Delphi) or the `MetafileCanvas <Vcl.Graphics.TMetafileCanvas.htm>`__ constructor that takes a comment (C++). + ''' + Description: str + ''' + Provides an optional text description that is embedded in the ``MetaFile``. + + Set the ``Description`` string of a new ``MetaFile`` by calling the `MetafileCanvas <Vcl.Graphics.TMetafileCanvas.htm>`__ `CreateWithComment <Vcl.Graphics.TMetafileCanvas.CreateWithComment.htm>`__ constructor (Delphi) or the `Metafile <Vcl.Graphics.TMetafile.htm>`__ ``Canvas`` constructor that takes a comment (C++). + ''' + Enhanced: bool + ''' + Determines how the ``MetaFile`` will be stored on disk. + + Use ``Enhanced`` to determine how the ``MetaFile`` is stored on disk. If ``Enhanced`` is ``True``, the ``MetaFile`` is stored as an ``.emf`` (*Win32 Enhanced Metafile*). If ``Enhanced`` is ``False``, the ``MetaFile`` is stored as a ``.wmf`` (*Windows 3.1* `Metafile <Vcl.Graphics.TPicture.Metafile.htm>`__, with *Aldus* header). + + The in-memory format is always *EMF*. *WMF* has very limited capabilities; storing as *WMF* will lose information that would be retained by *EMF*. This property is set to match the ``MetaFile`` type when loaded from a *Stream* or file. If loaded as *WMF*, then save as *WMF*. + + By default, the ``Enhanced`` property is ``True``. + ''' + Handle: HENHMETAFILE + ''' + Provides access to the *Windows GDI* ``MetaFile`` handle, for accessing the GDI ``MetaFile`` object. + + Use ``Handle`` when calling a *Windows API* function that requires the handle of a ``MetaFile`` object. Pass the handle from the ``Handle`` property of the ``MetaFile`` object to the function. + ''' + MMWidth: int + ''' + Contains the width of the ``MetaFile`` image in 0.01 millimeter units, the native scale used by enhanced ``MetaFile``\ s. + + ``MMWidth`` is used for a more accurate reading of the horizontal size of the graphic. The `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property, by contrast, is always in screen device pixel units; to avoid loss of precision in converting between device pixels and millimeters, set or read the dimensions in millimeters with ``MMWidth``. + + The ``MMWidth`` property is always in screen device pixel units. + ''' + MMHeight: int + ''' + Contains the height of the ``MetaFile`` image in 0.01 millimeter units, the native scale used by enhanced ``MetaFile``\ s. + + ``MMHeight`` is used for a more accurate reading of the vertical size of the graphic. The `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property, by contrast, is always in screen device pixel units; to avoid loss of precision in converting between device pixels and millimeters, set or read the dimensions in millimeters with ``MMHeight``. + ''' + Inch: int + ''' + Returns the units per inch that are used for the ``MetaFile``\ s. coordinate mapping. + + Use ``Inch`` to find the units per inch assumed by a *WMF* ``MetaFile``, and to alter scale when writing as *WMF*, but otherwise this property is obsolete. Enhanced ``MetaFile``\ s maintain complete scale information internally. For example, if the ``MetaFile`` was created in a ``Twips`` coordinate system (using ``MM_TWIPS`` mapping), the value of ``Inch`` is 1440. + ''' + + def GetEmpty(self) -> bool: + ''' + Indicates whether graphics object contains graphic. + + `GetEmpty <Vcl.Graphics.TGraphic.GetEmpty.htm>`__ indicates whether the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object contains a graphic. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class should override the `GetEmpty <Vcl.Graphics.TGraphic.GetEmpty.htm>`__ method to indicate whether a given `Graphic <Vcl.Graphics.TGraphic.htm>`__ object is bound to an image. + ''' + def GetHeight(self) -> int: + ''' + Get vertical size of graphic in pixels. + + `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ gets the vertical size of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ object in pixels. + + Each descendant of `Graphic <Vcl.Graphics.TGraphic.htm>`__ defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def GetPalette(self) -> HPALETE: + ''' + Get color palette of graphical image. + + `GetPalette <Vcl.Graphics.TGraphic.GetPalette.htm>`__ gets the color palette of the graphical image. You can also use the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property to get the color palette of a graphical image. If the graphic does not need or use a palette, the `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ property is zero. + ''' + def GetWidth(self) -> int: + ''' + Get horizontal size of graphic in pixels. + + `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ gets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ and `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def Draw(self, ACanvas: Canvas, Rect: Rect) -> None: + ''' + Render graphic onto ``Canvas`` at rectangle. + + `Canvas <Vcl.Graphics.TCanvas.htm>`__. `Draw <Vcl.Graphics.TCanvas.Draw.htm>`__ calls this function to render the graphic onto its ``Canvas`` at the coordinates specified by the ``Rect`` parameter. Descendants of `Graphic <Vcl.Graphics.TGraphic.htm>`__ should override this function with a specific rendering implementation. + ''' + def ReadData(self, Stream: Stream) -> None: + ''' + Read graphic data from `Stream <System.Classes.TStream.htm>`__. + + `ReadData <Vcl.Graphics.TGraphic.ReadData.htm>`__ is used to read the binary graphic from the virtual property ``Data`` (created by `DefineProperties <Vcl.Graphics.TGraphic.DefineProperties.htm>`__) when streaming in a `Graphic <Vcl.Graphics.TGraphic.htm>`__ from the `Stream <System.Classes.TStream.htm>`__ ``Stream``. + ''' + def ReadEMFStream(self, Stream: Stream) -> None: + ''' + No have docs. + ''' + def ReadWMFStream(self, Stream: Stream, Length: int) -> None: + ''' + No have docs. + ''' + def SetHeight(self, Value: int) -> None: + ''' + Set vertical size of graphic in pixels. + + `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ sets the vertical size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetHeight <Vcl.Graphics.TGraphic.GetHeight.htm>`__ and `SetHeight <Vcl.Graphics.TGraphic.SetHeight.htm>`__ methods to access the `Height <Vcl.Graphics.TGraphic.Height.htm>`__ property. + ''' + def SetTransparent(self, Value: bool) -> None: + ''' + Specify if graphic should be drawn transparently. + + `SetTransparent <Vcl.Graphics.TGraphic.SetTransparent.htm>`__ specifies if a graphic should be drawn transparently. + ''' + def SetWidth(self, Value: int) -> None: + ''' + Set horizontal size of graphic in pixels. + + `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ sets the horizontal size of the graphic in pixels. + + Each descendant of the `Graphic <Vcl.Graphics.TGraphic.htm>`__ class defines its own `GetWidth <Vcl.Graphics.TGraphic.GetWidth.htm>`__ and `SetWidth <Vcl.Graphics.TGraphic.SetWidth.htm>`__ methods to access the `Width <Vcl.Graphics.TGraphic.Width.htm>`__ property. + ''' + def TestEMF(self, Stream: Stream) -> bool: + ''' + No have docs. + ''' + def WriteData(self, Stream: Stream) -> None: + ''' + Write graphic data to `Stream <System.Classes.TStream.htm>`__. + + `WriteData <Vcl.Graphics.TGraphic.WriteData.htm>`__ is used to write the binary graphic to the virtual property ``Data`` (created by `DefineProperties <Vcl.Graphics.TGraphic.DefineProperties.htm>`__) when streaming a `Graphic <Vcl.Graphics.TGraphic.htm>`__ out to the `Stream <System.Classes.TStream.htm>`__ ``Stream``. + ''' + def WriteEMFStream(self, Stream: Stream) -> None: + ''' + No have docs. + ''' + def WriteWMFStream(self, Stream: Stream) -> None: + ''' + No have docs. + ''' + def Create(self) -> None: + ''' + Instantiates a ``MetaFile`` object. + + Call ``Create()`` to instantiate a ``MetaFile`` at runtime. + + ``Create()`` allocates memory for a ``MetaFile`` object, and calls the inherited ``Create()``. Then sets the `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ and `Transparent <Vcl.Graphics.TGraphic.Transparent.htm>`__ properties to ``True``. To create a ``MetaFile`` image from scratch, draw the image in a ``MetaFile`` ``Canvas``. When the ``MetaFile`` ``Canvas`` is destroyed, it transfers the image into the ``MetaFile`` object provided to the ``MetaFile`` ``Canvas`` constructor. After the image is drawn on the ``Canvas`` and the ``Canvas`` is destroyed, the image is 'playable' in the ``MetaFile`` object. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of a ``MetaFile`` object. + + Do not call ``Destroy()`` directly in an application. Instead, an application should call ``Free()``. ``Free()`` verifies that the `Metafile <Vcl.Graphics.TMetafile.htm>`__ reference is not ``nil`` before it calls ``Destroy()``. + + ``Destroy()`` releases the image, which frees the image and the handle when the reference count on the ``MetaFile`` image is zero. Then ``Destroy()`` calls the inherited ``Destroy()``. + ''' + def Clear(self) -> None: + ''' + Deletes the ``MetaFile`` image. + + Use ``Clear()`` to release the old ``MetaFile`` image, create a new image, and increment a reference count on it. + ''' + def HandleAllocated(self) -> bool: + ''' + Indicates whether the `Metafile <Vcl.Graphics.TMetafile.htm>`__ object has acquired a handle to the underlying *GDI* object. + + Use ``HandleAllocated()`` to determine whether the `Handle <Vcl.Graphics.TMetafile.Handle.htm>`__ property is set to an HMETAFILE value. ``HandleAllocated()`` indicates whether the underlying *GDI* object has already been created. Use ``HandleAllocated()`` rather than reading the `Handle <Vcl.Graphics.TMetafile.Handle.htm>`__ property. When an application reads the `Handle <Vcl.Graphics.TMetafile.Handle.htm>`__ property, it automatically creates a ``MetaFile`` and returns its handle if the underlying *GDI* object does not already exist. + ''' + @classmethod + def CanLoadFromStream(self, Stream: Stream) -> bool: + ''' + No have docs. + ''' + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Loads the ``MetaFile`` from a *Stream*. + + Use ``LoadFromStream()`` by specifying the stream from which the ``MetaFile`` is loaded as the value of Stream. ``LoadFromStream()`` reads a ``MetaFile`` from a *Stream* and replaces the current image with it. + ''' + def SaveToFile(self, Filename: str) -> None: + ''' + Writes the ``MetaFile`` to disk. + + Use ``SaveToFile()()`` to save the ``MetaFile`` to a file provided by the ``Filename`` parameter. To load a ``MetaFile`` from a file, call the `LoadFromFile <Vcl.Graphics.TGraphic.LoadFromFile.htm>`__ method. + + .. note:: If the ``Filename`` parameter has an extension of ``.wmf``, the ``MetaFile`` is saved as a *WMF* file. It is not necessary to set the `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ property. + ''' + def SaveToStream(self, Stream: Stream) -> None: + ''' + Writes the ``MetaFile`` to a *Stream*. + + Use ``SaveToStream()()`` to save the ``MetaFile`` to the stream specified by the ``Stream`` parameter. If the `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ property is ``True``, the ``MetaFile`` is saved as an *EMF*; if ``False``, it it saved as a *WMF*. + ''' + def LoadFromClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETTE) -> None: + ''' + Loads a ``MetaFile`` from the ``Clipboard``. + + ``LoadFromClipboardFormat()`` replaces the current image with the data in the clipboard. ``LoadFromClipboardFormat()`` ignores the ``AData`` and ``APalette`` parameters. + ''' + def SaveToClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETTE) -> None: + ''' + Saves a ``MetaFile`` to a ``Clipboard`` format. + + Use ``SaveToClipboardFormat()`` to copy the ``MetaFile`` to a ``Clipboard`` format. The resulting values can then be copied to the *Windows* clipboard using the clipboard's SetAsHandle method. + + The ``MetaFile``\ s. palette is returned in the ``APalette`` parameter, the format in the A``Format`` parameter, and a handle to the data in the ``AData`` parameter. Before the ``MetaFile`` can be saved, an application must have registered the format with the ``MetaFile`` object using the `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method. To save a ``MetaFile`` to a file, call `SaveToFile <Vcl.Graphics.TMetafile.SaveToFile.htm>`__. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies an object to the metafile. + + ``Assign()`` copies the `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ and `Palette <Vcl.Graphics.TGraphic.Palette.htm>`__ properties of an object to the metafile. If the metafile is ``nil`` (Delphi) or ``NULL`` (C++), ``Assign()`` creates one. Otherwise, ``Assign()`` calls the inherited method. For assignment, metafiles are polymorphic with other ``Graphic`` objects, and with ``Picture``. + ''' + def ReleaseHandle(self) -> HENHMETAFILE: + ''' + Releases the *Windows* *GDI* object represented by the ``MetaFile``. + + Call ``ReleaseHandle()`` to release the resources used to represent the ``MetaFile``. ``ReleaseHandle()`` sets the `Handle <Vcl.Graphics.TMetafile.Handle.htm>`__ property to nil. ``NULL``. + + Call ``ReleaseHandle()`` before setting the `Handle <Vcl.Graphics.TMetafile.Handle.htm>`__ property, so that the resources associated with the ``MetaFile`` are not lost. + ''' + def SetSize(self, AWidth: int, AHeight: int) -> None: + ''' + Specifies the size of the ``MetaFile``. + + Use the ``SetSize()`` method to set both the height and width of the ``MetaFile``. This results in better performance than setting the height and width separately. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Monitor(Object): + ''' + ================================ + Vcl.Forms.TMonitor.PixelsPerInch + ================================ + + ``Monitor`` represents a monitor on which an application runs. + + ``Monitor`` represents a monitor that displays the user interface of an application. It introduces properties to describe the dimensions of a single monitor. In addition, the `Primary <Vcl.Forms.TMonitor.Primary.htm>`__ property distinguishes the primary property from other monitors on the system. + + When writing multi-monitor applications, use ``Monitor`` to help lay out forms and dialogs so that they are not split over several monitors. + + Applications do not create instances of ``Monitor``. Instead, monitor components for all available monitors are listed by the `Monitors <Vcl.Forms.TScreen.Monitors.htm>`__ property of the global ``Screen`` variable. The global ``Screen`` variable also provides global information about the monitors on which the application runs, such as screen resolution, available fonts, and so on. + ''' + + __hash__: ClassVar[None] = ... + Handle: HMONITOR + ''' + Indicates the *Windows* handle for the monitor. + + Read `Monitor <Vcl.Forms.TCustomForm.Monitor.htm>`__ to obtain a *Windows* handle for the monitor represented by this `Monitor <Vcl.Forms.TMonitor.htm>`__ component. Use this handle for *Windows API* calls such as GetMonitorInfo. + ''' + MonitorNum: int + ''' + Specifies the index of the monitor in the global screen object's `Monitors <Vcl.Forms.TScreen.Monitors.htm>`__ list. + + The global screen variable maintains a list of all monitors in a multi-monitor application. ``MonitorNum`` is the index of this monitor in the list object that is the *Screen*'s `Monitors <Vcl.Forms.TScreen.Monitors.htm>`__ property. + + Use ``MonitorNum`` to identify a specific monitor when working with multiple monitors. + ''' + Left: int + ''' + Indicates the logical position of the left edge of the monitor. + + In multi-monitor applications, the available screen space can span multiple monitors from ``Left`` to ``Right``. Read ``Left`` to determine where, in the entire available screen space, this monitor appears. The value of ``Left`` is in pixels relative to the left edge of the primary monitor. + ''' + Height: int + ''' + Indicates the vertical size of the monitor in pixels. + + Read ``Height`` to learn the size of the monitor in pixels. Use this value along with the `Top <Vcl.Forms.TMonitor.Top.htm>`__ property to calculate how to position objects vertically in multi-monitor applications. + + .. note:: The ``Height`` property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the `WorkareaRect <Vcl.Forms.TMonitor.WorkareaRect.htm>`__ property. + ''' + Top: int + ''' + Indicates the logical position of the top edge of the monitor. + + In multi-monitor applications, the available screen space can span multiple monitors from top to bottom. Read ``Top`` to determine where, in the entire available screen space, this monitor appears. The value of ``Top`` is in pixels relative to the top edge of the primary monitor. + ''' + Width: int + ''' + Indicates the horizontal size of the monitor in pixels. + + Read ``Width`` to learn the size of the monitor in pixels. Use this value along with the `Left <Vcl.Forms.TMonitor.Left.htm>`__ property to calculate vertical positions for objects in multi-monitor applications. + + .. note:: The ``Width`` property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the `WorkareaRect <Vcl.Forms.TMonitor.WorkareaRect.htm>`__ property. + ''' + BoundsRect: Rect + ''' + Indicates the dimensions of the monitor in pixels. + + Read ``BoundsRect`` to learn the dimensions of the monitor. ``BoundsRect`` gives the dimensions of the monitor in pixels, where ``(0,0)`` represents the top-left corner of the primary monitor. + + The top of ``BoundsRect`` is given by the `Top <Vcl.Forms.TMonitor.Top.htm>`__ property, the left edge by the `Left <Vcl.Forms.TMonitor.Left.htm>`__ property, and the height and width by the `Height <Vcl.Forms.TMonitor.Height.htm>`__ and `Width <Vcl.Forms.TMonitor.Width.htm>`__ properties respectively. + + .. note:: The ``BoundsRect`` property does not take into account any task bars or tool bars docked on the monitor. To determine the area on the monitor that is free of such docked windows, use the `WorkareaRect <Vcl.Forms.TMonitor.WorkareaRect.htm>`__ property. + ''' + WorkareaRect: Rect + ''' + Gives the application useable area of the monitor. + + ``WorkareaRect()`` returns a `Rect <System.Types.TRect.htm>`__ value furnished with the coordinates and dimensions of the work area of the ``Monitor``. On *Windows*, for example, the application tabs at the *Screen* mean that the ``Workarea`` is smaller than the monitor size. + + .. note:: The `Rect <System.Types.TRect.htm>`__ ``Right`` and ``Bottom`` values are one pixel beyond ``Workarea`` boundary. They are given these values to allow for easy calculation of ``Workarea`` ``Width`` and ``Height`` as (``Right``-``Left``) and (``Bottom``-``Top``) respectively. + ''' + Primary: bool + ''' + Indicates whether this is the primary monitor. + + Read ``Primary`` to determine whether a monitor is the primary monitor in a multi-monitor application. When ``Primary`` is ``True``, the monitor is the primary monitor. The coordinates of other monitors are given in terms of the primary monitor. + ''' + PixelsPerInch: int + ''' + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Notebook(CustomControl): + ''' + ====================== + Vcl.ExtCtrls.TNotebook + ====================== + + ``Notebook`` displays multiple pages, each with its own set of controls. + + ``Notebook`` components are frequently used with tab set controls (``TTabSet``) to let the user select pages in the notebook by clicking a tab. ``Notebook`` is provided for backward compatibility. New applications should use ``PageControl`` instead. + ''' + + __hash__: ClassVar[None] = ... + ActivePage: str + ''' + Determines which page displays in the notebook. + + ``ActivePage`` determines which page displays in the notebook. The value of ``ActivePage`` must be one of the strings contained in the `Pages <Vcl.ExtCtrls.TNotebook.Pages.htm>`__ property. To ``get`` or ``set`` the active page by index rather than string, use the `PageIndex <Vcl.ExtCtrls.TNotebook.PageIndex.htm>`__ property instead. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + PageIndex: int + ''' + Determines which page displays in the notebook control. + + The value of ``PageIndex`` determines which page displays in the notebook. Changing the ``PageIndex`` value changes the page in the control. + + Each string in the `Pages <Vcl.ExtCtrls.TNotebook.Pages.htm>`__ property is automatically assigned a ``PageIndex`` value when the page is created. The first page receives a value of 0, the second has a value of 1, and so on. If you delete a string from the `Pages <Vcl.ExtCtrls.TNotebook.Pages.htm>`__ property, the ``PageIndex`` values are reassigned so that the values always begin with 0 and continue to increase without any gaps between values. To ``get`` or ``set`` the current page using its string rather than its index, use the `ActivePage <Vcl.ExtCtrls.TNotebook.ActivePage.htm>`__ property instead. + ''' + Pages: list[int] + ''' + Contains the strings that identify the individual pages of the notebook control. + + The ``Pages`` property contains the strings that identify the individual pages of the notebook control. Both these controls create a separate page for each string in the ``Pages`` property. For example, if ``Pages`` contains three strings, First, Second, and Third, the control has three separate pages. + + You can access the various pages in a notebook or tabbed notebook control with either the `ActivePage <Vcl.ExtCtrls.TNotebook.ActivePage.htm>`__ or `PageIndex <Vcl.ExtCtrls.TNotebook.PageIndex.htm>`__ property. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ExtCtrls.TNotebook.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Constructs a `Notebook <Vcl.ExtCtrls.TNotebook.htm>`__ component. + + Call ``Create()`` to instantiate a notebook at runtime. ``Notebook`` components placed in forms at design time are created automatically. + + The ``AOwner`` parameter specifies the component (usually the ``Form``) that is responsible for freeing the notebook. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `Notebook <Vcl.ExtCtrls.TNotebook.htm>`__ component. + + Do not call ``Destroy()`` directly in an application. Instead, use ``Free()``, which checks that the `Notebook <Vcl.ExtCtrls.TNotebook.htm>`__ reference is not ``nil`` before calling ``Destroy()``. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified method for each child of the control. + + `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ is called by the streaming system that loads and saves components. Applications seldom need to call this routine. + + `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ executes the *callback* specified by the ``Proc`` parameter for every child control listed by the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property that lists the ``Root`` parameter as its ``Owner()``. + + Override `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ to limit or augment which child controls are saved with the control. When overriding `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__, call the procedure passed as the ``Proc`` parameter for every child control that should be saved. The ``Root`` parameter indicates the component (usually a form) that owns the control. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnPageChanged(self, Sender: Object) -> None: + ''' + # OnPageChanged: NotifyEvent + Occurs when the user selects a new page in the notebook. + + Use the ``OnPageChanged`` event when you want special processing to occur when the active page changes. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class NumberBox(CustomNumberBox): + ''' + ======================== + Vcl.NumberBox.TNumberBox + ======================== + + ``NumberBox`` is a numeric input control that supports the input of integer numbers, floating point numbers with a given set of decimal digits and proper formatting, and currency values. + ''' + + __hash__: ClassVar[None] = ... + AcceptExpressions: bool + ''' + No have docs. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the text is aligned within the text ``Edit`` control. + + Use `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ to change the way the text is formatted in the text ``Edit`` control. `Alignment <Vcl.StdCtrls.TCustomEdit.Alignment.htm>`__ can take one of the following values: + + ==================== ============================================ + **Value** **Meaning** + ==================== ============================================ + ``taLeftJustify`` Align text to the left side of the control + ``taCenter`` Center text horizontally in the control. + ``taRightJustify`` Align text to the right side of the control. + ==================== ============================================ + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSelect: bool + ''' + Determines whether all the text in the ``Edit`` control is automatically selected when the control gets focus. + + Set `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ to select all the text when the ``Edit`` control gets focus. `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ only applies to single-line ``Edit`` controls. + + Use `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ when the user is more likely to replace the text in the ``Edit`` control than to append to it. + ''' + AutoSize: bool + ''' + Determines whether the height of the ``Edit`` control automatically resizes to accommodate the text. + + Use `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ to make the ``Edit`` control adjust its size automatically so the client area accommodates the height of the text. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``False``, the ``Edit`` control has a fixed height. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``True``, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style. + + .. note:: `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ only adjusts the height of the ``Edit`` control. Even with `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ set to ``True``, text in the ``Edit`` control may appear truncated if it extends beyond the width of the control. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines whether the ``Edit`` control has a single line border around the client area. + + Use `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ to affect the sharpness with which the client area of the ``Edit`` control stands out. `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ can have a value of either ``bsSingle`` or ``bsNone``. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsSingle``, the ``Edit`` control has a single-line border around the client area. If `BorderStyle <Vcl.StdCtrls.TCustomEdit.BorderStyle.htm>`__ is ``bsNone``, there will be no border. + ''' + CharCase: EditCharCase + ''' + Determines the case of the text within the ``Edit`` control. + + Use `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to force the contents of the ``Edit`` control to assume a particular case. + + When `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ is set to ``ecLowerCase`` or ``ecUpperCase``, the case of characters is converted as the user types them into the ``Edit`` control. Changing the `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ property to ``ecLowerCase`` or ``ecUpperCase`` changes the actual contents of the text, not just the appearance. Any case information is lost and can't be recaptured by changing `CharCase <Vcl.StdCtrls.TCustomEdit.CharCase.htm>`__ to ``ecNormal``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + CurrencyString: str + ''' + No have docs. + ''' + CurrencyFormat: Byte + ''' + No have docs. + ''' + Decimal: Byte + ''' + No have docs. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HideSelection: bool + ''' + Determines whether the visual indication of the selected text remains when focus shifts to another control. + + Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` to provide visual feedback of the selected portion of the text even when the ``Edit`` control does not have focus. Set `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``True`` to show the selection only when the ``Edit`` control has focus. `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ does not affect the actual value of the selection, only the visual indication. Always setting `HideSelection <Vcl.StdCtrls.TCustomEdit.HideSelection.htm>`__ to ``False`` can make forms with many ``Edit`` controls look too busy. + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ only takes effect when the control receives focus. To change the value of `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ only takes effect when the control receives focus. To change the value of `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + LargeStep: float + ''' + No have docs. + ''' + Mode: NumberBoxMode + ''' + No have docs. + ''' + MinValue: float + ''' + No have docs. + ''' + MaxValue: float + ''' + No have docs. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can enter into the ``Edit`` control. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the number of characters that can be entered into the ``Edit`` control. A value of 0 indicates that there is no application-defined limit on the length. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the length of the text in an ``Edit`` control if that text will be copied into a fixed-length buffer. + + .. note:: Setting `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ characters. + + .. note:: Even when `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an ``Edit`` control. + + .. note:: The unit of ``MaxLength`` is characters (not bytes) if the application is using themes. + ''' + OEMConvert: bool + ''' + Determines whether characters typed in the ``Edit`` control are converted from *ANSI* to *OEM* and then back to *ANSI*. + + `OEMConvert <Vcl.StdCtrls.TCustomEdit.OEMConvert.htm>`__ is most useful for ``Edit`` controls used to enter file names when the application does not use Unicode file names. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.NumberBox.TNumberBox.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the ``Edit`` control. To restrict the ``Edit`` control to display only, set the `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ property to ``True``. Set `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``False`` to allow the contents of the ``Edit`` control to be edited. + + Setting `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + SmallStep: float + ''' + No have docs. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + TextHint: str + ''' + A hint or message to be displayed when the ``Text`` property is empty. + + Use `TextHint <Vcl.StdCtrls.TCustomEdit.TextHint.htm>`__ to cue the user on what kind of entry is expected in the text field. Runtime themes must be enabled. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Value: float + ''' + No have docs. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + SpinButtonOptions: NumberBoxSpinButtonOptions + ''' + No have docs. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + UseNaNValue: bool + ''' + No have docs. + ''' + UseMouseWheel: bool + ''' + No have docs. + ''' + UseUpDownKeys: bool + ''' + No have docs. + ''' + Wrap: bool + ''' + No have docs. + ''' + NegativeValueColor: Color + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the text for the edit control may have changed. + + Write an `OnChange <Vcl.StdCtrls.TCustomEdit.OnChange.htm>`__ event handler to take specific action whenever the text for the edit control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the edit control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the edit control. + ''' + def OnChangeValue(self, Sender: Object) -> None: + ''' + # OnChangeValue: NotifyEvent + ``NumberBox`` is a numeric input control that supports the input of integer numbers, floating point numbers with a given set of decimal digits and proper formatting, and currency values. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnEvaluateExpression(self, Sender: Object) -> None: + ''' + # OnEvaluateExpression: NotifyEvent + No have docs. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + ''' + def OnValidateChar(self, Astr: str, AValidated: bool) -> None: + ''' + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Object: + ''' + ============== + System.TObject + ============== + + ``Object`` is the ultimate ancestor of all objects and components. + + ``Object`` encapsulates fundamental behavior common to objects by introducing methods that: + + - Create, maintain, and destroy instances of the object by allocating, initializing, and freeing required memory. + - Respond when object instances are created or destroyed. + - Return class-type and instance information on an object and runtime type information (RTTI) about its published properties. + - Support message handling. + - Support interfaces implemented by the object. + + Use ``Object`` as an immediate base class when declaring simple objects that do not need to persist (are not saved and reloaded) and that do not need to be assigned to other objects. + + Much of the capability of objects is established by methods that ``Object`` introduces. Many of these methods are used internally by *IDEs* and are not intended for users to call directly. Others are overridden in descendant objects that have more complex behavior. + + Although ``Object`` is the based object of a component framework, not all objects are components. All component classes descend from TComponent. + + .. note:: ``Object`` is never directly instantiated. Although it does not use programming language features that prevent instantiation, ``Object`` is an abstract class. + ''' + + __hash__: ClassVar[None] = ... + Disposed: bool + ''' + ``Disposed`` is a read-only property that shows the current state of this object. + + The ``Disposed`` property returns ``True`` if the object has been disposed using the `DisposeOf <System.TObject.DisposeOf.htm>`__ method. Otherwise, it returns ``False``. + + .. code-block:: python + + type + TMySimpleClass = class + private + // + stringMember: String; + constructor Create(Text: String); + destructor Destroy; + end; + + constructor TMySimpleClass.Create(Text: String); + begin + stringMember := Text; + end; + + destructor TMySimpleClass.Destroy; + begin + // this will be executed on calling the DisposeOf method. + end; + + var + myObject: MySimpleClass; + begin + myObject := TMySimpleClass.Create + ('This is a code snippet illustrating the functionality for the DisposeOf method and Disposed property'); + if not myObject.Disposed then + myObject.DisposeOf; + //Starting here, the object has entered the Disposed state. + end. + ''' + + def Create(self) -> None: + ''' + Constructs an object and initializes its data before the object is first used. + + ``Create()`` constructs an object. The purpose, size, and behavior of objects differ greatly. The ``Create()`` constructor defined by `Object <System.TObject.htm>`__ allocates memory but does not initialize data. + + Descendant objects usually define a constructor that creates the particular kind of object and initializes its data. + + .. note:: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance. + ''' + def Free(self) -> None: + ''' + Destroys an object and frees its associated memory, if necessary. + + Use ``Free()`` to destroy an object. ``Free()`` automatically calls the destructor if the object reference is not nil. Any object instantiated at run time that does not have an owner should be destroyed by a call to ``Free()``, so that it can be properly disposed of and its memory released. Unlike `Destroy <System.TObject.Destroy.htm>`__, ``Free()`` is successful even if the object is nil; if the object was never initialized, ``Free()`` would not result in an error. + + When you call ``Free()`` for a component, it calls ``Free()`` for all components that it owns—that is, all components in its component list. Since a form owns all the controls and other components that are created on it in design mode, those components are automatically freed when the form is freed. By default, all forms are owned by the ``Application`` object; when the application terminates, it frees the ``Application`` object, which frees all forms. For objects that are not components, or for components created with a nil owner, be sure to call ``Free()`` after you are finished with them; otherwise the allocated memory will not be usable until after the application terminates. + + .. warning:: Never explicitly free a component within one of its own event handlers or the event handler of a component it owns or contains. For example, do not free a button or the form that owns the button in its ``OnClick`` event handler. + + To free a form, call its `Release <Vcl.Forms.TCustomForm.Release.htm>`__ method, which destroys the form and releases the memory allocated for it after all its event handlers and those of the components it contains are through executing. + + .. note:: In C++ code, do not use ``Free()`` to destroy an object. Use the ``delete`` keyword. + ''' + def DisposeOf(self) -> None: + ''' + ``DisposeOf`` forces the execution of the destructor code in an object. + + The new Delphi mobile compilers introduce a new dispose pattern implemented by calling ``DisposeOf``, which executes the destructor code even if there are variables with pending references to the object. After the ``DisposeOf()`` method is called, the object is placed in a special state, the `Disposed <System.TObject.Disposed.htm>`__ state. This means that the destructor is not called again if ``DisposeOf()`` is called again, or if the reference count reaches zero (the moment in which the memory is released). + + The behavior of ``DisposeOf`` differs for the two generations of Delphi compilers: + + - On the **Delphi desktop compilers** (``DCC32``, ``DCC64``, ``DCCOSX``), the effect of calling ``DisposeOf`` remains the same, as it calls `Free <System.TObject.Free.htm>`__. + - On the **Delphi mobile compilers** (``DCCIOS32``, ``DCCIOSARM``), the destructor code is executed at the same time as for the Delphi desktop compilers, but the memory is managed by the `Automatic Reference Counting <Automatic_Reference_Counting_in_Delphi_Mobile_Compilers.htm>`__ mechanism. + + .. code-block:: python + + type + TMySimpleClass = class + private + // + stringMember: String; + constructor Create(Text: String); + destructor Destroy; + end; + + constructor TMySimpleClass.Create(Text: String); + begin + stringMember := Text; + end; + + destructor TMySimpleClass.Destroy; + begin + // this will be executed on calling the DisposeOf method. + end; + + var + myObject: MySimpleClass; + begin + myObject := TMySimpleClass.Create + ('This is a code snippet indicating the usage of the DisposeOf method'); + if not myObject.Disposed then + myObject.DisposeOf; + //Starting here, the object has entered the Disposed state. + end. + ''' + @classmethod + def InitInstance(self, Instance: Pointer) -> Object: + ''' + Initializes a newly allocated object instance to all zeros and initializes the instance's virtual method table pointer. + + You should not call ``InitInstance`` directly. ``InitInstance()`` is called by `NewInstance <System.TObject.NewInstance.htm>`__ when an object is created. When overriding `NewInstance <System.TObject.NewInstance.htm>`__, be sure to call ``InitInstance`` as the last statement. + + ``InitInstance`` is not virtual, so you cannot override it. Instead, initialize any data for an object in the constructor. + ''' + def CleanupInstance(self) -> None: + ''' + Performs finalization on long strings, variants, and interface variables within a class. + + Do not call ``CleanupInstance()`` directly. ``CleanupInstance()`` is called automatically when the object instance is destroyed. + + ``CleanupInstance()`` releases all long strings and variants. It sets long strings to ``empty`` and variants to ``Unassigned``. + ''' + def ClassType(self) -> Class: + ''' + Returns the class reference for the object's class. + + .. note:: ``ClassType`` dynamically determines the type of an object and returns its class reference, or metaclass. + + Avoid using ``ClassType`` in application code. + + .. note:: In Delphi code, use the ``is`` or ``as`` operators instead of ``ClassType``. + + .. note:: In C++ code, use a dynamic cast or the `InheritsFrom <System.TObject.InheritsFrom.htm>`__ method instead of ``ClassType``. + ''' + def ClassName(self) -> str: + ''' + Returns a string indicating the type of the object instance (as opposed to the type of the variable passed as an argument). + + Use ``ClassName()`` to obtain the class name from an object instance or class reference. This is useful for differentiating object instances that are assigned to a variable that has the type of an ancestor class. + + .. note:: In C++ code, call ``ClassName`` as a method to obtain an object's class name. Use the global static function to obtain the class name from a metaclass object. + ''' + def ClassNameIs(self, Name: str) -> bool: + ''' + Determines whether an object is of a specific type. + + ``ClassNameIs`` determines whether an object instance or class reference has a class name that matches a specified string. This is useful to query objects across modules or shared libraries. + + .. note:: In C++ code, call ``ClassNameIs`` as a method to compare an object's class name. Use the global static function to compare the class name from a metaclass object. + ''' + def ClassParent(self) -> Class: + ''' + Returns the type of the immediate ancestor of a class. + + ``ClassParent()`` returns the name of the parent class for an object instance or class reference. For `Object <System.TObject.htm>`__, ``ClassParent()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + + Avoid using ``ClassParent`` in application code. + + .. note:: In Delphi code, use the ``is`` or ``as`` operators instead of ``ClassParent``. + + .. note:: In C++ code, use a dynamic cast or the `InheritsFrom <System.TObject.InheritsFrom.htm>`__ method instead of ``ClassParent``. + ''' + def ClassInfo(self) -> Pointer: + ''' + Returns a pointer to the run-time type information (RTTI) table for the object type. + + ``ClassInfo`` provides access to the RTTI table for a given object type. + + Some classes do not provide run-time type information. For these classes, ``ClassInfo()`` returns ``nil`` (Delphi) or ``NULL`` (C++). All classes descended from TPersistent do provide run-time type information. + ''' + @classmethod + def InstanceSize(self) -> int: + ''' + Returns the size in bytes of each instance of the object type. + + ``InstanceSize`` indicates how many bytes of memory are required for a class's instance data. ``InstanceSize()`` is called from methods that allocate and deallocate memory. ``InstanceSize`` is not a virtual method, so it cannot be overridden. ``InstanceSize`` should be called only when implementing a custom version of `NewInstance <System.TObject.NewInstance.htm>`__. + ''' + def InheritsFrom(self, AClass: Class) -> bool: + ''' + Determines the relationship of two object types. + + Use ``InheritsFrom`` to determine whether a particular class type or object is an instance of a class or one of its descendants. ``InheritsFrom()`` returns ``True`` if the object type specified in the aClass parameter is an ancestor of the object type or the type of the object itself. Otherwise, it returns ``False``. + + .. note:: ``InheritsFrom`` is similar to the Delphi ``is`` operator, but applies to class references. + + .. note:: In C++ code, a nonstatic version of ``InheritsFrom`` is provided. This call is useful in determining whether a descendant class method or property can be used, given a variable of a base class. For example, use ``InheritsFrom`` to determine whether the ``Sender`` parameter in an event handler is of a particular class type or one of its descendants. + ''' + @overload + @classmethod + def MethodAddress(self, Name: str) -> Pointer: + ''' + Returns the address of a class method by name. + + .. note:: You can use ``MethodAddress`` for published methods only. + + There are situations when it is useful to invoke an object method without hard coding the method name in advance. Call ``MethodAddress`` to dynamically retrieve the address of such a method by specifying the method ``Name`` as a string. + + An easy way to invoke the method is to define a procedure or function data type, such as: + + .. code-block:: python + + type TProc = procedure of object; + + Assign the object name and the ``MethodAddress()`` method to a Method <System.TMethod.htm>`__ variable, such as: + + .. code-block:: python + + MethodVar.Data := Pointer(ObjectInstanceName); + MethodVar.Code := ObjectInstanceName.MethodAddress('MethodNameString'); + + Pass this in a call to a variable of the procedure or function type: + + .. code-block:: python + + Proc := TProc(MethodVar); + Proc; + ''' + @overload + @classmethod + def MethodAddress(self, Name: str) -> Pointer: ... + @classmethod + def MethodName(self, Address: Pointer) -> str: + ''' + Returns the name of a class method by address. + + There are situations when it is useful to invoke an object method without hard coding the method name in advance. Call `MethodAddress <System.TObject.MethodAddress.htm>`__ to dynamically retrieve the address of such a method by specifying the method name as a string. + + ``MethodName`` is the opposite of this process--by supplying an ``Address()`` method, the name of the method is returned as a string. + ''' + @classmethod + def QualifiedClassName(self) -> str: + ''' + Returns the qualified name of the class. + + ``QualifiedClassName()`` returns the class's unit scope concatenated with the class name. Example: + + .. code-block:: python + + uses + SysUtils, SyncObjs; + + begin + Writeln(TEvent.QualifiedClassName); // displays System.SyncObjs.TEvent + ''' + @overload + def FieldAddress(self, Name: str) -> Pointer: + ''' + Returns the address of a published object field. + + ``FieldAddress`` is used internally by the component streaming system to access a specified published field of an object. ``FieldAddress()`` returns a pointer to the field, if it exists. If the object has no published field by that name, ``FieldAddress()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + + Programs should access and manipulate fields by using properties instead of ``FieldAddress``. + ''' + @overload + def FieldAddress(self, Name: str) -> Pointer: ... + def GetInterface(self, IID: GUID, Obj) -> bool: + ''' + Retrieves a specified interface. + + ``GetInterface`` retrieves the interface designated by a *GUID* or type name. The basic implementation of ``GetInterface`` uses the *GUID* specified in the ``IID`` parameter. If the specified interface is supported by the class, it is returned in the ``Obj`` parameter, and ``GetInterface`` has a return value of True. Otherwise, ``Obj`` contains ``nil`` (Delphi) or ``NULL`` (C++), and ``GetInterface()`` returns ``False``. + + .. note:: In Delphi code, ``IID`` can be an interface name. The compiler automatically translates this name into the corresponding *GUID*. + + .. note:: In C++ code, use the templated version of ``GetInterface()`` to obtain an interface from a ``DelphiInterface`` object. + + ``GetInterface`` is equivalent to the ``as`` operator (Delphi) and dynamic casts (C++), except that ``GetInterface`` does not raise an exception if the interface is not supported. + ''' + @classmethod + def GetInterfaceEntry(self, IID: GUID) -> PInterfaceEntry: + ''' + Returns the entry for a specific interface implemented in a class. + + ``GetInterfaceEntry()`` returns the class entry for the interface specified by the ``IID`` parameter. + + .. note:: In Delphi Code, ``IID`` can be an interface name. The compiler replaces this name with the actual *GUID*. + + .. note:: *COM* objects can use ``GetInterfaceEntry`` to automate dispatch calls to a dual-IDispatch interface. + ''' + @classmethod + def GetInterfaceTable(self) -> PInterfaceTable: + ''' + Returns a pointer to a structure containing all of the interfaces implemented by a given class. + + ``GetInterfaceTable()`` returns the interface entries for the class. This list contains only interfaces implemented by this class, not its ancestors. To find the ancestor list, iteratively call `ClassParent <System.TObject.ClassParent.htm>`__ and then call ``GetInterfaceTable`` on the value it returns. To find the entry for a specific interface, use the `GetInterfaceEntry <System.TObject.GetInterfaceEntry.htm>`__ method instead. + ''' + @classmethod + def UnitName(self) -> str: + ''' + Returns the name of the unit where the class is defined. + + ``UnitName`` can be used to obtain the unit where a specific class is defined. For example, calling ``UnitName`` on `Button <Vcl.StdCtrls.TButton.htm>`__ returns the ``Vcl.StdCtrls`` string. + ''' + @classmethod + def UnitScope(self) -> str: + ''' + Returns the class's unit scope. + + The class's unit scope is currently equivalent with the class's unit name. + + .. code-block:: python + + uses + SysUtils, SyncObjs; + + begin + Writeln(TEvent.UnitScope); // displays System.SyncObjs + // ... + ''' + def Equals(self, Obj: Object) -> bool: + ''' + Checks whether the current instance and the ``Obj`` parameter are equal. + + The function has one ``Obj`` parameter of the `Object <System.TObject.htm>`__ type. + + By default, the ``Equals()`` method shows whether the addresses corresponding to the current object and the ``Obj`` object are identical. The method returns a ``Boolean`` value that represents the equality between the two addresses. + + .. note:: ``Equals()`` is supposed to be overridden in user-derived classes, to provide consumer objects with an equality determining function. For example, in the `FMX.Types.TBounds <FMX.Types.TBounds.htm>`__ class, `Equals <FMX.Types.TBounds.Equals.htm>`__ also returns ``True`` if the **Rect** properties of the current object and of the ``Obj`` object are equal. In the `FMX.StdActns.TBaseValueRange <FMX.StdActns.TBaseValueRange.htm>`__ class, `Equals <FMX.StdActns.TBaseValueRange.Equals.htm>`__ also returns ``True`` if all the properties of the current object and of the ``Obj`` object are equal. + ''' + def GetHashCode(self) -> int: + ''' + Returns an integer containing the hash code. + + By default, calling ``GetHashCode()`` on an object returns an integer representing the virtual address at which the object is stored. + + **Notes:** + + - ``GetHashCode()`` is supposed to be overridden in user-derived classes, to provide consumer objects with an integer hash code representation. + - The sign of the hash code depends on the address of the particular object instance. Negative hash code can appear for object instances that reside at higher memory locations. + ''' + def ToString(self) -> str: + ''' + Returns a string containing the class name. + + By default, the ``ToString()`` returns a string containing the class name of the instance that is being called. + + For example, calling ``ToString()`` on a ``Button`` instance returns a string containing ``Button``. + + .. note:: ``ToString()`` is intended to be overridden in user-derived classes, to provide consumer objects with a string representation. + ''' + def SafeCallException(self, ExceptObject: Object, ExceptAddr: Pointer) -> HResult: + ''' + Handles exceptions in methods declared using the safecall calling convention. + + ``SafeCallException()`` handles exceptions in methods that use the safecall calling convention. Some classes that implement interfaces override this method to handle possible errors. + + As implemented in `Object <System.TObject.htm>`__, ``SafeCallException()`` simply returns E_UNEXPECTED. This is the appropriate response for classes that do no support interfaces. + ''' + def AfterConstruction(self) -> None: + ''' + Responds after the last constructor has executed. + + ``AfterConstruction()`` is called automatically after the object's last constructor has executed. Do not call it explicitly in your applications. + + The ``AfterConstruction()`` method implemented in `Object <System.TObject.htm>`__ does nothing. Override this method when creating a class that performs an action after the object is created. For example, ``CustomForm`` overrides ``AfterConstruction()`` to generate an ``OnCreate`` event. + ''' + def BeforeDestruction(self) -> None: + ''' + Responds before the first destructor executes. + + ``BeforeDestruction()`` is called automatically before the object's first destructor executes. Do not call it explicitly in your applications. + + The ``BeforeDestruction()`` method implemented in `Object <System.TObject.htm>`__ does nothing. Override this method when creating a class that performs an action before the object is destroyed. For example, ``CustomForm`` overrides ``BeforeDestruction()`` to generate an ``OnDestroy`` event. + + .. note:: ``BeforeDestruction()`` is not called when the object is destroyed before it is fully constructed. That is, if the object's constructor raises an exception, the destructor is called to dispose of the object, but ``BeforeDestruction()`` is not called. + ''' + def Dispatch(self, Message) -> None: + ''' + Calls message-handling methods for the object, based on the contents of the ``Message`` parameter. + + Call ``Dispatch()`` to automatically pass messages to the appropriate message handler. + + ``Dispatch()`` determines whether a message is in the list of message handlers declared for the object. If the object does not handle the message, ``Dispatch()`` then examines the message-handler list of the ancestor class, and continues checking ancestors until it either finds a specific handler or runs out of ancestors, in which case it calls `DefaultHandler <System.TObject.DefaultHandler.htm>`__. + + The only assumption ``Dispatch()`` makes about the data in ``Message`` is that the first two bytes contain a message ``ID``—that is, an integer that determines which message handler ``Dispatch()`` calls. Although any kind of data can be passed to ``Dispatch()``, most `Object <System.TObject.htm>`__ descendants expect a message record such as ``Message`` or a specific data structure type. + ''' + def DefaultHandler(self, Message) -> None: + ''' + Provides the interface for a method that processes message records. + + ``DefaultHandler()`` is called by `Dispatch <System.TObject.Dispatch.htm>`__ when it cannot find a method for a particular message. ``DefaultHandler()`` provides message handling for all messages for which an object does not have specific handlers. Descendant classes that process messages override ``DefaultHandler()`` according to the types of messages they handle. + + .. note:: In a Delphi message-handling method, calling inherited results in a call to the ancestor's ``DefaultHandler()`` method only if that ancestor does not specify a message method for the particular message being handled. Otherwise, calling inherited results in a call to the specific handler for that type of message. + ''' + @classmethod + def NewInstance(self) -> Object: + ''' + Allocates memory for an instance of an object type and returns a pointer to that new instance. + + All constructors call ``NewInstance`` automatically. ``NewInstance`` calls `InstanceSize <System.TObject.InstanceSize.htm>`__ to determine how much memory containing a particular instance to allocate from the heap. Do not call ``NewInstance`` directly. + + Override ``NewInstance`` only for special memory allocation requirements. For example, when allocating a large number of identical objects that all need to be in memory at the same time, you can allocate a single block of memory for the entire group, then override ``NewInstance`` to use part of that larger block for each instance. + + If you override ``NewInstance`` to allocate memory, you may need to override `FreeInstance <System.TObject.FreeInstance.htm>`__ to deallocate the memory. + + .. note:: By default, ``NewInstance`` calls `InitInstance <System.TObject.InitInstance.htm>`__. + ''' + def FreeInstance(self) -> None: + ''' + Deallocates memory allocated by a previous call to the `NewInstance <System.TObject.NewInstance.htm>`__ method. + + All destructors call ``FreeInstance`` automatically to deallocate memory that was allocated by overriding `NewInstance <System.TObject.NewInstance.htm>`__. + + Do not call ``FreeInstance`` directly. ``FreeInstance`` should be overridden if `NewInstance <System.TObject.NewInstance.htm>`__ was overridden to change the way the object's instance data was allocated. + + Like `NewInstance <System.TObject.NewInstance.htm>`__, ``FreeInstance`` uses the value returned from `InstanceSize <System.TObject.InstanceSize.htm>`__ to deallocate the object's memory. + ''' + def Destroy(self) -> None: + ''' + Disposes of an object instance. + + Do not call ``Destroy()`` directly. Call `Free <System.TObject.Free.htm>`__ instead. Free verifies that the object reference is not nil before calling ``Destroy()``. + + The ``Destroy()`` method defined by `Object <System.TObject.htm>`__ deallocates memory. Descendent objects usually define a destructor that is customized for that particular kind of object. + + When declaring a ``Destroy()`` method in a descendant, always add the override directive to the declaration and call the inherited ``Destroy()`` as the last statement in the overriding method. Because ``Destroy()`` is a virtual method, overriding it ensures that the proper inherited behavior occurs. + + .. note:: If an exception escapes from the constructor, the destructor is called to destroy the partially constructed object instance that failed to initialize completely. Therefore, destructors should check that allocated resources such as handles were actually allocated before trying to release them, since their value might be zero. + + ``Destroy()`` should be implemented so that it calls `Free <System.TObject.Free.htm>`__ on all subobjects created within the object's constructor (that is, allocated by the constructor). Unlike ``Destroy()``, `Free <System.TObject.Free.htm>`__ provides a safeguard when destroying objects that are nil. + ''' + def CPP_ABI_1(self) -> None: + ''' + No have docs. + ''' + def CPP_ABI_2(self) -> None: + ''' + No have docs. + ''' + def CPP_ABI_3(self) -> None: + ''' + No have docs. + ''' + def __MarkDestroying(self, Obj) -> None: + ''' + No have docs. + ''' + def __SetDisposed(self, Obj) -> None: + ''' + No have docs. + ''' + def GetDisposed(self) -> bool: + ''' + Getter for the `Disposed <System.TObject.Disposed.htm>`__ property. + ''' + def CheckDisposed(self) -> None: + ''' + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class OpenDialog(CommonDialog): + ''' + ======================= + Vcl.Dialogs.TOpenDialog + ======================= + + ``OpenDialog`` displays a file-selection dialog. + + ``OpenDialog`` displays a modal Windows dialog box for selecting and opening files. The dialog does not appear at runtime until it is activated by a call to the ``Execute()`` method. When the user clicks Open, the dialog closes and the selected file or files are stored in the Files property. + ''' + + __hash__: ClassVar[None] = ... + FileEditStyle: FileEditStyle + ''' + Determines the style of the file-selection dialog. (Obsolete.) + + ``FileEditStyle`` is maintained for compatibility with older versions of the VCL. It has no effect. + ''' + Files: Strings + ''' + List of selected file names. + + ``Files`` is a ``StringList`` that contains each selected file name with its full directory path. (To let users select multiple file names, set the ``ofAllowMultiSelect`` flag in Options.) Use properties and methods for ``StringList``\ s to traverse this list of files and read individual items. + + The example below assigns the list of files in ``Files`` to the ``Items`` property of a ``ListBox`` component. + + .. code-block:: python + :caption: Delphi + + ListBox1.Items.Assign(OpenDialog1.Files); + + .. code-block:: python + :caption: C++ + + ListBox1->Items->Assign(OpenDialog1->Files); + + ''' + HistoryList: Strings + ''' + Maintains a list of previously selected files. (Obsolete.) + + ``HistoryList`` is maintained for compatibility with older versions of `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__. It is not used. + ''' + DefaultExt: str + ''' + Specifies a default file extension. + + ``DefaultExt`` specifies a file extension that is appended automatically to the selected file name, unless the selected file name already includes a registered extension. If the user selects a file name with an extension that is unregistered, ``DefaultExt`` is appended to the unregistered extension. + + Extensions longer than three characters are not supported. Do not include the period (``'.'``) that divides the file name and its extension. + ''' + FileName: FileName + ''' + Indicates the name and directory path of the last file selected. + + The ``FileName`` property returns the name and complete directory path of the most recently selected file. The value of ``FileName`` is the same as the first item in the ``Files`` property. To make a file name appear by default in the dialog's ``Edit`` box, assign a value to ``FileName`` in the *Object Inspector* or in program code. Programmatic changes to ``FileName`` have no effect while the dialog is active. + + .. code-block:: python + :caption: Delphi + + if OpenDialog1.Execute then + Memo1.Lines.LoadFromFile(OpenDialog1.FileName) + else + Memo1.Lines.Clear; + + .. code-block:: python + :caption: C++ + + if (OpenDialog1->Execute()) + Memo1->Lines->LoadFromFile(OpenDialog1->FileName); + else + Memo1->Clear(); + ''' + Filter: str + ''' + Determines the file masks (filters) available in the dialog. + + The file-selection dialog includes a drop-down list of file types under the ``Edit`` box. When the user picks a file type from the list, only files of the selected type are displayed in the dialog. To configure file masks at design time, click on the ellipsis marks (...) to the right of the ``Filter`` property in the *Object Inspector*. This opens the ``Filter`` editor. In the left column of the ``Filter`` editor, under ``Filter`` Name, type a brief description of each file type that will be available at runtime. In the right column, under ``Filter``, type the file mask corresponding to each description. For example, the description "Text files" might appear to the left of the mask "*.txt", and the description "Pascal source files" might appear to the left of the mask "*.pas". Since the description appears in the drop-down list at runtime, it is often helpful to show the mask explicitly in the description (for example, "Text files (*.txt)"). To create file masks in program code, assign a value to the ``Filter`` property that consists of a description and a mask separated by a vertical bar (pipe) character. Do not include spaces around the vertical bar. + + For example: + + .. code-block:: python + :caption: Delphi + + OpenDialog1.Filter := 'Text files (*.txt)|*.TXT'; + + .. code-block:: python + :caption: C++ + + OpenDialog1->Filter = "Text files (*.txt)|*.TXT"; + + Multiple filters should be separated by vertical bars. For example, + + .. code-block:: python + :caption: Delphi + + OpenDialog1.Filter := 'Text files (*.txt)|*.TXT|Pascal files (*.pas)|*.PAS'; + + .. code-block:: python + :caption: C++ + + OpenDialog1->Filter = "Text files (*.txt)|*.TXT|Pascal files (*.pas)|*.PAS"; + + To include multiple masks in a single filter, separate the masks with semicolons. This works both in the *Object Inspector* and in program code. For example, + + .. code-block:: python + :caption: Delphi + + OpenDialog1.Filter := 'Pascal files|*.PAS;*.DPK;*.DPR'; + + .. code-block:: python + :caption: C++ + + OpenDialog1->Filter = "Pascal files|*.PAS;*.DPK;*.DPR"; + + If no ``Value`` is assigned to ``Filter``, the dialog displays all file types. + ''' + FilterIndex: int + ''' + Determines which filter is selected by default when the dialog opens. + + ``FilterIndex`` determines which of the file types in Filter is selected by default when the dialog opens. Set ``FilterIndex`` to 1 to choose the first file type in the list as the default, or set ``FilterIndex`` to 2 to choose the second file type as the default, and so forth. If the value of ``FilterIndex`` is out or range, the first file type listed in Filter is the default. + ''' + InitialDir: str + ''' + Determines the current directory when the dialog opens. + + ``InitialDir`` determines the default directory displayed in the file-selection dialog when it opens. For example, to point the dialog at the ``WINDOWS\SYSTEM`` directory, set the value of ``InitialDir`` to ``C:\WINDOWS\SYSTEM``. + + If no ``Value`` is assigned to ``InitialDir``, or if the specified directory does not exist, the initial directory is controlled by the global ForceCurrentDirectory variable. If ForceCurrentDirectory is ``True``, the dialog opens with the current working directory displayed. Otherwise, the dialog opens with either the current working directory or the *My Documents* directory, depending on the version of *Windows*. + ''' + Options: OpenOptions + ''' + Determines the appearance and behavior of the file-selection dialog. + + Use the ``Options`` property to customize the appearance and functionality of the dialog. + ''' + OptionsEx: OpenOptionsEx + ''' + Augments the `Options <Vcl.Dialogs.TOpenDialog.Options.htm>`__ property with additional flags that determine the appearance and behavior of the file-selection dialog. + + Use the ``OptionsEx`` property to further customize the file ``OpenDialog`` beyond the options covered by the `Options <Vcl.Dialogs.TOpenDialog.Options.htm>`__ property. + ''' + Title: str + ''' + Specifies the text in the dialog's ``TitleBar``. + + Use ``Title`` to specify the text that appears in the file-selection dialog's ``TitleBar``. If no ``Value`` is assigned to ``Title``, the dialog has the title "Open". + ''' + + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ instance. + + ``Create()`` generates a `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ instance, but the new dialog does not appear on the ``Form`` at runtime until the ``Execute()`` method is called. + + ``AOwner`` is the component that is responsible for freeing the `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ instance. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ and frees its memory. + + Do not call ``Destroy()`` directly in an application. Call ``Free()`` instead. ``Free()`` verifies that the `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ reference is not ``nil`` before calling ``Destroy()``. + ''' + def ExplorerHook(self, Wnd: HWnd, Msg: int, WParam: WPARAM, LParam: LPARAM) -> _PTR: + ''' + No have docs. + ''' + @overload + def Execute(self, ParentWnd: HWND) -> bool: + ''' + Displays the file-selection dialog. + + ``Execute()`` opens the file-selection dialog, returning ``True`` when the user selects a file and clicks Open. If the user clicks Cancel, ``Execute()`` returns ``False``. + + The code signatures of ``Execute()`` that appear above are actually overrides of the ``Execute()`` overloads in the base class `Vcl.Dialogs.TCommonDialog.Execute <Vcl.Dialogs.TCommonDialog.Execute.htm>`__. There is one more overload of Execute for Delphi that appears in the inherited members from TCommonDialog, and this overload takes no input parameters. + + The ``ParentWnd`` parameter is a window handle of type `HWND MSDN <http://msdn.microsoft.com/aa383751(VS.85).aspx>`__. If none is provided, the current form handle is used, accessed from `Vcl.Forms.TApplication.ActiveFormHandle <Vcl.Forms.TApplication.ActiveFormHandle.htm>`__ in the global variable `Vcl.Forms.Application <Vcl.Forms.Application.htm>`__. + + .. code-block:: python + :caption: Delphi + + if OpenDialog1.Execute then + Memo1.Lines.LoadFromFile(OpenDialog1.FileName) + else + Memo1.Lines.Clear; + + .. code-block:: python + :caption: C++ + + if (OpenDialog1->Execute()) + Memo1->Lines->LoadFromFile(OpenDialog1->FileName); + else + Memo1->Lines->Clear(); + ''' + @overload + def Execute(self) -> bool: ... + @overload + def Execute(self, ParentWnd: HWND) -> None: ... + def CanClose(self, OpenFileName: OpenFileName) -> bool: + ''' + No have docs. + ''' + def DoCanClose(self) -> bool: + ''' + No have docs. + ''' + def DoSelectionChange(self) -> None: + ''' + No have docs. + ''' + def DoFolderChange(self) -> None: + ''' + No have docs. + ''' + def DoTypeChange(self) -> None: + ''' + No have docs. + ''' + def DoIncludeItem(self, OFN: OFNotifyEx, Include: bool) -> None: + ''' + No have docs. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Designates methods for storing an object's unpublished data on a stream such as a form file. + + ``Vcl.Dialogs.TOpenDialog.DefineProperties`` inherits from `System.Classes.TComponent.DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__. All content below this line refers to `System.Classes.TComponent.DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__. + + Designates methods for storing an object's unpublished data on a stream such as a form file. + + `Component <System.Classes.TComponent.htm>`__ overrides the `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ method defined in `Persistent <System.Classes.TPersistent.htm>`__ to define "fake" ``Top`` and ``Left`` properties. These are defined so that components that are not controls can be manipulated at design time. However, the ``Top`` and ``Left`` properties are hidden, that is, they are not published, because only controls appear at run time. + + `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ is virtual; descendent classes can override it. When overriding `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__, be aware that the `Ancestor <System.Classes.TFiler.Ancestor.htm>`__ property of ``Filer`` might be set, and that this property can determine whether or not it is appropriate to write properties. + + `DefineProperties <System.Classes.TComponent.DefineProperties.htm>`__ is called automatically as part of the component streaming system; do not call it directly. + ''' + def GetFileNames(self, OpenFileName: OpenFileName) -> None: + ''' + No have docs. + ''' + def GetHandle(self) -> HWND: + ''' + Returns the value for the inherited `Handle <Vcl.Dialogs.TCommonDialog.Handle.htm>`__ property. + + The ``GetHandle()`` protected function gets the value for the `Handle <Vcl.Dialogs.TCommonDialog.Handle.htm>`__ property. + ''' + def GetStaticRect(self) -> Rect: + ''' + Returns the coordinates of the reserved area of the dialog box. + + ``GetStaticRect`` is provided for components that descend from `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ and require the placement of new controls alongside the standard ones inherited from the parent class. For Explorer-style dialogs, ``GetStaticRect()`` returns the size and location of the standard controls within the dialog. For older versions of *Windows*, or if ``ofOldStyleDialog`` is enabled in `Options <Vcl.Dialogs.TOpenDialog.Options.htm>`__, ``GetStaticRect()`` returns the client dimensions of the entire dialog box. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Responds to *Windows Messages* sent to the dialog. + + `WndProc <Vcl.Dialogs.TCommonDialog.WndProc.htm>`__ is the main window procedure for the dialog. As implemented in `CommonDialog <Vcl.Dialogs.TCommonDialog.htm>`__, it simply calls the ``Dispatch()`` method, where any message handlers respond to messages before the `DefaultHandler <Vcl.Dialogs.TCommonDialog.DefaultHandler.htm>`__ method sends them on to the *Windows Message* handler. + + Override `WndProc <Vcl.Dialogs.TCommonDialog.WndProc.htm>`__ to subclass the dialog's window procedure. To add additional message processing without interfering with the existing message handling of the dialog, override `MessageHook <Vcl.Dialogs.TCommonDialog.MessageHook.htm>`__ instead. + ''' + def LaunchDialog(self, DialogData: IntPtr) -> bool: + ''' + No have docs. + ''' + + def OnCanClose(self, Sender: Object, CanClose: bool) -> None: + ''' + # OnCanClose: CloseQueryEvent + Occurs when the user tries to close the dialog without canceling. + + Write an ``OnCanClose`` event handler to provide custom validation of the value of FileName. File selection dialogs provide a number of built-in validations, such as checking for invalid characters, prompting for confirmation before overwriting, checking whether a file or path exists, and so on. These validations can be specified using the ``Options`` property. However, applications can provide additional validation of file names in an ``OnCanClose`` event handler. + + Set the ``CanClose`` parameter to ``False`` to prevent the dialog from closing. The ``OnCanClose`` event handler is responsible for telling the user why the dialog doesn't close. + + .. note:: ``OnCanClose`` does not occur under *Windows NT 3.51* unless the new shell is installed. + ''' + def OnFolderChange(self, Sender: Object) -> None: + ''' + # OnFolderChange: NotifyEvent + Occurs when a directory is opened or closed from the dialog. + + The ``OnFolderChange`` event occurs when the user changes the directory whose contents are displayed in the dialog. This can happen when the user double-clicks a directory, clicks the *Up* arrow, or uses the ``ListBox`` at the top of the dialog to navigate through the directory structure. To obtain the path of the currently selected directory, use the `ExtractFilePath <System.SysUtils.ExtractFilePath.htm>`__ routine on the `FileName <Vcl.Dialogs.TOpenDialog.FileName.htm>`__ property of the + ''' + def OnIncludeItem(self, OFN: OFNotifyEx, Include: bool) -> None: + ''' + # OnIncludeItem: IncludeItemEvent + Specifies a default file extension. + + ``DefaultExt`` specifies a file extension that is appended automatically to the selected file name, unless the selected file name already includes a registered extension. If the user selects a file name with an extension that is unregistered, ``DefaultExt`` is appended to the unregistered extension. + + Extensions longer than three characters are not supported. Do not include the period (``'.'``) that divides the file name and its extension. + ''' + def OnSelectionChange(self, Sender: Object) -> None: + ''' + # OnSelectionChange: NotifyEvent + Occurs when file names displayed in the dialog are changed. + + The ``OnSelectionChange`` event occurs when the user does something to change the list displayed in the dialog. This can include opening the file-selection dialog box, highlighting a file or directory, selecting a new filter, selecting a new directory, or creating a new folder. + + The newly selected files can be obtained by reading the value of the `FileName <Vcl.Dialogs.TOpenDialog.FileName.htm>`__ or `Files <Vcl.Dialogs.TOpenDialog.Files.htm>`__ properties. The latter property should be consulted if the ``ofMultiSelect`` option is included in the dialog's `Options <Vcl.Dialogs.TOpenDialog.Options.htm>`__. + ''' + def OnTypeChange(self, Sender: Object) -> None: + ''' + # OnTypeChange: NotifyEvent + Occurs when the file types displayed in the dialog are changed. + + The ``OnTypeChange`` event occurs when the user selects a new filter from the `Files <Vcl.Dialogs.TOpenDialog.Files.htm>`__ of Type ``ListBox`` at the bottom of the dialog. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Page(CustomControl): + ''' + ================== + Vcl.ExtCtrls.TPage + ================== + + Specifies a page in a `Notebook <Vcl.ExtCtrls.TNotebook.htm>`__ control. + + The ``Page`` class implements a page in a `Notebook <Vcl.ExtCtrls.TNotebook.htm>`__ control. + ''' + + __hash__: ClassVar[None] = ... + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + + def ReadState(self, Reader: Reader) -> None: + ''' + Prepares the control for having its properties assigned values from a *Stream*. + + Override `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__ to change the preparations the control makes as it readies itself to have its property values assigned from a *Stream*. For example, a control might destroy temporary internal data structures or objects before new instances are loaded from the stream. Be sure to include a call to the inherited method when overriding `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__ disables control alignment until all the child controls have been read from the stream, calls the inherited `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__ method, and re-enables the alignment of all the controls. The method then builds the tab order list of controls and synchronizes its visibility with that of its parent control. + ''' + def Paint(self) -> None: + ''' + Responds to a mouse click. + + The `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ method for `CustomControl <Vcl.Controls.TCustomControl.htm>`__ does nothing other than provide the interface for a method that responds to ``WM_PAINT`` messages. `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called by the `PaintWindow <Vcl.Controls.TCustomControl.PaintWindow.htm>`__ method, after that method has supplied the `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ with the handle to a device context. When creating a custom control, always override `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ to draw the image of the control. + + .. tip:: To determine which portions of the control's ``Canvas`` need to be repainted when `Paint <Vcl.Controls.TCustomControl.Paint.htm>`__ is called, use the `ClipRect <Vcl.Graphics.TCustomCanvas.ClipRect.htm>`__ property of the ``Canvas``. + ''' + def Create(self, AOwner: Component) -> None: + ''' + `Creates <Vcl.Controls.TCustomControl.Create.htm>`__ an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. + + Calling `Create <Vcl.Controls.TCustomControl.Create.htm>`__ constructs and initializes an instance of `CustomControl <Vcl.Controls.TCustomControl.htm>`__. However, you should never attempt to instantiate a `CustomControl <Vcl.Controls.TCustomControl.htm>`__. This class is intended solely as a base class from which other control classes descend and you should only call `Create <Vcl.Controls.TCustomControl.Create.htm>`__ to instantiate one of these descendants. Controls placed on forms at design time are created automatically. + + After calling the inherited constructor, `Create <Vcl.Controls.TCustomControl.Create.htm>`__ initializes the control and also a `Canvas <Vcl.Graphics.TCanvas.htm>`__ object for its `Canvas <Vcl.Controls.TCustomControl.Canvas.htm>`__ property. + + When overriding `Create <Vcl.Controls.TCustomControl.Create.htm>`__, always call the inherited `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the `Create <Vcl.Controls.TCustomControl.Create.htm>`__ method. + + .. note:: If a component's constructor allocates resources or memory, also override the destructor to free those resources. + ''' + + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and false otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +==================================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class PageControl(CustomTabControl): + ''' + ========================= + Vcl.ComCtrls.TPageControl + ========================= + + ``PageControl`` is a set of pages used to make a multiple page dialog box. + + Use ``PageControl`` to create a multiple page dialog or tabbed notebook. ``PageControl`` displays multiple overlapping pages that are `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ objects. The user selects a page by clicking the page's tab that appears at the ``Top`` of the control. To add a new page to a ``PageControl`` object at design time, right-click the ``PageControl`` object and choose *New Page*. + + You can `define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to a page of the ``PageControl``. To define the accelerator key use the `Caption <Vcl.ComCtrls.TTabSheet.Caption.htm>`__ property of the `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ control. To create a tabbed control that uses only a single body portion (page), use `TabControl <Vcl.ComCtrls.TTabControl.htm>`__ instead. + + .. note:: When using one of the ``PageControl``s, if you want to restrict a user from switching to a tab, you cannot set TabSheet.Enabled <Vcl.ComCtrls.TTabSheet.Enabled.htm>`__ to ``False`` to accomplish that restriction. Instead, use the `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event to prevent the user from selecting a tab. + ''' + + __hash__: ClassVar[None] = ... + ActivePageIndex: int + ''' + Specifies the page currently displayed by the ``PageControl``. + + Use ``ActivePageIndex`` to ``get`` or ``set`` the active page by ``Index`` rather than by object. The value of ``ActivePageIndex`` identifies a page in the ``Pages`` property array. Changing the value of ``ActivePageIndex`` changes the ``ActivePage`` property, and vice versa. + + If there is no active page, reading ``ActivePageIndex`` gives a value of -1. + + Setting ``ActivePageIndex`` to a value that is out of bounds (less than 0 or greater than ``PageCount - 1``) results in the ``PageControl`` having no active page. + ''' + PageCount: int + ''' + Indicates the number of pages in the `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ object. + + Use ``PageCount`` to determine the number of pages listed by the ``Pages`` property. If the ``MultiLine`` property is ``False``, not all pages may have tabs visible to the user. + ''' + Pages: list[TabSheet] + ''' + Lists all the pages in the `PageControl <Vcl.ComCtrls.TPageControl.htm>`__. + + Use ``Pages`` to gain direct access to a particular page in the ``PageControl``. For example, use ``Pages`` to disable individual pages in the ``PageControl``. Specify which page to access using ``Index``, where an ``Index`` of 0 specifies the first page, an ``Index`` of 1 specifies the second page, and so on. Each page is a ``TabSheet`` object. To locate a page in the ``PageControl`` by its position relative to another page, use the ``FindNextPage()`` method. + + .. note:: ``Pages`` is a read-only property. To add a ``TabSheet`` to a ``PageControl`` at design time, right click and select New Page. To add a ``TabSheet`` to a ``PageControl`` at runtime, create the ``TabSheet`` and set its ``PageControl`` property to the ``PageControl``. + ''' + ActivePage: TabSheet + ''' + Specifies the page currently displayed by the ``PageControl``. + + Read ``ActivePage`` to determine which page is selected by the user. The user selects a page by clicking the mouse on its tab. Set ``ActivePage`` to bring a page to the foreground. Only one page can be active at a time. To change the ``ActivePage`` to the page that precedes or follows the active page, use the `SelectNextPage <Vcl.ComCtrls.TPageControl.SelectNextPage.htm>`__ method. To iterate through all the pages to locate a specific page, use the `FindNextPage <Vcl.ComCtrls.TPageControl.FindNextPage.htm>`__ method. + + Two events occur when one attempts to change the current page. They are `OnChange <Vcl.ComCtrls.TCustomTabControl.OnChange.htm>`__ and `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__. `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ occurs immediately before you attempt to change the current page, while `OnChange <Vcl.ComCtrls.TCustomTabControl.OnChange.htm>`__ occurs immediately after the page has been changed. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HotTrack: bool + ''' + Determines whether labels on the tab under the mouse are automatically highlighted. + + Set `HotTrack <Vcl.ComCtrls.TCustomTabControl.HotTrack.htm>`__ to ``True`` to provide visual feedback to the user about which tab would be selected if the mouse button is clicked. `HotTrack <Vcl.ComCtrls.TCustomTabControl.HotTrack.htm>`__ is especially useful when the ``TabControl`` contains multiple rows of tabs. + ''' + Images: CustomImageList + ''' + Specifies the images drawn in tabs. + + `Images <Vcl.ComCtrls.TCustomTabControl.Images.htm>`__ specifies the images that are drawn in tabs. For disabled tabs, grayed versions of the images are used. + + In the implementation of `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__, the order of images in ``ImageList`` properties directly corresponds to the associated tabs in the control. In the descendant class, `PageControl <Vcl.ComCtrls.TPageControl.htm>`__, this behavior is replaced by support for individual `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ objects, each with an `ImageIndex <Vcl.ComCtrls.TTabSheet.ImageIndex.htm>`__ property. In any case, the application programmer can define customized image displays by defining an `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event handler. + ''' + MultiLine: bool + ''' + Determines whether the tabs can appear on more than one row. + + Use `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ to determine how the tabs are displayed. If `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ is ``True``, the tabs are displayed on more than one row when the number of tabs exceeds the number that fits across the top of the ``TabControl``. How many rows is determined by how many tabs are in the ``TabControl``. If `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ is ``False``, the tabs are displayed on one row only, and the user must scroll the displayed scroll arrows to view all the tabs. + ''' + OwnerDraw: bool + ''' + Specifies whether the ``TabControl`` handles its own painting. + + Set `OwnerDraw <Vcl.ComCtrls.TCustomTabControl.OwnerDraw.htm>`__ to ``True`` to override any default painting behavior. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ComCtrls.TPageControl.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + RaggedRight: bool + ''' + Specifies whether rows of tabs stretch to fill the width of the control. + + Use `RaggedRight <Vcl.ComCtrls.TCustomTabControl.RaggedRight.htm>`__ to ``get`` or ``set`` whether rows of tabs stretch to fill the width of the control. + ''' + ScrollOpposite: bool + ''' + Determines how the rows of tabs are scrolled in a multi-line ``TabControl``. + + Set `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ to determine where previous rows of tabs in a multi-line ``TabControl`` move when the user selects a tab in another row. When `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``True``, previous rows of tabs are moved to the bottom of the ``TabControl`` if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is tpTop, or to the top if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is tpBottom. When `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``False``, previous rows of tabs are moved to the back of all other rows of tabs. + + For example, in a ``TabControl`` with three rows of tabs at the top, if the user selects a tab in the second row, `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ determines where the first row moves. If `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``True``, the second row now appears at the front (bottom) row on top of the ``TabControl``, followed by the third row behind (above) it. The first row moves to the bottom of the ``TabControl``. If `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``False``, the first row moves to the back (top), so that the ``TabControl`` displays the second row in front (at the bottom of the tab region), followed by the third row (now in the middle), followed by the first row. + + .. note:: Setting `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ to ``True`` automatically sets the `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ property to ``True``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Style: TabStyle + ''' + Specifies the style of the ``TabControl``. + + Use `Style <Vcl.ComCtrls.TCustomTabControl.Style.htm>`__ to determine the appearance of the tabs. These can appear as notebook tabs or as buttons. + ''' + TabHeight: int + ''' + Specifies the height, in pixels, of the tabs in the ``TabControl``. + + Set `TabHeight <Vcl.ComCtrls.TCustomTabControl.TabHeight.htm>`__ to control the height of the tabs that appear above the client region of the ``TabControl``. The `TabHeight <Vcl.ComCtrls.TCustomTabControl.TabHeight.htm>`__ property is the vertical size in pixels of the individual tabs. If `TabHeight <Vcl.ComCtrls.TCustomTabControl.TabHeight.htm>`__ is set to 0, the tabs automatically size themselves to fit their text. + ''' + TabIndex: int + ''' + Identifies the selected tab on a ``TabControl``. + + Read `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ to determine which tab was selected by the user. `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ is the index of the tab in the list of labels maintained by the Tabs property. The first (leftmost) tab has a `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ of 0, the next has 1, and so on. If no tabs are selected, `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ has a value of -1. + + Set `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ to programmatically change the selected tab in the ``TabControl``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabPosition: TabPosition + ''' + Determines whether tabs appear at the top or bottom. + + Set `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ to ``tpTop`` to display the tabs at the top of the ``TabControl``. Set `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ to ``tpBottom`` to display the tabs at the bottom. If the `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ property is ``True``, tabs can appear at both top and bottom, with the row containing the current tab and all subsequent rows on the side indicated by `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__. + + Due to a limitation in the windows common control, if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is ``tpLeft`` or ``tpRight``, ``Font`` must be a ``True`` Type font. Otherwise, tab text may paint incorrectly. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + TabWidth: int + ''' + Specifies the horizontal size, in pixels, of the tabs in the ``TabControl``. + + `TabWidth <Vcl.ComCtrls.TCustomTabControl.TabWidth.htm>`__ specifies a fixed width for all tabs. If `TabWidth <Vcl.ComCtrls.TCustomTabControl.TabWidth.htm>`__ is 0, then each tab is automatically made wide enough to show its caption. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + def CanShowTab(self, TabIndex: int) -> bool: + ''' + Indicates whether a ``TabSheet`` in the ``PageControl`` can be selected. + + Call ``CanShowTab`` to determine whether a tab can be selected or accessed. + + Tab``Index`` is the index of the tab in the list of ``TabSheet``\ s maintained by the ``Pages`` property. + + ``CanShowTab()`` returns ``True`` if the specified Tab sheet is enabled (its ``Enabled`` property is ``True`` ). + ''' + def Change(self) -> None: + ''' + Responds to changes in the ``PageControl``. + + ``Change()`` is called automatically when Windows notifies the ``PageControl`` of a change. `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ responds to this notification by updating its display to show the new current page. + ''' + def DoAddDockClient(self, Client: Control, ARect: Rect) -> None: + ''' + Provides necessary adjustments when a new client is docked in the ``PageControl``. + + ``DoAddDockClient()`` is called when a new client is docked to the ``PageControl``. It sets the ``PageControl``\ s. ``TabSheet`` as the new client's parent. + + ``Client`` is the client being docked. + ''' + def DockOver(self, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Indicates whether an object that is dragged over the ``PageControl`` can be docked. + + ``DockOver()`` is called automatically when the user drags a dockable window over the ``PageControl``. + + The ``Source`` parameter describes the object that is being dragged. + + The ``'X'`` and ``'Y'`` parameters give the current position of the dragged control. + + The ``State`` parameter indicates how the mouse is moving. + + ``DockOver()`` initializes the ``Source`` parameter to reflect the dockable region of the ``PageControl`` and generates an `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. An `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event handler can change the ``Accept`` parameter to ``False`` if the ``Source`` control should not be docked. + + .. note:: ``DockOver()`` is only called if the `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ property is ``True``. + ''' + def DoRemoveDockClient(self, Client: Control) -> None: + ''' + Provides necessary adjustments when a control is undocked from the ``PageControl``. + + ``DoRemoveDockClient()`` is called when a client is undocked from the ``PageControl``. + + It selects the next page in the ``TabSheet``. + + ``Client`` is the client being undocked. + ''' + def GetImageIndex(self, TabIndex: int) -> int: + ''' + Specifies the image to display for a particular page. + + Override ``GetImageIndex`` in a derived class to specify the index of the image to display for a particular page. + + ``TabIndex`` is the page's index that is about to be displayed. + + The *Return Value* is an integer that is the image's index (in the `Images <Vcl.ComCtrls.TCustomTabControl.Images.htm>`__ property) that will be displayed in the tab. + + By default, if there is no `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event handler, ``GetImageIndex()`` returns the `ImageIndex <Vcl.ComCtrls.TTabSheet.ImageIndex.htm>`__ property for the page with the specified index; otherwise, ``GetImageIndex`` calls the inherited ``GetImageIndex()`` method, returning the result. + ''' + def GetPageFromDockClient(self, Client: Control) -> TabSheet: + ''' + Returns the ``TabSheet`` on which a client is docked. + + Call ``GetPageFromDockClient`` to get the ``TabSheet`` on which ``Client`` is docked. + + returns ``nil`` (Delphi) or ``NULL`` (C++) if ``Client`` is not docked. + ''' + def GetSiteInfo(self, Client: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + Returns the ``PageControl``\ s. docking information. + + Call ``GetSiteInfo()`` to determine the docking region of the ``PageControl`` and whether a dragged window can be docked. + + ``Client`` is a potential docking client. + + ``InfluenceRect()`` returns the area in which the client can be docked. + + ``MousePos`` is the current mouse position. + + ``CanDock`` indicates whether the client can be docked in the ``PageControl``. + + ``GetSiteInfo()`` initializes ``CanDock`` to ``True`` if ``Client`` is not already docked in the ``PageControl``. It then inflates the influence rectangle by 10 pixels and generates an `OnValidate`OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + ''' + def Loaded(self) -> None: + ''' + Initializes the ``PageControl`` after all its parts have been loaded from a *Stream*. + + ``Loaded()`` is called automatically when the ``Form`` containing the ``PageControl`` is first loaded into memory. `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ overrides the ``Loaded()`` method to ensure that all ``TabSheet``\ s with a `Highlighted <Vcl.ComCtrls.TTabSheet.Highlighted.htm>`__ property of ``True`` appear highlighted. + ''' + def SetActivePage(self, Page: TabSheet) -> None: + ''' + No have docs. + ''' + def SetChildOrder(self, Child: Component, Order: int) -> None: + ''' + Assigns indexes to the pages that reflect the order in which pages are loaded from a *Stream*. + + ``SetChildOrder()`` is called automatically when the children of the ``PageControl`` are loaded from a *Stream*. It assigns each page an index that reflects the order in which pages are loaded and saved. + + The ``Child`` parameter is a page of the ``PageControl``. The ``Order`` parameter indicates when the page is loaded or saved. The first page loaded or saved is called with ``Order`` set to 0, the second with ``Order`` set to 1, and so on. + + ``SetChildOrder()`` assigns the ``PageIndex`` property of the individual pages to the value of ``Order``. + ''' + def SetTabIndex(self, Value: int) -> None: + ''' + Sets the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property. + + `SetTabIndex <Vcl.ComCtrls.TCustomTabControl.SetTabIndex.htm>`__ is called to change the value of the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property. Descendant classes should override `SetTabIndex <Vcl.ComCtrls.TCustomTabControl.SetTabIndex.htm>`__ to provide special implementations of this property. + ''' + def ShowControl(self, AControl: Control) -> None: + ''' + Displays a specified page. + + ``ShowControl()`` is called automatically when a particular page of the ``PageControl`` should be visible. The ``AControl`` parameter specifies the page that should be displayed on screen. + + ``ShowControl()`` makes the specified page active it is not already active, and sets its own ``Visible`` property to ``True``. It then calls the ``ShowControl()`` method of its parent object to ensure that the ``PageControl`` is showing (and therefore able to display the active page). + ''' + def UpdateActivePage(self) -> None: + ''' + Updates the ``ActivePage`` property when changes are made to the ``Pages`` property. + + This protected method is used internally when the pages listed in the ``Pages`` property change. It ensures that the ``PageControl`` is internally consistent and that the active page is displayed. + ''' + def CheckTabImagesIndexAndName(self) -> None: + ''' + No have docs. + ''' + def DockClient(self, DockSource: DragDockObject, MousePos: Point) -> int: + ''' + No have docs. + ''' + def UndockClient(self, NewTarget, Client: Control) -> bool: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of ``PageControl``. + + Call ``Create()`` to instantiate a ``PageControl`` at runtime. Page controls added to forms at design time are created automatically. + + ``AOwner`` is the ``Form`` in which the ``PageControl`` should appear. It becomes the value of the ``Owner()`` property. + + When creating a ``PageControl`` at runtime, the pages must be added programmatically. To add a page to a ``PageControl`` at runtime, create the ``TabSheet`` object for the page and set its ``PageControl`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `PageControl <Vcl.ComCtrls.TPageControl.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. ``Destroy()`` frees the TList object that holds the pages of the control, and then calls the inherited destructor. + ''' + def FindNextPage(self, CurPage: TabSheet, GoForward: bool, CheckTabVisible: bool, CheckTabEnabled: bool) -> TabSheet: + ''' + Returns the next page in the ``PageControl`` before or after a specified page. + + Call ``FindNextPage`` to locate a page in the ``PageControl`` by its position relative to the page specified by the ``CurPage`` parameter. If the ``GoForward`` parameter is ``True``, ``FindNextPage()`` returns the next page in the ``PageControl`` after ``CurPage``. If ``GoForward`` is ``False``, ``FindNextPage()`` returns the previous page. If ``CurPage`` is not a page in the ``PageControl``, ``FindNextPage()`` returns the first page when ``GoForward`` is ``True`` or the last page when ``GoForward`` is ``False``. If ``GoForward`` is ``True`` and ``CurPage`` is the last page in the ``PageControl``, ``FindNextPage()`` returns the first page. If ``GoForward`` is ``False`` and ``CurPage`` is the first page in the ``PageControl``, ``FindNextPage()`` returns the last page. + + When ``CheckTabVisible`` is ``True``, ``FindNextPage()`` returns the next page with a Tab``Visible`` property set to ``True``, if ``CheckTabVisible`` is ``False``, ``FindNextPage()`` returns the next page, including pages with ``TabVisible`` set to ``False``. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified procedure for every page in the ``PageControl``. + + Call ``GetChildren()`` to execute a *callback* for every page in the ``PageControl``. The ``Proc`` parameter is the *callback*. The ``Root`` parameter is ignored by `PageControl <Vcl.ComCtrls.TPageControl.htm>`__. + + ``GetChildren()`` is intended primarily for the streaming system that loads and saves components. + ''' + def SelectNextPage(self, GoForward: bool, CheckTabVisible: bool) -> None: + ''' + Changes the ``ActivePage`` to the first visible page that is before or after the currently active page. + + Use ``SelectNextPage`` to select the page next to the currently active page. + + If the ``GoForward`` parameter is ``True``, ``SelectNextPage`` selects the first page after ``ActivePage``; if ``GoForward`` is ``False``, ``SelectNextPage`` selects the first page previous to ``ActivePage``. + + If ``CheckTabVisible`` is ``True``, ``SelectNextPage`` only considers pages with their Tab``Visible`` property set to ``True``. + + .. note:: To select a page at design-time, right-click the `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ and choose *Previous Page* or *Next Page*. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs after a new tab is selected. + + Write an `OnChange <Vcl.ComCtrls.TCustomTabControl.OnChange.htm>`__ event handler to take specific action immediately after the selected tab changes. Use the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property to determine which tab is now selected. This is the opportunity to make any changes to the control that reflect the new state implied by the selected tab. + + Before the value of `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ changes, an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event occurs. + + .. note:: The event is not called if you change the active page in code, for example, by setting the value of `ActivePage <Vcl.ComCtrls.TPageControl.ActivePage.htm>`__. + ''' + def OnChanging(self, Sender: Object, AllowChange: bool) -> None: + ''' + # OnChanging: TabChangingEvent + Occurs immediately before a new tab is selected. + + Write an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event handler to take specific action immediately before the selected tab changes. Set the ``AllowChange`` parameter to ``False`` to prevent the change. + + Use an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event handler to prevent the user from leaving a tab setting until certain conditions have been met. An `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event handler can also be used to save information about the current state of the ``TabControl`` before it is changed by a new tab selection. + + .. note:: The event is not called if you change the active page in code, for example, by setting the value of `PageControl <Vcl.ComCtrls.TPageControl.htm>`__. `ActivePage <Vcl.ComCtrls.TPageControl.ActivePage.htm>`__. + + `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ is an event handler of type `Vcl.ComCtrls.TTabChangingEvent <Vcl.ComCtrls.TTabChangingEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDrawTab(self, Control: CustomTabControl, TabIndex: int, Rect: Rect, Active: bool) -> None: + ''' + # OnDrawTab: DrawTabEvent + Occurs when a tab is about to be drawn. + + Use `OnDrawTab <Vcl.ComCtrls.TCustomTabControl.OnDrawTab.htm>`__ to customize the painting of tabs. + + You can paint the tab using the `Canvas <Vcl.ComCtrls.TCustomTabControl.Canvas.htm>`__ property. + + ``OnDrawTab`` is an event handler of type `Vcl.ComCtrls.TDrawTabEvent <Vcl.ComCtrls.TDrawTabEvent.htm>`__. See TDrawTabEvent for a description of the parameters. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetImageIndex(self, Sender: Object, TabIndex: int, ImagelistIndex: int) -> None: + ''' + # OnGetImageIndex: TabGetImageEvent + Occurs when a tab is about to display its associated image. + + ``VCL.ComCtrls.TPageControl.OnGetImageIndex`` inherits from `Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__. + + Occurs when a tab is about to display its associated image. + + Write an `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event handler to specify the ``ImageIndex`` for a given TabIndex. + + On entry to the event handler, the ``ImageIndex`` parameter is the same as the Tab``Index`` parameter, where Tab``Index`` is the index of the tab which is about to display its image. Change the ``ImageIndex`` parameter to specify the index into the ``Images`` property that specifies the image that should be painted. + + ``OnGetImageIndex`` is an event handler of type `Vcl.ComCtrls.TTabGetImageEvent <Vcl.ComCtrls.TTabGetImageEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class PaintBox(GraphicControl): + ''' + ====================== + Vcl.ExtCtrls.TPaintBox + ====================== + + ``PaintBox`` provides a canvas that applications can use for rendering an image. + + Use ``PaintBox`` to add custom images to a form. Unlike ``Image``, which displays an image that is stored in a ``bitmap``, ``icon``, or ``metafile``, ``PaintBox`` requires an application to draw the image directly on a canvas. Use the ``OnPaint`` event handler to draw on the ``PaintBox``\ s. ``Canvas``, the drawing surface of the ``PaintBox``. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Provides the drawing surface used by the graphic control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. + + Since a `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ instance does not have its own *Windows* *Screen* object, it obtains its device context from its parent control. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def Paint(self) -> None: + ''' + Generates an `OnPaint <Vcl.ExtCtrls.TPaintBox.OnPaint.htm>`__ event. + + ``Paint()`` responds to ``WM_PAINT`` messages from *Windows* by initializing the canvas and calling the `OnPaint <Vcl.ExtCtrls.TPaintBox.OnPaint.htm>`__ event handler if it is assigned. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `PaintBox <Vcl.ExtCtrls.TPaintBox.htm>`__. + + Call ``Create()`` to instantiate a `PaintBox <Vcl.ExtCtrls.TPaintBox.htm>`__ object at runtime. `PaintBox <Vcl.ExtCtrls.TPaintBox.htm>`__ objects added to forms at design time are created automatically. + + Call ``Create()`` to instantiate a ``Image`` object at runtime. ``Images`` placed on forms at design time are created automatically. + + ``AOwner`` is the component that is responsible for freeing the ``PaintBox`` instance. It becomes the value of the ``Owner()`` property. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnPaint(self, Sender: Object) -> None: + ''' + # OnPaint: NotifyEvent + ``OnPaint`` occurs when the ``PaintBox`` receives a *Windows* paint message. + + Write an ``OnPaint`` event handler to draw the image of the ``PaintBox``. The ``OnPaint`` event fires when the system repaints the `PaintBox <Vcl.ExtCtrls.TPaintBox.htm>`__ control. If there is a handler for this event, its code is executed when the ``OnPaint`` event fires. + + Use properties and methods of the canvas (such as ``LineTo(), Draw()``, and ``TextOut()``) to programmatically construct the image that the ``PaintBox`` presents on a form. This can consist of a number of operations including drawing lines, images, and shapes. A `PaintBox <Vcl.ExtCtrls.TPaintBox.htm>`__ itself has no visible manifestation, so if an ``OnPaint`` event handler is not provided or no drawing is done in the event handler, the ``PaintBox`` cannot be seen on the ``Form`` at run time. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Panel(CustomPanel): + ''' + =================== + Vcl.ExtCtrls.TPanel + =================== + + ``Panel`` implements a generic panel control. + + Use ``Panel`` to put an empty panel on a form. Panels have properties for providing a beveled border around the control, as well as methods to help manage the placement of child controls embedded in the panel. + + You can also use panels to group controls together, similar to the way you can use a ``GroupBox``, but with a beveled border (or no border) rather than the ``GroupBox`` outline. Panels are typically used for groups of controls within a single form. If you intend to use the same grouping in other forms, you may want to use a frame instead. + + Panels with no borders are useful as docking sites when writing applications that use drag-and-dock. + + Although you can use a panel to implement a ``StatusBar`` or tool bar, it is recommended that you use the TToolBar and TStatusBar classes instead. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how the ``Caption`` is aligned within the ``Panel``. + + Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to specify if the ``Caption`` of a panel appears on the *left*, *right*, or *center* of the panel. For example, to use a panel as a ``StatusBar`` that displays the ``Application``. ::``Hint`` property as the panel's ``Caption`` property, set `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ to ``taLeftJustify`` to place the hint text on the left side of the panel. + + .. note:: Use the `VerticalAlignment <Vcl.ExtCtrls.TCustomPanel.VerticalAlignment.htm>`__ property to control the vertical position of the ``Caption``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Determines the style of the inner bevel of a panel. + + Use `BevelInner <Vcl.ExtCtrls.TCustomPanel.BevelInner.htm>`__ to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the bevels, if they are drawn, is the ``BevelWidth`` property. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Determines the style of the outer bevel of a panel. + + Use `BevelOuter <Vcl.ExtCtrls.TCustomPanel.BevelOuter.htm>`__ to provide the panel with a three-dimensional beveled look. A panel component has two bevels, an outer bevel drawn next to the border of the control, and an inner bevel drawn inside the outer bevel, separated by the number of pixels specified in the ``BorderWidth`` property. The width of the outer bevel is specified in the ``BevelWidth`` property in pixels. + ''' + BevelWidth: BevelWidth + ''' + Determines the width, in pixels, of both the inner and outer bevels of a panel. + + Use `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ to specify how wide the inner or outer bevel should be. Do not confuse `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__, which is the width of the bevels, with BorderWidth, which is the space between the bevels. + + If both the ``BevelInner`` and ``BevelOuter`` properties are ``bvNone``, `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ has no effect. To remove both bevels, set the ``BevelInner`` and ``BevelOuter`` properties to ``bvNone``, rather than setting the `BevelWidth <Vcl.ExtCtrls.TCustomPanel.BevelWidth.htm>`__ to 0, as this involves less overhead when painting. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderWidth: BorderWidth + ''' + Specifies the distance, in pixels, between the outer and inner bevels. + + Use `BorderWidth <Vcl.ExtCtrls.TCustomPanel.BorderWidth.htm>`__ to specify how wide the border around the panel should be. A value of 0 (zero) means no border should appear. + + The border of a panel is the area between the outer and inner bevels. It is visible only if the inner bevel is raised or lowered, but affects the inset of the caption within the ``Panel`` even if ``BevelInner`` is ``bvNone``. If the ``Alignment`` property is not ``taCenter``, the ``Caption`` will be aligned to the inner edge of the border. This edge is `BorderWidth <Vcl.ExtCtrls.TCustomPanel.BorderWidth.htm>`__ pixels in from the outer bevel if ``BevelInner`` is ``bvNone``. It is the inner edge of the inner bevel otherwise. + + Do not confuse the border of the panel with line drawn around the panel itself. The line around the panel is specified by the ``BorderStyle`` property. + ''' + BorderStyle: BorderStyle + ''' + Determines the style of the line drawn around the perimeter of the panel control. + + Use `BorderStyle <Vcl.ExtCtrls.TCustomPanel.BorderStyle.htm>`__ to specify whether the panel has a single line drawn around it. These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + + Do not confuse the line drawn around the panel with the ``BorderWidth`` of the panel. The ``BorderWidth`` of the panel is the distance between the outer and inner bevels. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + UseDockManager: bool + ''' + Specifies whether the docking manager is used in drag-and-dock operations. + + Use `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``get`` or ``set`` whether a docking manager is used in drag-and-dock operations. + + The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + FullRepaint: bool + ''' + Determines how the panel repaints itself when it is resized. + + `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ controls how the panel responds when it is resized. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``True``, the entire panel, including the beveled border repaints when the size changes. When `FullRepaint <Vcl.ExtCtrls.TCustomPanel.FullRepaint.htm>`__ is ``False``, only the area inside the beveled border repaints. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Locked: bool + ''' + Determines whether a panel that is used as a ``ToolBar`` is replaced by a ``ToolBar`` supplied by an *OLE* server. + + Set the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``False`` when the panel is used as a ``ToolBar`` by a ``OleContainer`` component. Any panels aligned to a ``OleContainer`` are assumed to be replaceable ``ToolBar``\ s unless the `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property is ``True``. Prevent the panel from being replaced by an *OLE* server's ``ToolBar`` by setting the panel's `Locked <Vcl.ExtCtrls.TCustomPanel.Locked.htm>`__ property to ``True``. + + .. note:: An *OLE* application's ``ToolBar``\ s must be in panels aligned to a side of the ``Form`` (that is, their ``Align`` properties must be set to ``alTop``, ``alBottom``, ``alLeft``, or ``alRight``). + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use `Padding <Vcl.Controls.TWinControl.Padding.htm>`__ to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowCaption: bool + ''' + Specifies whether to display the ``Caption`` of the panel control. + + `ShowCaption <Vcl.ExtCtrls.TCustomPanel.ShowCaption.htm>`__ is a ``Boolean`` property that you can use to specify whether to display the ``Caption`` of the panel control. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + VerticalAlignment: VerticalAlignment + ''' + Sets the vertical position of the ``Caption``. + + Use the ``VerticalAlignment`` property to control the position of the ``Caption`` within the ``Panel``. Choose one of the following values. + + ========================= ======================================================== + **Value** *``Description``* + ========================= ======================================================== + ``taAlignBottom`` The ``Caption`` displays at the bottom of the panel. + ``taAlignTop`` The ``Caption`` displays at the top of the panel. + ``taVerticalCenter`` The ``Caption`` displays at the center of the panel. + ========================= ======================================================== + + .. note:: Use the `Alignment <Vcl.ExtCtrls.TCustomPanel.Alignment.htm>`__ property to control the horizontal position of the ``Caption``. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + # OnAlignInsertBefore: bool + Occurs when an object with custom alignment is aligned. + + `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ returns ``True`` if ``C2`` should be presented before ``C1``, and false otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + # OnAlignPosition: AlignPositionEvent + Occurs when an object with custom alignment is aligned. + + `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +==================================================================================+====================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` | + | | constraints for the control. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify these values to reposition the control. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ can modify this value. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ does nothing. | | + +----------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnCanResize(self, Sender: Object, NewWidth: int, NewHeight: int, Resize: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when an attempt is made to resize the control. + + Use `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ to adjust the way a control is resized. If necessary, change the new ``Width`` and ``Height`` of the control in the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler. The `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler also allows applications to indicate that the entire resize should be aborted. + + If there is no `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler, or if the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler indicates that the resize attempt can proceed, the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event is followed immediately by an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ is an event handler of type `Vcl.Controls.TCanResizeEvent <Vcl.Controls.TCanResizeEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnConstrainedResize(self, Sender: Object, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + # OnConstrainedResize: ConstrainedResizeEvent + Adjusts the resize constraints. + + Use `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ to adjust a control's constraints when an attempt is made to resize it. Upon entry to the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the parameters of the event handler are set to the corresponding properties of the control's ``Constraints`` object. The event handler can adjust those values before they are applied to the new height and width that are being applied to the control. (The ``CanAutoSize()`` method or an ``OnCanResize`` event handler may already have adjusted this new height and width). + + On exit from the `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handler, the constraints are applied to the attempted new height and width. Once the constraints are applied, the control's height and width are changed. After the control's height and width change, an ``OnResize`` event occurs to allow any final adjustments or responses. + + .. note:: The `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ handler is called immediately after the ``OnCanResize`` handler. + + `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ is an event handler of type `Vcl.Controls.TConstrainedResizeEvent <Vcl.Controls.TConstrainedResizeEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class PascalInterface: + '''Wrapper of a Pascal record''' + + def SetProps(self, prop1 = ..., prop2 = ...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class PascalRecord: + '''Wrapper of a Pascal record''' + + def SetProps(self, prop1 = ..., prop2 = ...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Persistent(Object): + ''' + ========================== + System.Classes.TPersistent + ========================== + + ``Persistent`` is the ancestor for all objects that have assignment and streaming capabilities. ``Persistent`` encapsulates the behavior common to all objects that can be assigned to other objects, and that can read and write their properties to and from a form file (``.xfm`` or ``.dfm`` file). For this purpose, ``Persistent`` introduces methods that can be overridden to: + + - Define the procedure for loading and storing unpublished data to a stream. + - Provide the means to assign values to properties. + - Provide the means to assign the contents of one object to another. + + Do not create instances of ``Persistent``. Use ``Persistent`` as a base class when declaring objects that are not components, but that need to be saved to a stream or have their properties assigned to other objects. + ''' + + __hash__: ClassVar[None] = ... + + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of an object to a destination object. + + Override the ``AssignTo()`` method to extend the functionality of the `Assign <System.Classes.TPersistent.Assign.htm>`__ method of destination objects so that they handle newly created object classes. When defining a new object class, override the `Assign <System.Classes.TPersistent.Assign.htm>`__ method for every existing object class that should be able to copy its properties to the new class. Override the ``AssignTo()`` method for every existing class to which the new class can copy. + + The `Assign <System.Classes.TPersistent.Assign.htm>`__ method of `Persistent <System.Classes.TPersistent.htm>`__ calls ``AssignTo()`` if the descendant object does not succeed in copying the properties of a source object. The ``AssignTo()`` method defined by `Persistent <System.Classes.TPersistent.htm>`__ raises an ``EConvertError`` exception. + + For example, given the following code in which A and B are instance variables: + + .. code-block:: python + + A.Assign(B); {Delphi} + + .. code-block:: python + + A->Assign(B); // C++ + + if A knows how to handle B, then it does so and returns. If A doesn't know how to handle B's type, execution will trickle to the `Persistent <System.Classes.TPersistent.htm>`__ version of `Assign <System.Classes.TPersistent.Assign.htm>`__, which calls: + + .. code-block:: python + + B.AssignTo(A); {Delphi} + + .. code-block:: python + + B->AssignTo(A); // C++ + + If B knows how to copy to A, the assignment succeeds. Otherwise, `Persistent <System.Classes.TPersistent.htm>`__ raises an exception. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Provides an interface for a method that reads and writes otherwise unpublished data. + + Descendants of `Persistent <System.Classes.TPersistent.htm>`__ override ``DefineProperties()`` to designate a method for storing the object's unpublished data to a stream such as a form file. By default, writing an object to a stream writes the values of all its published properties, and reading the object in reads those values and assigns them to the properties. Objects can also specify methods that read and write data other than published properties by overriding the ``DefineProperties()`` method. + + When overriding ``DefineProperties()``, consider including some or all of the following: + + - A call to the inherited method + - Calls to the filer object's `DefineProperty <System.Classes.TFiler.DefineProperty.htm>`__ method + - Calls to the filer object's `DefineBinaryProperty <System.Classes.TFiler.DefineBinaryProperty.htm>`__ method + + ``DefineProperties()`` is virtual, so descendant classes can override it as necessary but are not required to do so. + ''' + def GetOwner(self) -> Persistent: + ''' + Returns the owner of an object. + + ``GetOwner()`` is used by the `GetNamePath <System.Classes.TPersistent.GetNamePath.htm>`__ method to find the owner of a persistent object. `GetNamePath <System.Classes.TPersistent.GetNamePath.htm>`__ and ``GetOwner()`` are introduced in `Persistent <System.Classes.TPersistent.htm>`__ so descendants such as collections can appear in the *Object Inspector*. As implemented in `Persistent <System.Classes.TPersistent.htm>`__, ``GetOwner()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + + For `OwnedCollection <System.Classes.TOwnedCollection.htm>`__, `GetOwner <System.Classes.TOwnedCollection.GetOwner.htm>`__ returns the owner of the collection. For `CollectionItem <System.Classes.TCollectionItem.htm>`__ collection items, `GetOwner <System.Classes.TCollectionItem.GetOwner.htm>`__ returns the collection object into which the collection item has been inserted. For `Component <System.Classes.TComponent.htm>`__, `GetOwner <System.Classes.TComponent.GetOwner.htm>`__ returns the value of the `Owner <System.Classes.TComponent.Owner.htm>`__ property. + ''' + def Destroy(self) -> None: + ''' + Destroys the `Persistent <System.Classes.TPersistent.htm>`__ instance and frees its memory. + + Do not call ``Destroy()`` directly. Call `Free <System.TObject.Free.htm>`__ instead. `Free <System.TObject.Free.htm>`__ checks that the object reference is not ``nil`` before calling ``Destroy()``. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies the contents of another similar object. + + ``Assign()`` copies properties and other attributes of the specified ``Source`` object to the current object. The standard form of a call to ``Assign()`` is: + + .. code-block:: python + + Destination.Assign(Source); {Delphi} + + .. code-block:: python + + Destination->Assign(Source); // C++ + + which tells the current object to copy the contents of the ``Source`` object to itself. + + Most objects override ``Assign()`` to handle the assignment of properties from similar objects. When overriding ``Assign()``, call the inherited method if the destination object cannot handle the assignment of properties from the class of the ``Source`` parameter. + + If no overridden ``Assign()`` method can handle the assignment of properties from ``Source``, the method implemented in `Persistent <System.Classes.TPersistent.htm>`__ calls the source object's `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. This allows the source object to handle the assignment. If the ``Source`` object is ``nil`` (Delphi) or ``NULL`` (C++), ``Assign()`` raises an `EConvertError <System.SysUtils.EConvertError.htm>`__ exception. + + In general, the statement + + .. code-block:: python + + Destination := Source; {Delphi} + + .. code-block:: python + + Destination = Source; // C++ + + is not the same as the statement + + .. code-block:: python + + Destination.Assign(Source); {Delphi} + + .. code-block:: python + + Destination->Assign(Source); // C++ + + The assignment operator makes ``Destination`` reference the same object as ``Source``, whereas the ``Assign()`` method copies the contents of the object referenced by ``Source`` into the object referenced by ``Destination``. + + .. note:: The types of some properties are also objects. If these properties have written methods that use ``Assign()`` to set the value of the property, then in these cases the assignment operator does the same thing as the ``Assign()`` method. + ''' + def GetNamePath(self) -> str: + ''' + Returns the name of the object as it appears in the *Object Inspector*. + + ``GetNamePath()`` is for internal use only. It determines the text that the *Object Inspector* displays for the name of the object being edited. ``GetNamePath()`` is introduced in `Persistent <System.Classes.TPersistent.htm>`__ so descendants such as collections can appear in the *Object Inspector*. Do not call ``GetNamePath()`` directly. + + For components, ``GetNamePath()`` returns the component name. For `CollectionItem <System.Classes.TCollectionItem.htm>`__ objects it returns the name of the hosting component, the name of the property, and the index into the collection surrounded by brackets. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Picture(InterfacedPersistent, IStreamPersist): + ''' + ===================== + Vcl.Graphics.TPicture + ===================== + + ``Picture`` contains a bitmap, icon, ``MetaFile`` graphic, or user-defined graphic. + + ``Picture`` is a ``Graphic`` container, used to hold a graphic, the type of which is specified in the ``Graphic`` property. It is used in place of a ``Graphic`` if the graphic can be of any ``Graphic`` class. ``LoadFromFile()`` and ``SaveToFile()`` are polymorphic. For example, if the ``Picture`` is holding an Icon, it is valid to ``LoadFromFile()`` a bitmap file, where the class ``Icon`` can only read ``.ico`` files. + + If the ``Picture`` contains a bitmap graphic, the ``Bitmap`` property specifies the graphic. If the ``Picture`` contains an icon graphic, the ``Icon`` property specifies the graphic. If the ``Picture`` contains a ``MetaFile`` graphic, the ``Metafile`` property specifies the graphic. + + The properties of ``Picture`` indicate the type of graphic that the picture object contains, and its size. The methods of ``Picture`` are used to load, save, and manipulate graphics. To load or save a picture to the ``Clipboard``, use the ``Action()`` method of a ``Clipboard`` object. To draw a picture on a ``Canvas``, call the ``Draw()`` or ``StretchDraw()`` methods of a ``Canvas`` object, passing the ``Graphic`` property of a ``Picture`` as a parameter. + ''' + + __hash__: ClassVar[None] = ... + Bitmap: Bitmap + ''' + Specifies the contents of the picture object as a bitmap graphic (``.bmp`` file format). + + Use ``Bitmap`` to reference the picture object when it contains a bitmap. If ``Bitmap`` is referenced when the picture contains a ``Metafile`` or ``Icon`` graphic, the graphic won't be converted (`Types of Graphic Objects <Types_of_Graphic_Objects.htm>`__). Instead, the original contents of the picture are discarded and ``Bitmap()`` returns a new, blank bitmap. + + .. note:: When assigning the ``Bitmap`` property, `Picture <Vcl.Graphics.TPicture.htm>`__ assigns the properties of a another `Bitmap <Vcl.Graphics.TBitmap.htm>`__ object. It does not take ownership of the specified value. + ''' + Graphic: Graphic + ''' + Specifies the graphic that the picture contains. + + Use ``Graphic`` to specify what graphic the `Picture <Vcl.Graphics.TPicture.htm>`__ object contains. The graphic can be a bitmap, icon, metafile, or user-defined graphic class (`Types of Graphic Objects <Types_of_Graphic_Objects.htm>`__). + + .. note:: When assigning the ``Graphic`` property, `Picture <Vcl.Graphics.TPicture.htm>`__ assigns the properties of a another `Graphic <Vcl.Graphics.TGraphic.htm>`__ object. It does not take ownership of the specified object. + ''' + PictureAdapter: IChangeNotifier + ''' + Represents an *OLE* interface for the picture. + + ``PictureAdapter`` is for internal use only. + ''' + Height: int + ''' + Specifies the vertical size (in pixels) of the graphic. + + Use ``Height`` to find the height of the graphic image contained in the picture object. ``Height`` is the native, unstretched, height of the picture. + ''' + Icon: Icon + ''' + Specifies the contents of the `Picture <Vcl.Graphics.TPicture.htm>`__ object as an icon graphic (.ICO file format). + + If ``Icon`` is referenced when the `Picture <Vcl.Graphics.TPicture.htm>`__ contains a ``Bitmap`` or ``Metafile`` graphic, the graphic won't be converted. Instead, the original contents of the `Picture <Vcl.Graphics.TPicture.htm>`__ are discarded and ``Icon()`` returns a new, blank icon. + + .. note:: When assigning the ``Icon`` property, `Picture <Vcl.Graphics.TPicture.htm>`__ assigns the properties of a another ``Icon`` object. It does not take ownership of the specified value. + ''' + Metafile: Metafile + ''' + Specifies the contents of the picture object as an `Enhanced <Vcl.Graphics.TMetafile.Enhanced.htm>`__ Windows metafile graphic (``.EMF`` file format). + + If ``Metafile`` is referenced when the `Picture <Vcl.Graphics.TPicture.htm>`__ contains a `Bitmap <Vcl.Graphics.TPicture.Bitmap.htm>`__ or `Icon <Vcl.Graphics.TPicture.Icon.htm>`__ graphic, the graphic won't be converted. Instead, the original contents of the `Picture <Vcl.Graphics.TPicture.htm>`__ are discarded and ``Metafile()`` returns a new, blank metafile (`Types of Graphic Objects <Types_of_Graphic_Objects.htm>`__ ). + + .. note:: When assigning the ``Metafile`` property, `Picture <Vcl.Graphics.TPicture.htm>`__ assigns the properties of a another `Metafile <Vcl.Graphics.TMetafile.htm>`__ object. It does not take ownership of the specified value. + ''' + WICImage: WICImage + ''' + No have docs. + ''' + Width: int + ''' + Specifies the horizontal size (in pixels) of the picture. + + Use ``Width`` to find the width of a graphic image. ``Width`` contains the native, unstretched, width of the picture. + ''' + + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of an object to a destination object. + + Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method to extend the functionality of the `Assign <System.Classes.TPersistent.Assign.htm>`__ method of destination objects so that they handle newly created object classes. When defining a new object class, override the `Assign <System.Classes.TPersistent.Assign.htm>`__ method for every existing object class that should be able to copy its properties to the new class. Override the `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method for every existing class to which the new class can copy. + + The `Assign <System.Classes.TPersistent.Assign.htm>`__ method of `Persistent <System.Classes.TPersistent.htm>`__ calls `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ if the descendant object does not succeed in copying the properties of a source object. The `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method defined by `Persistent <System.Classes.TPersistent.htm>`__ raises an ``EConvertError`` exception. + + For example, given the following code in which ``'A'`` and ``'B'`` are instance variables: + + .. code-block:: python + + A.Assign(B); {Delphi} + + .. code-block:: python + + A->Assign(B); // C++ + + if ``'A'`` knows how to handle ``'B'``, then it does so and returns. If ``'A'`` doesn't know how to handle ``'B'``\ s type, execution will trickle to the `Persistent <System.Classes.TPersistent.htm>`__ version of `Assign <System.Classes.TPersistent.Assign.htm>`__, which calls: + + .. code-block:: python + + B.AssignTo(A); {Delphi} + + .. code-block:: python + + B->AssignTo(A); // C++ + + If ``'B'`` knows how to copy to ``'A'``, the assignment succeeds. Otherwise, `Persistent <System.Classes.TPersistent.htm>`__ raises an exception. + ''' + def Changed(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Provides an interface for a method that reads and writes otherwise unpublished data. + + ``Vcl.Graphics.TPicture.DefineProperties`` inherits from `System.Classes.TPersistent.DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__. All content below this line refers to `System.Classes.TPersistent.DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__. + + Provides an interface for a method that reads and writes otherwise unpublished data. + + Descendants of `Persistent <System.Classes.TPersistent.htm>`__ override `DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__ to designate a method for storing the object's unpublished data to a *Stream* such as a form file. By default, writing an object to a *Stream* writes the values of all its published properties, and reading the object in reads those values and assigns them to the properties. Objects can also specify methods that read and write data other than published properties by overriding the `DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__ method. + + When overriding `DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__, consider including some or all of the following: + + - A call to the inherited method + - Calls to the filer object's `DefineProperty <System.Classes.TFiler.DefineProperty.htm>`__ method + - Calls to the filer object's `DefineBinaryProperty <System.Classes.TFiler.DefineBinaryProperty.htm>`__ method + + `DefineProperties <System.Classes.TPersistent.DefineProperties.htm>`__ is virtual, so descendant classes can override it as necessary but are not required to do so. + ''' + def Progress(self, Sender: Object, Stage: ProgressStage, PercentDone: Byte, RedrawNow: bool, R: Rect, Msg: str) -> None: + ''' + No have docs. + ''' + def FindGraphicClass(self, Context: FindGraphicClassContext, GraphicClass: GraphicClass) -> None: + ''' + No have docs. + ''' + def Create(self) -> None: + ''' + ``Creates`` a `Picture <Vcl.Graphics.TPicture.htm>`__ object. + + Call ``Create()`` to create an instance of `Picture <Vcl.Graphics.TPicture.htm>`__ at runtime. ``Create()`` allocates the memory for the picture object and initializes its internal formats. After creating the `Picture <Vcl.Graphics.TPicture.htm>`__ object, use the ``LoadFromClipboardFormat()`` or ``LoadFromFile()`` method to assign a graphical image to the picture, so that it is available to the application. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of a picture object. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `Picture <Vcl.Graphics.TPicture.htm>`__ reference is not ``nil`` before it calls ``Destroy()``. + + ``Destroy()`` frees the graphic image it contains before calling the inherited ``Destroy()``. + ''' + def LoadFromFile(self, Filename: str) -> None: + ''' + Reads the file specified in ``Filename`` and loads the data into the `Picture <Vcl.Graphics.TPicture.htm>`__ object. + + Use ``LoadFromFile()`` to read a picture from disk. The ``Graphic`` class created is determined by the file extension of the file. If the file extension is not recognized an EInvalidGraphic exception is raised. + ''' + def SaveToFile(self, Filename: str) -> None: + ''' + Writes the picture to disk. + + Use ``SaveToFile()`` to save a `Picture <Vcl.Graphics.TPicture.htm>`__ object to the file specified in Filename. + + The saved picture can be loaded to another `Picture <Vcl.Graphics.TPicture.htm>`__ or to an appropriate ``Graphic`` descendant by calling its ``LoadFromFile()`` method. + ''' + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Reads the picture from a ``Stream``. + + Use ``LoadFromStream()`` to read a picture from a ``Stream`` object. The ``Graphic`` class created is determined by the type of data contained in the stream. + + The data in the stream should be previously written by a call to the ``SaveToStream()`` method of another `Picture <Vcl.Graphics.TPicture.htm>`__ or of a ``Graphic`` descendant. + ''' + def SaveToStream(self, Stream: Stream) -> None: + ''' + Saves the picture to a *Stream*. + + Use ``SaveToStream()`` to save a picture to the ``Stream`` object specified by the ``Stream`` parameter. + + The saved picture can be loaded to another `Picture <Vcl.Graphics.TPicture.htm>`__ or to an appropriate ``Graphic`` descendant by calling its ``LoadFromStream()`` method. + ''' + def LoadFromClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETTE) -> None: + ''' + Reads the picture from the handle provided in the given ``Clipboard`` format. + + Use ``LoadFromClipboardFormat()`` to read in a graphic from the ``Clipboard``. If the format is not supported, an `EInvalidGraphic <Vcl.Graphics.EInvalidGraphic.htm>`__ exception is raised. + + The following code snippet shows how to load a picture from the clipboard into a `Image <Vcl.ExtCtrls.TImage.htm>`__ control. + + .. note:: To load a picture into the clipboard, you can use the code snippet for the `SaveToClipboardFormat <Vcl.Graphics.TPicture.SaveToClipboardFormat.htm>`__ method. + ''' + def SaveToClipboardFormat(self, AFormat: int, AData: Handle, APalette: HPALETTE) -> None: + ''' + Allocates a global handle and writes the picture in its native ``Clipboard`` format (CF_BITMAP for bitmaps, CF_METAFILE for metafiles, and so on). + + Use ``SaveToClipboardFormat()`` to copy the picture to a ``Clipboard`` format. The resulting values can then be copied to the *Windows* clipboard using the clipboard's SetAsHandle method. + + The palette of the picture is returned in the ``APalette`` parameter, the format in the A``Format`` parameter, and a handle to the data in the ``AData`` parameter. Before the picture can be saved, an application must have registered the format using the `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method. + + The following code snippet shows how to save a bitmap to the clipboard. + + .. note:: To load a bitmap from the clipboard, you can use the code snippet for the `LoadFromClipboardFormat <Vcl.Graphics.TBitmap.LoadFromClipboardFormat.htm>`__ method. + ''' + def SupportsClipboardFormat(self, AFormat: int) -> bool: + ''' + Indicates if the given ``Clipboard`` format is supported by the `LoadFromClipboardFormat <Vcl.Graphics.TPicture.LoadFromClipboardFormat.htm>`__ method. + + If the `LoadFromClipboardFormat <Vcl.Graphics.TPicture.LoadFromClipboardFormat.htm>`__ method supports the ``Clipboard`` format specified as the value of AFormat, ``SupportsClipboardFormat()`` returns ``True``. If the format is not supported, the method returns ``False``. + ''' + def Assign(self, Source: Persistent) -> None: + ''' + Copies one object to another by copying the contents of that object to the other. + + When ``Source`` is a object type that is valid for the ``Graphic`` property, ``Assign()`` makes that graphic the value of the ``Graphic`` property. + + The actions performed by ``Assign()`` depend on the actual types of the `Picture <Vcl.Graphics.TPicture.htm>`__ ``Graphic`` property and Source. For example, if the ``Graphic`` property and ``Source`` are bitmaps (``Bitmap``), the bitmap contained in ``Source`` is copied into the ``Graphic`` property. Similar conversions are valid, for example, for ``Icon`` or ``Metafile``. + + If the ``Source`` parameter is not a valid object for the ``Graphic`` property, ``Assign()`` calls the inherited method so that the picture can be copied from any object with which it is compatible. + ''' + def RegisterFileFormat(self, AExtension, ADescription: str, AGraphicClass: GraphicClass) -> None: + ''' + Registers a new ``Graphic`` class for use in ``LoadFromFile()``. + + Use ``RegisterFileFormat`` to register a graphic file format with `Picture <Vcl.Graphics.TPicture.htm>`__ so that it can be used with a ``OpenDialog`` or ``SaveDialog`` box. + + The ``AExtension`` ``parameter`` specifies the three-character system file extension to associate with the graphic class (for example, "bmp" is associated with ``Bitmap``). The ``ADescription`` parameter specifies the description of the graphic to appear in the drop down list of the dialog box (for example, ``Bitmap``\ s. is the description of ``Bitmap``). The ``AGraphicClass`` parameter registers the new graphic class to associate with the file format. + ''' + def RegisterClipboardFormat(self, AFormat: int, AGraphicClass: GraphicClass) -> None: + ''' + Registers a new ``Graphic`` class for use in the `LoadFromClipboardFormat <Vcl.Graphics.TPicture.LoadFromClipboardFormat.htm>`__ method. + + Use ``RegisterClipboardFormat()`` register a new graphic format with `Picture <Vcl.Graphics.TPicture.htm>`__ so that it can be used with the `LoadFromClipboardFormat <Vcl.Graphics.TPicture.LoadFromClipboardFormat.htm>`__ method. + ''' + def UnregisterGraphicClass(self, AClass: GraphicClass) -> None: + ''' + Removes all references to the specified `Graphic <Vcl.Graphics.TGraphic.htm>`__ class and all its descendants from the internal lists of file formats and clipboard formats. + + Call ``UnregisterGraphicClass()`` to make a graphic class unavailable to all picture objects. ``UnregisterGraphicClass()`` reverses the registration accomplished by the `RegisterFileFormat <Vcl.Graphics.TPicture.RegisterFileFormat.htm>`__, or `RegisterFileFormatRes <Vcl.Graphics.TPicture.RegisterFileFormatRes.htm>`__, or `RegisterClipboardFormat <Vcl.Graphics.TPicture.RegisterClipboardFormat.htm>`__ method. When a graphic class is registered, the global ``GraphicFilter``, ``GraphicExtension``, and ``GraphicFileMask()`` functions can return dialog filter strings, default file extensions or file filters for the graphic class. Call ``UnregisterGraphicClass()`` when these values should not be available. For example, component writers who implement custom graphic classes unregister those classes according to the language used. In Delphi, the classes are unregistered in the ``finalization`` block of the unit that implements them and, in C++, the classes are unregistered using the ``#pragma`` exit directive (C++). + + File formats and clipboard formats for the custom class are registered in the ``initialization`` block (Delphi) or using #pragma startup (C++). + ''' + @overload + def RegisterFileFormatRes(self, AExtension: str, ADescriptionResID: str, AGraphicClass: GraphicClass) -> None: + ''' + Registers a new ``Graphic`` class for use in the ``LoadFromFile()`` method. + + Use ``RegisterFileFormatRes()`` by specifying a string resource. + + The ``AExtension`` parameter specifies the three-character system file extension to associate with the graphic class (for example, "bmp" is associated with ``Bitmap``). + + The ``ADescriptionResID`` parameter specifies the resource ``ID`` for a description of the graphic, which then appears in the drop down list of the dialog box (for example, ``Bitmap``\ s. is the description of ``Bitmap``). + + The ``AGraphicClass`` parameter registers the new graphic class to associate with the file format. + ''' + @overload + def RegisterFileFormatRes(self, AExtension: str, ADescriptionResID: int, AGraphicClass: GraphicClass) -> None: ... + + def OnChange(self, Sender: Object) -> None: + ''' + Occurs when the specific graphics item encapsulated by the picture object changes. + + Use ``OnChange`` to write an event handler to process an action when the graphic is modified. + ''' + def OnProgress(self, Sender: Object, Stage: ProgressStage, PercentDone: Byte, RedrawNow: bool, R: Rect, Msg: str) -> None: + ''' + # OnProgress: ProgressEvent + Occurs periodically during slow operations that affect the graphic. + + ``OnProgress`` is generated by the particular graphic that the picture object contains. Whether ``OnProgress`` occurs depends upon the type of graphic in the ``Graphic`` property. Some graphics generate this event, others do not. *JPEG* images, for example, generate an ``OnProgress`` event. + + Write an ``OnProgress`` event handler to provide the user with feedback during slow operations such as loading large compressed images. TImage, for example, hooks the ``OnProgress`` event of `Picture <Vcl.Graphics.TPicture.htm>`__. + + .. note:: The ``PercentDone`` parameter on the event handler is only an approximation. With some image formats, the value of ``PercentDone`` may actually decrease from the value in previous events, as the graphic object discovers there is more work to do. + + ``OnProgress`` is an event handler of type `Vcl.Graphics.TProgressEvent <Vcl.Graphics.TProgressEvent.htm>`__. + ''' + def OnFindGraphicClass(self, Sender: Object, Context: FindGraphicClassContext, GraphicClass: GraphicClass) -> None: + ''' + # OnFindGraphicClass: FindGraphicClassEvent + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Point: + ''' + =================== + System.Types.TPoint + =================== + + Defines a pixel location on-screen. + + The ``Point`` type defines the integer type `X <System.Types.TPoint.X.htm>`__ and `Y <System.Types.TPoint.Y.htm>`__ coordinates of a pixel location on-screen, with the origin in the upper-left corner. `X <System.Types.TPoint.X.htm>`__ and `Y <System.Types.TPoint.Y.htm>`__ specify the horizontal and vertical coordinates of a point, respectively. + + The type of `X <System.Types.TPoint.X.htm>`__ and `Y <System.Types.TPoint.Y.htm>`__ is `FixedInt <System.FixedInt.htm>`__. + ''' + + X: int + ''' + Specifies the horizontal coordinate of the `Point <System.Types.TPoint.htm>`__ object. + + The type of ``Point.X`` is `FixedInt <System.FixedInt.htm>`__. + ''' + Y: int + ''' + Specifies the vertical coordinate of the `Point <System.Types.TPoint.htm>`__ object. + + The type of ``Point.Y`` is `FixedInt <System.FixedInt.htm>`__. + ''' + + @overload + def Create(self, P: Point) -> None: + ''' + Creates a `Point <System.Types.TPoint.htm>`__ object. + + Use ``Create()`` to construct and initialize a new `Point <System.Types.TPoint.htm>`__ object. ``'X'`` and ``'Y'`` specify the horizontal and vertical `Integer <System.Integer.htm>`__ coordinates of the point, respectively. + ''' + @overload + def Create(self, X: int, Y: int) -> None: + ''' + Creates a `Point <System.Types.TPoint.htm>`__ object. + + Use ``Create()`` to construct and initialize a new `Point <System.Types.TPoint.htm>`__ object. ``'X'`` and ``'Y'`` specify the horizontal and vertical `Integer <System.Integer.htm>`__ coordinates of the point, respectively. + ''' + def Equal(self, Lhs: Point, Rhs: Point) -> bool: + ''' + Tests whether two `Point <System.Types.TPoint.htm>`__ objects are equal. + + *operator Equality* tests whether two `Point <System.Types.TPoint.htm>`__ records are equal, by comparing their ``'X'`` and ``'Y'`` values. It returns the ``Boolean`` value ``True`` if their ``'X'`` properties are equal and their ``'Y'`` properties are equal. Otherwise, it returns ``False``. + ''' + def NotEqual(self, Lhs: Point, Rhs: Point) -> bool: + ''' + Tests whether two points are not equal. + + **operator Inequality** tests whether two points are unequal by comparing their ``'X'`` and ``'Y'`` values. It returns the ``Boolean`` value ``True`` if at least one of their coordinates is different. Otherwise, it returns ``False``. + ''' + @overload + def Add(self, Point: Point) -> Point: + ''' + Calculates the sum between two points. + + Call the ``Add()`` function to obtain the sum of two points. The ``'X'`` property of the result is the sum between the ``'X'`` value of the first `Point <System.Types.TPoint.htm>`__ object and the value of ``'X'`` of the second `Point <System.Types.TPoint.htm>`__ object. The ``'Y'`` property of the result is the sum between the ``'Y'`` value of the first `Point <System.Types.TPoint.htm>`__ object and the value of ``'Y'`` of the second `Point <System.Types.TPoint.htm>`__ object. + ''' + @overload + def Add(self, Lhs: Point, Rhs: Point) -> Point: + ''' + Calculates the sum between two points. + + Call the ``Add()`` function to obtain the sum of two points. The ``'X'`` property of the result is the sum between the ``'X'`` value of the first `Point <System.Types.TPoint.htm>`__ object and the value of ``'X'`` of the second `Point <System.Types.TPoint.htm>`__ object. The ``'Y'`` property of the result is the sum between the ``'Y'`` value of the first `Point <System.Types.TPoint.htm>`__ object and the value of ``'Y'`` of the second `Point <System.Types.TPoint.htm>`__ object. + ''' + @overload + def Subtract(self, Lhs: Point, Rhs: Point) -> Point: + ''' + Calculates the difference between two `Point <System.Types.TPoint.htm>`__ objects. + + The `X <System.Types.TPoint.X.htm>`__ property of the result is the difference between the ``'X'`` value of the first `Point <System.Types.TPoint.htm>`__ and the value of ``'X'`` of the second `Point <System.Types.TPoint.htm>`__. The `Y <System.Types.TPoint.Y.htm>`__ property of the result is the difference between the ``'Y'`` value of the first `Point <System.Types.TPoint.htm>`__ and the value of ``'Y'`` of the second `Point <System.Types.TPoint.htm>`__. + ''' + @overload + def Subtract(self, Point: Point) -> Point: + ''' + Calculates the difference between two `Point <System.Types.TPoint.htm>`__ objects. + + The `X <System.Types.TPoint.X.htm>`__ property of the result is the difference between the ``'X'`` value of the first `Point <System.Types.TPoint.htm>`__ and the value of ``'X'`` of the second `Point <System.Types.TPoint.htm>`__. The `Y <System.Types.TPoint.Y.htm>`__ property of the result is the difference between the ``'Y'`` value of the first `Point <System.Types.TPoint.htm>`__ and the value of ``'Y'`` of the second `Point <System.Types.TPoint.htm>`__. + ''' + def Implicit(self, Value: int) -> Point: + ''' + Returns a `Point <System.Types.TPoint.htm>`__ object. + + *operator Implicit* returns a `Point <System.Types.TPoint.htm>`__ object with the same coordinates as the `SmallPoint <System.Types.TSmallPoint.htm>`__ object received as parameter. It converts a `SmallPoint <System.Types.TSmallPoint.htm>`__ to a `Point <System.Types.TPoint.htm>`__ and the conversion is implicit. + ''' + def Explicit(self, Value: Point) -> int: + ''' + Returns a `SmallPoint <System.Types.TSmallPoint.htm>`__ object. + + *operator Explicit* returns a `SmallPoint <System.Types.TSmallPoint.htm>`__ object, with the same coordinates as the `Point <System.Types.TPoint.htm>`__ object received as parameter. It converts the coordinates to `SmallPoint <System.Types.TSmallPoint.htm>`__ values and the conversion must be explicit. + ''' + def PointInCircle(self, Point: Point, Center: Point, Radius: int) -> bool: + ''' + Tests whether the point is on or inside a circle. + + ``PointInCircle()`` returns the ``Boolean`` value ``True`` if the point is on or inside the circle. Otherwise, it returns ``False``. + ''' + def Zero(self) -> Point: + ''' + `Point <System.Types.TPoint.htm>`__ where the values of `X <System.Types.TPoint.X.htm>`__ and `Y <System.Types.TPoint.Y.htm>`__ are all 0. + ''' + def Distance(self, P2: Point) -> float: + ''' + Calculates the distance between the current `Point <System.Types.TPoint.htm>`__ object and the point specified by the *P2* parameter. + + The `Distance <System.Types.TPointF.Distance.htm>`__ function calculates the length of the segment between the current `Point <System.Types.TPoint.htm>`__ point and the point specified by the *P2* parameter. It calculates the euclidean distance between two points. + ''' + @overload + def SetLocation(self, X: int, Y: int) -> None: + ''' + Sets the location of a `Point <System.Types.TPoint.htm>`__ object. + + Use ``SetLocation`` to set the location of a point at specified coordinates or at a specified `Point <System.Types.TPoint.htm>`__ location. + ''' + @overload + def SetLocation(self, P: Point) -> None: + ''' + Sets the location of a `Point <System.Types.TPoint.htm>`__ object. + + Use ``SetLocation`` to set the location of a point at specified coordinates or at a specified `Point <System.Types.TPoint.htm>`__ location. + ''' + @overload + def Offset(self, DX: int, DY: int) -> None: + ''' + Increments the values of ``'X'`` and ``'Y'``. + + ``Offset`` changes the location of the point by incrementing its ``'X'`` and ``'Y'`` values. + ''' + @overload + def Offset(self, Point: Point) -> None: + ''' + Increments the values of ``'X'`` and ``'Y'``. + + ``Offset`` changes the location of the point by incrementing its ``'X'`` and ``'Y'`` values. + ''' + def IsZero(self) -> bool: + ''' + Tests whether the point is zero. + + ``IsZero()`` returns the ``Boolean`` value ``True`` if the point is zero. Otherwise, it returns ``False``. + + A point is zero if its ``'X'`` and ``'Y'`` properties are equal to zero. + ''' + def Angle(self, APoint: Point) -> float: + ''' + Calculates the angle in radians between the positive X-axis of a plane and the point given by the coordinates (X, Y) on the plane. + + ``Angle`` is equivalent to `Arctan2(Y, X) <System.Math.ArcTan2.htm>`__. The angle is positive for counter-clockwise angles (upper half-plane, ``Y > 0``), and negative for clockwise angles (lower half-plane, ``Y < 0``). + + ``Arctan2(0, 0)`` is 0, because normally ``Arctan2(0, 0)`` is undefined. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class PopupMenu(Menu): + ''' + ==================== + Vcl.Menus.TPopupMenu + ==================== + + ``PopupMenu`` encapsulates the properties, methods, and events of a pop-up menu. + + Use ``PopupMenu`` to define the pop-up menu that appears when the user clicks on a control with the right mouse button. To make a pop-up menu available, assign the ``PopupMenu`` object to the control's ``PopupMenu`` property. + + .. tip:: To create a ``PopupMenu`` that users can configure at runtime, use the ``StandardMenuPopup`` component with an action manager instead. + + .. note:: If the ``PopupMenu``\ s. ``ParentBiDiMode`` is ``True``, the ``PopupMenu``\ s. ``BiDiMode`` is set to the ``BiDiMode`` of the control that activates it. If a control cannot be found, the ``BiDiMode`` is set to the value of the ``Application`` object's ``BiDiMode``. The ``PopupMenu``\ s. ``BiDiMode`` affects all of its ``MenuItems``. + ''' + + __hash__: ClassVar[None] = ... + Alignment: PopupAlignment + ''' + Determines where the pop-up menu appears when the user clicks the right mouse button. + + Set ``Alignment`` to control the placement of the ``PopupMenu``. ``Alignment`` controls whether the menu appears to the left of the mouse, to the right of the mouse, or centered over the mouse. + + By default, the menu appears with its top left corner under the mouse (paLeft). + ''' + AutoHotkeys: bool + ''' + Determines whether the accelerator keys for ``MenuItems`` can be reset automatically. + + Set `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ to indicate whether the menu should automatically ensure that accelerator keys for its items are reset if necessary so that every menu item has an accelerator key and no two items have the same accelerator key. This ensures that ``MenuItems`` added dynamically at runtime can have accelerator keys that do not introduce conflicts. `Menu <Vcl.Menus.TMenu.htm>`__ tries to preserve all existing accelerator key mappings when adjusting the accelerator keys, but may be forced to change some in order to ensure that every item has a unique accelerator. + + Before the menu is displayed, the menu checks and adjusts the accelerator key mappings if `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ is maAutomatic. When `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ is ``maManual``, the menu does not alter the top-level ``MenuItems``, but may adjust the accelerator keys for submenus, depending on the `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ property of the menu item that is the parent of the submenu. + + When `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ is ``maManual``, an application can still adjust the ``MenuItems`` by calling the ``Items`` property's ``RethinkHotkeys()`` method. `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ merely controls whether this adjustment occurs automatically. + + .. note:: The `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ property of a menu is linked to the `AutoHotkeys <Vcl.Menus.TMenu.AutoHotkeys.htm>`__ property of the `Menu <Vcl.Menus.TMenu.htm>`__ ``Items`` object that implements its ``Items`` property. Setting one sets the other. + ''' + AutoLineReduction: MenuAutoFlag + ''' + Determines whether redundant separator bars are automatically removed from the menu. + + Set `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ to indicate whether the menu should automatically ensure that the menu does not start or end with a separator bar and that two separator bars do not appear next to each other. This ensures that menus built dynamically at runtime do not have separator bars in undesired positions. + + Before the menu is displayed, it removes superfluous separator bars when `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ is maAutomatic. When `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ is ``maManual``, the menu does not remove separators from the top-level ``MenuItems``, but may remove superfluous separators from submenus, depending on the `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ property of the menu item that is the parent of the submenu. + + When `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ is ``maManual``, an application can still remove superfluous separators by calling the `Items <Vcl.Menus.TMenu.Items.htm>`__ property's `RethinkLines <Vcl.Menus.TMenuItem.RethinkLines.htm>`__ method. `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ merely determines whether this adjustment occurs automatically. + + .. note:: The `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ property of a menu is linked to the `AutoLineReduction <Vcl.Menus.TMenu.AutoLineReduction.htm>`__ property of the `Menu <Vcl.Menus.TMenu.htm>`__ ``Items`` object that implements its `Items <Vcl.Menus.TMenu.Items.htm>`__ property. Setting one sets the other. + ''' + AutoPopup: bool + ''' + Determines whether the pop-up menu appears automatically when the user clicks the right mouse button. + + Set ``AutoPopup`` to ``True`` to cause the pop-up menu to appear automatically when the user clicks the right mouse button on a control that has the pop-up menu specified as its ``PopupMenu`` property. The application key present on keyboards specifically designed for 32-bit Windows will also show this menu when pressed. + + Set ``AutoPopup`` to ``False`` if the appearance of the pop-up menu should be controlled programmatically. To display a pop-up menu when ``AutoPopup`` is ``False``, use the ``Popup()`` method. + ''' + BiDiMode: BiDiMode + ''' + Determines the layout of the menu in *Middle East* locales. + + Set `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ to control the layout of ``MenuItems``. `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ controls whether the ``MenuItems`` read from ``Left`` to ``Right`` or ``Right`` to ``Left``. + ''' + HelpContext: HelpContext + ''' + Specifies a context ``ID`` for the entire pop-up menu. + + Use ``HelpContext()`` to associate a help screen with the entire pop-up menu. Each *Screen* in the ``Help`` system should have a unique context ``ID``. When a component is selected in the application, pressing *F1* displays the ``Help`` screen associated with the value of ``HelpContext()``. To associate a help screen with the individual items in the pop-up menu, use the ``HelpContext()`` property of the associated ``MenuItem`` objects. + ''' + Images: CustomImageList + ''' + Lists the images that can appear beside individual ``MenuItems``. + + Use `Images <Vcl.Menus.TMenu.Images.htm>`__ to hold the set of images that can appear beside ``MenuItems`` in the menu. Individual ``MenuItems`` set their ``ImageIndex`` property to indicate which image in the list appears to the left of the menu item ``Caption``. + + `Images <Vcl.Menus.TMenu.Images.htm>`__ in the list should be 16x16. + + .. tip:: If the application uses ``ActionList``s, this property should be the value of the ``ActionList``\ s. `Images <Vcl.Menus.TMenu.Images.htm>`__ property. This way, ``MenuItems`` and buttons that do the same thing can display the same image. + ''' + MenuAnimation: MenuAnimation + ''' + Specifies how the menu appears when it is first displayed. + + Use ``MenuAnimation`` to specify how the ``PopupMenu`` appears on the *Screen*. The menu can simply appear as a whole, or can slide into view like a window shade being drawn from any edge. + + .. note:: ``MenuAnimation`` only has an effect when running on *Windows 98*, *Windows NT 5.0*, or later. + ''' + OwnerDraw: bool + ''' + Specifies whether the ``MenuItems`` are drawn by the application. + + Set `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ to ``True`` to indicate that the application will draw ``MenuItems`` in an `OnDrawItem <Vcl.Menus.TMenuItem.OnDrawItem.htm>`__ event handler. When `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ is ``True``, ``MenuItems`` receive an `OnMeasureItem <Vcl.Menus.TMenuItem.OnMeasureItem.htm>`__ and an `OnDrawItem <Vcl.Menus.TMenuItem.OnDrawItem.htm>`__ event when they need to be rendered on screen. + + Set `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ to ``False`` to accept the default drawing. When `OwnerDraw <Vcl.Menus.TMenu.OwnerDraw.htm>`__ is ``False``, ``MenuItems`` display the caption with an optional image to the left (If the `Images <Vcl.Menus.TMenu.Images.htm>`__ and `ImageIndex <Vcl.Menus.TMenuItem.ImageIndex.htm>`__ properties are set). + + Owner-draw menus are useful for displaying the value that appears when selecting a menu item. For example, in a menu that allows users to choose a color, an owner-draw menu could display rectangles drawn in the designated color, rather than color names. + ''' + ParentBiDiMode: bool + ''' + Indicates whether the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ property is inherited from the control that uses the menu. + + By default, `ParentBiDiMode <Vcl.Menus.TMenu.ParentBiDiMode.htm>`__ is ``True``, indicating that the layout of ``MenuItems`` follows the `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ setting of the associated form or control. Change `ParentBiDiMode <Vcl.Menus.TMenu.ParentBiDiMode.htm>`__ to ``False`` to override the default `BiDiMode <Vcl.Menus.TMenu.BiDiMode.htm>`__ setting and control the menu's layout independently. + ''' + TrackButton: TrackButton + ''' + Specifies which mouse button activates the ``PopupMenu`` when it is associated with a ``ToolBar`` button. + + Use ``TrackButton`` to specify which mouse button activates the ``PopupMenu`` when it is associated with a ``ToolBar`` button. + ''' + PopupComponent: Component + ''' + Indicates the component that last displayed the ``PopupMenu`` in response to a right mouse click. + + Read ``PopupComponent`` to determine which control is currently using the ``PopupMenu``. In applications where multiple controls share the same pop-up menu, use ``PopupComponent`` to determine which of them displayed the menu. + + Set ``PopupComponent`` to associate a control with the menu before calling the Popup method programmatically to bring up the pop-up menu. + ''' + PopupPoint: Point + ''' + Indicates the location where the pop-up menu appears. + + This public property is used internally to locate the ``PopupMenu``. Its ``Value`` is set by the `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method. + ''' + + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__. + + Call ``Create()`` to create to create a pop-up menu at runtime. Pop-up menus placed in forms or data modules at design time are created automatically. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. + ''' + def CloseMenu(self) -> None: + ''' + Closes the pop-up menu onscreen. + + Call ``CloseMenu`` to close the pop-up menu. + ''' + def Popup(self, X, Y: int) -> None: + ''' + Displays the pop-up menu onscreen. + + Call ``Popup`` to bring up the pop-up menu. The menu appears at the *Screen* coordinates indicated by the values (in pixels) of ``'X'`` and ``'Y'``. + ''' + def DoPopup(self, Sender: Object) -> None: + ''' + Generates an `OnPopup <Vcl.Menus.TPopupMenu.OnPopup.htm>`__ event. + + ``DoPopup()`` is called automatically just before the pop-up menu appears to generate an `OnPopup <Vcl.Menus.TPopupMenu.OnPopup.htm>`__ event. Override ``DoPopup`` in a descendant class to change the event. + ''' + def UseRightToLeftAlignment(self) -> bool: + ''' + Specifies whether the control's alignment is in a right-to-left mode. + + Call ``UseRightToLeftAlignment()`` to determine whether the control's alignment is in a right-to-left mode. This information can be used when painting the control or when responding to mouse events. + + ``UseRightToLeftAlignment()`` returns the setting from the control that activated the popup. If the popup was not activated by a control, ``UseRightToLeftAlignment()`` returns the setting used in the global ``Application`` object. + ''' + def SetPopupPoint(self, APopupPoint: Point) -> None: + ''' + Used to set starting point coordinates. + + ``SetPopupPoint`` is used internally to set the coordinates of the point where the pop-up menu will appear. + ''' + + def OnChange(self, Sender: Object, Source: MenuItem, Rebuild: bool) -> None: + ''' + # OnChange: MenuChangeEvent + Occurs when the menu changes. + + Write an `OnChange <Vcl.Menus.TMenu.OnChange.htm>`__ event handler to respond to changes in the menu's structure. `OnChange <Vcl.Menus.TMenu.OnChange.htm>`__ occurs when the menu is loaded into memory, and in response to property changes that affect the menu's structure. + ''' + def OnPopup(self, Sender: Object) -> None: + ''' + # OnPopup: NotifyEvent + Occurs just before the pop-up menu appears. + + Write an ``OnPopup`` event handler to take specific action just before the pop-up menu appears. For example, use an ``OnPopup`` event handler to set the Checked, Enabled, or ``Visible`` property of individual items in the menu so that they are appropriate to the PopupComponent. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class PrototypeBindSource(CustomPrototypeBindSource): + ''' + ========================================== + Data.Bind.ObjectScope.TPrototypeBindSource + ========================================== + + Is a bind source for creating sample data. + + If you want to create your own custom prototype bind source, then you should derive your class from `CustomPrototypeBindSource <Data.Bind.ObjectScope.TCustomPrototypeBindSource.htm>`__. When designing applications that make use of the LiveBindings framework, you can use a ``PrototypeBindSource`` component readily available in the *Tool Palette* to generate sample data for your bindings. + + These tutorials in the `Tutorials <Tutorials.htm>`__ section describe the use of ``PrototypeBindSource``: + ''' + + __hash__: ClassVar[None] = ... + AutoActivate: bool + ''' + ``Data.Bind.ObjectScope.TPrototypeBindSource.AutoActivate`` inherits from `Data.Bind.ObjectScope.TBaseObjectBindSource.AutoActivate <Data.Bind.ObjectScope.TBaseObjectBindSource.AutoActivate.htm>`__. All content below this line refers to `Data.Bind.ObjectScope.TBaseObjectBindSource.AutoActivate <Data.Bind.ObjectScope.TBaseObjectBindSource.AutoActivate.htm>`__. + + Specifies whether the bind source is automatically activated. Set `AutoActive <Data.Bind.ObjectScope.TBaseObjectBindSource.AutoActivate.htm>`__ to ``True`` for automatic activation. + ''' + AutoEdit: bool + ''' + No have docs. + ''' + AutoPost: bool + ''' + No have docs. + ''' + RecordCount: int + ''' + No have docs. + ''' + FieldDefs: GeneratorFieldDefs + ''' + No have docs. + ''' + ScopeMappings: ScopeMappings + ''' + Specifies an owned collection of scope mappings. + + ``Data.Bind.ObjectScope.TPrototypeBindSource.ScopeMappings`` inherits from `Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings <Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings.htm>`__. All content below this line refers to `Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings <Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings.htm>`__. + + The `ScopeMappings <Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings.htm>`__ property specifies an owned collection whose elements are scope mappings. `ScopeMappings <Data.Bind.Components.TBaseBindScopeComponent.ScopeMappings.htm>`__ are used to add name/value pairs that can be referenced by expressions that reference this source component. + ''' + + def OnCreateAdapter(self, Sender: Object, ABindSourceAdapter: BindSourceAdapter) -> None: + ''' + # OnCreateAdapter: CreateAdapterEvent + + No have docs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class RadioButton(ButtonControl): + ''' + ========================= + Vcl.StdCtrls.TRadioButton + ========================= + + ``RadioButton`` is a wrapper for a system ``RadioButton``. + + Use ``RadioButton`` to add a ``RadioButton`` to a form. ``RadioButton``\ s present a set of mutually exclusive options to the user- that is, only one ``RadioButton`` in a set can be selected at a time. When the user selects a ``RadioButton``, the previously selected ``RadioButton`` becomes unselected. ``RadioButton``\ s are frequently grouped in a ``RadioGroupBox`` (``TGroupBox``). Add the ``GroupBox`` to the ``Form`` first, then get the ``RadioButton``\ s from the *Component Palette* and put them into the ``GroupBox``. Or you can add a ``RadioGroup``, a group that already has ``RadioButton``\ s in it, so that you do not have to get the buttons from the *Tool Palette*. + + By default, all ``RadioButton``\ s that are directly contained in the same windowed control container, such as a ``RadioGroup`` or ``Panel``, are grouped. For example, two ``RadioButton``\ s on a form can be checked at the same time only if they are contained in separate containers, such as two different ``GroupBox``\ es. + + The `Caption <Vcl.StdCtrls.TRadioButton.Caption.htm>`__ property can be used `to define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to the control. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: LeftRight + ''' + Determines the position of the ``Caption`` relative to the ``RadioButton``. + + Set ``Alignment`` to determine whether the ``Caption`` of the ``RadioButton`` should appear to the left of the ``RadioButton`` (``taLeftJustify``) or to the right of the ``RadioButton`` (taRightJustify). + + .. note:: Do not confuse the ``Alignment`` property with the alignment of the caption in the text area of the ``RadioButton``. The ``Caption`` always appears left aligned. ``Alignment`` only controls on which side of the button the text area appears. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Checked: bool + ''' + Specifies whether the button control is checked. + + Use `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ to determine whether a ``Button`` control is checked. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.StdCtrls.TRadioButton.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + WordWrap: bool + ''' + Specifies whether the button ``Text`` wraps to fit the width of the control. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``True`` to allow the display of multiple lines of text. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``True``, text that is too wide for the control wraps at the right margin. + + Set `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ to ``False`` to limit the text to a single line. When `WordWrap <Vcl.StdCtrls.TButtonControl.WordWrap.htm>`__ is ``False``, text that is too wide for the control appears truncated. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def GetChecked(self) -> bool: + ''' + Returns whether the button control is checked. + + `GetChecked <Vcl.StdCtrls.TButtonControl.GetChecked.htm>`__ is the read implementation of the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def SetChecked(self, Value: bool) -> None: + ''' + Sets the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + + `SetChecked <Vcl.StdCtrls.TButtonControl.SetChecked.htm>`__ is the write implementer for the `Checked <Vcl.StdCtrls.TButtonControl.Checked.htm>`__ property. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `RadioButton <Vcl.StdCtrls.TRadioButton.htm>`__. + + Call ``Create()`` to instantiate a ``RadioButton`` at runtime. ``RadioButton``\ s added to forms at design time are created automatically. + + ``AOwner`` is the component, typically a form, that becomes the value of the ``Owner()`` property. The ``Owner()`` is responsible for freeing the ``RadioButton`` object. + ''' + def GetControlsAlignment(self) -> Alignment: + ''' + Returns the alignment of any text in the control. + + Use ``GetControlsAlignment()`` to determine the orientation of text in controls that do not have an `Alignment <Vcl.StdCtrls.TRadioButton.Alignment.htm>`__ property. + + ``GetControlsAlignment()`` overrides the inherited method, returning taRightJustify if `UseRightToLeftAlignment <Vcl.StdCtrls.TCustomButton.UseRightToLeftAlignment.htm>`__ returns ``False``. If `UseRightToLeftAlignment <Vcl.StdCtrls.TCustomButton.UseRightToLeftAlignment.htm>`__ returns ``True``, ``GetControlsAlignment()`` returns the opposite of the `Alignment <Vcl.StdCtrls.TRadioButton.Alignment.htm>`__ property. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class RadioGroup(CustomRadioGroup): + ''' + ============================== + Vcl.ExtCtrls.TCustomRadioGroup + ============================== + + ``RadioGroup`` represents a group of ``RadioButton``\ s that function together. + + A ``RadioGroup`` object is a special ``GroupBox`` that contains only ``RadioButton``\ s.. ``RadioButton``\ s that are placed directly in the same control component are said to be "grouped." When the user checks a ``RadioButton``, all other ``RadioButton``\ s in its group become unchecked. Hence, two ``RadioButton``\ s on a form can be checked at the same time only if they are placed in separate containers, such as ``GroupBox``\ es. To add ``RadioButton``\ s to a ``RadioGroup``, edit the ``Items`` property in the *Object Inspector*. Each string in ``Items`` makes a ``RadioButton`` appear in the ``GroupBox`` with the string as its caption. The value of the ``ItemIndex`` property determines which ``RadioButton`` is currently selected. + + Display the ``RadioButton``\ s in a single column or in multiple columns by setting the Columns property. + + .. note:: Setting the ``RadioGroup``\ s. ``BiDiMode`` to ``bdRightToLeft`` automatically flips its ``RadioButton``\ s.. The ``FlipChildren()`` method has no effect. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Columns: int + ''' + ``Columns`` determines the number of columns in the ``RadioGroup``. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ItemIndex: list[int] + ''' + Indicates which ``RadioButton`` in the group is currently selected. + + `ItemIndex <Vcl.ExtCtrls.TCustomRadioGroup.ItemIndex.htm>`__ holds the index of the selected ``RadioButton`` in the ``Items`` list. (The first button is 0.) The value of `ItemIndex <Vcl.ExtCtrls.TCustomRadioGroup.ItemIndex.htm>`__ changes at runtime as the user selects ``RadioButton``\ s.. If you want one of the buttons to appear selected when the application starts, assign that button to `ItemIndex <Vcl.ExtCtrls.TCustomRadioGroup.ItemIndex.htm>`__ at design time; otherwise, leave `ItemIndex <Vcl.ExtCtrls.TCustomRadioGroup.ItemIndex.htm>`__ set to the default value of -1, which means that no button is selected. + ''' + Items: list + ''' + Lists the ``RadioButton``\ s in the ``RadioGroup``. + + `Items <Vcl.ExtCtrls.TCustomRadioGroup.Items.htm>`__ holds a ``Strings`` object that lists the captions of the ``RadioButton``\ s in the group. In `CustomRadioGroup <Vcl.ExtCtrls.TCustomRadioGroup.htm>`__ descendants, where this property is published, ``RadioButton``\ s can be added or removed by editing the `Items <Vcl.ExtCtrls.TCustomRadioGroup.Items.htm>`__ list from the *Object Inspector*. + + .. note:: A ``RadioButton`` object is created automatically for each string in `Items <Vcl.ExtCtrls.TCustomRadioGroup.Items.htm>`__. You cannot directly add or remove ``RadioButton`` objects, but you can access individual ``Button`` objects through the `Buttons <Vcl.ExtCtrls.TCustomRadioGroup.Buttons.htm>`__ property. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + ParentBiDiMode: int + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``True``, the control uses the parent's theme background to draw its own background. + + If `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ has no effect unless *XP* themes are enabled. + ''' + ParentColor: Color + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``VCL.ExtCtrls.TRadioGroup.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: Font + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: int + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: int + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + WordWrap: bool + ''' + Specifies whether the text for the ``RadioButton``\ s wraps to fit the width of the ``RadioGroup``. + + Set `WordWrap <Vcl.ExtCtrls.TCustomRadioGroup.WordWrap.htm>`__ to ``True`` to allow the display of multiple lines of text next to each ``RadioButton`` in the ``RadioGroup``. When `WordWrap <Vcl.ExtCtrls.TCustomRadioGroup.WordWrap.htm>`__ is ``True``, text that is too wide for the ``RadioGroup`` wraps at the right margin. + + Set `WordWrap <Vcl.ExtCtrls.TCustomRadioGroup.WordWrap.htm>`__ to ``False`` to limit the text to a single line. When `WordWrap <Vcl.ExtCtrls.TCustomRadioGroup.WordWrap.htm>`__ is ``False``, text that is too wide for the ``RadioGroup`` appears truncated. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Rect: + ''' + ================== + System.Types.TRect + ================== + + ``Rect`` defines a rectangle. + + ``Rect`` represents the dimensions of a rectangle. The coordinates are specified as either four separate integers representing the *left*, *top*, *right*, and *bottom* sides, or as two points representing the locations of the upper-left and lower-right corners. + + Typically, ``Rect`` values represent pixel locations, where the origin of the pixel coordinate system is in the upper-left corner of the screen (screen coordinates) or the upper-left corner of a control's client area (client coordinates). When a ``Rect`` value represents a rectangle on the screen, by convention the top and left edges are considered inside the rectangle and the bottom and right edges are considered outside the rectangle. This convention allows the width of the rectangle to be ``Right - Left`` and the height to be ``Bottom - Top``. + ''' + + __hash__: ClassVar[None] = ... + # changing the width is always relative to Left + Width: int + ''' + Returns the width of the rectangle. + + .. note:: Before calling ``Width``, make sure the rectangle is normalized. + ''' + # changing the Height is always relative to Top + Height: int + ''' + Returns the height of the rectangle. + + .. note:: Before calling ``Height``, make sure the rectangle is normalized. + ''' + Size: Size + ''' + Returns the size of the rectangle. + + ``Size()`` returns the rectangle's ``Width`` and ``Height``. + ''' + Location: Point + ''' + Returns the ``'X'`` and ``'Y'`` coordinates of the upper-left corner point. + ''' + + # 0: (self, Left: int, Top: int, Right: int, Bottom: int) + # 1: (TopLeft: Point, BottomRight: Point) + + @overload + def Create(self, Origin: Point) -> None: # empty rect at given origin + ''' + Creates a `Rect <System.Types.TRect.htm>`__ rectangle. + + Use ``Create()`` to construct and initialize a new `Rect <System.Types.TRect.htm>`__ rectangle having `Integer <System.Integer.htm>`__ coordinates: + + - ``Origin`` and *P1* represent the upper-left corner of the rectangle as the `Point <System.Types.TPoint.htm>`__ type point. + - *P2* represents the lower-right corner of the rectangle as the `Point <System.Types.TPoint.htm>`__ type point. + - ``Top``, ``Bottom``, ``Right``, and ``Left`` are `Integer <System.Integer.htm>`__ vertical or horizontal coordinates of the *upper*, *lower*, *right*, and *left* sides of the rectangle, respectively. + - ``Width`` and ``Height`` are `Integer <System.Integer.htm>`__ ``Width`` and ``Height`` of the rectangle, respectively. + - *R* is the rectangle with coordinates specified using the `Rect <System.Types.TRect.htm>`__ type. + - *Normalize* specifies to create a `normalized <System.Types.TRect.Normalize.htm>`__ rectangle. + + .. note:: ``Create(const Origin: Point)`` creates an empty rectangle at the given ``Origin``. + ''' + @overload + def Create(self, Origin: Point, Width: int, Height: int) -> None: ... # at TPoint of origin with width and height + @overload + def Create(self, Left: int, Top: int, Right: int, Bottom: int) -> None: ... # at Left, Top, Right, and Bottom + @overload + def Create(self, P1: Point, P2: Point, Normalize: bool) -> None: ... # with corners specified by p1 and p2 + @overload + def Create(self, R: Rect, Normalize: bool) -> None: ... + # operator overloads + def Equal(self, Lhs: Rect, Rhs: Rect) -> bool: + ''' + Tests whether two rectangles are equal. + + *Operator Equality* returns the ``Boolean`` value ``True`` if the two rectangles are equal. Otherwise, it returns ``False``. + ''' + def NotEqual(self, Lhs: Rect, Rhs: Rect) -> bool: + ''' + Tests whether two rectangles are unequal. + + **Operator Inequality** returns the ``Boolean`` value ``True`` if the two rectangles are not equal. Otherwise, it returns ``False``. + ''' + def Add(self, Lhs: Rect, Rhs: Rect) -> Rect: + ''' + Calculates the `Union <System.Types.TRect.Union.htm>`__ of two rectangles. + + *Operator Addition* calculates the `Union <System.Types.TRect.Union.htm>`__ of two rectangles and returns a `Rect <System.Types.TRect.htm>`__ object. + ''' + # intersection of two rectangles + def Multiply(self, Lhs: Rect, Rhs: Rect) -> Rect: + ''' + Calculates the intersection of two rectangles. + + *Operator Multiply* calculates the *Intersection* of two rectangles and returns a `Rect <System.Types.TRect.htm>`__ object, which is the area the two rectangles have in common. + ''' + def Empty(self) -> Rect: + ''' + Creates an empty `Rect <System.Types.TRect.htm>`__ object. + + ``Empty`` creates an empty `Rect <System.Types.TRect.htm>`__ object, with the upper-left corner and the lower-right corner both in the point ``(0, 0)``. + ''' + #utility methods + #makes sure TopLeft is above and to the left of BottomRight + def NormalizeRect(self) -> None: + ''' + Normalizes the `Rect <System.Types.TRect.htm>`__ object. + + Use the ``NormalizeRect()`` method to normalize a `Rect <System.Types.TRect.htm>`__ object. + + .. note:: A normalized `Rect <System.Types.TRect.htm>`__ object is a rectangle with `Top <System.Types.TRect.Top.htm>`__ < `Bottom <System.Types.TRect.Bottom.htm>`__ or `Left <System.Types.TRect.Left.htm>`__ < `Right <System.Types.TRect.Right.htm>`__. + + .. note:: Several methods of `Rect <System.Types.TRect.htm>`__ (`Height <System.Types.TRect.Height.htm>`__, `Width <System.Types.TRect.Width.htm>`__, `IsEmpty <System.Types.TRect.IsEmpty.htm>`__, `PtInRect <System.Types.TRect.PtInRect.htm>`__, and so on) assume normalized `Rect <System.Types.TRect.htm>`__ objects, so use ``NormalizeRect`` if `Top <System.Types.TRect.Top.htm>`__ >* `Bottom <System.Types.TRect.Bottom.htm>`__ or `Left <System.Types.TRect.Left.htm>`__ >* `Right <System.Types.TRect.Right.htm>`__. + ''' + #returns true if left = right or top = bottom + def IsEmpty(self) -> bool: + ''' + Tests whether the rectangle is empty. + + ``IsEmpty()`` returns the ``Boolean`` value ``True`` if the rectangle is empty. Otherwise, it returns ``False``. + + .. note:: Before calling ``IsEmpty``, make sure the rectangle is normalized. + ''' + #returns true if the point is inside the rect + def Contains(self, Pt: Point) -> bool: + ''' + Tests whether a point or a rectangle is located within the rectangle. + + ``Contains()`` returns ``True`` if the received parameter is located within the rectangle. + + A point located on the `Top <System.Types.TRect.Top.htm>`__ or `Left <System.Types.TRect.Left.htm>`__ side of the rectangle is considered to be within the rectangle, while one located on the `Right <System.Types.TRect.Right.htm>`__ or `Bottom <System.Types.TRect.Bottom.htm>`__ side is considered to be outside of the rectangle. + ''' + # returns true if the rect encloses R completely + # def Contains(self, R: Rect) -> bool: + # returns true if any part of the rect covers R + def IntersectsWith(self, R: Rect) -> bool: + ''' + Tests whether two rectangles intersect. + + ``IntersectsWith()`` returns the ``Boolean`` value ``True`` if two rectangles intersect. Otherwise, it returns ``False``. + ''' + # computes an intersection of R1 and R2 + @overload + def Intersect(self, R1: Rect, R2: Rect) -> Rect: + ''' + Calculates the intersection between two rectangles. + + ``Intersect`` calculates the intersection between two rectangles and returns a `Rect <System.Types.TRect.htm>`__ object, which is the area the two rectangles have in common. + ''' + # replaces current rectangle with its intersection with R + @overload + def Intersect(self, R: Rect) -> None: + ''' + Calculates the intersection between two rectangles. + + ``Intersect`` calculates the intersection between two rectangles and returns a `Rect <System.Types.TRect.htm>`__ object, which is the area the two rectangles have in common. + ''' + # computes a union of R1 and R2 + def Union(self, R1: Rect, R2: Rect) -> Rect: + ''' + Calculates the union between two rectangles. + + ``Union()`` returns a `Rect <System.Types.TRect.htm>`__ object that represents the union between two rectangles. + ''' + # replaces current rectangle with its union with R + @overload + def Union(self, R: Rect) -> None: ... + # creates a minimal rectangle that contains all points from array Points + @overload + def Union(self, Points: list[Point]) -> Rect: ... + # offsets the rectangle origin relative to current position + @overload + def Offset(self, DX: int, DY: int) -> None: + ''' + Adds horizontal and vertical specified offsets. + + ``Offset`` does the following: + + - Adds the ``DX`` offset to the `Left <System.Types.TRect.Left.htm>`__ and `Right <System.Types.TRect.Right.htm>`__ properties. + - Adds the ``DY`` offset to the `Top <System.Types.TRect.Top.htm>`__ and `Bottom <System.Types.TRect.Bottom.htm>`__ properties. + ''' + @overload + def Offset(self, Point: Point) -> None: ... + # sets new origin + @overload + def SetLocation(self, X: int, Y: int) -> None: + ''' + Sets the location of a rectangle. + + ``SetLocation`` sets the location of a rectangle to the (``'X'``, ``'Y'``) or ``Point`` locations received as parameters. The location of the rectangle is represented by its upper-left corner. + ''' + @overload + def SetLocation(self, Point: Point) -> None: ... + # inflate by DX and DY + @overload + def Inflate(self, DX: int, DY: int) -> None: + ''' + Inflates the dimensions of the rectangle. + + ``Inflate`` increases the rectangle's dimensions by adding specified values to `Right <System.Types.TRect.Right.htm>`__ and `Bottom <System.Types.TRect.Bottom.htm>`__, and dropping specified values from `Top <System.Types.TRect.Top.htm>`__ and `Left <System.Types.TRect.Left.htm>`__. + + ``DX`` and ``DY`` are horizontal and vertical offsets, respectively. + + The values of the rectangle's properties (`Right <System.Types.TRect.Right.htm>`__, `Bottom <System.Types.TRect.Bottom.htm>`__, `Top <System.Types.TRect.Top.htm>`__, `Left <System.Types.TRect.Left.htm>`__) can be modified by using the ``DR``, ``DB``, ``DT``, ``DL`` parameters, respectively. + ''' + # inflate in all directions + @overload + def Inflate(self, DL: int, DT: int, DR: int, DB: int) -> None: ... + #returns the center point of the rectangle + def CenterPoint(self) -> Point: + ''' + Returns the center point of the rectangle. + ''' + @overload + def SplitRect(self, SplitType: SplitRectType, Size: int) -> Rect: + ''' + Returns a rectangle obtained from the current rectangle, applying the specified splitting rule. + + ``SplitRect()`` returns a rectangle obtained from the current rectangle by deleting of the specified by ``Size`` or ``Percent`` part of the current rectangle from the side specified by ``SplitType``. + + If a value of ``Size`` or ``Percent`` is negative, then ``SplitRect`` adds the specified by ``Size`` or ``Percent`` part of the current rectangle to the side specified by ``SplitType``. + + ``SplitType`` specifies which rectangle side (``Left``, ``Right``, ``Top`` or ``Bottom``) is moved when resizing a rectangle. For example, if ``srLeft`` is specified, then the left margin of the current rectangle is moved. + + ``Percent`` defines the part of the current rectangle to be deleted or added. That is, ``SplitRect()`` moves the ``SplitType`` side onto the specified ``Percent``. ``'0'`` corresponds to zero percent. ``'1'`` corresponds to ``100%`` percent. If ``Percent`` is positive, then the ``SplitType`` side is moved in the direction inside the current rectangle. Otherwise, the ``SplitType`` side is moved in the direction outside of the current rectangle. + + ``Size`` or defines the absolute size of the width or height of the part of the current rectangle to be deleted or added. That is, ``SplitRect()`` moves the ``SplitType`` side onto the specified ``Size`` distance. + ''' + @overload + def SplitRect(self, SplitType: SplitRectType, Percent: float) -> Rect: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ResourceStream(CustomMemoryStream): + '''TResourceStream is a memory stream that provides access to the compiled resources in an application. + Use TResourceStream to read the resources of an application. An instance of TResourceStream holds the value of a single resource in a memory buffer where it is accessible to the application. + The global ReadComponentRes function uses TResourceStream to access the compiled resources used by the application.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Create(self, Instance: int, ResName: str, ResType: PWideChar) -> None: + '''TResourceStream.Create(Instance: int, ResName: str, ResType: PWideChar) -> None + Creates an instance of TResourceStream associated with a particular resource name and type. + Call Create to instantiate a TResourceStream, passing in parameters that identify the resource in a specified instance. TResourceStream finds the resource data and loads it into the Memory buffer for the TResourceStream. + The Instance parameter is the instance handle associated with the executable or shared library that contains the resource. + In the first constructor syntax, the ResName is the string associated with the resource in the .rc file that was compiled with the application. If the resource is associated with an integer ID rather than a string, use the string representation of the integer after a pound sign. Thus, for example, a resource with an integer identifier of 128 be identified by a ResName of #128. + + Note: Specifying resources by ID requires less memory than specifying resources by name. + The ResType parameter is a string identifying the type of the resource. Applications can define their own resource types and identify them by name in the .rc file. In addition, there are a number of predefined resource types (which reflect Windows resource types). To identify a resource that is one of the predefined resource types, set ResType to the appropriate value from the following table: + + + + + + ResType + + Type of resource + + + + RT_ACCELERATOR + + + + Accelerator table + + + + + RT_BITMAP + + + + Bitmap resource + + + + + RT_DIALOG + + + + Dialog box + + + + + RT_FONT + + + + Font resource + + + + + RT_FONTDIR + + + + Font directory resource + + + + + RT_MENU + + + + Menu resource + + + + + RT_RCDATA + + + + Application-defined resource (raw data) + + + + + RT_STRING + + + + String-table entry + + + + + RT_MESSAGETABLE + + + + Message-table entry + + + + + RT_CURSOR + + + + Hardware-dependent cursor resource + + + + + RT_GROUP_CURSOR + + + + Hardware-independent cursor resource + + + + + RT_ICON + + + + Hardware-dependent icon resource + + + + + RT_GROUP_ICON + + + + Hardware-independent icon resource + + + + + RT_VERSION + + + + Version resource''' + def CreateFromID(self, Instance: int, ResID: int, ResType: PWideChar) -> None: + '''TResourceStream.CreateFromID(Instance: int, ResID: int, ResType: PWideChar) -> None''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys an instance of TResourceStream. + Do not call Destroy directly in an application to destroy an instance of TResourceStream. Instead, call Free. Free verifies that the TResourceStream reference is not nil, and only then calls Destroy. + Destroy frees the memory buffer that stores the resource before calling the inherited destructor.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def Write(self, Buffer, Count: int) -> int: + '''TResourceStream.Write(Buffer, Count: int) -> int + Overrides the inherited method to raise an exception when an attempt is made to write the resource back to the application. + Applications should not use a TResourceStream to write the resources of the running application. Write overrides the inherited method to raise an EStreamError exception when an application tries to write to the application's resources. + As all other data-writing methods of TResourceStream (WriteBuffer, WriteComponent) call Write to do the actual writing, calling any of the data-writing methods of TResourceStream will raise an exception.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class SaveDialog(OpenDialog): + '''TSaveDialog displays a "Save As" dialog for saving files. + TSaveDialog displays a modal Windows dialog box for selecting file names and saving files. The dialog does not appear at runtime until it is activated by a call to the Execute method. When the user clicks Save, the dialog closes and the selected file name is stored in the FileName property.''' + __hash__: ClassVar[None] = ... + FileName: Any + + def Execute(self) -> Any: + '''TOpenDialog.Execute() + Displays the dialog''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ScrollBar(WinControl): + ''' + ======================= + Vcl.StdCtrls.TScrollBar + ======================= + + ``ScrollBar`` is a *Windows* ``ScrollBar``, which is used to scroll the contents of a window, form, or control. + + Use ``ScrollBar`` to add a free-standing ``ScrollBar`` to a form. Many controls have properties that add ``ScrollBar``\ s which are an integral part of the control (``TControlScrollBar`` objects). ``ScrollBar`` allows controls that do not have integrated ``ScrollBar``\ s or groupings of controls to be scrolled when the user manipulates the ``ScrollBar`` object. + + When the bi-directional mode of a ``ScrollBar`` is changed, its coordinate system is reversed. Position zero in left-to-right mode is the left side, and position zero in right-to-left mode is the right side. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Kind: ScrollBarKind + ''' + Specifies whether the ``ScrollBar`` is horizontal or vertical. + + Set ``Kind`` to indicate the orientation of the ``ScrollBar``. These are the possible values: + + =================== ============================= + **Value** **Meaning** + =================== ============================= + ``sbHorizontal`` Scroll bar is horizontal + ``sbVertical`` Scroll bar is vertical + =================== ============================= + ''' + LargeChange: ScrollBarInc + ''' + Determines how much `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ changes when the user clicks the ``ScrollBar`` on either side of the thumb tab or presses PgUp or PgDn. + + Set ``LargeChange`` to specify how much to change the value of `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ when the user clicks on the side of the thumb tab (that is, on the thumb tab track, but not on the thumb tab itself). The `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ and `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ properties define the total range over which `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ can vary. + + For example, if `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ is 30000 and `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ is 0, the scroll box can assume 30,000 positions. If the ``LargeChange`` property setting is 10000 and the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ property is 0, the user can click the ``ScrollBar`` track three times after the thumb tab before it moves all the way to the end of the ``ScrollBar`` (30000 / 10000 = 3). + + ``LargeChange`` should correspond to the portion of this range that the user sees in one page or screen, expressed in the logical units used by the `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__, `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__, and `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ properties. + ''' + Max: int + ''' + Specifies the maximum position represented by the ``ScrollBar``. + + Set ``Max`` to the maximum value the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ property can take. The ``Max`` and `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ properties define the total range over which `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ can vary. + ''' + Min: int + ''' + Specifies the minimum position represented by the ``ScrollBar``. + + Set ``Min`` to the minimum value the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ property can take. The ``Min`` and `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ properties define the total range over which `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ can vary. + ''' + PageSize: int + ''' + Specifies the size of the thumb tab. + + ``PageSize`` is the size of the thumb tab, measured in the same units as `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__, `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__, and `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ (not pixels). + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.StdCtrls.TScrollBar.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + Position: int + ''' + Indicates the current position of the ``ScrollBar``. + + Read ``Position`` to determine the current position of the thumb tab. This value can be used to determine how to scroll any components controlled by the ``ScrollBar``. When the user scrolls the ``ScrollBar``, the value of ``Position`` changes. Set ``Position`` to programmatically move the thumb tab of the ``ScrollBar``. + + The number of possible positions on the ``ScrollBar`` is determined by the difference between the `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ property and the `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ property. If ``Position`` has the same value as `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__, the thumb tab appears at the far left of a horizontal ``ScrollBar`` or the top of a vertical ``ScrollBar``. If ``Position`` has the same value as `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__, the thumb tab appears at the far right of a horizontal ``ScrollBar`` or the bottom of a vertical ``ScrollBar``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + SmallChange: ScrollBarInc + ''' + Determines how much `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ changes when the user clicks the arrow buttons on the ``ScrollBar`` or presses the arrow keys on the keyboard. + + Set ``SmallChange`` to specify how much to change the value of `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ when the user clicks on the arrow buttons. The `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ and `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ properties define the total range over which `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ can vary. + + For example, if `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ is 100 and `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ is 0, the scroll box can assume 100 positions. If the ``SmallChange`` property setting is 5 and the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ property is 0, the user can click the down or right arrow button 20 times before the thumb tab is moved all the way to the end of the ``ScrollBar``. + + ``SmallChange`` should correspond to the portion of this range that the user sees as one line or one item, expressed in the logical units used by the `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__, `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__, and `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ properties. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def CanObserve(self, ID: int) -> bool: + ''' + No have docs. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def Change(self) -> None: + ''' + Called when the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ property changes. + + Override ``Change()`` in a derived class to perform actions when the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ of the ``ScrollBar`` changes. + + By default, ``Change()`` calls the `OnChange <Vcl.StdCtrls.TScrollBar.OnChange.htm>`__ event handler. + ''' + def Scroll(self, ScrollCode: ScrollCode, ScrollPos: int) -> None: + ''' + Triggers an ``OnScroll`` event with the given ``ScrollCode`` parameter and updates the ``ScrollPos`` variable that is passed. + + ``Scroll()`` is a protected routine in the `ScrollBar <Vcl.StdCtrls.TScrollBar.htm>`__ class that is used to trigger an ``OnScroll`` event, with the given ``ScrollCode`` parameter. + + ``Scroll()`` also updates the value of the ``ScrollPos`` variable that is passed. + + The following table gives the possible values for the ``ScrollCode`` parameter. + + ============== =================================================================================================================== + **Value** **Meaning** + ============== =================================================================================================================== + ``scLineUp`` User clicked the top or left scroll arrow or pressed the *Up* or ``Left`` arrow key. + ``scLineDown`` User clicked the bottom or right scroll arrow or pressed the *Down* or ``Right`` arrow key. + ``scPageUp`` User clicked the area to the left of the thumb tab or pressed the *PgUp* key. + ``scPageDown`` User clicked the area to the right of the thumb tab or pressed the *PgDn* key. + ``scPosition`` User positioned the thumb tab and released it. + ``scTrack`` User is moving the thumb tab + ``scTop`` User moved the thumb tab to the top or leftmost on the ``ScrollBar``. + ``scBottom`` User moved the thumb tab to the bottom or rightmost on the ``ScrollBar``. + ``scEndScrol`` User finished moving the thumb tab on the ``ScrollBar``. + ============== =================================================================================================================== + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of ``ScrollBar`` <Vcl.StdCtrls.TScrollBar.htm>`__. + + Call ``Create()`` to create an instance of ``ScrollBar`` <Vcl.StdCtrls.TScrollBar.htm>`__ at runtime. ``ScrollBar``\ s placed on a form at design time are created automatically. + + ``AOwner`` is the component that is responsible for freeing the ``ScrollBar``. This becomes the value of the ``Owner()`` property. + ''' + def SetParams(APosition, AMin: int, AMax: int) -> None: + ''' + Sets the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__, `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__, and `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__ property values all at once. + + Use the ``SetParams()`` method to set the `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__, `Min <Vcl.StdCtrls.TScrollBar.Min.htm>`__, and `Max <Vcl.StdCtrls.TScrollBar.Max.htm>`__ property values all at once, preventing repaints that would occur if each property value were set separately. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs immediately after the value of `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ changes. + + Write an ``OnChange`` event handler to control another object or group of objects using `ScrollBar <Vcl.StdCtrls.TScrollBar.htm>`__. Adjust the objects controlled by the ``ScrollBar`` to reflect the new value of `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__. + + ``OnChange`` occurs whether the value of `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ is changed by the user or programmatically. If the value of `Position <Vcl.StdCtrls.TScrollBar.Position.htm>`__ is changed by the user, ``OnChange`` occurs immediately after the `OnScroll <Vcl.StdCtrls.TScrollBar.OnScroll.htm>`__ event. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Target: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnScroll(self, Sender: Object, ScrollCode: ScrollCode, ScrollPos: int) -> None: + ''' + # OnScroll: ScrollEvent + Occurs when the user scrolls the ``ScrollBar`` with the mouse or keyboard. + + Write an ``OnScroll`` to alter the way the ``ScrollBar`` adjusts its position when the user scrolls the ``ScrollBar``. + + OnScroll is an event handler of type `Vcl.StdCtrls.TScrollEvent <Vcl.StdCtrls.TScrollEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Shape(GraphicControl): + ''' + =================== + Vcl.ExtCtrls.TShape + =================== + + ``Shape`` represents a geometric shape that can be drawn on a form. + + Add a ``Shape`` object to a form to draw a simple geometric shape on the ``Form``. ``Shape`` introduces properties to describe the pen used to outline the shape and the brush used to fill it. + + If the shape is only part of the image of a custom control, use the methods of the control's canvas instead. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + Brush: Brush + ''' + Specifies the color and pattern used for filling the shape control. + + ``Brush`` is a ``Brush`` object that represents the color and pattern that fill the interior of the shape. Use the properties and methods of TBrush to change the color or pattern of the shape object: + + .. code-block:: python + + Shape1.Brush.Color := clWhite; + Shape1->Brush->Color = clWhite; + + .. note:: Setting the ``Brush`` property assigns the properties of another ``Brush`` object to the shape's brush. The ``Shape`` object does not take ownership of the assigned object. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + Pen: Pen + ''' + Specifies the pen used to outline the shape control. + + Read ``Pen()`` to obtain the ``Pen`` object that represents the color and style of the line used to outline the shape. Use the properties of ``Pen`` to change the color or style. + + ``Pen`` is a ``Pen`` object that represents the color and style of the line used to outline the shape. Use the properties and methods of ``Pen`` to change the color or pattern of the ``Shape`` object: + + .. code-block:: python + + Shape1.Pen.Width := 1; + Shape1.Pen.Color := Red; + Shape1->Pen->Width = 1; + Shape1->Pen->Color = clRed; + + .. note:: Setting the ``Pen`` property assigns the properties of another ``Pen`` object to the shape's pen. The ``Shape`` object does not take ownership of the assigned object. + ''' + Shape: ShapeType + ''' + Specifies the shape of the control. + + Set ``Shape`` to the geometric shape that should be drawn on the ``Form``. The ``Shape`` property has these possible values: + + ======================= ============================================== + **Value** **Meaning** + ======================= ============================================== + ``stCircle`` The shape is a circle. + ``stEllipse`` The shape is an ellipse. + ``stRectangle`` The shape is a rectangle. (Default) + ``stRoundRect`` The shape is a rectangle with rounded corners. + ``stRoundSquare`` The shape is a square with rounded corners. + ``stSquare`` The shape is a square. + ======================= ============================================== + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def Create(self, AOwner: Component) -> None: + ''' + Creates an instance of `Shape <Vcl.ExtCtrls.TShape.htm>`__. + + Call `Shape <Vcl.ExtCtrls.TShape.htm>`__ indirectly, using the new keyword, to instantiate a `Shape <Vcl.ExtCtrls.TShape.htm>`__ object at runtime. Shapes added to a form at design time are created automatically. + + ``AOwner`` is the component, typically a form, that is responsible for freeing the ``Shape`` object. + ''' + def Destroy(self) -> None: + ''' + Destroys of an instance of `Shape <Vcl.ExtCtrls.TShape.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the object is not ``nil`` before it calls Destroy. + ''' + def StyleChanged(self, Sender: Object) -> None: + ''' + No have docs. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Rescaling event dispatcher. + + `ChangeScale <Vcl.Controls.TControl.ChangeScale.htm>`__ is called automatically when an event requires that the control resize itself. Most often, this event is a call to the ``ScaleBy()`` method of the control itself or the control's parent. This allows the control to adjust its own special properties, such as font sizes and display regions. + + `ChangeScale <Vcl.Controls.TControl.ChangeScale.htm>`__ parameters have the same meaning as for ``ScaleBy()``. + + .. note:: Because control sizes and coordinates are integers, scaling can result in round-off error. Repeated calls to `ChangeScale <Vcl.Controls.TControl.ChangeScale.htm>`__ can make the control gradually get smaller or slowly disappear from the ``Form``. Consider destroying and reloading the ``Form`` after several rescalings. + ''' + def Paint(self) -> None: + ''' + Renders the control's surface. + + The `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method is called automatically when a lightweight control needs to update its display area. Code in the `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ method uses the `Canvas <Vcl.Controls.TGraphicControl.Canvas.htm>`__ property to render the control surface. + + As implemented in `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__, `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ does nothing. Specific rendering logic is provided by `Paint <Vcl.Controls.TGraphicControl.Paint.htm>`__ methods in descendent control classes. + ''' + + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Size: + ''' + ================== + System.Types.TSize + ================== + + Specifies the ``Width`` and ``Height`` of an object. + + ``Size`` specifies the size of an object. The object can be a rectangle, a form, a ``Button``, and so on. Typically, the implied units of measurement are pixels. + + ``cx`` is the width. + + ``cy`` is the height. + ''' + + cx: int + ''' + Specifies the width of an object. Typically, the implied units of measurement are pixels. + ''' + cy: int + ''' + Specifies the height of an object. Typically, the implied units of measurement are pixels. + ''' + Width: int + ''' + Specifies the width of the `Size <System.Types.TSize.htm>`__ object. + ''' + Height: int + ''' + Specifies the height of the `Size <System.Types.TSize.htm>`__ object. + ''' + + @overload + def Create(self, P: Size) -> None: + ''' + Creates a `Size <System.Types.TSize.htm>`__ object. + + Use ``Create()`` to construct and initialize a new `Size <System.Types.TSize.htm>`__ object. To create a nonempty `Size <System.Types.TSize.htm>`__ object, send a `Size <System.Types.TSize.htm>`__ object, or a width and a height, through the constructor parameters. + ''' + @overload + def Create(self, X: int, Y: int) -> None: ... + # operator overloads + def Equal(self, Lhs: Size, Rhs: Size) -> bool: + ''' + Tests whether two `Size <System.Types.TSize.htm>`__ records are equal, by comparing their `cx <System.Types.TSize.cx.htm>`__ and `cy <System.Types.TSize.cy.htm>`__ values. + + It returns the ``Boolean`` value ``True`` if their `cx <System.Types.TSize.cx.htm>`__ properties are equal and their `cy <System.Types.TSize.cy.htm>`__ properties are equal. Otherwise, it returns ``False``. + ''' + def NotEqual(self, Lhs: Size, Rhs: Size) -> bool: + ''' + Tests whether two `SizeF <System.Types.TSizeF.htm>`__ records are unequal, by comparing their `cx <System.Types.TSizeF.cx.htm>`__ and `cy <System.Types.TSizeF.cy.htm>`__ values. + + It returns the ``Boolean`` value ``True`` if at least one of their `cx <System.Types.TSizeF.cx.htm>`__ or `cy <System.Types.TSizeF.cy.htm>`__ properties are unequal. Otherwise, it returns ``False``. + ''' + @overload + def Add(self, Lhs: Size, Rhs: Size) -> Size: + ''' + Calculates the sum between two `Size <System.Types.TSize.htm>`__ objects. + + Use ``Add()`` to add the ``Width`` and ``Height`` of one `Size <System.Types.TSize.htm>`__ object to the ``Width`` and ``Height`` of another `Size <System.Types.TSize.htm>`__ object. + ''' + @overload + def Add(self, Point: Size) -> Size: ... + @overload + def Subtract(self, Lhs: Size, Rhs: Size) -> Size: + ''' + Calculates the difference between two `Size <System.Types.TSize.htm>`__ objects. + + The `cx <System.Types.TSize.cx.htm>`__ property of the result is the difference between the `cx <System.Types.TSize.cx.htm>`__ value of the first `Size <System.Types.TSize.htm>`__ and the value of `cx <System.Types.TSize.cx.htm>`__ of the second `Size <System.Types.TSize.htm>`__. + + The `cy <System.Types.TSize.cy.htm>`__ property of the result is the difference between the `cy <System.Types.TSize.cy.htm>`__ value of the first `Size <System.Types.TSize.htm>`__ and the value of `cy <System.Types.TSize.cy.htm>`__ of the second `Size <System.Types.TSize.htm>`__. + ''' + @overload + def Subtract(self, Point: Size) -> Size: ... + # methods + def Distance(self, P2: Size) -> float: + ''' + Calculates the euclidean difference between two `Size <System.Types.TSize.htm>`__ objects. + ''' + def IsZero(self) -> bool: + ''' + Tests whether the width and the height of the `Size <System.Types.TSize.htm>`__ object are zero. + + ``IsZero()`` returns the ``Boolean`` value ``True`` if both the width and the height of the `Size <System.Types.TSize.htm>`__ object are zero. Otherwise, it returns ``False``. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class SpeedButton(CustomSpeedButton): + ''' + ======================== + Vcl.Buttons.TSpeedButton + ======================== + + ``SpeedButton`` is a ``Button`` that is used to execute commands or set modes. + + Use ``SpeedButton`` to add a ``Button`` to a group of buttons in a form. ``SpeedButton`` introduces properties that can be used to set graphical images that represent the different ``ButtonState``\ s (selected, unselected, disabled, and so on). Use other properties to specify multiple images or to rearrange the images and text on the button. ``SpeedButton`` also introduces properties that allow ``SpeedButton``\ s to work together as a group. ``SpeedButton``\ s are commonly grouped in panels to create specialized ``ToolBars`` and *Tool Palette*s. + + The recommended way to implement the button's response when the user clicks it is to assign an action from an ``ActionList`` as the value of the ``Action`` property. By setting the ``Action`` property, you make the button a client of the ``Action``, and the ``Action`` handles update the button's properties and respond when the user clicks the button. + + If you are not using an action to respond when the user clicks the button, then you can specify the button's response by writing an ``OnClick`` event handler. + + .. tip:: To create a ``SpeedButton`` with a client-aligned glyph that covers the button's edges, add a 1-pixel margin around the button's top and left edges and a 3-pixel margin around its bottom and right edges. Do this by manually editing the bitmap specified by the ``Glyph`` property'. + ''' + + __hash__: ClassVar[None] = ... + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AllowAllUp: bool + ''' + Specifies whether all ``SpeedButton``\ s in the group that contains this ``SpeedButton`` can be unselected at the same time. + + Use ``AllowAllUp`` with a group of buttons that belong to the same group. ``SpeedButton``\ s belong to the same group if they have the same value on their ``GroupIndex`` property. Buttons in the same group behave in a mutually exclusive fashion: when one button in the group is selected (down), all other buttons in the group become unselected (up). + + If ``AllowAllUp`` is ``True``, all of the ``SpeedButton``\ s in a group can be unselected at the same time. Clicking the single selected button in the group will deselect that button without selecting another. If ``AllowAllUp`` is ``False``, exactly one of the buttons in the group must be selected at any time. + + Clicking a down button won't return the button to its up state. + + Changing the value of the ``AllowAllUp`` property for one ``SpeedButton`` in a group changes the ``AllowAllUp`` value for all buttons in the group. + + .. note:: If Group``Index`` is zero, ``AllowAllUp`` has no effect. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + GroupIndex: int + ''' + Allows ``SpeedButton``\ s to work together as a group. + + Set ``GroupIndex`` to determine how the button behaves when clicked. + + When ``GroupIndex`` is 0, the button behaves independently of all other buttons on the ``Form``. When the user clicks such a ``SpeedButton``, the button appears pressed (in its clicked state) and then returns to its normal up state when the user releases the mouse button. + + When ``GroupIndex`` is greater than 0, the button remains selected (in its down state) when clicked by the user. When the user clicks a selected button, it returns to the up state, unless ``AllowAllUp`` is ``False``. Setting the ``GroupIndex`` property of a single ``SpeedButton`` to a value greater than 0 causes the button to behave as a two-state button when ``AllowAllUp`` is ``True``. + + ``SpeedButton``\ s with the same ``GroupIndex`` property value (other than 0) work together as a group. When the user clicks one of these buttons, it remains selected until the user clicks another ``SpeedButton`` belonging to the same group. ``SpeedButton``\ s used in this way can present mutually exclusive choices to the user. + ''' + Down: bool + ''' + Specifies whether the button is selected (down) or unselected (up). + + Read ``Down`` to determine whether a ``SpeedButton`` is selected. The ``Down`` property only applies if the ``GroupIndex`` property of the button is nonzero. + + When Group``Index`` is greater than 0, set ``Down`` to ``True`` to select a ``Button``. When the user clicks on a ``Button`` in the unselected (up) state, the button is selected and ``Down`` is set to ``True``. When the user clicks on a ``Button`` in the selected (down) state, if ``Caption`` is ``True``, the button becomes unselected and ``Down`` is set to ``False``. + + At design time, specify which button in a group is the initially selected button by setting the ``Down`` property of the selected button to ``True``. + + .. note:: When Group``Index`` is 0, buttons do not remain in the selected state when clicked. + ''' + DisabledImageIndex: ImageIndex + ''' + No have docs. + ''' + DisabledImageName: ImageName + ''' + ``DisabledImageName`` uses the name of the image when the UI is disabled. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the ``Caption``, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + ImageIndex: int + ''' + No have docs. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + Images: CustomImageList + ''' + No have docs. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + HotImageIndex: ImageIndex + ''' + No have docs. + ''' + HotImageName: ImageName + ''' + The name of the image is used when the cursor hovers over the UI. + ''' + Flat: bool + ''' + Determines whether the button has a 3D border that provides a raised or lowered look. + + Set *flat* to ``True()`` to remove the raised border when the button is unselected and the lowered border when the button is clicked or selected. When *flat* is ``True``, use separate bitmaps for the different ``ButtonState``\ s to provide visual feedback to the user about the ``ButtonState``. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Glyph: Bitmap + ''' + Specifies the bitmap that appears on the ``SpeedButton``. + + Set ``Glyph`` to a ``Bitmap`` object that contains the image that should appear on the face of the button. Bring up the ``OpenDialog`` box from the *Object Inspector* to choose a bitmap file (with a ``.bmp`` extension), or specify a bitmap file at runtime. + + ``Glyph`` can provide up to four images within a single bitmap. All images must be the same size and next to each other in a horizontal row. `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ displays one of these images depending on the state of the button. + + ================== ================ ================================================================================================================================== + **Image_position** **Button_state** *``Description``* + ================== ================ ================================================================================================================================== + ``First`` ``Up`` This image appears when the button is unselected. If no other images exist in the bitmap, this image is used for all states. + ``Second`` ``Disabled`` This image usually appears dimmed to indicate that the button can't be selected. + ``Third`` ``Clicked`` This image appears when the button is clicked. If ``GroupIndex`` is 0, the *Up* image reappears when the user releases the mouse button. + ``Fourth`` ``Down`` This image appears when the button stays down indicating that it remains selected. + ================== ================ ================================================================================================================================== + + If only one image is present, `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ attempts to represent the other states by altering the image slightly for each state, although the *Down* state is always the same as the *Up* state. + + If the bitmap contains multiple images, specify the number of images in the bitmap with the ``NumGlyphs`` property. + + .. note:: The lower left pixel of the bitmap is reserved for the "transparent" color. Any pixel in the bitmap that matches the lower left pixel will be transparent. + ''' + Layout: ButtonLayout + ''' + Determines where the image or text appears on the ``SpeedButton``. + + Set ``Layout`` to determine the position of the bitmap specified by the ``Glyph`` property' or the text specified by the ``Caption`` property. + ''' + Margin: int + ''' + Specifies the number of pixels between the edge of the button and the image or ``Caption`` drawn on its surface. + + Use ``Margin`` to specify the indentation of the image specified by the ``Glyph`` property' or the text specified by the ``Caption`` property. The edges that ``Margin`` separates depend on the ``Layout`` property. If ``Layout`` is ``blGlyphLeft``, the margin appears between the left edge of the image or ``Caption`` and the left edge of the button. If ``Layout`` is ``blGlyphRight``, the margin separates the right edges. If ``Layout`` is ``blGlyphTop``, the margin separates the top edges, and if ``Layout`` is ``blGlyphBottom``, the margin separates the bottom edges. + + If ``Margin`` is -1, the image or text is centered on the button. + ''' + NumGlyphs: NumGlyphs + ''' + Specifies the number of images included in the ``Glyph`` property'. + + Set ``NumGlyphs`` to the number of images provided by the bitmap assigned to the ``Glyph`` property'. All images must be the same size and next to each other in a row. The ``Glyph`` property' can provide up to four images. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + PressedImageIndex: ImageIndex + ''' + No have docs. + ''' + PressedImageName: ImageName + ''' + The name of the image is used when pressing the UI. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + SelectedImageIndex: ImageIndex + ''' + No have docs. + ''' + SelectedImageName: ImageName + ''' + The name of the image is used when selecting the UI. + ''' + Spacing: int + ''' + Determines where the image and text appear on a ``SpeedButton``. + + Set ``Spacing`` to the number of pixels that should appear between the image specified in the ``Glyph`` property' and the text specified in the ``Caption`` property. + + If ``Spacing`` is a positive number, its ``Value`` is the number of pixels between the image and text. If ``Spacing`` is 0, the image and text appear flush with each other. If ``Spacing`` is -1, the text appears centered between the image and the button edge. + ''' + Transparent: bool + ''' + Specifies whether the background of the button is transparent. + + Use ``Transparent`` to specify whether the background of the button is transparent. + + This property works only if the *flat* property of the ``SpeedButton`` is set to ``True``. + + When *Windows* themes are enabled, the ``Transparent`` property cannot make the button background transparent. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class SpinButton(WinControl): + ''' + ============================ + Vcl.Samples.Spin.TSpinButton + ============================ + + ``SpinButton`` allows the user to navigate through a range of values using the arrow buttons. + + A ``SpinButton`` is a control with two TimerSpeedButtons <Vcl.Samples.Spin.TTimerSpeedButton.htm>`__, each button displaying an arrow. ``SpinButton`` allows the navigation through a range of values using the arrow buttons to customize the value held by the control. Usually, it is used to increase or decrease the value of the focused control. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DownGlyph: Bitmap + ''' + The bitmap that appears on the *Down* button. + + ``DownGlyph`` represents the bitmap that appears on the *Down* button. You can provide up to four images (one for each state) within a single bitmap, depending on the value of the `DownNumGlyphs <Vcl.Samples.Spin.TSpinButton.DownNumGlyphs.htm>`__ property. All images must be the same size and next to each other in a row. + + The four states of the button are described in the following table: + ''' + DownNumGlyphs: NumGlyphs + ''' + Specifies the number of `Glyphs <Vcl.Buttons.TSpeedButton.Glyph.htm>`__ that appear on the *Down* button. + + ``DownNumGlyphs`` specifies the number of `Glyphs <Vcl.Buttons.TSpeedButton.Glyph.htm>`__ that appear on the *Down* button. If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the NumGlyphs property. The default ``Value`` is 1. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + FocusControl: WinControl + ''' + Designates a windowed control associated with the `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__. + + Use ``FocusControl()`` to set focus to a control. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + UpGlyph: Bitmap + ''' + The bitmap that appears on the *Up* button. + + ``UpGlyph`` specifies the bitmap that appears on the *Up* button. You can provide up to four images (one for each state) within a single bitmap, depending on the value of the `UpNumGlyphs <Vcl.Samples.Spin.TSpinButton.UpNumGlyphs.htm>`__ property. All images must be the same size and next to each other in a row. + + The four states of the button are described in the following table: + + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Button_state** | *``Description``* | + +==================+==============================================================================================================================================================================================================================================================================================+ + | *Up* | This image appears when the button is up. This image is also used when the button has focus (for example, if the user tabs to it); in this case, a focus rectangle is drawn around the button. If no other images exist in the bitmap, bit buttons also use this image for all other states. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | *Disabled* | This image usually appears dimmed to indicate that the button cannot be selected. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | *Clicked* | This image appears when the button is clicked. The Up image reappears when the user releases the mouse button. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | *Down* | This image appears when the button stays down. | + +------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + UpNumGlyphs: NumGlyphs + ''' + Number of `Glyphs <Vcl.Buttons.TSpeedButton.Glyph.htm>`__ that appear on the *Up* button. + + ``UpNumGlyphs`` specifies the number of `Glyphs <Vcl.Buttons.TSpeedButton.Glyph.htm>`__ that appear on the *Up* button. If you have multiple images in a bitmap, you must specify the number of images that are in the bitmap with the NumGlyphs property. The default ``Value`` is 1. + ''' + StyleElements: StyleElements + ''' + Specifies the `style elements <Vcl.Controls.TStyleElements.htm>`__ that are used by the control. + + Use ``StyleElements`` to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + ``StyleElements`` is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + + .. note:: If you use custom glyphs and you want to draw custom images with styles you must disable ``seClient``. + ''' + StyleName: str + ''' + No have docs. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def Loaded(self) -> None: + ''' + Initializes the control after it is loaded from a *Stream*. + + ``Loaded()`` overrides the inherited method in order to set the button bounds. + + Do not call ``Loaded()``. The *VCL Streaming* system calls ``Loaded()`` automatically after the control's form is loaded into memory so that the control can complete any initializations that depend on other objects in the ``Form``. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to *KeyPress* events. + + The ``KeyDown()`` responds to *KeyPress* events. + + ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) are combined with the keystroke. + + The ``Key`` parameter is one of the following keyboard keys: *Space*, *Down*, or *Up*. + + If ``Key`` is ``Down``, the `OnDownClick <Vcl.Samples.Spin.TSpinButton.OnDownClick.htm>`__ event is handled, if Up - `OnUpClick <Vcl.Samples.Spin.TSpinButton.OnUpClick.htm>`__, and if Space - the click event for the focused button. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being destroyed. + + ``Notification()`` responds to notifications indicating that the focus controls are about to be destroyed. + + ``Notification()`` calls the `Notification <Vcl.Controls.TControl.Notification.htm>`__ inherited method. + + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def Create(self, AOwner: Component) -> None: + ''' + Creates and initializes a `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__ instance. + + The ``Create()`` method creates and initializes a `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__ instance. + ''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + ''' + Sets the ``Left``, ``Top``, ``Width``, and ``Height`` properties of the control in a single operation. + + ``SetBounds()`` sets the ``Left``, ``Top``, ``Width``, and ``Height`` properties of the control in a single operation. Specify the values for the ``Left``, ``Top``, ``Width``, and ``Height`` properties as the value of the ``ALeft``, ``ATop``, ``AWidth``, and ``AHeight`` parameters, respectively. The same effect can be achieved by setting the ``Left``, ``Top``, ``Width``, and ``Height`` properties separately. + + ``SetBounds()`` calls the `SetBounds <Vcl.Controls.TWinControl.SetBounds.htm>`__ inherited method. + ''' + + def OnDownClick(self, Sender: Object) -> None: + ''' + # OnDownClick: NotifyEvent + Occurs when the user clicks the down button of the `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__. + + Use the ``OnDownClick`` event handler to specify what happens with the focused control value when the user clicks the down button of the `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUpClick(self, Sender: Object) -> None: + ''' + # OnUpClick: NotifyEvent + Occurs when the user clicks the up button of the `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__. + + Use the ``OnUpClick`` event handler to specify what happens with the focused control value when the user clicks the up button of the `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class SpinEdit(CustomEdit): + ''' + ========================== + Vcl.Samples.Spin.TSpinEdit + ========================== + + ``SpinEdit`` combines a `Edit <Vcl.StdCtrls.TEdit.htm>`__ box with a `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__. + + A ``SpinEdit`` component is a `Edit <Vcl.StdCtrls.TEdit.htm>`__ with a `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__ attached. The `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ of the ``Edit`` box is numerical. By pressing the up and down buttons of `SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__, the `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ is increased or decreased. + ''' + + __hash__: ClassVar[None] = ... + Button: SpinButton + ''' + Specifies the ``SpinButton <Vcl.Samples.Spin.TSpinButton.htm>`__ of the ``SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__. + + ``Button`` is a read-only property that specifies the spin button of the ``SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSelect: bool + ''' + Determines whether all the text in the ``Edit`` control is automatically selected when the control gets focus. + + Set `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ to select all the text when the ``Edit`` control gets focus. `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ only applies to single-line ``Edit`` controls. + + Use `AutoSelect <Vcl.StdCtrls.TCustomEdit.AutoSelect.htm>`__ when the user is more likely to replace the text in the ``Edit`` control than to append to it. + ''' + AutoSize: bool + ''' + Determines whether the height of the ``Edit`` control automatically resizes to accommodate the text. + + Use `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ to make the ``Edit`` control adjust its size automatically so the client area accommodates the height of the text. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``False``, the ``Edit`` control has a fixed height. When `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ is ``True``, the size of the control is readjusted whenever a change occurs that could affect the height of the control, such as a change to the font or border style. + + .. note:: `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ only adjusts the height of the ``Edit`` control. Even with `AutoSize <Vcl.StdCtrls.TCustomEdit.AutoSize.htm>`__ set to ``True``, text in the ``Edit`` control may appear truncated if it extends beyond the width of the control. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + EditorEnabled: bool + ''' + Specifies whether `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ can be edited. + + ``EditorEnabled`` specifies whether `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ can be edited or not. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Increment: int + ''' + Specifies the increment value. + + ``Increment`` specifies the increment used to increase or decrease the `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ property by clicking one of the `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ buttons or using the *Up* and *Down* keys while `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ is focused. + ''' + MaxLength: int + ''' + Specifies the maximum number of characters the user can enter into the ``Edit`` control. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the number of characters that can be entered into the ``Edit`` control. A value of 0 indicates that there is no application-defined limit on the length. + + Use `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ to limit the length of the text in an ``Edit`` control if that text will be copied into a fixed-length buffer. + + .. note:: Setting `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ will not truncate the existing text, it merely prevents the user from adding more text after reaching the limit of `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ characters. + + .. note:: Even when `MaxLength <Vcl.StdCtrls.TCustomEdit.MaxLength.htm>`__ is 0, there may be limitations imposed by the operating system on the number of characters that may be entered into an ``Edit`` control. + + .. note:: The unit of ``MaxLength`` is characters (not bytes) if the application is using themes. + ''' + MaxValue: int + ''' + Specifies the maximum value. + + ``MaxValue`` specifies the maximum `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ that `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ can take. + ''' + MinValue: int + ''' + Specifies the minimum value. + + ``MinValue`` specifies the minimum `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__ that `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ can take. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can change the text of the ``Edit`` control. To restrict the ``Edit`` control to display only, set the `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ property to ``True``. Set `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``False`` to allow the contents of the ``Edit`` control to be edited. + + Setting `ReadOnly <Vcl.StdCtrls.TCustomEdit.ReadOnly.htm>`__ to ``True`` ensures that the text is not altered, while still allowing the user to select text. The selected text can then be manipulated by the application, or copied to the ``Clipboard``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Value: int + ''' + Specifies the value listed in the `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__. + + ``Value`` specifies the value listed in the `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__. The value can be changed by clicking one of the `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ buttons or using the *Up* and *Down* keys while `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ is focused. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + + def IsValidChar(self, Key: str) -> bool: + ''' + Verifies whether the pressed key is valid. + + ``IsValidChar`` verifies whether the pressed key is valid. ``IsValidChar()`` returns ``True`` if the ``Key`` is ``'+'``, ``'-'``, or one of the number keys. + ''' + def UpClick(self, Sender: Object) -> None: + ''' + Is the control's action in response to a mouse click on the up button of the `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__. + + ``UpClick()`` is called automatically when the user left-clicks the up button of the control. The method increases the ``Edit`` box's `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__. + ''' + def DownClick(self, Sender: Object) -> None: + ''' + Represents the control's action in response to a mouse click on the down button of the `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__. + + ``DownClick()`` is called automatically when the user left-clicks the down button of the control. The method decreases the ``Edit`` box's `Value <Vcl.Samples.Spin.TSpinEdit.Value.htm>`__. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + ``KeyDown()`` responds to key press events considering the ``Key`` parameter. + + ``Shift`` indicates which *Shift* keys (*Shift*, *Ctrl*, or *Alt*) were down when the user moved the mouse. + + The ``Key`` parameter can be either the *Down* or *Up* keyboard key. If the key is *Up*, then the method calls `UpClick <Vcl.Samples.Spin.TSpinEdit.UpClick.htm>`__; if the key is Down, then the method calls `DownClick <Vcl.Samples.Spin.TSpinEdit.DownClick.htm>`__. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds to keyboard input. + + ``KeyPress()`` responds to key press events. The method uses `IsValidChar <Vcl.Samples.Spin.TSpinEdit.IsValidChar.htm>`__ to validate the key. + + The ``Key`` parameter is a keyboard key. ``KeyPress()`` calls the `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__ inherited method. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window creation parameter record passed in the ``Params`` parameter. + + The `CreateWnd <Vcl.Samples.Spin.TSpinEdit.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. + + `CreateWnd <Vcl.Samples.Spin.TSpinEdit.CreateWnd.htm>`__ calls the inherited method and then specifies the style for the created window. + ''' + def CreateWnd(self) -> None: + ''' + Creates a *Windows* control corresponding to the ``Edit`` control. + + ``CreateWnd()`` is called when the ``Edit`` control is created and whenever a change to the ``Edit`` control requires the window to be re-created. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ instance. + + The ``Create()`` method creates and initializes a `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ instance. + ''' + def Destroy(self) -> None: + ''' + Destroys a `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ instance. + + The ``Destroy()`` method destroys a `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ instance. ``Destroy()`` calls the `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ inherited method. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + The method is blank. + + `SpinEdit <Vcl.Samples.Spin.TSpinEdit.htm>`__ has no need to call a specified method for the control's child, so ``GetChildren()`` doesn't perform any action. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs when the text for the ``Edit`` control may have changed. + + Write an `OnChange <Vcl.StdCtrls.TCustomEdit.OnChange.htm>`__ event handler to take specific action whenever the text for the ``Edit`` control may have changed. Use the `Modified <Vcl.StdCtrls.TCustomEdit.Modified.htm>`__ property to see if a change actually occurred. The ``Text`` property of the ``Edit`` control will already be updated to reflect any changes. This event provides the first opportunity to respond to modifications that the user types into the ``Edit`` control. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Splitter(GraphicControl): + ''' + ====================== + Vcl.ExtCtrls.TSplitter + ====================== + + ``Splitter`` divides the client area of a form into resizable panes. + + Add a ``Splitter`` to a form between two aligned controls to allow users to resize the controls at runtime. The ``Splitter`` sits between a control aligned to one edge of the ``Form`` and the controls that fill up the rest of the client area. Give the ``Splitter`` the same alignment as the control that is anchored to the edge of the ``Form``. When the user moves the ``Splitter``, it resizes the anchored control. This, in turn, changes the client area of the ``Form``, and the controls that fill up the rest of the client area resize accordingly. + + Use each control on the ``Form`` as a separate pane. After each pane is placed, place a ``Splitter`` with the same alignment to allow that pane to be resized. The last pane to be placed on the ``Form`` should be client-aligned, so that it resizes automatically to fill up the remaining space after all other panes are resized. + ''' + + __hash__: ClassVar[None] = ... + Canvas: Canvas + ''' + Provides the drawing surface used by the graphic control. + + Use the properties of the `Canvas <Vcl.Graphics.TCanvas.htm>`__ object to draw or paint on the surface of the control. + + Since a `GraphicControl <Vcl.Controls.TGraphicControl.htm>`__ instance does not have its own *Windows* *Screen* object, it obtains its device context from its parent control. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + AutoSnap: bool + ''' + Determines whether neighboring objects are resized to zero when the splitter is used to make them smaller than ``MinSize``. + + Set ``AutoSnap`` to ``False`` to prevent the splitter from resizing neighboring objects to zero when the user tries to make them smaller than ``MinSize``. When ``AutoSnap`` is ``False``, such resize attempts are simply blocked, leaving the neighboring object with a size of ``MinSize``. The default value of ``AutoSnap`` is ``True``. + ''' + Beveled: bool + ''' + Determines whether the ``Splitter`` looks beveled along the edge that moves. + + Set ``Beveled`` to ``False()`` to remove the beveled edges from the ``Splitter``. Set ``Beveled`` to ``True`` to give the edge a 3D beveled look. + + The bevel on a ``Splitter`` runs in a single direction only: along the edges the user moves to resize neighboring objects. Thus, if the ``Align`` property is ``alLeft`` or ``alRight``, the vertical edges of the ``Splitter`` are beveled. If the ``Align`` property is ``alTop`` or ``alBottom``, the horizontal edges of the ``Splitter`` are beveled. The default value of ``Beveled`` is ``False``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Cursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when it passes into the region covered by the control. + + Change the value of `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ to provide feedback to the user when the mouse pointer enters the control. The value of `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ is the index of the cursor in the list of cursors maintained by the global variable, `Screen <Vcl.Forms.Screen.htm>`__. In addition to the built-in cursors provided by `Screen <Vcl.Forms.TScreen.htm>`__, applications can add custom cursors to the list. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + MinSize: int + ''' + Specifies the minimum size, in pixels, of the panes on either side of the ``Splitter``. + + Set ``MinSize`` to provide a minimum size the ``Splitter`` must leave when resizing its neighboring control. For example, if the ``Align`` property is ``alLeft`` or ``alRight``, the ``Splitter`` cannot resize the regions to its left or right any smaller than ``MinSize`` pixels. If the ``Align`` property is ``alTop`` or ``alBottom``, the ``Splitter`` cannot resize the regions above or below it any smaller than ``MinSize`` pixels. The default value of ``MinSize`` is 30. + + .. note:: Always set ``MinSize`` to a value less than half the client width of its parent. When ``MinSize`` is half the client width of the ``Splitter``\ s. parent, the ``Splitter`` cannot move because to do so would be to resize one of the panes less than ``MinSize`` pixels. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ResizeStyle: ResizeStyle + ''' + Specifies the effect of moving the ``Splitter``. + + Use ``ResizeStyle`` to determine what happens when the user moves the ``Splitter`` with the mouse. + + ``ResizeStyle`` can have one of the values in the following table: + + ============= ==================================================================================================================================================================================================================================================================== + **Value** **Meaning** + ============= ==================================================================================================================================================================================================================================================================== + ``rsNone`` Moving the ``Splitter`` with the mouse has no effect. + ``rsLine`` A line is drawn indicating the new position of the ``Splitter`` that would result if the user released the mouse at the current position. The ``Splitter`` does not actually move and no controls are resized. + ``rsUpdate`` The control against which the ``Splitter`` is aligned is resized based on the current mouse position, and the ``Splitter`` is moved to that position. + ``rsPatter`` A pattern is drawn indicating the new position of the ``Splitter`` that would result if the user released the mouse at the current position. The ``Splitter`` does not actually move and no controls are resized. This is the default value for ``ResizeStyle``. + ============= ==================================================================================================================================================================================================================================================================== + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `Splitter <Vcl.ExtCtrls.TSplitter.htm>`__. + + Call ``Create()`` to instantiate a ``Splitter`` at runtime. `Splitter <Vcl.ExtCtrls.TSplitter.htm>`__ objects placed on forms at design time are created automatically. + + ``AOwner`` specifies the ``Form`` whose surface the ``Splitter`` divides. + ''' + def Destroy(self) -> None: + ''' + Frees the memory associated with the ``Splitter``. + + Do not call ``Destroy()`` directly. Instead, call ``Free()``, which checks that the ``Splitter`` is not ``nil`` before calling ``Destroy()``. + ''' + def CanResize(self, NewSize: int) -> bool: + ''' + Determines how the ``Splitter`` responds to mouse moves. + + ``CanResize()`` is called by the `DoCanResize <Vcl.ExtCtrls.TSplitter.DoCanResize.htm>`__ method to generate an `OnCanResize <Vcl.ExtCtrls.TSplitter.OnCanResize.htm>`__ event. The ``NewSize`` parameter indicates the size the associated control will have if the ``Splitter`` is allowed to perform the resize. ``CanResize()`` returns a ``Boolean`` value that indicates whether the value specified by ``NewSize`` should be applied by redrawing the line (when `ResizeStyle <Vcl.ExtCtrls.TSplitter.ResizeStyle.htm>`__ is ``rsLine``) or resizing the associated control (when `ResizeStyle <Vcl.ExtCtrls.TSplitter.ResizeStyle.htm>`__ is ``rsUpdate``); + + Unless an `OnCanResize <Vcl.ExtCtrls.TSplitter.OnCanResize.htm>`__ event handler sets the value of ``NewSize`` and the return value, ``CanResize()`` returns ``True`` without changing the ``NewSize`` parameter. + + .. note:: ``CanResize()`` is not called if the value of `ResizeStyle <Vcl.ExtCtrls.TSplitter.ResizeStyle.htm>`__ is ``rsNone`` when the user presses the mouse button. + ''' + def DoCanResize(self, NewSize: int) -> bool: + ''' + Generates an ``OnCanResize`` event and enforces the ``MinSize`` property. + + ``DoCanResize()`` is called automatically when the user moves the mouse after pressing the mouse button on the ``Splitter``. The ``NewSize`` parameter indicates the size the associated control will have if the ``Splitter`` is allowed to perform the resize. ``DoCanResize()`` returns a ``Boolean`` value that indicates whether the value specified by ``NewSize`` should be applied by redrawing the line (when ``ResizeStyle`` is ``rsLine``) or resizing the associated control (when ``ResizeStyle`` is ``rsUpdate``). + + ``DoCanResize`` calls ``CanResize()`` to generate an ``OnCanResize`` event. If, after calling the event handler, ``NewSize`` is less than the value of ``MinSize``, ``NewSize`` is changed to zero. + + .. note:: ``DoCanResize`` is not called if the value of ``ResizeStyle`` is ``rsNone`` when the user presses the mouse button. + ''' + def MouseDown(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseDown <FMX.Controls.TControl.OnMouseDown.htm>`__ event dispatcher. + + ``FMX.StdCtrls.TSplitter.MouseDown`` inherits from `FMX.Controls.TControl.MouseDown <FMX.Controls.TControl.MouseDown.htm>`__. All content below this line refers to `FMX.Controls.TControl.MouseDown <FMX.Controls.TControl.MouseDown.htm>`__. + + A control calls `MouseDown <FMX.Controls.TControl.MouseDown.htm>`__ in response to any of mouse-down messages, decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'``, and ``'Y'`` parameters, respectively: + + - ``Button`` determines which mouse button is pressed: left, right, or middle. + - ``Shift`` indicates which *Shift* keys--*Shift*, *Ctrl*, *Alt*, and *CMD* (only for Mac)--were down when the user pressed the mouse button. + - ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. If ``Button`` is ``mbLeft``, `MouseDown <FMX.Controls.TControl.MouseDown.htm>`__ sets `PressedPosition <FMX.Controls.TControl.PressedPosition.htm>`__ as a PointF <System.Types.TPointF.htm>`__ (``'X'``, ``'Y'``). + ''' + def MouseMove(self, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseMove <FMX.Controls.TControl.OnMouseMove.htm>`__ event dispatcher. + + ``FMX.StdCtrls.TSplitter.MouseMove`` inherits from `FMX.Controls.TControl.MouseMove <FMX.Controls.TControl.MouseMove.htm>`__. All content below this line refers to `FMX.Controls.TControl.MouseMove <FMX.Controls.TControl.MouseMove.htm>`__. + + As the mouse cursor moves across a control, this method is called repeatedly. Each time it is called with the new coordinates that reflect the continuous path of the mouse cursor across the screen real estate covered by the control's visual representation: + + - ``Shift`` indicates which *Shift* keys--*Shift*, *Ctrl*, *Alt*, and *CMD* (only for Mac)--were down when the mouse cursor is over the control. + - ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + Override the protected `MouseMove <FMX.Controls.TControl.MouseMove.htm>`__ method to provide other responses when the mouse cursor moves over the control. + ''' + def MouseUp(self, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + `OnMouseUp <FMX.Controls.TControl.OnMouseUp.htm>`__ event dispatcher. + + ``FMX.StdCtrls.TSplitter.MouseUp`` inherits from `FMX.Controls.TControl.MouseUp <FMX.Controls.TControl.MouseUp.htm>`__. All content below this line refers to `FMX.Controls.TControl.MouseUp <FMX.Controls.TControl.MouseUp.htm>`__. + + `OnMouseUp <FMX.Controls.TControl.OnMouseUp.htm>`__ event dispatcher. + + A control calls `MouseUp <FMX.Controls.TControl.MouseUp.htm>`__ in response to any of mouse-up messages, decoding the message parameters into the shift-key state and position, which it passes in the ``Shift``, ``'X'`` and ``'Y'`` parameters, respectively: + + - ``Button`` determines which mouse button was previously pressed: left, right, or middle. + - ``Shift`` indicates which *Shift* keys--*Shift*, *Ctrl*, *Alt*, and *CMD* (only for Mac)--were down when the pressed mouse button is released. + - ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer within the client area of the control. + + Override the protected `MouseUp <FMX.Controls.TControl.MouseUp.htm>`__ method to provide other responses when the mouse button previously pressed is released while the cursor is over the control. + ''' + def Paint(self) -> None: + ''' + Draws the image of the ``Splitter``. + + The ``Paint()`` method is called automatically when the ``Splitter`` receives ``WM_PAINT`` messages from its Parent. ``Paint()`` draws the background color of the ``Splitter``, and if ``Beveled`` is ``True``, draws a bevel along the movable edges. After drawing the background and bevel, ``Paint()`` generates an `OnPaint <Vcl.ExtCtrls.TSplitter.OnPaint.htm>`__ event. + ''' + def RequestAlign(self) -> None: + ''' + Changes the cursor when the alignment of the splitter changes. + + ``RequestAlign()`` changes the cursor from crHSplit to ``crVSplit`` when the ``Align`` property changes to ``alBottom`` or ``alTop``. It changes the cursor from ``crVSplit`` to ``crHSplit`` when the ``Align`` property changes to any other value. + + If the ``Cursor`` property is not ``crHSplit`` or ``crVSplit``, ``RequestAlign()`` has no effect. + + Override ``RequestAlign()`` to suppress the automatic cursor change or to implement a different association between alignment and the ``Splitter``\ s. cursor. + ''' + def StopSizing(self) -> None: + ''' + Cleans up after the splitter has resized its neighboring control. + + This protected procedure is called when the user releases the mouse or hits the *Escape* key while using the splitter to resize a control. ``StopSizing`` makes sure that the resize line is no longer visible and generates an ``OnMoved`` event. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `Splitter <Vcl.ExtCtrls.TSplitter.htm>`__. + + Call ``Create()`` to instantiate a ``Splitter`` at runtime. `Splitter <Vcl.ExtCtrls.TSplitter.htm>`__ objects placed on forms at design time are created automatically. + + ``AOwner`` specifies the ``Form`` whose surface the ``Splitter`` divides. + ''' + def Destroy(self) -> None: + ''' + Frees the memory associated with the ``Splitter``. + + Do not call ``Destroy()`` directly. Instead, call ``Free()``, which checks that the ``Splitter`` is not ``nil`` before calling ``Destroy()``. + ''' + + def OnCanResize(self, Sender: Object, NewSize: int, Accept: bool) -> None: + ''' + # OnCanResize: CanResizeEvent + Occurs when the user tries to move the ``Splitter`` with the mouse. + + Write an ``OnCanResize`` event handler to conditionally prevent the user from resizing neighboring components using the ``Splitter``. + + ``OnCanResize`` is an event handler of type `Vcl.ExtCtrls.TCanResizeEvent <Vcl.ExtCtrls.TCanResizeEvent.htm>`__. + ''' + def OnMoved(self, Sender: Object) -> None: + ''' + # OnMoved: NotifyEvent + Occurs after the user has retiled the ``Form`` using the splitter. + + Write an ``OnMoved`` event handler to take specific action when the user finishes dragging the edge of the neighboring control using the splitter. For example, after resizing a control on the edge of the ``Form``, use an ``OnMoved`` event handler to update the layout of the new client area of the ``Form``. Use the ``ClientRect`` property of the ``Form`` to determine the new size remaining. + ''' + def OnPaint(self, Sender: Object) -> None: + ''' + # OnPaint: NotifyEvent + Occurs when the ``Splitter`` needs to draw itself. + + Write an ``OnPaint`` event handler to customize the appearance of the ``Splitter``. For example, use an ``OnPaint`` event handler to give a ``Splitter`` the appearance of the ``Splitter``\ s that appear in ``CoolBar`` objects. Use the ``Canvas`` property as a drawing surface for painting the ``Splitter``. Use the ``ClientRect`` property to determine the coordinates of the canvas on which to paint the ``Splitter``. + + When a ``Splitter`` object receives a ``WM_PAINT`` message, it paints its background before generating the ``OnPaint`` event. If the Beveled property is ``True``, the beveled appearance will also be added before the ``OnPaint`` event. Most applications set Beveled to ``False`` when using the ``OnPaint`` event to customize the appearance of the ``Splitter``. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class StaticText(CustomStaticText): + ''' + ======================== + Vcl.StdCtrls.TStaticText + ======================== + + ``StaticText`` is a windowed control that displays text on a form. + + The ``StaticText`` component functions like `Label <Vcl.StdCtrls.TLabel.htm>`__, except that it descends from ``WinControl`` and therefore has a window handle. Use ``StaticText`` instead of `Label <Vcl.StdCtrls.TLabel.htm>`__ when the component's accelerator key must belong to a windowed control--for example, on an ``ActiveX`` property page. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Determines how text is aligned within the component. + + The possible values of `Alignment <Vcl.StdCtrls.TCustomStaticText.Alignment.htm>`__ are + + =================== ============================================ + **Value** **Meaning** + =================== ============================================ + ``taLeftJustify`` Text is aligned at the left of the control. + ``taCenter`` Text is centered in the control. + ``taRightJustify`` Text is aligned at the right of the control. + =================== ============================================ + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Determines whether the component is automatically resized to accommodate its text. + + If `AutoSize <Vcl.StdCtrls.TCustomStaticText.AutoSize.htm>`__ is ``True``, the component is automatically resized-- at runtime and design time-- whenever the font size or `Caption <Vcl.Controls.TControl.Caption.htm>`__ text changes. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Determines the appearance of the control's border. + + Use `BorderStyle <Vcl.StdCtrls.TCustomStaticText.BorderStyle.htm>`__ to specify the appearance of the border, if any, that appears around the text. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the ``Caption``, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + FocusControl: WinControl + ''' + Links the component with another windowed control. + + Use the `FocusControl <Vcl.StdCtrls.TCustomStaticText.FocusControl.htm>`__ property to link the `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ instance with another windowed control. If the text of `Caption <Vcl.Controls.TControl.Caption.htm>`__ includes an accelerator key, the component specified by `FocusControl <Vcl.StdCtrls.TCustomStaticText.FocusControl.htm>`__ receives focus when the accelerator is pressed. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.StdCtrls.TStaticText.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowAccelChar: bool + ''' + Enables accelerator characters. + + If `ShowAccelChar <Vcl.StdCtrls.TCustomStaticText.ShowAccelChar.htm>`__ is ``True``, an ampersand in the component's `Caption <Vcl.Controls.TControl.Caption.htm>`__ text appears as an underline and makes the character after it into an accelerator key. If `ShowAccelChar <Vcl.StdCtrls.TCustomStaticText.ShowAccelChar.htm>`__ is ``False``, ampersands appear as ampersands. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether the background of the image obscures objects below the image object. + + Set `Transparent <Vcl.StdCtrls.TCustomStaticText.Transparent.htm>`__ to ``True`` to allow objects behind the `CustomStaticText <Vcl.StdCtrls.TCustomStaticText.htm>`__ object to show through the background of the image. Set `Transparent <Vcl.StdCtrls.TCustomStaticText.Transparent.htm>`__ to ``False`` to make the background of the image opaque. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class StatusBar(CustomStatusBar): + '''TStatusBar represents a status bar. + The TStatusBar component is a row of panels, usually aligned at the bottom of a form, that display information about an application as it runs. Each panel is represented by a TStatusPanel object listed in the Panels property. The SimplePanel property can be used to toggle the status bar at runtime between a single- and multiple-panel display.''' + __hash__: ClassVar[None] = ... + Action: BasicAction + '''BasicAction: Specifies the action associated with the control. + Action is the action object that is associated with the control. Actions allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an OnClick event). + To create actions at design time, place an action list component on a form or data module. Double-click the action list to bring up the action list editor. Add actions in the editor using its context menu. Once the actions have been added using the Action List editor, they appear in the drop-down list for the Action property in the Object Inspector.''' + Align: Align + '''Align: Determines how the control aligns within its container (parent control). + Use Align to align a control to the top, bottom, left, or right of a form or panel and have it remain there even if the size of the form, panel, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the top, bottom, left, or right edge of the parent. + For example, to use a panel component with various controls on it as a tool palette, change the panel's Align value to alLeft. The value of alLeft for the Align property of the panel guarantees that the tool palette remains on the left side of the form and always equals the client height of the form. + The default value of Align is alNone, which means a control remains where it is positioned on a form or panel. + + Tip: If Align is set to alClient, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the form and pressing ESC, or by using the Object Inspector. + Any number of child components within a single parent can have the same Align value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + Note: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the Anchors property instead.''' + Anchors: Anchors + '''Anchors: Specifies how the control is anchored to its parent. + Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its Anchors property set to [akLeft, akRight], the control stretches when the width of its parent changes. + Anchors is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the form is created in a maximized state, the control is not stretched because the form is not resized after the control is created. + + Note: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the Align property instead. Unlike Anchors, Align allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size.''' + AutoHint: bool + '''bool: Specifies whether the status bar's text is set automatically to the current hint. + Use AutoHint to specify whether the status bar's text is set automatically to the current hint. When AutoHint is True, the status bar automatically responds to hint actions by displaying the long version of the hint's text in the first panel.''' + BiDiMode: BiDiMode + '''BiDiMode: Specifies the bidirectional mode for the control. + Use BiDiMode to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from right to left instead of left to right. The bidirectional mode controls the reading order for the text, the placement of the vertical scroll bar, and whether the alignment is changed. + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ftSmallint, ftInteger, ftWord, ftFloat, ftCurrency, ftBCD, ftDate, ftTime, ftDateTime, ftAutoInc.''' + BorderWidth: int + '''int: Specifies the width of the control's border. + Use BorderWidth to get or set the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border.''' + Color: int + '''int: Specifies the background color of the control. + Use Color to read or change the background color of the control. + If a control's Vcl.Controls.TControl.ParentColor property is True, then changing the Color property of the control's parent automatically changes the Color property of the control. When the value of the Color property is changed, the control's ParentColor property is automatically set to False. + The Color of a TLabel is always the color of the background unless you set TLabel.Transparent to False.''' + Constraints: SizeConstraints + '''SizeConstraints: Specifies the size constraints for the control. + Use Constraints to specify the minimum and maximum width and height of the control. When Constraints contains maximum or minimum values, the control cannot be resized to violate those constraints. + + Note: Constraints apply to the height of the form. However, the height of the form depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the ClientHeight when you design your form and set the constraints in the FormCreate event. In the following example, ClientHeight is represented by x: Constraints.MinHeight?:= x + Height - ClientHeight. + Warning: Do not set up constraints that conflict with the value of the Align or Anchors property. When these properties conflict, the response of the control to resize attempts is not well-defined.''' + ControlCount: Any + '''Returns the count of contained controls''' + Controls: Any + '''Returns an iterator over contained controls''' + DoubleBuffered: bool + '''bool: Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + When DoubleBuffered is false, the windowed control paints itself directly to the window. When DoubleBuffered is true, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + Note: Some controls, such as TRichEdit, can't paint themselves into a bitmap. For such controls, DoubleBuffered must be set to false.''' + DragCursor: int + '''int: Specifies the image used to represent the mouse pointer when the control is being dragged. + Use the DragCursor property to change the cursor image presented when the control is being dragged. + + Note: To make a custom cursor available for the DragCursor property, see the Cursor property.''' + DragKind: DragKind + '''DragKind: Specifies whether the control is being dragged normally or for docking. + Use DragKind to get or set whether the control participates in drag-and-drop operations or drag-and-dock operations.''' + DragMode: DragMode + '''DragMode: Specifies how the control initiates drag-and-drop or drag-and-dock operations. + Use DragMode to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the DragMode property value to dmManual. Enable automatic dragging by setting DragMode to dmAutomatic. For more information about dmManual and dmAutomatic, see TDragMode.''' + Enabled: bool + '''bool: Controls whether the control responds to mouse, keyboard, and timer events. + Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. + To re-enable a control, set Enabled to True. + + Note: This property applies to all TControl descendants.''' + Focused: Any + '''Determines whether the control has input focus.''' + Font: Font + '''Font: Specifies the attributes of text written on or in the control. + To change to a new font, specify a new TFont object. To modify a font, change the value of the Charset, Color, Height, Name , Pitch, Size, or Style of the TFont object. + + Note: Changing the font color of the Caption is not supported for some controls (such as TButton). In most cases, there is an alternate control you can use whose Font property will change the color of the caption or text (such as TBitBtn or TSpeedButton).''' + Handle: Any + '''Provides access to the underlying Windows screen object for the control.''' + HandleAllocated: Any + '''Reports whether a screen object handle exists for the control.''' + OnClick: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnContextPopup: Callable[[Object, Point, bool], None] + '''Callable[[Object, Point, bool], None]:''' + OnCreatePanelClass: Callable[[CustomStatusBar, StatusPanelClass], None] + '''Callable[[CustomStatusBar, StatusPanelClass], None]:''' + OnDblClick: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnDragDrop: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnDragOver: Callable[[Object, Object, int, int, DragState, bool], None] + '''Callable[[Object, Object, int, int, DragState, bool], None]:''' + OnDrawPanel: Callable[[StatusBar, StatusPanel, Rect], None] + '''Callable[[StatusBar, StatusPanel, Rect], None]:''' + OnEndDock: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnEndDrag: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnGesture: Callable[[Object, GestureEventInfo, bool], None] + '''Callable[[Object, GestureEventInfo, bool], None]:''' + OnHint: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseActivate: Callable[[Object, MouseButton, ShiftState, int, int, int, MouseActivate], None] + '''Callable[[Object, MouseButton, ShiftState, int, int, int, MouseActivate], None]:''' + OnMouseDown: Callable[[Object, MouseButton, ShiftState, int, int], None] + '''Callable[[Object, MouseButton, ShiftState, int, int], None]:''' + OnMouseEnter: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseLeave: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseMove: Callable[[Object, ShiftState, int, int], None] + '''Callable[[Object, ShiftState, int, int], None]:''' + OnMouseUp: Callable[[Object, MouseButton, ShiftState, int, int], None] + '''Callable[[Object, MouseButton, ShiftState, int, int], None]:''' + OnResize: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnStartDock: Callable[[Object, DragDockObject], None] + '''Callable[[Object, DragDockObject], None]:''' + OnStartDrag: Callable[[Object, DragObject], None] + '''Callable[[Object, DragObject], None]:''' + Panels: StatusPanels + '''StatusPanels: Lists the panels (TStatusPanel objects) in the status bar. + The Panels property holds a TStatusPanels, that is, a collection of TStatusPanel objects. At design time, you can add, remove, or modify panels with the Panels editor. To open the Panels editor, select the Panels property in the Object Inspector, then double-click in the Value column to the right or click the ellipsis (...) button. + At design time, you can add, remove, or modify panels with the Panels editor: + + To open the Panels editor from the the Object Inspector, select the Panels property and either double-click in the Value column to the right or click the ellipsis (...) button. + To open the Panels editor from the Form Designer, right-click TStatusBar and select Panels editor from the context menu.''' + ParentBiDiMode: bool + '''bool: Specifies whether the control uses its parent's BiDiMode. + Use ParentBiDiMode to get or set whether the control uses its parent's BiDiMode. When ParentBiDiMode is true, the control's BiDiMode property is always equal to that of its parent. If ParentBiDiMode is false, the control uses its own BiDiMode property. + Set ParentBiDiMode to true for all controls in a form to ensure that the entire user interface adjusts to Middle Eastern locales in a uniform manner. + When the value of the control's BiDiMode property changes, ParentBiDiMode becomes false automatically.''' + ParentColor: bool + '''bool: Specifies where a control looks for its color information. + To have a control use the same color as its parent control, set ParentColor to True. If ParentColor is False, the control uses its own Color property. + Set ParentColor to True for all controls to ensure that all the controls on a form have a uniform appearance. For example, if ParentColor is True for all controls in a form, changing the background color of the form to gray causes all the controls on the form to also have a gray background. + When the value of a control's Color property changes, ParentColor becomes False automatically.''' + ParentDoubleBuffered: bool + '''bool: ParentDoubleBuffered defers the DoubleBuffered property of this component to the value of the parent's DoubleBuffered property. + ParentDoubleBuffered is a boolean indicating that the DoubleBuffered property of this component is overridden by the value of the parent's DoubleBuffered property.''' + ParentFont: bool + '''bool: Specifies where a control looks for its font information. + To have a control use the same font as its parent control, set ParentFont to true. If ParentFont is false, the control uses its own Font property. Many controls default ParentFont to true so that all the controls in a form or other container present a uniform appearance. When the value of a control's Font property changes, ParentFont becomes false automatically. + When ParentFont is true for a form, the form uses the default font. Currently, the default font is Tahoma 8 pt.''' + ParentShowHint: bool + '''bool: Specifies where a control looks to find out if its Help Hint should be shown. + Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them. + If ParentShowHint is True, the control uses the ShowHint property value of its parent. If ParentShowHint is False, the control uses the value of its own ShowHint property. + To provide Help Hints only for selected controls on a form, set the ShowHint property for those controls that should have Help Hints to True, and ParentShowHint becomes False automatically. + + Note: Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.''' + ParentWindow: Any + '''Reference to parent's underlying control.''' + PopupMenu: PopupMenu + '''PopupMenu: Specifies the pop-up menu associated with the control. + Assign a value to PopupMenu to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the TPopupMenu's AutoPopup property is True, the pop-up menu appears automatically. If the menu's AutoPopup property is False, display the menu with a call to its Popup method from the control's OnContextPopup event handler.''' + ShowHint: bool + '''bool: ShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control. + ShowHint determines whether the Help Hint appears for the control. The Help Hint is the value of the TControl.Hint property. The Help Hint appears in a box just beneath the control when the mouse pointer moves over the control. + To enable Help Hints for a particular control, two conditions must be satisfied: + + The application's ShowHint property must be True. + Either the control's own ShowHint property must be True, or the control's ParentShowHint property must be True and its parent's ShowHint property must be True. + For example, imagine a check box within a group box. If the ShowHint property of the group box is True and the ParentShowHint property of the check box is True, but the ShowHint property of the check box is False, the check box still displays its Help Hint. + Changing the ShowHint value automatically sets the ParentShowHint property to False.''' + Showing: Any + '''Indicates whether the control is showing on the screen.''' + SimplePanel: bool + '''bool: Determines whether the status bar displays a single panel or multiple panels. + If SimplePanel is set to True, the status bar consists of a single panel displaying the text in SimpleText. If SimplePanel is set to False, the status bar displays a separate panel for each item in its Panels property. + + Note: When SimplePanel is False, you cannot use the SimpleText property to display text in the status bar. Instead, you must set the Text property on one of the panel objects.''' + SimpleText: str + '''str: Contains a text string to be displayed in the status panel when SimplePanel is True. + + Note: Microsoft Windows XP and earlier versions limited the size of the string to 127 chars. Under Microsoft Windows Vista, Windows 7, or later Windows operating systems, SimpleText has no such limit.''' + SizeGrip: bool + '''bool: Determines whether the status bar is resizable at run time. + If SizeGrip is set to True, the status bar has a triangular grip on the lower right corner. The user can resize the status bar by dragging the grip with the mouse. + A size grip will not be drawn unless the Parent property refers to the child of a TCustomForm descendant with a BorderStyle of bsSizeable or bsSizeToolWin. + + Note: If Align is set to alBottom, alRight, or alClient, the sizing grip will not work. If the Alignment property of the last panel in the status bar is set to taRightJustify, the sizing grip will truncate the panel's text.''' + StyleElements: StyleElements + '''StyleElements: Specifies the style elements that are used by the control. + Use StyleElements to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + StyleElements is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled.''' + StyleName: str + '''str: Embarcadero Technologies does not currently have any additional information.''' + Touch: TouchManager + '''TouchManager: Specifies the touch manager component associated with the control. + Use the Touch property to access gesturing options associated with a control. Touch specifies a class of type TTouchManager. + Touch is used to: + + Associate a TGestureManager. + (TGestureManager manages all the gestures that can be used by the control.) + Select the standard, interactive, or custom gestures to associate with the control. + (You can also connect each gesture to an action; see Assigning Actions to Gestures.) + Specify a set of options for interactive or tablet gestures.''' + UseSystemFont: bool + '''bool: Specifies whether the status bar uses the system font. + UseSystemFont specifies whether the status bar uses the system font. To change fonts, use the Font property.''' + Visible: bool + '''bool: Specifies whether the component appears onscreen. + Use the Visible property to control the visibility of the control at run time. If Visible is True, the control appears. If Visible is False, the control is not visible. + Calling the Show method sets the control's Visible property to True. Calling the Hide method sets it to False. + For TCustomForm descendants, the Show and ShowModal methods set Visible to True and bring the form to the front of all open windows. + For TTabSheet descendants, Visible does not control the visibility of the control at run time. For more information, see the description of the TabVisible property.''' + + def CanFocus(self) -> Any: + '''TWinControl.CanFocus() + Indicates whether a control can receive focus.''' + def SetFocus(self) -> Any: + '''TWinControl.SetFocus() + Gives the input focus to the control.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Stream(Object): + ''' + ====================== + System.Classes.TStream + ====================== + + ``Stream`` is the base class type for ``Stream`` objects that can read from or write to various kinds of storage media, such as disk files, dynamic memory, and so on. + + Use specialized ``Stream`` objects to read from, write to, or copy information stored in a particular medium. Each descendant of ``Stream`` implements methods for transferring information to and from a particular storage medium, such as a disk file, dynamic memory, and so on. In addition to methods for reading, writing, and copying bytes to and from the ``Stream``, ``Stream`` objects permit applications to seek to an arbitrary position in the ``Stream``. Properties of ``Stream`` provide information about the ``Stream``, such as its size and the current position in the ``Stream``. + + ``Stream`` also introduces methods that work in conjunction with components and filers for loading and saving components in simple and inherited forms. These methods are called automatically by global routines that initiate component streaming. They can also be called directly to initiate the streaming process. Note, however, that component streaming always involves two additional objects: + + - A component object that is passed as a parameter to the ``Stream``\ s. methods. + - A filer object that is automatically created by the ``Stream``, and associated with the ``Stream``. + + Descendant ``Stream`` objects, such as memory and file ``Stream``\ s used for component streaming, are created automatically by the global functions `ReadComponentRes <System.Classes.ReadComponentRes.htm>`__ and `WriteComponentRes <System.Classes.TStream.WriteComponentRes.htm>`__. For streaming other kinds of information, choose a descendent class according to the specific data and storage needs. These include: + + - `FileStream <System.Classes.TFileStream.htm>`__ -- for working with files. + - `StringStream <System.Classes.TStringStream.htm>`__ -- for manipulating in-memory strings. + - `MemoryStream <System.Classes.TMemoryStream.htm>`__ -- for working with a memory buffer. + - `WinSocketStream <System.Win.ScktComp.TWinSocketStream.htm>`__ -- for reading and writing over a socket connection. + - `OleStream <Vcl.AxCtrls.TOleStream.htm>`__ -- for using a *COM* interface to read and write. + ''' + + __hash__: ClassVar[None] = ... + Position: int + ''' + Indicates the current offset into the stream for reading and writing. + + Use ``Position()`` to obtain the current position of the stream. This is the number of bytes from the beginning of the streamed data. + ''' + Size: int + ''' + Indicates the size in bytes of the stream. + + Use ``Size`` to find the size of the stream. ``Size`` is used internally in routines that read and write to and from the stream. Setting the ``Size`` property of `Stream <System.Classes.TStream.htm>`__ does nothing. However, descendants of `Stream <System.Classes.TStream.htm>`__ can override this property to allow applications to change the size of the resource accessed using the stream. + + The ``Size`` property typically indicates the size of the stream in bytes. But a descendent of `Stream <System.Classes.TStream.htm>`__ can use ``-1`` to indicate an unknown size. When the size is unknown, use the return value from Stream.Read <System.Classes.TStream.Read.htm>`__ to determine end of the stream. + ''' + + @overload + def Read(self, Buffer: int, Count: int) -> int: + ''' + Methods responsible for reading up to ``Count`` bytes of data from the stream into ``Buffer``. + + Descendant stream classes can define its own ``Read()`` methods that read data from its particular storage medium (such as memory or a disk file) into a ``Buffer`` buffer. + + ``Read()`` is used in cases where the number of bytes to read from the stream is not necessarily fixed. + + ``Read()`` attempts to read, into ``Buffer``, up to ``Count`` bytes from the stream, starting at the current `position <System.Classes.TStream.Position.htm>`__, and then advances the current position in the stream by the number of bytes actually transferred. ``Read()`` returns the number of bytes actually read, which may be less than ``Count``. + + ``Offset`` specifies a zero-based position in ``Buffer`` from which to write the first byte into ``Buffer``. + + All the other data-reading methods of a stream (`ReadBuffer <System.Classes.TStream.ReadBuffer.htm>`__, `ReadData <System.Classes.TStream.ReadData.htm>`__) call ``Read()`` to do their actual reading. + ''' + @overload + def Read(self, Buffer: Bytes, Offset: int, Count: int) -> int: ... + @overload + def Read(self, Buffer: Bytes, Count: int) -> int: ... + @overload + def Write(self, Buffer: int, Count: int) -> int: + ''' + Methods responsible for writing up to ``Count`` bytes from ``Buffer`` to the stream. + + ``Write()`` attempts to write up to ``Count`` bytes from the ``Buffer`` to the current `position <System.Classes.TStream.Position.htm>`__ in the stream, and returns the number of bytes written. After writing to the stream, ``Write()`` advances the current position by the number of bytes written. + + ``Offset`` specifies a zero-based position in ``Buffer`` of the first byte to write. + + All other data-writing methods of a stream (`WriteBuffer <System.Classes.TStream.WriteBuffer.htm>`__, `WriteData <System.Classes.TStream.WriteData.htm>`__) call ``Write()`` to do their actual writing. + + Each descendent stream object defines a ``Write()`` method that writes data to its particular storage medium (such as memory or a disk file). + ''' + @overload + def Write(self, Buffer: Bytes, Offset: int, Count: int) -> int: ... + @overload + def Write(self, Buffer: Bytes, Count: int) -> int: ... + def Read64(self, Buffer: Bytes, Offset: int, Count: int) -> int: + ''' + No have docs. + ''' + def Write64(self, Buffer: Bytes, Offset: int, Count: int) -> int: + ''' + No have docs. + ''' + @overload + def ReadData(self, Buffer: Pointer, Count: int) -> int: + ''' + Methods responsible for reading up to ``Count`` but not more than ``SizeOf(Buffer)`` bytes from the stream into ``Buffer``. + + ``ReadData()`` is used in cases, where the number of bytes to read from the stream is not necessarily fixed. + + ``ReadData()`` works using the following algorithms: + + - When ``ReadData()`` does not have the ``Count`` parameter, then ``ReadData()`` tries to read the ``SizeOf(Buffer)`` number of bytes, then advances the current position in the stream by the number of bytes transferred. ``ReadData()`` returns the number of bytes read. + - When ``ReadData()`` has the ``Count`` parameter, then: + + - If ``Count`` ``> SizeOf(Buffer)``, then ``ReadData()`` tries to read the ``SizeOf(Buffer)`` number of bytes. ``ReadData()`` advances the current position in the stream by ``Count`` number of bytes. ``ReadData()`` returns ``Count``. + - If ``Count`` ``<= SizeOf(Buffer)``, then ``ReadData()`` tries to read up to the ``Count`` number of bytes from the stream. ``ReadData()`` advances the current position in the stream by the number of bytes transferred. ``ReadData()`` returns the number of bytes read. + + ``ReadData()`` methods call `Read <System.Classes.TStream.Read.htm>`__ to do their actual reading. + ''' + @overload + def ReadData(self, Buffer: Bytes, Count: int) -> int: ... + @overload + def ReadData(self, Buffer: bool) -> int: ... + @overload + def ReadData(self, Buffer: str) -> int: ... + @overload + def ReadData(self, Buffer: str, Count: int) -> int: ... + @overload + def ReadData(self, Buffer: int) -> int: ... + @overload + def ReadData(self, Buffer: int, Count: int) -> int: ... + @overload + def ReadData(self, Buffer: float) -> int: ... + @overload + def ReadData(self, Buffer: float, Count: int) -> int: ... + @overload + def ReadData(self, Buffer: Extended80Rec) -> int: ... + @overload + def ReadData(self, Buffer: Extended80Rec, Count: int) -> int: ... + @overload + def ReadBuffer(self, Buffer: int, Count: int) -> None: ... + @overload + def ReadBuffer(self, Buffer: Bytes, Count: int) -> None: ... + @overload + def ReadBuffer(self, Buffer: Bytes, Offset: int, Count: int) -> None: ... + @overload + def WriteData(self, Buffer: Bytes, Count: int) -> int: + ''' + Methods responsible for writing up to ``Count`` bytes from ``Buffer`` to the stream. + + ``WriteData()`` is used in cases, where the number of bytes to write to the stream is not necessarily fixed. + + ``WriteData()`` works using the following algorithms: + + - When ``WriteData()`` does not have the ``Count`` parameter, then ``WriteData()`` tries to write the ``SizeOf(Buffer)`` number of bytes. ``WriteData()`` advances the current position in the stream by the number of bytes transferred. ``WriteData()`` returns the number of bytes written. + - When ``WriteData()`` has the ``Count`` parameter, then: + + - If ``Count`` ``> SizeOf(Buffer)``, then ``WriteData()`` tries to write the ``SizeOf(Buffer)`` number of bytes. ``WriteData()`` advances the current position in the stream by the ``Count`` number of bytes. + - If ``Count`` ``<= SizeOf(Buffer)``, then ``WriteData()`` tries to write up to the ``Count`` number of bytes to the stream and then advances the current position in the stream by the number of bytes transferred. ``WriteData()`` returns the number of bytes written, which may be less than ``Count``. + + ``WriteData()`` methods call `Write <System.Classes.TStream.Write.htm>`__ to do their actual writing. + ''' + @overload + def WriteData(self, Buffer: Pointer, Count: int) -> int: ... + @overload + def WriteData(self, Buffer: bool) -> int: ... + @overload + def WriteData(self, Buffer: str) -> int: ... + @overload + def WriteData(self, Buffer: str, Count: int) -> int: ... + @overload + def WriteData(self, Buffer: int) -> int: ... + @overload + def WriteData(self, Buffer: int, Count: int) -> int: ... + @overload + def WriteData(self, Buffer: float) -> int: ... + @overload + def WriteData(self, Buffer: float, Count: int) -> int: ... + @overload + def WriteData(self, Buffer: Extended80Rec) -> int: ... + @overload + def WriteData(self, Buffer: Extended80Rec, Count: int) -> int: ... + def Seek32(self, Offset: int, Origin: SeekOrigin) -> int: + ''' + No have docs. + ''' + @overload + def Seek(self, Offset: int, Origin: int) -> int: + ''' + Moves to a specified position in the streamed resource. + + Call ``Seek()`` to move the current position of the stream in its particular storage medium (such as memory or a disk file). + + The ``Origin`` parameter indicates how to interpret the ``Offset`` parameter. Origin should be one of the following values: + + ================= =============================================================================================================================== + **Value** **Meaning** + ================= =============================================================================================================================== + ``soBeginning`` Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be ``>= 0``. + ``soCurrent`` Offset is from the current position in the resource. Seek moves to `Position <System.Classes.TStream.Position.htm>`__ Offset. + ``soEnd`` Offset is from the end of the resource. Offset must be <= 0 to indicate a number of bytes before the end of the file. + ================= =============================================================================================================================== + + ``Seek()`` returns the new value of the `Position <System.Classes.TStream.Position.htm>`__ property. + + ``Seek()`` is called by the `Position <System.Classes.TStream.Position.htm>`__ and `Size <System.Classes.TStream.Size.htm>`__ properties. + + .. note:: As implemented in `Stream <System.Classes.TStream.htm>`__, the two versions (the 32-bit or 64-bit syntax) call each other. Descendent stream classes must override at least one of these versions, and the override must not call the inherited default implementation. + ''' + @overload + def Seek(self, Offset: int, Origin: SeekOrigin) -> int: ... + @overload + def Seek(self, Offset: int, Origin: int) -> int: ... + @overload + def ReadBufferData(self, Buffer: bool) -> None: + ''' + Methods responsible for reading fixed ``Count`` or ``SizeOf(Buffer)`` number of bytes from the stream into ``Buffer``. + + Use ``ReadBufferData()`` to read exactly the fixed ``Count`` or ``SizeOf(Buffer)`` number of bytes from the stream into a typed ``Buffer``. ``ReadBufferData()`` raises an `EReadError <System.Classes.EReadError.htm>`__ exception if ``ReadBufferData()`` cannot read exactly the specified number of bytes. + + ``ReadBufferData()`` works using the following algorithms: + + - When ``ReadBufferData()`` does not have the ``Count`` parameter, then ``ReadBufferData()`` tries to read the ``SizeOf(Buffer)`` number of bytes, then advances the current position in the stream by the number of bytes transferred. If the number of bytes transferred is not ``= SizeOf(Buffer)``, then ``ReadBufferData()`` raises an `EReadError <System.Classes.EReadError.htm>`__ exception. + - When ``ReadBufferData()`` has the ``Count`` parameter, then ``ReadBufferData()`` calls `ReadData <System.Classes.TStream.ReadData.htm>`__ to read the ``Count`` bytes. If a reported number of transferred bytes is not equal to ``Count``, then ``ReadBufferData()`` raises an `EReadError <System.Classes.EReadError.htm>`__ exception. + + ``ReadBufferData()`` calls `ReadData <System.Classes.TStream.ReadData.htm>`__ to do the actual reading. + ''' + @overload + def ReadBufferData(self, Buffer: str) -> None: ... + @overload + def ReadBufferData(self, Buffer: str, Count: int) -> None: ... + @overload + def ReadBufferData(self, Buffer: int) -> None: ... + @overload + def ReadBufferData(self, Buffer: int, Count: int) -> None: ... + @overload + def ReadBufferData(self, Buffer: float) -> None: ... + @overload + def ReadBufferData(self, Buffer: float, Count: int) -> None: ... + @overload + def ReadBufferData(self, Buffer: Extended80Rec) -> None: ... + @overload + def ReadBufferData(self, Buffer: Extended80Rec, Count: int) -> None: ... + @overload + def WriteBuffer(self, Buffer: int, Count: int) -> None: + ''' + Writes ``Count`` bytes from ``Buffer`` onto the stream. + + ``WriteBuffer()`` attempts to write ``Count`` bytes from the ``Buffer`` to the current `position <System.Classes.TStream.Position.htm>`__ in the stream, then ``WriteBuffer()`` advances the current position by ``Count``. If the stream fails to write all the requested bytes, an `EWriteError <System.Classes.EWriteError.htm>`__ exception is raised. + + ``Offset`` specifies a zero-based position in ``Buffer`` of the first byte to write. + + Use ``WriteBuffer()`` to save data to a stream. ``WriteBuffer()`` is used in cases, where the number of bytes to write is known and required, for example when writing in structures. Use ``WriteBuffer()`` for standard file I/O streaming. + + ``WriteBuffer()`` is used internally for writing to a stream. It is used by other objects, such as strings and lists, for writing strings stored in a buffer. + + ``WriteBuffer()`` calls `Write <System.Classes.TStream.Write.htm>`__ to handle the actual writing. + ''' + @overload + def WriteBuffer(self, Buffer: Bytes, Count: int) -> None: ... + @overload + def WriteBuffer(self, Buffer: Bytes, Offset: int, Count: int) -> None: ... + + def WriteBufferData(self, Buffer: int, Count: int) -> None: + ''' + Writes up to ``'4'`` four or ``Count`` bytes from ``Buffer`` onto the stream. + + ``WriteBufferData()`` works using the following algorithms: + + - If ``Count`` ``<= 4``, then ``WriteBufferData()`` tries to write up to ``Count`` bytes to the stream starting at the current `position <System.Classes.TStream.Position.htm>`__ and advances the current position in the stream by the number of bytes transferred. + - If ``Count`` ``> 4``, then ``WriteBufferData()`` tries to write up to ``'4'`` four bytes to the stream, starting at the current `position <System.Classes.TStream.Position.htm>`__, and then advances the current position in the stream until ``Count`` number of bytes from the initial position that was before the starting of ``WriteBufferData()`` execution. + ''' + def CopyFrom(self, Source: Stream, Count: int, BufferSize: int) -> int: + ''' + The ``CopyFrom()`` copies a specified number of bytes from one stream to another. + + You can use ``CopyFrom()`` to perform the following actions: + + - Copy data from one stream to a different one. + - Eliminate the need to create, read into, write from, and free a buffer when copying data. + + When ``CopyFrom()`` copies the ``Count`` bytes from the stream specified by the ``Source`` into another stream, it moves the current position by ``Count`` bytes and returns the number of bytes copied. + + If ``Count`` is 0, ``CopyFrom()`` sets ``Source`` position to 0 before reading then copies the entire contents of ``Source`` into the stream. If ``Count`` is greater than or less than 0, ``CopyFrom()`` reads from the current position in Source. + + If ``Count`` is -1, ``Stream.CopyFrom`` allows copying streams with unknown size (that is, ``Size`` equals to -1) by copying all available content. + + .. warning:: If the ``Count()`` is greater than the SourceStream size, ``ReadBuffer()`` throws an exception stating that a stream read error has occurred. This happens because the ``CopyFrom()`` method uses ``ReadBuffer()`` and ``WriteBuffer()``. This doesn't happen if you pass -1 as Count, as indicated above. + + .. note:: In version 11 the method has been optimized and now allows for better performance in case of a large Count. + ''' + def ReadComponent(self, Instance: Component) -> Component: + ''' + Initiates streaming of components and their properties. ``ReadComponent()`` is called indirectly by the global routine `ReadComponentRes <System.Classes.ReadComponentRes.htm>`__, by the `ReadComponentRes <System.Classes.TStream.ReadComponentRes.htm>`__ method, or it can be called directly to initiate component streaming. + + ``ReadComponent()`` reads data values from the stream and assigns them to ``Instance``\ s. properties. It then constructs a reader object and calls the reader's `ReadRootComponent <System.Classes.TReader.ReadRootComponent.htm>`__ method to read the ``Instance``\ s. property values and construct child objects defined in the stream as children of ``Instance``. ``ReadComponent()`` returns the component. + + If ``Instance`` is ``nil`` (Delphi) or ``NULL`` (C++), ``ReadComponent()`` constructs a component based on the type information in the stream and returns the newly-constructed component. + ''' + def ReadComponentRes(self, Instance: Component) -> Component: + ''' + Reads components and their properties from a stream in a resource file format. + + ``ReadComponentRes()`` is called automatically by the global routine `ReadComponentResFile <System.Classes.ReadComponentResFile.htm>`__. It can also be called directly if the current position of the stream points to a component written using the `WriteComponentRes <System.Classes.TStream.WriteComponentRes.htm>`__ method. + + `ReadComponentResFile <System.Classes.ReadComponentResFile.htm>`__ creates a file stream object, which then calls its ``ReadComponentRes()`` method. + + ``ReadComponentRes()`` first calls the `ReadResHeader <System.Classes.TStream.ReadResHeader.htm>`__ method to read a resource header from the stream. If the stream does not contain a resource header at the current position, `ReadResHeader <System.Classes.TStream.ReadResHeader.htm>`__ will raise an `EInvalidImage <System.Classes.EInvalidImage.htm>`__ exception. ``ReadComponentRes()`` then calls `ReadComponent <System.Classes.TStream.ReadComponent.htm>`__ to read the properties that must be set on Instance. + ''' + def WriteComponent(self, Instance: Component) -> None: + ''' + Initiates the writing of components and their properties to a stream. ``WriteComponent()`` is used internally in the component streaming system, but can also be called directly when writing components to memory streams or database blobs. + + ``WriteComponent()`` constructs a writer object and calls its `WriteRootComponent <System.Classes.TWriter.WriteRootComponent.htm>`__ method to write the component specified by Instance, and its owned objects, to the stream. + ''' + def WriteComponentRes(self, ResName: str, Instance: Component) -> None: + ''' + Writes components and their properties to a stream from a resource file format. + + ``WriteComponentRes()`` is used internally in the streaming system, but can also be called directly when sending data to other applications on disk. ``WriteComponentRes()`` is used for streaming components that need data, such as a bitmap or icon to be stored in a resource-file format. + + ``WriteComponentRes()`` calls `WriteDescendentRes <System.Classes.TStream.WriteDescendentRes.htm>`__, passing in ``nil`` (Delphi) or ``NULL`` (C++) as the ``Ancestor``. Therefore, `WriteDescendentRes <System.Classes.TStream.WriteDescendentRes.htm>`__ initiates the remainder of the streaming process for a component that, in this case, is not a descendant. To read a component written with ``WriteComponentRes()``, call the `ReadComponentRes <System.Classes.TStream.ReadComponentRes.htm>`__ method. + ''' + def WriteDescendent(self, Instance: Component, Ancestor: Component) -> None: + ''' + Streams components and their properties in inherited forms. + + Do not call ``WriteDescendent()`` directly. ``WriteDescendent()`` is called automatically by `WriteComponent <System.Classes.TStream.WriteComponent.htm>`__. + + ``WriteDescendent()`` constructs a writer object, then calls the writer object's ``WriteDescendent()`` method to write the component passed in ``Instance`` to the stream. ``Instance`` is either an inherited form descended from + + Ancestor or ``nil`` (Delphi) or ``NULL`` (C++). However, ``WriteDescendent()`` is never used to write owned components, only to initiate streaming on the root component. + ''' + def WriteDescendentRes(self, ResName: str, Instance: Component, Ancestor: Component) -> None: + ''' + ``Streams`` components and their properties in inherited forms. + + Do not call ``WriteDescendentRes()`` directly. ``WriteDescendentRes()`` is called automatically by `WriteComponentRes <System.Classes.TStream.WriteComponentRes.htm>`__. + + ``WriteDescendentRes()`` writes a resource-file header to the stream, using the resource name passed in ``ResName`` as the name of the resource. It then calls `WriteDescendent <System.Classes.TStream.WriteDescendent.htm>`__ to write ``Instance`` to the stream as a descendant of ``Ancestor``. + ''' + def WriteResourceHeader(self, ResName: str, FixupInfo: int) -> None: + ''' + Writes a resource-file header to the stream. + + Do not call ``WriteResourceHeader()``; it is used internally. The `WriteDescendentRes <System.Classes.TStream.WriteDescendentRes.htm>`__ method calls ``WriteResourceHeader()`` before writing a component to the stream. This method writes the resource-file header, using the value passed as ``ResName`` for the name of the resource. It returns a position in FixupInfo that must be used to adjust the header after the size of the resource is known. WriteDescendentRes calls `FixupResourceHeader <System.Classes.TStream.FixupResourceHeader.htm>`__ with the value returned as FixupInfo after streaming out the component. + ''' + def FixupResourceHeader(self, FixupInfo: int) -> None: + ''' + Patches the resource header for a resource that has been written to the stream. + + Do not call ``FixupResourceHeader()`` it is used internally. The `WriteDescendentRes <System.Classes.TStream.WriteDescendentRes.htm>`__ method calls ``FixupResourceHeader()`` after writing a component to the stream. This method then uses the current position to determine the size of the resource just written and adjust the resource header accordingly. + + The ``FixupInfo`` parameter is the value returned by `WriteResourceHeader <System.Classes.TStream.WriteResourceHeader.htm>`__ when it writes the resource header (before `WriteDescendentRes <System.Classes.TStream.WriteDescendentRes.htm>`__ streams out the component.) + ''' + def ReadResHeader(self) -> None: + ''' + Reads a resource-file header from the stream. + + Do not call ``ReadResHeader()`` directly. It is called automatically by `ReadComponentRes <System.Classes.TStream.ReadComponentRes.htm>`__ before reading a component from a resource file. + + After reading the resource-file header, ``ReadResHeader()`` moves the current position of the stream to just beyond the header. If the stream does not contain a valid resource-file header, ``ReadResHeader()`` raises an `EInvalidImage <System.Classes.EInvalidImage.htm>`__ exception. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class StringGrid(DrawGrid): + ''' + ===================== + Vcl.Grids.TStringGrid + ===================== + + ``StringGrid`` represents a grid control designed to simplify the handling of strings and associated objects. + + Add a ``StringGrid`` object to a form to present textual data in a tabular format. ``StringGrid`` provides many properties to control the appearance of the grid, as well as events and methods that take advantage of the tabular organization of the grid in responding to user actions. + + ``StringGrid`` introduces the ability to associate an object with each string in the grid. These objects can encapsulate any information or behavior represented by the strings that are presented to the user. + + For a ``StringGrid``, the `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ property controls whether the current settings have any effect for `FixedColor <Vcl.Grids.TCustomGrid.FixedColor.htm>`__, and for `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ and `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ : + + - Setting ``FixedColor`` has no effect unless you also set `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ to ``gdsClassic``. + - Setting `GradientStartColor <Vcl.Grids.TCustomGrid.GradientStartColor.htm>`__ and `GradientEndColor <Vcl.Grids.TCustomGrid.GradientEndColor.htm>`__ has no effect unless you set the value of `DrawingStyle <Vcl.Grids.TCustomGrid.DrawingStyle.htm>`__ to ``gdsGradient``. + + .. note:: If the strings to be presented in a grid represent field values from the records in a dataset, use `DBGrid <Vcl.DBGrids.TDBGrid.htm>`__ instead. + + .. note:: To display the string and the associated object or control, use `DrawGrid <Vcl.Grids.TDrawGrid.htm>`__ instead. . + ''' + + __hash__: ClassVar[None] = ... + Cols: list[int] + ''' + Lists strings with their associated objects for each column. + + Use ``Cols`` to access all the strings for a single column, along with their associated objects. The number of strings and associated objects is always equal to the value of the ``RowCount`` property, the number of rows in the grid. The ``Index`` parameter is the number of the column, where the value of the first column in the grid is zero. To get all the strings and objects for a row, rather than for a column, use the ``Rows`` property. + ''' + Rows: list[int] + ''' + Lists the strings and their associated objects for each row. + + Use ``Rows`` to access all the strings for a single row, along with their associated objects. The number of strings and associated objects is always equal to the value of the ``ColCount`` property, the number of columns in the grid. The ``Index`` parameter is the number of the row, where the value of the first row in the grid is zero. To get all the strings and objects for a column, rather than for a row, use the ``Cols`` property. + ''' + + def ColumnMoved(self, FromIndex: int, ToIndex: int) -> None: + ''' + Generates an `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ event. + + `ColumnMoved <Vcl.Grids.TCustomDrawGrid-ColumnMoved.htm>`__ is called immediately after a column in the grid has moved. It overrides the inherited method to generate an `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ event. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to make internal adjustments or to block the `OnColumnMoved <Vcl.Grids.TCustomDrawGrid.OnColumnMoved.htm>`__ event. + ''' + def DrawCell(self, ACol: int, ARow: int, ARect: Rect, AState: GridDrawState) -> None: + ''' + Generates an `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event. + + `DrawCell <Vcl.Grids.TCustomDrawGrid.DrawCell.htm>`__ is called automatically whenever a cell in the grid is drawn. If the `DefaultDrawing <Vcl.Grids.TCustomGrid.DefaultDrawing.htm>`__ property is ``True``, the background of the cell is painted before `DrawCell <Vcl.Grids.TCustomDrawGrid.DrawCell.htm>`__ is called, and the 3D effects of the fixed cells or the focus rectangle around the focused cell are drawn after `DrawCell <Vcl.Grids.TCustomDrawGrid.DrawCell.htm>`__. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to draw the contents of the cell or to block the `OnDrawCell <Vcl.Grids.TCustomDrawGrid.OnDrawCell.htm>`__ event. + ''' + def GetEditText(self, ACol: int, ARow: int) -> str: + ''' + Generates an `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event. + + The inplace editor calls `GetEditText <Vcl.Grids.TCustomDrawGrid.GetEditText.htm>`__ to obtain the text for the indicated cell. `GetEditText <Vcl.Grids.TCustomDrawGrid.GetEditText.htm>`__ returns the ``Value`` parameter set by the `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event handler. If there is no `OnGetEditText <Vcl.Grids.TCustomDrawGrid.OnGetEditText.htm>`__ event handler, `GetEditText <Vcl.Grids.TCustomDrawGrid.GetEditText.htm>`__ returns an empty string. + ''' + def SetEditText(self, ACol: int, ARow: int, Value: str) -> None: + ''' + event handleraGenerates an `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event. + + `SetEditText <Vcl.Grids.TCustomDrawGrid.SetEditText.htm>`__ is called by the inplace editor so that the grid can store the new value for the current cell. `SetEditText <Vcl.Grids.TCustomDrawGrid.SetEditText.htm>`__ overrides the inherited parent class's method to generate an `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to update an internal representation of the cell's value, or to block the `OnSetEditText <Vcl.Grids.TCustomDrawGrid.OnSetEditText.htm>`__ event. + ''' + def RowMoved(self, FromIndex: int, ToIndex: int) -> None: + ''' + Generates an `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event. + + `RowMoved <Vcl.Grids.TCustomDrawGrid.RowMoved.htm>`__ is called immediately after a row in the grid changes position. It overrides the inherited method to generate an `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event. Descendants of `CustomDrawGrid <Vcl.Grids.TCustomDrawGrid.htm>`__ can override this method to make internal adjustments or to block the `OnRowMoved <Vcl.Grids.TCustomDrawGrid.OnRowMoved.htm>`__ event. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `StringGrid <Vcl.Grids.TStringGrid.htm>`__. + + Call ``Create()`` to create an instance of `StringGrid <Vcl.Grids.TStringGrid.htm>`__ at runtime. For ``StringGrid``\ s placed on forms at design time, ``Create()`` is called automatically. + + ``AOwner`` is another component, typically a form, that becomes the grid's ``Owner()``. The ``Owner()`` is responsible for freeing the grid. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `StringGrid <Vcl.Grids.TStringGrid.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the ``StringGrid`` is not ``nil``, and only then calls ``Destroy()``. + + ``Destroy()`` frees the helper objects used to manage the array of strings and their associated objects. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + ''' + def OnColumnMoved(self, Sender: Object, FromIndex: int, TolistIndex: int) -> None: + ''' + # OnColumnMoved: MovedEvent + Occurs immediately after the position of a column changes. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + when the user double-clicks the left mouse button when the mouse pointer is over the control. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + ''' + def OnDrawCell(self, Sender: Object, ACol: int, ARow: int, Rect: Rect, State: GridDrawState) -> None: + ''' + # OnDrawCell: DrawCellEvent + Occurs when a cell in the grid needs to be drawn. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + ''' + def OnFixedCellClick(self, Sender: Object, ACol: int, ARow: int) -> None: + ''' + # OnFixedCellClick: FixedCellClickEvent + Determines the event triggered when a user clicks in a fixed cell. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + ''' + def OnGetEditMask(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + # OnGetEditMask: GetEditEvent + Occurs when the in-place editor requests an `edit mask <Vcl.Mask.TCustomMaskEdit.EditMask.htm>`__. + ''' + def OnGetEditText(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + # OnGetEditText: GetEditEvent + Occurs when the in-place editor requests the value of a cell. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + ''' + def OnMouseWheelDown(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelDown: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated downward. + ''' + def OnMouseWheelUp(self, Sender: Object, Shift: ShiftState, MousePos: Point, Handled: bool) -> None: + ''' + # OnMouseWheelUp: MouseWheelUpDownEvent + Occurs when the mouse wheel is rotated upward. + ''' + def OnRowMoved(self, Sender: Object, FromIndex: int, TolistIndex: int) -> None: + ''' + # OnRowMoved: MovedEvent + Occurs immediately after the position of a row changes. + ''' + def OnSelectCell(self, Sender: Object, ACol: int, ARow: int, CanSelect: bool) -> None: + ''' + # OnSelectCell: SelectCellEvent + Occurs before a cell in the grid is selected. + ''' + def OnSetEditText(self, Sender: Object, ACol: int, ARow: int, Value: str) -> None: + ''' + # OnSetEditText: SetEditEvent + Occurs when the user edits the value of a cell. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + ''' + def OnTopLeftChanged(self, Sender: Object) -> None: + ''' + # OnTopLeftChanged: NotifyEvent + Occurs immediately after the `TopRow <Vcl.Grids.TCustomGrid.TopRow.htm>`__ property or the `LeftCol <Vcl.Grids.TCustomGrid.LeftCol.htm>`__ property changes. + ''' + def SetCells(self, col: int, row: int, text: str) -> None: + ''' + TStringGrid.SetCell(col, row, value) + Sets the content of a cell + + class procedure TPyDelphiStringGrid.RegisterMethods( PythonType : PythonType ); + begin + inherited; + PythonType.AddMethod('GetCell', @TPyDelphiStringGrid.GetCell, + 'TStringGrid.GetCell(col, row)'#10 + + 'Returns the content of a cell'); + PythonType.AddMethod('SetCell', @TPyDelphiStringGrid.SetCell, + 'TStringGrid.SetCell(col, row, value)'#10 + + 'Sets the content of a cell'); + end; + ''' + def GetCells(self, col: int, row: int) -> str: + ''' + TStringGrid.GetCell(col, row) + Returns the content of a cell + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class StringStream(BytesStream): + '''TStringStream provides file-like access to information stored as a long string. + Use TStringStream to store data as a long string enhanced with I/O capabilities. TStringStream is useful as an intermediary object that can hold text as well as read it from or write it to another storage medium. TStringStream provides a mechanism for manipulating text that is obtained from a less accessible medium.''' + __hash__: ClassVar[None] = ... + ClassName: Any + '''Returns the TObject.ClassName''' + DataString: str + '''str: Provides direct access to the string that stores the text represented by the TStringStream object. + Use DataString to get access to the text of the stream. The text represents the information that is being transferred by means of the string stream. Size is the number of bytes in the string, and Position is the current position within DataString. + + Note: DataString is a read-only property. DataString can be used to change the contents of the string, but applications can't change the DataString itself.''' + Encoding: Encoding + '''Encoding: Represents the encoding used internally by the TStringStream instance to store the data. + Encoding represents the encoding that is used to get the corresponding array of bytes from a given string, or to obtain the corresponding string from the contained array of bytes. (A string stream contains an array of bytes.) + The encoding of a stream string is set in the constructor (you can specify what encoding to use).''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def Create(self, *args, **kwargs) -> Any: + '''Creates an instance of TStringStream. + Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.\r + Creates an instance of TStringStream. + Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.\r + Creates an instance of TStringStream. + Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.\r + Creates an instance of TStringStream. + Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.\r + Creates an instance of TStringStream. + Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.\r + Creates an instance of TStringStream. + Call Create to instantiate a TStringStream object. Create initializes the DataString property to the AString parameter.''' + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys an instance of TMemoryStream. + System.Classes.TStringStream.Destroy inherits from System.Classes.TMemoryStream.Destroy. All content below this line refers to System.Classes.TMemoryStream.Destroy. + Destroys an instance of TMemoryStream. + Do not call Destroy directly in an application. Instead, call Free. Free verifies that the TMemoryStream reference is not nil, and only then calls Destroy. + Destroy a TMemoryStream object when it is no longer needed to store or write data. Destroy calls Clear to free the memory buffer before calling the inherited destructor.''' + def Free(self) -> Any: + '''TObject.Free() + Frees the Wrapped Delphi Object''' + def InheritsFrom(self, ClassName) -> Any: + '''TObject.InheritsFrom(ClassName) + Returns True if Delphi Object is or inherits from ClassName''' + def ReadBytes(self) -> Any: + '''TPyDelphiStream.ReadBytes() + Read content as bytes.''' + def ReadFloat(self) -> Any: + '''TPyDelphiStream.ReadFloat() + Read content as float.''' + def ReadInt(self) -> Any: + '''TPyDelphiStream.ReadInt() + Read content as integer.''' + def ReadString(self) -> Any: + '''TPyDelphiStream.ReadString() + Read content as string.''' + def SetProps(self, prop1=..., prop2=...) -> Any: + '''TObject.SetProps(prop1=val1, prop2=val2...) + Sets several properties in one call''' + def ToList(self) -> Any: + '''TStrings.ToList() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python list object.''' + def ToTuple(self) -> Any: + '''TStrings.ToTuple() + If the object is a container (TStrings, TComponent...), it returns the content of the sequence as a Python tuple object.''' + def WriteBytes(self) -> Any: + '''TPyDelphiStream.WriteBytes() + Write content as bytes.''' + def WriteFloat(self) -> Any: + '''TPyDelphiStream.WriteFloat() + Write content as float.''' + def WriteInt(self) -> Any: + '''TPyDelphiStream.WriteInt() + Write content as integer.''' + def WriteString(self) -> Any: + '''TPyDelphiStream.WriteString() + Write content as string.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __dir__(self) -> Any: + '''Returns the list of all methods, fields and properties of this instance.''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Strings(Persistent): + ''' + ======================= + System.Classes.TStrings + ======================= + + ``Strings`` is the base class for objects that represent a list of strings. + + Derive a class from ``Strings`` to store and manipulate a list of strings. ``Strings`` contains abstract or, in C++ terminology, pure virtual methods and should not be directly instantiated. + + Descendants of ``Strings`` can represent several individual strings, such as the individual lines that appear in a ``ListBox``. Some objects use descendants of ``Strings`` to represent one long body of text so that it can be manipulated in smaller chunks. + + ``Strings`` introduces many properties and methods to: + + - Add or delete strings at specified positions in the list. + - Rearrange the strings in the list. + - Access the string at a particular location. + - Read the strings from or write the strings to a file or stream. + - Associate an object with each string in the list. + - Store and retrieve strings as name-value pairs. + + For an explanation of name-value pairs, refer to the `NameValueSeparator <System.Classes.TStrings.NameValueSeparator.htm>`__ property. + ''' + + __hash__: ClassVar[None] = ... + UpdateCount: int + ''' + Indicates the number of calls to `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ that have not been matched by a call to `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__. + + `Strings <System.Classes.TStrings.htm>`__ uses ``UpdateCount`` to keep track of calls to the `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ and `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ methods. Every time a call is made to `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__, `Strings <System.Classes.TStrings.htm>`__ increments the value of ``UpdateCount``. Every call to `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ causes `Strings <System.Classes.TStrings.htm>`__ to decrement ``UpdateCount``. + + When ``UpdateCount`` changes from 0 to 1, `Strings <System.Classes.TStrings.htm>`__ calls the `SetUpdateState <System.Classes.TStrings.SetUpdateState.htm>`__ method with a parameter of ``True``. When ``UpdateCount`` changes from 1 to 0, `Strings <System.Classes.TStrings.htm>`__ calls the `SetUpdateState <System.Classes.TStrings.SetUpdateState.htm>`__ method with a parameter of ``False``. This allows descendant classes to perform optimizations when handling multiple updates. + ''' + Updating: bool + ''' + Indicates whether or not the list of strings is in the middle of an `update <System.Classes.TStrings.BeginUpdate.htm>`__. + ''' + Capacity: int + ''' + Indicates the number of strings the `Strings <System.Classes.TStrings.htm>`__ object can hold. + + Read ``Capacity`` to determine the currently allocated size of the ``StringList``. For the `Strings <System.Classes.TStrings.htm>`__ object, reading ``Capacity()`` returns the `Count <System.Classes.TStrings.Count.htm>`__ property, and setting ``Capacity`` does nothing. Descendants of `Strings <System.Classes.TStrings.htm>`__ can override this property to allow a ``StringList`` to allocate memory for entries that have not been added to the list. + ''' + CommaText: str + ''' + Lists the strings in the `Strings <System.Classes.TStrings.htm>`__ object in a single comma-delimited string. + + Use ``CommaText`` to ``get`` or ``set`` all the strings in the `Strings <System.Classes.TStrings.htm>`__ object in a single comma-delimited string. The single comma-delimited string format is also known as the system data format (SDF). + + When retrieving ``CommaText``, any string in the list that include spaces, commas or double quotes will be contained in double quotes, and any double quotes in a string will be repeated. For example, if the list contains the following strings: + + .. code-block:: python + + Stri,ng1 + Stri"ng2 + String 3 + String4 + + ``CommaText`` will return: + + .. code-block:: python + + "Stri,ng1","Stri""ng2","String 3",String4 + + When assigning ``CommaText``, the ``Value`` is parsed as SDF formatted text. For SDF format, strings are separated by commas or spaces, and optionally enclosed in double quotes. Double quote marks that are part of the string are repeated to distinguish them from the quotes that surround the string. Spaces and commas that are not contained within double quote marks are delimiters. Two commas next to each other will indicate an empty string, but spaces that appear next to another delimiter are ignored. For example, suppose ``CommaText`` is set to: + + .. code-block:: python + + "Stri,ng 1","Stri""ng 2",String 3,String4 + + The list will then contain: + + .. code-block:: python + + Stri,ng 1 + Stri"ng 2 + String + 3 + String4 + + .. note:: ``CommaText`` is the same as the `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ property with a delimiter of ',' and a quote character of '"'. + + Including a trailing comma in the source string causes a blank item to be included in the ``StringList``. For example, if ``CommaText`` is set to + + .. code-block:: python + + "String1,String2,String3, " + + the ``StringList`` will contain + + .. code-block:: python + + String1 + String2 + String3 + <Blank> + ''' + Count: int + ''' + Introduces an abstract property to represent the number of strings in the list. + + Descendants of `Strings <System.Classes.TStrings.htm>`__ implement a ``Count()`` property to indicate the number of strings in the list. + + Use the ``Count()`` property when iterating over all the strings in the list, or when trying to locate the position of a string relative to the last string in the list. + ''' + DefaultEncoding: Encoding + ''' + The default encoding for the current object. + + ``DefaultEncoding`` is used when the ``nil`` encoding is specified in a call to `LoadFromStream <System.Classes.TStrings.LoadFromStream.htm>`__ or `SaveToStream <System.Classes.TStrings.SaveToStream.htm>`__. + + By default, ``DefaultEncoding`` is set to `Default <System.SysUtils.TEncoding.Default.htm>`__. The user can change ``DefaultEncoding`` if another default encoding is desired for `LoadFromStream <System.Classes.TStrings.LoadFromStream.htm>`__ or `SaveToStream <System.Classes.TStrings.SaveToStream.htm>`__. + ''' + Delimiter: str + ''' + Specifies the delimiter used by the `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ property. + + Use ``Delimiter`` to ``get`` or ``set`` the delimiter used by the `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ property. DelimitedText represents all of the strings in the `Strings <System.Classes.TStrings.htm>`__ object as a single string, with individual strings separated by the character that is the value of ``SetEncoding()``. + + The default delimiter is represented by comma (``','``). + ''' + DelimitedText: str + ''' + Represents all the strings in the `Strings <System.Classes.TStrings.htm>`__ object as a single delimited string. + + Use ``DelimitedText`` to ``get`` or ``set`` all the strings in the `Strings <System.Classes.TStrings.htm>`__ object in a single string, separated by the character specified by the `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ property. + + When retrieving ``DelimitedText``, any string in the list that includes spaces or the delimiter and quotation marks characters specified in the `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ and `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ properties will be surrounded (before and after) by the quotation mark character (`QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__). In addition, any `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ character contained in an individual string will be repeated. + + When retrieving ``DelimitedText``, the resulting value delimits individual strings in two ways: each string is surrounded (before and after) by the quotation marks character specified by the `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ property. In addition, individual strings are separated by the character specified by the `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ property. + + When assigning ``DelimitedText``, individual strings must be separated using `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ marks, and optionally enclosed in `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ characters. + + When assigning ``DelimitedText``, the ``Value`` is parsed as SDF formatted text. For SDF format, strings are separated by `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ characters or spaces, and optionally enclosed in `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ characters. `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ marks that are part of the string are repeated to distinguish them from the `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ characters that surround the string. Spaces and `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ characters that are not contained within `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ marks are delimiters. Two `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ characters next to each other will indicate an empty string, but spaces that appear next to another `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ character are ignored. + + If `StrictDelimiter <System.Classes.TStrings.StrictDelimiter.htm>`__ is set to ``False``, the space character is also interpreted as a delimiter, regardless of the value of `Delimiter <System.Classes.TStrings.Delimiter.htm>`__. This is not ``True`` when the space character occurs between quotation marks. + + .. note:: `CommaText <System.Classes.TStrings.CommaText.htm>`__ is the same as the ``DelimitedText`` property when `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ is ',' and `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ is '"'. Including a trailing `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ in the source string causes a blank item to be included in the ``StringList``. + ''' + Encoding: Encoding + ''' + Character encoding determined during reading from a stream or file. + + ``Encoding`` is a read-only property that contains the value of the character encoding detected when the `LoadFromStream <System.Classes.TStrings.LoadFromStream.htm>`__ or `LoadFromFile <System.Classes.TStrings.LoadFromFile.htm>`__ methods are called. If a file or stream does not contain a *BOM* (the encoding value cannot be detected) then ``Encoding`` is set to the value specified in the `DefaultEncoding <System.Classes.TStrings.DefaultEncoding.htm>`__ property. + + ``Encoding`` is used in the `SaveToStream <System.Classes.TStrings.SaveToStream.htm>`__ and `SaveToFile <System.Classes.TStrings.SaveToFile.htm>`__ methods. + ''' + LineBreak: str + ''' + Defines line-break characters. + + The ``LineBreak`` property is used internally in `Strings <System.Classes.TStrings.htm>`__ to set the string terminator characters. Set or read the ``LineBreak`` property to determine the string terminator characters in multistring output operations. + + For example, the `GetText <System.Classes.TStrings.GetText.htm>`__ method returns a long string containing all `Strings <System.Classes.TStrings.htm>`__ strings, each of which is terminated by the ``LineBreak`` value. + + .. note:: On *Windows*, the default ``LineBreak`` ``Value`` is a carriage return and line feed combination (``#13#10``), whereas on *Android*, *Linux*, *macOS* and *iOS* it is just a line feed (``#10``). + ''' + Names: list + ''' + Indicates the name part of strings that are name-value pairs. + + When the list of strings for the `Strings <System.Classes.TStrings.htm>`__ object includes strings that are name-value pairs, read ``Names`` to access the name part of a string. ``Names`` is the name part of the string at ``Index``, where 0 is the first string, 1 is the second string, and so on. If the string is not a name-value pair, ``Names`` contains an empty string. + ''' + KeyNames: list + ''' + Indicates the names from the list of strings that contains name-value pairs. + + Use ``KeyNames`` to indicate the name part of a name-value pair accessed by ``Index`` of a list of strings. If the string is not a name-value pair, ``KeyNames()`` returns the complete string. Use `Names <System.Classes.TStrings.Names.htm>`__ if you prefer to get an empty string when you acces a string that is not a name-value pair. + ''' + Objects: list + ''' + Represents a set of objects that are associated one with each of the strings in the `Strings <System.Classes.TStrings.Strings.htm>`__ property. + + Setting the ``Objects`` property for `Strings <System.Classes.TStrings.htm>`__ has no effect. Reading the ``Objects`` property for `Strings <System.Classes.TStrings.htm>`__ returns ``nil`` (Delphi) or ``NULL`` (C++). Descendant classes can associate objects with the strings in the set by implementing the ``Objects`` property. + + Use the ``Objects`` property of a descendant of `Strings <System.Classes.TStrings.htm>`__ to ``get`` or ``set`` the object associated with the string at the position indicated by ``Index``. ``Index`` gives the position of the string associated with the object, where 0 is the first string, 1 is the second string, and so on. If a descendant of `Strings <System.Classes.TStrings.htm>`__ does not support the ``Objects`` property, reading this property returns ``nil`` (Delphi) or ``NULL`` (C++). + + .. note:: The `Strings <System.Classes.TStrings.htm>`__ object does not own the objects in the ``Objects`` array. ``Objects`` added to the ``Objects`` array still exist even if the `Strings <System.Classes.TStrings.htm>`__ object is destroyed. They must be explicitly destroyed by the application. + ''' + QuoteChar: str + ''' + Specifies the quote character used by the `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ property. + + Use ``QuoteChar`` to ``get`` or ``set`` the quote character that is used to enclose individual strings in the `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ property. + + When ``QuoteChar`` is set to the ``NULL`` character, then `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ does the following: + + - At reading, does not return quoted list items. + - At assigning, does not check an assigning value for quote char. + + That is, you can set ``QuoteChar`` to the ``NULL`` character to disable quoting in `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__. To set the ``QuoteChar`` to the ``NULL`` character, do the following: + + .. code-block:: python + :caption: Delphi + + MyStringList.QuoteChar := #0; + + + .. code-block:: python + :caption: C++ + + MyStringList->QuoteChar = '\0'; + ''' + Values: list + ''' + Represents the value part of a string associated with a given name, on strings that are name-value pairs. + + When the list of strings for the `Strings <System.Classes.TStrings.htm>`__ object includes strings that are name-value pairs, use ``Values`` to ``get`` or ``set`` the value part of a string associated with a specific name part. + + For more information on name-value pairs, refer to the `NameValueSeparator <System.Classes.TStrings.NameValueSeparator.htm>`__ property. + + .. note:: The ``Name`` index is case-insensitive. That is, ``Values`` is the value part for the first occurrence of ``Name`` or an equivalent string that differs only in case. + ''' + ValueFromIndex: list + ''' + Represents the value part of a string with a given index, on strings that are name-value pairs. + + When the list of strings for the `Strings <System.Classes.TStrings.htm>`__ object includes strings that are name-value pairs, use ``ValueFromIndex`` to ``get`` or ``set`` the value part of a string associated with an index. + + For more information on name-value pairs, refer to the `NameValueSeparator <System.Classes.TStrings.NameValueSeparator.htm>`__ property. + ''' + NameValueSeparator: str + ''' + Indicates the character used to separate names from values. + + Strings that contain the ``NameValueSeparator`` character are considered name-value pairs. ``NameValueSeparator`` defaults to the equal sign (``'='``). `Strings <System.Classes.TStrings.htm>`__ defines various methods for accessing names and values and for searching for specific names. + + Strings that are name-value pairs consist of a name part, the separator character, and a value part. Any spaces around the separator character are part of the name or value. This convention corresponds to the format used in many initialization files. For example: + ''' + StrictDelimiter: bool + ''' + Determines how the `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ property is used. + + If ``StrictDelimiter`` is ``True``, individual strings in `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ are only separated by `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ or quoted between `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__. If ``StrictDelimiter`` is ``False``, spaces and non-printable character are also used as delimiters. + + .. tip:: You can set `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ to the ``NULL`` character (``#0`` in Delphi, ``'\0'`` in C++) if you do not want quoted strings to be extracted as if they where surrounded by `Delimiter <System.Classes.TStrings.Delimiter.htm>`__. + ''' + Strings: list + ''' + References the strings in the list by their positions. + + Descendants of `Strings <System.Classes.TStrings.htm>`__ must implement an accessor function for the ``Strings`` property to return the string at the position indicated by ``Index``. + + ``Index`` gives the position of the string, where 0 is the first string, 1 is the second string, and so on. + + Use the ``Strings`` property to ``get`` or ``set`` the string at a particular position. To store a string as a name-value pair, assign ``Strings`` a value that includes the `NameValueSeparator <System.Classes.TStrings.NameValueSeparator.htm>`__ character. The name and value will then be accessible separately using the `Names <System.Classes.TStrings.Names.htm>`__ and `Values <System.Classes.TStrings.Values.htm>`__ properties. + + .. note:: In Delphi, ``Strings`` is the default property of `Strings <System.Classes.TStrings.htm>`__ objects. The ``Strings`` identifier can be omitted when accessing the ``Strings`` property of a descendant of `Strings <System.Classes.TStrings.htm>`__. For example, the following two lines of code are both acceptable and do the same thing: + + .. code-block:: python + + MyStrings.Strings[0] := 'This is the first string'; + MyStrings[0] := 'This is the first string'; + ''' + Text: str + ''' + Lists the strings in the `Strings <System.Classes.TStrings.htm>`__ object as a single string with the individual strings delimited by carriage returns and line feeds. + + Use ``Text`` to ``get`` or ``set`` all the strings in the `Strings <System.Classes.TStrings.htm>`__ object in a single string delimited by carriage return, line feed pairs. + + When setting ``Text``, the value will be parsed and separated into substrings whenever the `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ ``Value`` is encountered. For backward compatibility, on ``POSIX``, if the `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ separator is ``LF``, then ``LF``, ``CR``, or ``CRLF`` are treated as separators. On Windows if the `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ separator is ``CRLF``, then ``LF``, ``CR``, or ``CRLF`` are treated as separators. + + If the strings in the list contain carriage return or linefeed characters, a less ambiguous format for the strings is available through the `CommaText <System.Classes.TStrings.CommaText.htm>`__ or `DelimitedText <System.Classes.TStrings.DelimitedText.htm>`__ property. + ''' + StringsAdapter: IStringAdapter + ''' + Implements an `IStringsAdapter <System.Classes.IStringsAdapter.htm>`__ interface for the `Strings <System.Classes.TStrings.htm>`__ object. + + ``StringsAdapter`` specifies the attached StringsAdapter <Vcl.AxCtrls.TStringsAdapter.htm>`__ when it is used in *OLE* applications. + + .. note:: To create a StringsAdapter you can use `GetOleStrings <Vcl.AxCtrls.GetOleStrings.htm>`__ and `SetOleStrings <Vcl.AxCtrls.SetOleStrings.htm>`__ instead of creating an instance of StringsAdapter <Vcl.AxCtrls.TStringsAdapter.htm>`__. ``StringsAdapter`` is used internally with *OLE* applications. + ''' + WriteBOM: bool + ''' + Will cause ``SaveToStream()`` and ``SaveToFile()`` to write a *BOM*. + + Set ``WriteBOM`` to ``True`` to cause `SaveToStream <System.Classes.TStrings.SaveToStream.htm>`__ to write a *BOM* (byte-order mark) to the stream and to cause `SaveToFile <System.Classes.TStrings.SaveToFile.htm>`__ to write a *BOM* to the file. + ''' + TrailingLineBreak: bool + ''' + Determines whether to add a `line Break <System.Classes.TStrings.LineBreak.htm>`__ after the last line of the `Text <System.Classes.TStrings.Text.htm>`__ property or not. + + Use ``TrailingLineBreak`` to add a finishing line break to `Text <System.Classes.TStrings.Text.htm>`__. Set ``TrailingLineBreak`` to ``True`` to add a `line Break <System.Classes.TStrings.LineBreak.htm>`__ after the last line of `Text <System.Classes.TStrings.Text.htm>`__. Set ``TrailingLineBreak`` to ``False`` to finish `Text <System.Classes.TStrings.Text.htm>`__ without a `line Break <System.Classes.TStrings.LineBreak.htm>`__. Default is ``True``. + ''' + UseLocale: bool + ''' + Determines the implementation that the list of strings must use for string comparison. + + Set ``UseLocale`` to ``True`` to use `AnsiCompareStr <System.AnsiStrings.AnsiCompareStr.htm>`__ and `AnsiCompareText <System.AnsiStrings.AnsiCompareText.htm>`__ to compare strings. Set ``UseLocale`` to ``False`` to use `CompareStr <System.AnsiStrings.CompareStr.htm>`__ and `CompareText <System.AnsiStrings.CompareText.htm>`__. Default is ``True``. + ''' + Options: StringOptions + ''' + Controls a `set <System.Classes.TStringsOptions.htm>`__ of `boolean properties <System.Classes.TStringsOption.htm>`__ of `Strings <System.Classes.TStrings.htm>`__. + + Use ``Options`` to specify the value of the following boolean properties of the list of strings: + + ======================= ============================================================================== + **Option** **Properrty** + ======================= ============================================================================== + ``soStrictDelimiter`` `StrictDelimiter <System.Classes.TStrings.StrictDelimiter.htm>`__ + ``soWriteBOM`` `WriteBOM <System.Classes.TStrings.WriteBOM.htm>`__ + ``soTrailingLineBreak`` `TrailingLineBreak <System.Classes.TStrings.TrailingLineBreak.htm>`__ + ``soUseLocale`` `UseLocale <System.Classes.TStrings.UseLocale.htm>`__ + ======================= ============================================================================== + ''' + + def DefineProperties(self, Filer: Filer) -> None: + ''' + Reads and writes the `Strings <System.Classes.TStrings.Strings.htm>`__ property as if it were published. + + `Strings <System.Classes.TStrings.htm>`__ overrides ``DefineProperties()`` so that the strings in the list can be loaded and saved with a form file as if the `Strings <System.Classes.TStrings.Strings.htm>`__ property were published. + ''' + @overload + def Error(self, Msg: str, Data: int) -> None: + ''' + Raises an `EStringListError <System.Classes.EStringListError.htm>`__ exception. + + `Strings <System.Classes.TStrings.htm>`__ calls ``Error()`` internally to raise an `EStringListError <System.Classes.EStringListError.htm>`__ exception when it encounters a problem. + + ``Msg`` specifies the string with a single format specifier for an integer, that appears in the exception ``MessageBox()``. It can be either a string, or a pointer to a record structure that indicates the module and resource identifier for a string. + + ``Data`` is an ``Integer`` value that is inserted into ``Msg``. + ''' + @overload + def Error(self, Msg: PResStringRec, Data: int) -> None: ... + @overload + def ExtractName(self, S: str) -> str: + ''' + Returns the name portion of a string that is a name value pair. + + `Strings <System.Classes.TStrings.htm>`__ calls ``ExtractName()`` internally to parse strings that are name-value pairs and return the name portion. ``'S'`` is the string to parse. If the string ``'S'``: + + - Is a name-value pair, ``ExtractName()`` returns the name portion. + - Is not a name-value pair, ``ExtractName()`` returns: + + - The entire string ``'S'`` when ``AllNames`` is ``True``. + - An empty string when ``AllNames`` is ``False``. + + .. note:: If ``AllNames`` is not specified is ``False`` by default. + ''' + @overload + def ExtractName(self, S: str, AllNames: bool) -> str: ... + def Get(self, Index: int) -> str: + ''' + Returns a string given its index. + + *Get* is the protected read implementation of the `Strings <System.Classes.TStrings.Strings.htm>`__ property. + + In `Strings <System.Classes.TStrings.htm>`__ *Get* is abstract or, in C++ terminology, pure virtual, meaning it has no implementation. Descendant classes must override this method to return the string with the specified index. + ''' + def GetCapacity(self) -> int: + ''' + Returns the currently allocated size of the list of strings. + + ``GetCapacity()`` is the protected read implementation of the `Capacity <System.Classes.TStrings.Capacity.htm>`__ property. In `Strings <System.Classes.TStrings.htm>`__, ``GetCapacity()`` returns the value of the `Count <System.Classes.TStrings.Count.htm>`__ property. Descendants of `Strings <System.Classes.TStrings.htm>`__ can override this property to let a ``StringList`` allocate memory for entries that have not been added to the list. + ''' + def GetCount(self) -> int: + ''' + Returns the number of strings in the list + + ``GetCount()`` is the protected read implementation of the `Count <System.Classes.TStrings.Count.htm>`__ property. + + In `Strings <System.Classes.TStrings.htm>`__ ``GetCount()`` is abstract or, in C++ terminology, pure virtual, meaning it has no implementation. Descendant classes must override this method to return the number of strings that have been added to the list. + ''' + def GetObject(self, Index: int) -> Object: + ''' + Returns the object associated with the string at a specified index. + + ``GetObject()`` is the protected read implementation of the `Objects <System.Classes.TStrings.Objects.htm>`__ property. + + ``Index`` is the index of the string with which the object is associated. + + In `Strings <System.Classes.TStrings.htm>`__, ``GetObject()`` always returns ``nil`` (Delphi) or ``NULL`` (C++). This provides a default implementation for descendants that do not support associating objects with the strings in the list. Descendants that support this feature override ``GetObject()`` to return the specified object. + ''' + def GetTextStr(self) -> str: + ''' + Returns the value of the `Text <System.Classes.TStrings.Text.htm>`__ property. + + ``GetTextStr()`` is the protected read implementation of the `Text <System.Classes.TStrings.Text.htm>`__ property. It returns a string that lists all the strings in the list, with individual strings separated by the string terminator characters `LineBreak <System.Classes.TStrings.LineBreak.htm>`__. By default, `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ is a carriage return and a line feed (``#13#10``) characters on *Windows* operating systems and a carriage return (``#13``) character on the macOS operating system. + ''' + def Put(self, Index: int, S: str) -> None: + ''' + Changes the value of the string with a specified index. + + ``Put()`` is the protected write implementation of the `Strings <System.Classes.TStrings.Strings.htm>`__ property. + + ``Put()`` changes the value of the string with the index specified by ``Index`` to S. ``Put()`` does not change the object at the specified position. That is, any object associated with the previous string becomes associated with the new string. + ''' + def PutObject(self, Index: int, AObject: Object) -> None: + ''' + Changes the object associated with the string at a specified index. + + ``PutObject()`` is the protected write implementation of the `Objects <System.Classes.TStrings.Objects.htm>`__ property. + + As implemented in `Strings <System.Classes.TStrings.htm>`__, ``PutObject()`` does nothing. This provides a default implementation for descendants that do not support associating objects with the strings in the list. Descendants that support this feature override ``PutObject()`` to change the specified object. + ''' + def SetCapacity(self, NewCapacity: int) -> None: + ''' + Changes the amount of memory allocated to hold strings in the list. + + ``SetCapacity()`` is the protected write implementation of the `Capacity <System.Classes.TStrings.Capacity.htm>`__ property. + + ``NewCapacity`` is the number of strings the list can hold after the capacity has changed. + + In `Strings <System.Classes.TStrings.htm>`__, the ``SetCapacity()`` method does nothing. Descendent classes must override this method to change the number of strings that the list can hold. + + .. note:: For descendent classes that implement ``SetCapacity()``, assigning a value smaller than `Count <System.Classes.TStrings.Count.htm>`__ removes strings from the end of the list. Assigning a value greater than `Count <System.Classes.TStrings.Count.htm>`__ allocates space for more strings to be added. + ''' + def SetEncoding(self, Value: Encoding) -> None: + ''' + Protected setter of the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property. + + If ``Value`` is one of `standard encoding values <System.SysUtils.TEncoding.IsStandardEncoding.htm>`__, ``SetEncoding()`` sets the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property to ``Value``. Otherwise, ``SetEncoding()`` sets the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property to `default <System.SysUtils.TEncoding.Default.htm>`__. + + Internally, `Assign <System.Classes.TStrings.Assign.htm>`__ and `LoadFromStream <System.Classes.TStrings.LoadFromStream.htm>`__ call **SetEncoding*. + ''' + def SetTextStr(self, Value: str) -> None: + ''' + Sets the `Text <System.Classes.TStrings.Text.htm>`__ property. + + ``GetTextStr()`` is the protected write implementation of the `Text <System.Classes.TStrings.Text.htm>`__ property. It replaces the list with the strings specified by the ``Value`` parameter. ``SetTextStr()`` adds strings one at a time to the list, using the carriage returns or linefeed characters in ``Value`` as ``delimiters`` indicating when to add a new string. + ''' + def SetUpdateState(self, Updating: bool) -> None: + ''' + Performs internal adjustments before or after a series of updates. + + ``SetUpdateState()`` is called at the beginning or end of a series of updates. When the `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ method is first called and the `Strings <System.Classes.TStrings.htm>`__ object is not already in the middle of an update, `Strings <System.Classes.TStrings.htm>`__ calls ``SetUpdateState()`` internally, with + + Updating set to ``True``. When the `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ method is called and it cancels out the last unmatched call to `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__, `Strings <System.Classes.TStrings.htm>`__ calls ``SetUpdateState()`` internally, with + + Updating set to ``False``. + + As implemented in `Strings <System.Classes.TStrings.htm>`__, ``SetUpdateState()`` does nothing. Descendant classes can override this method to optimize the response to updates. + ''' + def CompareStrings(self, S1: str, S2: str) -> int: + ''' + Compares two strings. + + `Strings <System.Classes.TStrings.htm>`__ uses ``CompareStrings()`` internally to compare the values of strings that appear in the list. For example, the `IndexOf <System.Classes.TStrings.IndexOf.htm>`__ and `IndexOfName <System.Classes.TStrings.IndexOfName.htm>`__ methods use ``CompareStrings()`` to compare a specified string with the strings in the list. + + ``S1`` and ``S2`` are the strings to compare. + + ``CompareStrings()`` returns a value less than 0 if ``S1`` < ``S2``, 0 if ``S1`` == ``S2``, and a value greater than 0 if ``S1`` >* ``S2``. + + As implemented in `Strings <System.Classes.TStrings.htm>`__, ``CompareStrings()`` uses the global ``AnsiCompareText()`` function, which compares strings case insensitively. Some descendant classes override this method to change the way strings are compared (for example, to introduce case sensitivity). + ''' + def Create(self) -> None: + ''' + ``Creates`` an instance of a `Strings <System.Classes.TStrings.htm>`__ object. + + Do not call the ``Create()`` method for `Strings <System.Classes.TStrings.htm>`__ directly. `Strings <System.Classes.TStrings.htm>`__ is an abstract class and its constructor should only be called as an inherited method from the constructor of a derived class. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `Strings <System.Classes.TStrings.htm>`__ instance and frees its memory. + + Do not call ``Destroy()`` directly. Call ``Free()`` instead. ``Free()`` checks that the object reference is not ``nil`` before calling ``Destroy()``. + ''' + def Add(self, S: str) -> int: + ''' + ``Adds`` a string at the end of the list. + + Call ``Add()`` to add a string to the end of the list. ``Add()`` returns the index of the new string. + ''' + @overload + def AddPair(self, Name: str, Value: str) -> str: + ''' + Adds name-value pairs to the list of strings using `fluent-style coding <http://en.wikipedia.org/wiki/Fluent_interface>`__. + + ``AddPair()`` adds name-value pairs using the current `NameValueSeparator <System.Classes.TStrings.NameValueSeparator.htm>`__. You can also use ``AddPair()`` to add name-value pairs and the corresponding ``AObject``. + + ``Strings()`` returns a reference to the ``StringList``, allowing to populate the list using the `fluent-style coding <http://en.wikipedia.org/wiki/Fluent_interface>`__. + ''' + @overload + def AddPair(self, Name: str, Value: str, AObject: Object) -> str: ... + def AddObject(self, S: str, AObject: Object) -> int: + ''' + Adds a string to the list, and associates an object with the string. + + Call ``AddObject()`` to add a string and its associated object to the list. ``AddObject()`` returns the index of the new string and object. + + .. note:: The `Strings <System.Classes.TStrings.htm>`__ object does not own the objects you add this way. Objects added to the `Strings <System.Classes.TStrings.htm>`__ object still exist even if the `Strings <System.Classes.TStrings.htm>`__ instance is destroyed. They must be explicitly destroyed by the application. + ''' + def Append(self, S: str) -> None: + ''' + Adds a string to the list. + + ``Append()`` is the same as the `Add <System.Classes.TStrings.Add.htm>`__ method, except that it does not return a value. Use ``Append()`` when there is no need to know the index of the string after it has been added, or with descendants of `Strings <System.Classes.TStrings.htm>`__ for which the index returned is not meaningful. + + For example, the `Strings <System.Classes.TStrings.htm>`__ descendant used by ``Memo`` objects uses an index to determine where to insert a string, but the inserted string does not necessarily end up as a single string in the list. Part of the inserted text may become part of the previous string, and part may be broken off into a subsequent string. The index returned by `Add <System.Classes.TStrings.Add.htm>`__ is not meaningful in this case. + + Use ``Append()`` rather than `Add <System.Classes.TStrings.Add.htm>`__ as a parameter for a function requiring a `GetStrProc <System.Classes.TGetStrProc.htm>`__. + ''' + @overload + def AddString(self, String: str) -> None: + ''' + Adds the specified strings (and objects) to the current `Strings <System.Classes.TStrings.htm>`__ object. + + ``AddStrings()``, with the ``Strings`` parameter of the `Strings <System.Classes.TStrings.htm>`__ type, `appends <System.Classes.TStrings.AddObject.htm>`__ strings and associated objects from the ``Strings`` object at the end of the ``StringList`` in the current `Strings <System.Classes.TStrings.htm>`__ object. + + ``AddStrings()`` with the ``Strings`` parameter representing the `array <System.TArray.htm>`__ of strings, `appends <System.Classes.TStrings.Add.htm>`__ strings from ``Strings`` array at the end of the ``StringList`` in the current `Strings <System.Classes.TStrings.htm>`__ object. + + ``AddStrings()``, with two parameters, `appends <System.Classes.TStrings.Add.htm>`__ strings from ``Strings`` array at the end of the ``StringList`` in the current `Strings <System.Classes.TStrings.htm>`__ object and associates references to objects from ``Objects`` with their strings (having the same numbers in ``Strings`` and ``Objects`` arrays). If the number of strings in ``Strings`` is not equal to the number of objects in ``Objects``, then an exception is raised. + ''' + @overload + def AddString(self, String: list) -> None: ... + @overload + def AddString(self, String: list, Objects: list) -> None: ... + def Assign(self, Source: Persistent) -> None: + ''' + Sets the strings in the `Strings <System.Classes.TStrings.Strings.htm>`__ array, possibly associated `Objects <System.Classes.TStrings.Objects.htm>`__, and some other properties of the current `Strings <System.Classes.TStrings.htm>`__ object, from the ``Source`` object. + + Use ``Assign()`` to set the properties of the `Strings <System.Classes.TStrings.htm>`__ object from the ``Source`` object. If ``Source`` is of the `Strings <System.Classes.TStrings.htm>`__ type, ``Assign()`` copies the following properties: + + - `Strings <System.Classes.TStrings.Strings.htm>`__ + - `Objects <System.Classes.TStrings.Objects.htm>`__ + - `DefaultEncoding <System.Classes.TStrings.DefaultEncoding.htm>`__ + - `Encoding <System.Classes.TStrings.Encoding.htm>`__ + - `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ + - `Delimiter <System.Classes.TStrings.Delimiter.htm>`__ + - `QuoteChar <System.Classes.TStrings.QuoteChar.htm>`__ + - `NameValueSeparator <System.Classes.TStrings.NameValueSeparator.htm>`__ + - `Options <System.Classes.TStrings.Options.htm>`__ + + If ``Source`` is not of the `Strings <System.Classes.TStrings.htm>`__ type, the inherited ``Assign()`` will set the value of the string array from any object that supports `Strings <System.Classes.TStrings.htm>`__ in its `AssignTo <System.Classes.TPersistent.AssignTo.htm>`__ method. + ''' + def SetString(self, Source: str) -> None: + ''' + Sets the strings from another `Strings <System.Classes.TStrings.htm>`__ object to the list of strings. + + Use ``SetStrings`` to assign the value of the `Strings <System.Classes.TStrings.htm>`__ object from another `Strings <System.Classes.TStrings.htm>`__ object (``Source``). + + .. note:: ``SetStrings`` is similar to `Assign <System.Classes.TStrings.Assign.htm>`__, but `Assign <System.Classes.TStrings.Assign.htm>`__ also copies multiple additional properties. + ''' + def BeginUpdate(self) -> None: + ''' + Enables the `Strings <System.Classes.TStrings.htm>`__ object to track when the list of strings is changing. + + ``BeginUpdate()`` is called automatically by any property or method that changes the list of strings. Once the changes are complete, the property or method calls `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__. Call ``BeginUpdate()`` before directly modifying the strings in the list, and `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ after. When implementing properties or methods that change the list in descendants of `Strings <System.Classes.TStrings.htm>`__, call ``BeginUpdate()`` before the changes are made, and `EndUpdate <System.Classes.TStrings.EndUpdate.htm>`__ when the changes are complete. + + `Strings <System.Classes.TStrings.htm>`__ simply keeps track of when the list of strings is being changed. Some descendants of `Strings <System.Classes.TStrings.htm>`__ use this information to perform certain actions, such as telling a control to repaint, when updates are complete. + ''' + def Clear(self) -> None: + ''' + Introduces an abstract (Delphi) or pure virtual (C++) method to empty the list and any associated objects. + + Descendants of `Strings <System.Classes.TStrings.htm>`__ implement a ``Clear()`` method to delete all the strings in the list, and to remove any references to associated objects. + ''' + def Delete(self, Index: int) -> None: + ''' + Introduces an abstract (Delphi) or pure virtual (C++) method to delete a specified string from the list. + + Descendants of `Strings <System.Classes.TStrings.htm>`__ implement a ``Delete()`` method to remove a specified string from the list. If an object is associated with the string, the reference to the object is removed as well. ``Index`` gives the position of the string, where 0 is the first string, 1 is the second string, and so on. + ''' + def EndUpdate(self) -> None: + ''' + Enables the `Strings <System.Classes.TStrings.htm>`__ object to keep track of when the list of strings has finished changing. + + ``EndUpdate()`` is called automatically by any property or method that changes the list of strings. Call `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ before directly modifying the strings in the list, and ``EndUpdate()`` after. When implementing properties or methods that change the list in descendants of `Strings <System.Classes.TStrings.htm>`__, call `BeginUpdate <System.Classes.TStrings.BeginUpdate.htm>`__ before the changes are made, and ``EndUpdate()`` when the changes are complete. + + `Strings <System.Classes.TStrings.htm>`__ simply keeps track of when the list of strings is being changed. Some descendants of `Strings <System.Classes.TStrings.htm>`__ use this information to perform certain actions, such as telling a control to repaint, when updates are complete. + ''' + def Equals(self, String: str) -> None: + ''' + Compares the list of strings to the list from another `Strings <System.Classes.TStrings.htm>`__ object and returns ``True`` if the two lists match. + + Call ``Equals()`` to compare the lists in two `Strings <System.Classes.TStrings.htm>`__ objects. ``Equals()`` compares only the strings, not any references to associated objects. ``Equals()`` returns ``True`` if the lists for both `Strings <System.Classes.TStrings.htm>`__ objects have the same number of strings and the strings in each list match. ``Equals()`` returns ``False`` if the lists are different in length, if they contain different strings, or if the order of the strings in the two lists differ. + + .. note:: The ``Equals()`` method uses an overridden `Get <System.Classes.TStrings.Get.htm>`__ method to perform the compare, thus it does not provide a context-insensitive option. + ''' + def Exchange(self, Index1: int, Index2: int) -> None: + ''' + Swaps the position of two strings in the list. + + Call ``Exchange`` to rearrange the strings in the list. The strings are specified by their ``Index`` values in the ``Index1`` and ``Index2`` parameters. Indexes are zero-based, so the first string in the list has an ``Index`` value of 0, the second has an ``Index`` value of 1, and so on. + + If either string has an associated object, ``Exchange`` changes the position of the object as well. + ''' + def GetEnumerator(self) -> StringsEnumerator: + ''' + Returns a ``String``\ s enumerator. + + ``GetEnumerator()`` returns a StringsEnumerator <System.Classes.TStringsEnumerator.htm>`__ reference, which enumerates the strings in a ``Strings`` object. To process all these strings, call the StringsEnumerator <System.Classes.TStringsEnumerator.htm>`__ `GetCurrent <System.Classes.TComponentEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TStringsEnumerator.MoveNext.htm>`__ do loop. + ''' + def GetText(self) -> str: + ''' + Allocates a text buffer and fills it with the value of the `Text <System.Classes.TStrings.Text.htm>`__ property. + + Call ``GetText()`` to obtain a dynamically allocated character buffer containing all of the strings in the list. Individual strings are separated by a carriage return (``#13``) on the *OS X* operating system, or by a carriage return and a line feed (``#13#10``) on *Windows* operating systems. The caller is responsible for freeing the returned value using the `StrDispose <System.SysUtils.StrDispose.htm>`__ procedure. + ''' + def IndexOf(self, S: str) -> int: + ''' + Returns the position of a string in the list. + + Call ``IndexOf()`` to obtain the position of the first occurrence of the ``'S'`` string. ``IndexOf()`` is not case-sensitive; this means that the given string may differ in case from the string in the list. For example: + + .. code-block:: python + + String1 := MyStrings.Items.IndexOf('My First String'); + + is equivalent to + + .. code-block:: python + + String1 := MyStrings.Items.IndexOf('My FIRST String'); + + ``IndexOf()`` returns the 0-based index of the string. Thus, if ``'S'`` matches the first string in the list, ``IndexOf()`` returns 0, if ``'S'`` is the second string, ``IndexOf()`` returns 1, and so on. If the string is not in the ``StringList``, ``IndexOf()`` returns -1. + + .. note:: If the string appears in the list more than once, ``IndexOf()`` returns the position of the first occurrence. + ''' + def IndexOfName(self, Name: str) -> int: + ''' + Returns the position of the first name-value pair with the specified name. + + Call ``IndexOfName()`` to locate the first occurrence of a name-value pair where the name part is equal to the ``Name`` parameter or differs only in case. ``IndexOfName()`` returns the 0-based index of the string. If no string in the list has the indicated name, ``IndexOfName()`` returns -1. + + .. note:: If there is more than one name-value pair with a name portion matching the ``Name`` parameter, ``IndexOfName()`` returns the position of the first such string. + ''' + def IndexOfObject(self, AObject: Object) -> int: + ''' + Returns the index of the first string in the list associated with a given object. + + Call ``IndexOfObject()`` to locate the first string in the list associated with the object ``AObject``. Specify the object you want to locate as the value of the ``AObject`` parameter. ``IndexOfObject()`` returns the 0-based index of the string and object. If the object is not associated with any of the strings, ``IndexOfObject()`` returns -1. + ''' + def Insert(self, Index: int, S: str) -> None: + ''' + Introduces abstract (Delphi) or pure virtual (C++) method to insert a string at a specified position. + + Descendants of `Strings <System.Classes.TStrings.htm>`__ implement an ``Insert()`` method to add the string ``'S'`` to the list at the position specified by ``Index``. If ``Index`` is 0, the string is inserted at the beginning of the list. If ``Index`` is 1, the string is put in the second position of the list, and so on. + + All methods that add strings to the list use the ``Insert()`` method to add the string. + + If the string has an associated object, use the `InsertObject <System.Classes.TStrings.InsertObject.htm>`__ method instead. + ''' + def InsertObject(self, Index: int, S: str, AObject: Object) -> None: + ''' + Inserts a string into the list at the specified position, and associates it with an object. + + Call ``InsertObject()`` to insert the string ``'S'`` into the list at the position identified by ``Index``, and associate it with the object AObject. If ``Index`` is 0, the string is inserted at the beginning of the list. If ``Index`` is 1, the string is put in the second position of the list, and so on. + ''' + @overload + def LoadFromFile(self, FileName: str) -> None: + ''' + Fills the ``StringList`` with the lines of text in a specified file. + + ``LoadFromFile()`` fills the ``StringList`` of the `Strings <System.Classes.TStrings.htm>`__ object from the file specified by ``FileName``. ``LoadFromFile()`` first clears any strings already in the list. Lines in the file are separated by a carriage return and a line feed (``#13#10``) on Windows operating systems and a carriage return (``#13``) on the *OS X* operating system. Each line in the file is then appended in the list as a string. + + If the ``Encoding`` parameter is not given, then the strings are loaded using the appropriate encoding. The value of the encoding is obtained by calling the `GetBufferEncoding <System.SysUtils.TEncoding.GetBufferEncoding.htm>`__ routine of the `Encoding <System.SysUtils.TEncoding.htm>`__ class. ``LoadFromFile()`` then saves the value of the encoding in the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property, to be used if the file is saved. + + .. note:: ``LoadFromFile()`` uses the `Add <System.Classes.TStrings.Add.htm>`__ method to add the strings that are read from the file. + + If the specified file is not found, an `EFOpenError <System.Classes.EFOpenError.htm>`__ is raised. + ''' + @overload + def LoadFromFile(self, FileName: str, Encoding: Encoding) -> None: ... + @overload + def LoadFromStream(self, Stream: Stream) -> None: + ''' + Fills the list with lines of text read from a stream. + + ``LoadFromStream()`` fills the ``StringList`` of the `Strings <System.Classes.TStrings.htm>`__ object from the stream specified by ``Stream``. The text read from the stream is parsed into strings separated by a carriage return and a line feed (#13#10) characters on *Windows* operating systems and a carriage return (#13) character on the macOS operating system. Thus, ``LoadFromStream()`` reads the value of the `Text <System.Classes.TStrings.Text.htm>`__ property. + + If the ``Encoding`` parameter is not given, then the strings are loaded using the appropriate encoding. The value of the encoding is obtained by calling the `GetBufferEncoding <System.SysUtils.TEncoding.GetBufferEncoding.htm>`__ routine of the `Encoding <System.SysUtils.TEncoding.htm>`__ class. ``LoadFromStream()`` then saves the value of the encoding in the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property, to be used if the stream is saved. + + If the stream is a file stream, ``LoadFromStream()`` does the same thing as `LoadFromFile <System.Classes.TStrings.LoadFromFile.htm>`__, except that `LoadFromFile <System.Classes.TStrings.LoadFromFile.htm>`__ creates and destroys the file stream. + ''' + @overload + def LoadFromStream(self, Stream: Stream, Encoding: Encoding) -> None: ... + def Move(self, CurIndex: int, NewlistIndex: int) -> None: + ''' + Changes the position of a string in the list. + + Use ``Move()`` to move the string at position ``CurIndex`` so that it occupies the position ``NewIndex``. The positions are specified as 0-based indexes. For example, the following lines of code move the string in the first position to the last position: + + .. code-block:: python + :caption: Delphi + + MyStringsObject.Move(0, MyStringsObject.Count - 1); + + + .. code-block:: python + :caption: C++ + + MyStringsObject->Move(0, MyStringsObject->Count - 1); + + If the string has an associated object, the object remains associated with the string in its new position. + ''' + @overload + def SaveToFile(self, FileName: str) -> None: + ''' + Saves the `strings <System.Classes.TStrings.Strings.htm>`__ in the current `object <System.Classes.TStrings.htm>`__ to the specified ``FileName`` file. + + ``SaveToFile()`` does the same thing as `SaveToStream <System.Classes.TStrings.SaveToStream.htm>`__ when it writes to a file stream, except that ``SaveToFile()`` creates and destroys the file stream. + + Each string from the list is written to a separate line in the file. + + If the ``Encoding`` parameter is not given, then the strings are saved with the encoding specified in the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property. + ''' + @overload + def SaveToFile(self, FileName: str, Encoding: Encoding) -> None: ... + @overload + def SaveToStream(self, Stream: Stream) -> None: + ''' + Writes the value of the `Text <System.Classes.TStrings.Text.htm>`__ property to the ``Stream`` stream. + + ``SaveToStream()`` gets all strings from the current `Strings <System.Classes.TStrings.htm>`__ object and combines them into the single string containing these strings delimited by `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ sequence. Then ``SaveToStream()`` encodes this string using the specified ``Encoding``. Then ``SaveToStream()`` writes the encoded string into the specified ``Stream`` stream. + + If `WriteBOM <System.Classes.TStrings.WriteBOM.htm>`__ is ``True`` then ``SaveToStream()`` first `gets the preamble <System.SysUtils.TEncoding.GetPreamble.htm>`__ of the specified ``Encoding`` or of the `DefaultEncoding <System.Classes.TStrings.DefaultEncoding.htm>`__ (if ``Encoding = nil``) and writes the preamble bytes into the stream before the main string. + + If the ``Encoding`` parameter is not given, then the strings are saved with the encoding specified in the `Encoding <System.Classes.TStrings.Encoding.htm>`__ property. + + .. note:: On Windows, the default `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ ``Value`` is a carriage return and line feed combination (#13#10), whereas on macOS, it is just a line feed (#10). + + .. note:: If `TrailingLineBreak <System.Classes.TStrings.TrailingLineBreak.htm>`__ is ``True``, then ``SaveToStream()`` writes a finishing line break `LineBreak <System.Classes.TStrings.LineBreak.htm>`__ after the last string. + + If the stream is a file stream, ``SaveToStream()`` does the same thing as `SaveToFile <System.Classes.TStrings.SaveToFile.htm>`__, except that `SaveToFile <System.Classes.TStrings.SaveToFile.htm>`__ creates and destroys the file stream. + ''' + @overload + def SaveToStream(self, Stream: Stream, Encoding: Encoding) -> None: ... + def SetText(self, Text: str) -> None: + ''' + Sets the `Text <System.Classes.TStrings.Text.htm>`__ property. + + Call ``SetText()`` to replace the list with the strings specified by the `Text <System.Classes.TStrings.Text.htm>`__ parameter. ``SetText()`` adds strings one at a time to the list, using the carriage returns or linefeed characters in `Text <System.Classes.TStrings.Text.htm>`__ as delimiters indicating when to add a new string. + ''' + def ToStringArray(self) -> list: + ''' + Converts a `Strings <System.Classes.TStrings.htm>`__ descendant to a `string <System.String.htm>`__ array. + + Use ``ToStringArray()`` to obtain an array of `strings <System.String.htm>`__ for each string in the list. + ''' + def ToObjectArray(self) -> list: + ''' + Returns the `Object <System.TObject.htm>`__ array associated with `Strings <System.Classes.TStrings.Strings.htm>`__. + + Use ``ToObjectArray()`` to obtain the array of `Object <System.TObject.htm>`__ associated with `Strings <System.Classes.TStrings.Strings.htm>`__. + + .. note:: `Strings <System.Classes.TStrings.htm>`__ is an abstract class and this method has no effect. Descendent classes can associate objects with strings. + + .. note:: The `Strings <System.Classes.TStrings.htm>`__ object does not own the objects in the `Objects <System.Classes.TStrings.Objects.htm>`__ array. `Objects <System.Classes.TStrings.Objects.htm>`__ added to the `Objects <System.Classes.TStrings.Objects.htm>`__ array still exist even if the `Strings <System.Classes.TStrings.htm>`__ object is destroyed. They must be explicitly destroyed by the application. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __delitem__(self, other) -> Any: + '''Delete self[key].''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + def __setitem__(self, index, object) -> None: + '''Set self[key] to value.''' + +class StyleInfo: + '''wrapper for Delphi TStyleInfo type''' + __hash__: ClassVar[None] = ... + Author: Any + '''Provides access to the Author of a Style Info''' + AuthorEMail: Any + '''Provides access to the Author E-Mail of a Style Info''' + AuthorUrl: Any + '''Provides access to the Author URL of a Style Info''' + Name: Any + '''Provides access to the Name of a Style Info''' + Version: Any + '''Provides access to the Version of a Style Info''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class StyleManager: + ''' + ======================== + Vcl.Themes.TStyleManager + ======================== + + Handles styles-related operations. + + Use ``StyleManager`` to: + + - Register and unregister style classes. + - Set the active style. + - Load styles from files or resources. + - Retrieve styles and their descriptors. + - Replace and retrieve the style engine. + ''' + + __hash__: ClassVar[None] = ... + AutoDiscoverStyleResources: bool + ''' + Specifies whether the ``StyleManager`` should automatically load all styles of registered types or not. By default, ``AutoDiscoverStyleResources`` is set to ``True``. Set it to ``False`` if you want to turn off automatic discovery. + ''' + ActiveStyle: CustomStyleServices + ''' + Returns the current style that is set for the application. + ''' + ActiveDesigningStyle: CustomStyleServices + ''' + No have docs. + ''' + Enabled: bool + ''' + Specifies whether the style engine is enabled. ``Enabled()`` returns ``True`` if the style engine is active, and ``False`` otherwise. + ''' + Engine: CustomStyleEngine + ''' + # Returns the current style engine + Returns an instance of the current style engine. + ''' + EngineClass: CustomStyleEngineClass + ''' + Use it to ``get`` or ``set`` the reference to the style engine class. + ''' + Flags: StyleFlags + ''' + Returns the flags of the active style. + ''' + IsCustomStyleActive: bool + ''' + returns ``True`` if a custom style is the active style. Does not return ``True`` if the ``SystemStyle`` is active (i.e. *Windows Themes*) + No have docs. + ''' + Style: list[int] + ''' + Returns the style specified by name. + + ``Style()`` returns the style specified by ``Name`` from the list of registered styles. + ''' + StyleClassDescriptors: list[int] + ''' + Returns an array with the descriptors of all the registered style classes. + ''' + StyleDescriptor: list[int] + ''' + Returns the descriptor of the style specified by ``StyleName``. + ''' + StyleNames: list[int] + ''' + Returns an array with the names of all the registered style classes. + ''' + SystemStyle: CustomStyleServices + ''' + Returns the native system style, for example, the *Windows* theme. + ''' + SystemStyleName: str + ''' + No have docs. + ''' + FormBorderStyle: FormBorderStyle + ''' + Specifies the type of border to use for the ``Form``\ s in the application. + + Use the ``FormBorderStyle`` property to specify whether to use the system's border or the current style's border for the ``Form``\ s in the current application. + + By default, the border of the current style is used. + ''' + AnimationOnControls: bool + ''' + Enables the animation effect in controls when custom styles are used. + + Set the ``AnimationOnControls`` property to ``True`` to enable the fade effect in controls when the mouse enters or leaves the area of the control. + + By default, the value of ``AnimationOnControls`` is set to ``False``. + ''' + DialogsStyleName: str + ''' + No have docs. + ''' + SystemHooks: SystemHooks + ''' + The ``SystemHooks`` property allows displaying styled menus, common dialogs and tooltips. + + When a style is applied to the VCL application using the `StyleManager <Vcl.Themes.TStyleManager.htm>`__, the following values show styled menus, common dialogs and tooltips, according to the set style. + + The property includes these values by default: + + - ``shMenus`` shows styled menus. + - ``shDialogs`` shows styled common dialogs. (Only for ``Seattle`` version and superior). + - ``shToolTips`` shows tool tips. (Only for ``Seattle`` version and superior). To enable / disable a system hook, just add or remove the value from the enumerated property. + + For example: + + #. Use a `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ to show a styled dialog. + #. Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event from a `Button <Vcl.Dialogs.TCustomTaskDialog.Button.htm>`__ to execute a `OpenDialog <Vcl.Dialogs.TOpenDialog.htm>`__ component. + + .. note:: Find the Common Dialog components under the ``Dialogs`` category of the `Tool Palette <Tool_Palette.htm>`__. + + + .. code-block:: python + :caption: Delphi + + procedure TForm1.CheckBox1Click(self, Sender: Object); + begin + if CheckBox1.Checked then + //When checking the ``CheckBox``, the ``Value`` is added to the property and common dialog ares styled. + TStyleManager.SystemHooks := TStyleManager.SystemHooks + [shDialogs] + else + //When unchecking the ``CheckBox``, the ``Value`` is removed from the property and the style does not apply to common dialogs. + TStyleManager.SystemHooks := TStyleManager.SystemHooks - [shDialogs] + end; + + .. code-block:: python + :caption: Delphi + + procedure TForm2.Button2Click(self, Sender: Object); + begin + OpenDialog1.Execute; //Opens the dialog. + end; + + + .. code-block:: python + :caption: C++ + + void __fastcall TForm1::CheckBox1Click(TObject *Sender) + { + if (CheckBox1->Checked) { + //One possible way to add the value. + TStyleManager::SystemHooks = TStyleManager::SystemHooks + (TStyleManager::TSystemHooks() << TStyleManager::TSystemHook::shDialogs); + //Another possible way to add the value. + StyleManager::SystemHooks = TStyleManager::SystemHooks << TStyleManager::TSystemHook::shDialogs; } + else { + //One possible way to remove the value. + TStyleManager::SystemHooks = TStyleManager::SystemHooks - (TStyleManager::TSystemHooks() << TStyleManager::TSystemHook::shDialogs); + //Another possible way to add the value. + TStyleManager::SystemHooks = TStyleManager::SystemHooks >> TStyleManager::TSystemHook::shDialogs; } + } + + .. code-block:: python + :caption: C++ + + void __fastcall TForm1::Button1Click(TObject *Sender) + { + OpenDialog1->Execute(); //Opens the dialog. + } + ''' + UseSystemStyleAsDefault: bool + ''' + No have docs. + ''' + UseParentPaintBuffers: bool + ''' + No have docs. + ''' + + def GetStyle(self, Name: str) -> CustomStyleServices: + ''' + No have docs. + ''' + @classmethod + def CheckSysClassName(self, AClassName: str) -> bool: + ''' + Check for system class + No have docs. + ''' + @classmethod + def HandleMessage(self, Control: WinControl, Message: Message, DefWndProc: WndMethod) -> bool: + ''' + Handles a message from a control. + + ``HandleMessage()`` sends the message received from a control to the style engine. + + ============== ==================================================================== + **Parameter** **Meaning** + ============== ==================================================================== + ``Control`` The component that passes the message. + ``Message`` The message that is passed to the engine. + ``DefWndProc`` The default window procedure to be called for the message. + ============== ==================================================================== + ''' + @classmethod + def Initialize(self) -> None: + ''' + Initializes data about styles and style engines. + + .. note:: This function is reserved for internal use only. Do not call it directly. + ''' + @overload + def IsValidStyle(self, FileName: str) -> bool: + ''' + Checks whether a file represents a valid style. + + ``IsValidStyle()`` returns ``True`` if the file specified by ``FileName`` is recognized as a valid style. + + The second overload of ``IsValidStyle()`` returns, in addition, information about the style. + + ============= ================================================================= + **Parameter** **Meaning** + ------------- ----------------------------------------------------------------- + ``FileName`` The file name to be verified whether it represents a valid style. + ``StyleInfo`` A record that contains the information about the style. + ============= ================================================================= + ''' + @overload + def IsValidStyle(self, FileName: str, StyleInfo: StyleInfo) -> bool: + ''' + returns ``True`` if the file is recognized as a valid style and returns info about the style + ''' + def LoadFromFile(self, FileName: str) -> StyleServicesHandle: + ''' + Loads a style from the specified file. + + Note that ``LoadFromFile()`` does not automatically switch to the loaded style. To do that, call the `SetStyle <Vcl.Themes.TStyleManager.SetStyle.htm>`__ method. + ''' + @overload + @classmethod + def LoadFromResource(self, Instance: HINST, ResourceName: str) -> StyleServicesHandle: + ''' + Loads a style from the specified resource. + + Note that ``LoadFromResource`` does not automatically switch to the loaded style. To do that, call the `SetStyle <Vcl.Themes.TStyleManager.SetStyle.htm>`__ method. + + ================ ============================================== + **Parameter** **Meaning** + ------------- ------------------------------------------------- + ``Instance`` The instance handle of the loaded resource. + ``ResourceName`` The string associated with the resource. + ``ResType`` A string that identifies the type of resource. + ================ ============================================== + ''' + @overload + @classmethod + def LoadFromResource(self, Instance: HINST, ResourceName: str, ResourceType: PChar) -> StyleServicesHandle: + ''' + Load a style from a resource + ''' + @classmethod + def Notification(self, Operation: StyleEngineNotification, Data: Pointer) -> None: + ''' + Notifies the style engine of an event that occured. + + ============= ============================================ + **Parameter** **Meaning** + ------------- -------------------------------------------- + ``Operation`` The action that is performed. + ``Data`` The data on which the operation is executed. + ============= ============================================ + ''' + @classmethod + def RegisterStyle(self, Style: CustomStyleServices) -> None: + ''' + Registers the instance of a style specified by the ``Style`` parameter. + ''' + @overload + @classmethod + def RegisterStyleClass(self, Extension, Description: str, ResourceType: str, StyleClass: CustomStyleServicesClass) -> None: + ''' + Registers a style class with extension, description, and resource type. + + ================ ================================================================ + **Parameter** **Meaning** + ------------- ------------------------------------------------------------------- + ``Extension`` A string that specifies the extension used with the style files. + ``Description`` A string that specifies a description of the style. + ``ResourceType`` A string associated with the resource type. + ``StyleClass`` Specifies the style class to be registered. + ================ ================================================================ + ''' + @overload + @classmethod + def RegisterStyleClass(self, Extension, Description: str, ResourceType: PChar, StyleClass: CustomStyleServicesClass) -> None: + ''' + Register a style class with a file extension, description and resource type + ''' + @classmethod + def SetStyle(self, Name: str) -> None: + ''' + Sets the active style by name, instance, or handle. + + ============= ====================================================================================================================================================================================================================== + **Parameter** **Meaning** + ------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + ``Name`` The name of the style to be set as the active style. + ``Style`` A style instance to be set as the active style. + ``Handle`` The handle of the style to be set as the active style, as returned by the `LoadFromFile <Vcl.Themes.TStyleManager.LoadFromFile.htm>`__ or `LoadFromResource <Vcl.Themes.TStyleManager.LoadFromResource.htm>`__ method. + ============= ====================================================================================================================================================================================================================== + ''' + @overload + @classmethod + def SetStyle(self, Style: CustomStyleServices) -> None: + ''' + Set the active style by instance + ''' + @overload + @classmethod + def SetStyle(self, Handle: StyleServicesHandle) -> None: + ''' + Set the active style by handle + ''' + @classmethod + def TryLoadFromResource(self, Instance: HINST, ResourceName: str, ResourceType: PChar, Handle: StyleServicesHandle) -> bool: + ''' + Loads a style from a resource without raising an exception. + + ``TryLoadFromResource()`` returns ``True`` if the style was successfully loaded, or ``False`` otherwise. + + ================ ============================================== + **Parameter** **Meaning** + ``Instance`` The instance handle of the loaded resource. + ``ResourceName`` The string associated with the resource. + ``ResType`` A string that identifies the type of resource. + ``Handle`` The handle of the loaded style. + ================ ============================================== + ''' + @classmethod + def TrySetStyle(self, Name: str, ShowErrorDialog: bool) -> bool: + ''' + Sets the style specified by name as the active style, without raising an exception. + + ``TrySetStyle()`` returns ``True`` if the style was successfully set as the active style, and ``False`` otherwise. + + =================== ============================================================================================== + **Parameter** **Meaning** + ``Name`` A string that specifies the name of the style to be set as active. + ``ShowErrorDialog`` Specifies whether an error dialog box is shown if the style cannot be set as the active style. + =================== ============================================================================================== + ''' + @classmethod + def UnInitialize(self) -> None: + ''' + Uninitializes data about styles and style engines. + + .. note:: This function is reserv'ed for internal use only. Do not call it directly. + ''' + @classmethod + def UnRegisterStyle(self, Style: CustomStyleServices) -> None: + ''' + No have docs. + ''' + @classmethod + def UnRegisterStyleClass(self, StyleClass: CustomStyleServicesClass) -> None: + ''' + Unregisters a style class specified by the ``StyleClass`` parameter. + ''' + @classmethod + def UnRegisterStyleEngine(self, AEngineClass: CustomStyleEngineClass) -> None: + ''' + Unregisters the style engine specified by the ``AEngineClass`` parameter. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class TabControl(CustomTabControl): + ''' + ======================== + Vcl.ComCtrls.TTabControl + ======================== + + ``TabControl`` is a tab set that has the appearance of notebook dividers. + + Use ``TabControl`` to add a control with multiple tab settings to a form. Unlike a ``PageControl``, ``TabControl`` is not made up of several pages that contain different controls. Instead, ``TabControl`` is a single object. When the current tab changes, the ``TabControl`` must directly update its contents to reflect the change in an `OnChange <Vcl.ComCtrls.TTabControl.OnChange.htm>`__ event handler. + + Disabling a ``TabControl`` object disables all tabs because it is one control. To disable individual tabs, use `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ and disable the individual `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ controls that represent the pages. + + .. note:: When using one of the ``PageControl``s, if you want to restrict a user from switching to a tab, you cannot set TabSheet.Enabled <Vcl.ComCtrls.TTabSheet.Enabled.htm>`__ to ``False`` to accomplish that restriction. Instead, use the `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event to prevent the user from selecting a tab. + + The `Tabs <Vcl.ComCtrls.TTabControl.Tabs.htm>`__ property can be used to `define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to a tab item of the ``TabControl``. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HotTrack: bool + ''' + Determines whether 'labels on the tab under the mouse are automatically highlighted. + + Set `HotTrack <Vcl.ComCtrls.'TCustomTabControl.HotTrack.htm>`__ to ``True`` to provide visual feedback to the user about which tab would be selected if the mouse button is clicked. `HotTrack <Vcl.ComCtrls.TCustomTabControl.HotTrack.htm>`__ is especially useful when the ``TabControl`` contains multiple rows of tabs. + ''' + Images: CustomImageList + ''' + Specifies the images drawn in tabs. + + `Images <Vcl.ComCtrls.TCustomTabControl.Images.htm>`__ specifies the images that are drawn in tabs. For disabled tabs, grayed versions of the images are used. + + In the implementation of `CustomTabControl <Vcl.ComCtrls.TCustomTabControl.htm>`__, the order of images in ``ImageList`` properties directly corresponds to the associated tabs in the control. In the descendant class, `PageControl <Vcl.ComCtrls.TPageControl.htm>`__, this behavior is replaced by support for individual `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ objects, each with an `ImageIndex <Vcl.ComCtrls.TTabSheet.ImageIndex.htm>`__ property. In any case, the application programmer can define customized image displays by defining an `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event handler. + ''' + MultiLine: bool + ''' + Determines whether the tabs can appear on more than one row. + + Use `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ to determine how the tabs are displayed. If `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ is ``True``, the tabs are displayed on more than one row when the number of tabs exceeds the number that fits across the top of the ``TabControl``. How many rows is determined by how many tabs are in the ``TabControl``. If `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ is ``False``, the tabs are displayed on one row only, and the user must scroll the displayed scroll arrows to view all the tabs. + ''' + MultiSelect: bool + ''' + Specifies whether multiple tabs can be selected. + + Use `MultiSelect <Vcl.ComCtrls.TCustomTabControl.MultiSelect.htm>`__ to ``get`` or ``set`` whether multiple tabs can be selected. + + `MultiSelect <Vcl.ComCtrls.TCustomTabControl.MultiSelect.htm>`__ can only be ``True`` if ``Style`` is ``tsFlatButtons`` or ``tsButtons``. + ''' + OwnerDraw: bool + ''' + Specifies whether the ``TabControl`` handles its own painting. + + Set `OwnerDraw <Vcl.ComCtrls.TCustomTabControl.OwnerDraw.htm>`__ to ``True`` to override any default painting behavior. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``VCL.ComCtrls.TTabControl.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + RaggedRight: bool + ''' + Specifies whether rows of tabs stretch to fill the width of the control. + + Use `RaggedRight <Vcl.ComCtrls.TCustomTabControl.RaggedRight.htm>`__ to ``get`` or ``set`` whether rows of tabs stretch to fill the width of the control. + ''' + ScrollOpposite: bool + ''' + Determines how the rows of tabs are scrolled in a multi-line ``TabControl``. + + Set `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ to determine where previous rows of tabs in a multi-line ``TabControl`` move when the user selects a tab in another row. When `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``True``, previous rows of tabs are moved to the bottom of the ``TabControl`` if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is tpTop, or to the top if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is tpBottom. When `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``False``, previous rows of tabs are moved to the back of all other rows of tabs. + + For example, in a ``TabControl`` with three rows of tabs at the top, if the user selects a tab in the second row, `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ determines where the first row moves. If `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``True``, the second row now appears at the front (bottom) row on top of the ``TabControl``, followed by the third row behind (above) it. The first row moves to the bottom of the ``TabControl``. If `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ is ``False``, the first row moves to the back (top), so that the ``TabControl`` displays the second row in front (at the bottom of the tab region), followed by the third row (now in the middle), followed by the first row. + + .. note:: Setting `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ to ``True`` automatically sets the `MultiLine <Vcl.ComCtrls.TCustomTabControl.MultiLine.htm>`__ property to ``True``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + Style: TabStyle + ''' + Specifies the style of the ``TabControl``. + + Use `Style <Vcl.ComCtrls.TCustomTabControl.Style.htm>`__ to determine the appearance of the tabs. These can appear as notebook tabs or as buttons. + ''' + TabHeight: int + ''' + Specifies the height, in pixels, of the tabs in the ``TabControl``. + + Set `TabHeight <Vcl.ComCtrls.TCustomTabControl.TabHeight.htm>`__ to control the height of the tabs that appear above the client region of the ``TabControl``. The `TabHeight <Vcl.ComCtrls.TCustomTabControl.TabHeight.htm>`__ property is the vertical size in pixels of the individual tabs. If `TabHeight <Vcl.ComCtrls.TCustomTabControl.TabHeight.htm>`__ is set to 0, the tabs automatically size themselves to fit their text. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabPosition: TabPosition + ''' + Determines whether tabs appear at the top or bottom. + + Set `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ to ``tpTop`` to display the tabs at the top of the ``TabControl``. Set `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ to ``tpBottom`` to display the tabs at the bottom. If the `ScrollOpposite <Vcl.ComCtrls.TCustomTabControl.ScrollOpposite.htm>`__ property is ``True``, tabs can appear at both top and bottom, with the row containing the current tab and all subsequent rows on the side indicated by `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__. + + Due to a limitation in the windows common control, if `TabPosition <Vcl.ComCtrls.TCustomTabControl.TabPosition.htm>`__ is ``tpLeft`` or ``tpRight``, ``Font`` must be a ``TrueType`` font. Otherwise, tab text may paint incorrectly. + ''' + Tabs: Strings + ''' + Contains the list of text strings that label the tabs of the ``TabControl``. + + `Tabs <Vcl.ComCtrls.TCustomTabControl.Tabs.htm>`__ contains a `Strings <System.Classes.TStrings.htm>`__, a list of strings that label the tabs in the ``TabControl``. To add new tabs to the ``TabControl`` or to edit the tabs themselves, add a new string or edit the strings currently in the `Tabs <Vcl.ComCtrls.TCustomTabControl.Tabs.htm>`__ property. (To open the `String List editor <String_List_editor.htm>`__, double-click the `Tabs <Vcl.ComCtrls.TCustomTabControl.Tabs.htm>`__ property in the `Object Inspector <Object_Inspector.htm>`__.) To rearrange the tabs, rearrange the list of strings. + + `Tabs <Vcl.ComCtrls.TCustomTabControl.Tabs.htm>`__ can also contain objects associated with the ``Label``s, using the `System.Classes.TStrings.Objects <System.Classes.TStrings.Objects.htm>`__ property. + ''' + TabIndex: int + ''' + Identifies the selected tab on a ``TabControl``. + + Read `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ to determine which tab was selected by the user. `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ is the index of the tab in the list of labels maintained by the ``Tabs`` property. The first (leftmost) tab has a `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ of 0, the next has 1, and so on. If no tabs are selected, `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ has a value of -1. + + Set `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ to programmatically change the selected tab in the ``TabControl``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + TabWidth: int + ''' + Specifies the horizontal size, in pixels, of the tabs in the ``TabControl``. + + `TabWidth <Vcl.ComCtrls.TCustomTabControl.TabWidth.htm>`__ specifies a fixed width for all tabs. If `TabWidth <Vcl.ComCtrls.TCustomTabControl.TabWidth.htm>`__ is 0, then each tab is automatically made wide enough to show its caption. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs after a new tab is selected. + + Write an `OnChange <Vcl.ComCtrls.TCustomTabControl.OnChange.htm>`__ event handler to take specific action immediately after the selected tab changes. Use the `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ property to determine which tab is now selected. This is the opportunity to make any changes to the control that reflect the new state implied by the selected tab. + + Before the value of `TabIndex <Vcl.ComCtrls.TCustomTabControl.TabIndex.htm>`__ changes, an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event occurs. + + .. note:: The event is not called if you change the active page in code, for example, by setting the value of `ActivePage <Vcl.ComCtrls.TPageControl.ActivePage.htm>`__. + ''' + def OnChanging(self, Sender: Object, AllowChange: bool) -> None: + ''' + # OnChanging: TabChangingEvent + Occurs immediately before a new tab is selected. + + Write an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event handler to take specific action immediately before the selected tab changes. Set the ``AllowChange`` parameter to ``False`` to prevent the change. + + Use an `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event handler to prevent the user from leaving a tab setting until certain conditions have been met. An `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ event handler can also be used to save information about the current state of the ``TabControl`` before it is changed by a new tab selection. + + .. note:: The event is not called if you change the active page in code, for example, by setting the value of `PageControl <Vcl.ComCtrls.TPageControl.htm>`__.\ `ActivePage <Vcl.ComCtrls.TPageControl.ActivePage.htm>`__. + + `OnChanging <Vcl.ComCtrls.TCustomTabControl.OnChanging.htm>`__ is an event handler of type `Vcl.ComCtrls.TTabChangingEvent <Vcl.ComCtrls.TTabChangingEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnDrawTab(self, Control: CustomTabControl, TabIndex: int, Rect: Rect, Active: bool) -> None: + ''' + # OnDrawTab: DrawTabEvent + Occurs when a tab is about to be drawn. + + Use `OnDrawTab <Vcl.ComCtrls.TCustomTabControl.OnDrawTab.htm>`__ to customize the painting of tabs. + + You can paint the tab using the `Canvas <Vcl.ComCtrls.TCustomTabControl.Canvas.htm>`__ property. + + ``OnDrawTab`` is an event handler of type `Vcl.ComCtrls.TDrawTabEvent <Vcl.ComCtrls.TDrawTabEvent.htm>`__. See ``DrawTabEvent`` for a description of the parameters. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetImageIndex(self, Sender: Object, TabIndex: int, ImagelistIndex: int) -> None: + ''' + # OnGetImageIndex: TabGetImageEvent + Occurs when a tab is about to display its associated image. + + ``Vcl.ComCtrls.TTabControl.OnGetImageIndex`` inherits from `Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__. + + Occurs when a tab is about to display its associated image. + + Write an `OnGetImageIndex <Vcl.ComCtrls.TCustomTabControl.OnGetImageIndex.htm>`__ event handler to specify the ``ImageIndex`` for a given ``TabIndex``. + + On entry to the event handler, the ``ImageIndex`` parameter is the same as the ``TabIndex`` parameter, where ``TabIndex`` is the index of the tab which is about to display its image. Change the ``ImageIndex`` parameter to specify the index into the ``Images`` property that specifies the image that should be painted. + + ``OnGetImageIndex`` is an event handler of type `Vcl.ComCtrls.TTabGetImageEvent <Vcl.ComCtrls.TTabGetImageEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class TabSheet(WinControl): + ''' + ====================== + Vcl.ComCtrls.TTabSheet + ====================== + + ``TabSheet`` is an individual page in a `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ object. + + Use ``TabSheet`` to represent a single page in a tabbed ``PageControl``. Tab sheets are typically referred to as pages. `PageControl <Vcl.ComCtrls.TPageControl.htm>`__ maintains an indexed array of its ``TabSheet``\ s in its `Pages <Vcl.ComCtrls.TPageControl.Pages.htm>`__ property. Users can click on a tab to activate the ``TabSheet``. + + You can use the `Caption <Vcl.ComCtrls.TTabSheet.Caption.htm>`__ property of the ``TabSheet`` control to `define an accelerator key <Representing_Keys_and_Shortcuts.htm#Specifying_Accelerator_Keys>`__ to a page of the `PageControl <Vcl.ComCtrls.TPageControl.htm>`__. + ''' + + __hash__: ClassVar[None] = ... + PageControl: PageControl + ''' + Indicates the ``PageControl`` object that contains the ``TabSheet``. + + Read ``PageControl`` to gain access to the ``PageControl`` object that uses the ``TabSheet``. The properties and methods of the ``PageControl`` object can be used to locate the selected page, iterate through the other pages in the ``PageControl``, or change the display properties of the tabs. + + Set ``PageControl()`` to remove the ``TabSheet`` from its current ``PageControl`` (if any) and insert it into a new ``PageControl``. + ''' + TabIndex: int + ''' + Indicates the position of the ``TabSheet`` in the set of visible tabs in a ``PageControl`` object. + + Read ``TabIndex`` to determine where the user sees the ``TabSheet``. A value of 0 indicates the first visible ``TabSheet``, a value of 1 indicates the second visible ``TabSheet``, and so on. ``TabIndex`` is always less than or equal to PageIndex. For example, a ``TabSheet`` that has a PageIndex of 3 will have a ``TabIndex`` of 2 if one of the previous ``TabSheet``\ s in the ``PageControl`` is not visible. + + If a ``TabSheet``\ s. Tab``Visible`` property is ``False``, the ``TabIndex`` property is -1. + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + Caption: Caption + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the ``Caption``, use two ampersands (``'&&'``). + + .. notes:: + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + Highlighted: bool + ''' + Indicates whether the ``TabSheet`` appears highlighted. + + Use ``Highlighted`` to make a ``TabSheet`` stand out visually. When ``Highlighted`` is ``True``, the ``TabSheet`` is drawn using a highlight color so that it stands out visually from other ``TabSheet``\ s. + + .. note:: ``Highlighted`` is not linked to the active page of the host ``PageControl``. A ``PageControl`` can have only one active page, but can have multiple highlighted pages. + ''' + ImageIndex: ImageIndex + ''' + Specifies an image for the tab. + + Use ``ImageIndex`` to ``get`` or ``set`` the index of an image to be drawn in the tab. This index identifies an image from the ``Images`` property of the ``PageControl`` that contains the ``TabSheet``. Specify -1 to prevent an image from being drawn. + ''' + ImageName: ImageName + ''' + Displays the name of linked items from the `Image Collection <Vcl.VirtualImage.TCustomVirtualImage.ImageCollection.htm>`__. + ''' + Left: int + ''' + Specifies the horizontal coordinate of the left edge of a component relative to its parent. + + Use the `Left <Vcl.Controls.TControl.Left.htm>`__ property to determine where the left side of the control begins or to reposition the left side of the control. + + If the control is contained in another control, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the parent control. If the control is contained directly by the ``Form``, the property values are relative to the ``Form``. For forms, the value of the `Left <Vcl.Controls.TControl.Left.htm>`__ property is relative to the *Screen* in pixels. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + PageIndex: int + ''' + Indicates the index of the ``TabSheet`` in the list of ``TabSheet``\ s maintained by the ``PageControl``. + + Use ``PageIndex`` to determine where the ``TabSheet`` sits in its ``PageControl``. Each ``TabSheet`` in a ``PageControl`` is automatically assigned a ``PageIndex`` when it is inserted in the ``PageControl``. The first ``TabSheet`` receives a value of 0, the second has a value of 1, and so on. ``PageIndex`` values are reassigned if ``TabSheet``\ s are deleted or moved. To access a particular ``TabSheet`` given its ``Index`` value, use the indexed ``Pages`` property of the ``PageControl`` object. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ComCtrls.TTabSheet.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabVisible: bool + ''' + Specifies whether the tab of the `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ object appears in its ``PageControl``. + + Use ``TabVisible`` to temporarily remove a ``TabSheet`` from a ``PageControl``. When ``TabVisible`` is ``False``, the tab does not appear in the ``PageControl`` and its ``TabIndex`` property is -1. Setting ``TabVisible`` to ``True`` allows the user to see the tab of the ``TabSheet`` again. + ''' + Top: int + ''' + Specifies the ``'Y'`` coordinate of the upper-left corner of a control, relative to its parent or containing control in pixels. + + Use `Top <Vcl.Controls.TControl.Top.htm>`__ to locate the ``Top`` of the control or reposition the control to a different ``'Y'`` coordinate. The `Top <Vcl.Controls.TControl.Top.htm>`__ property, like the `Left <Vcl.Controls.TControl.Left.htm>`__ property, is the position of the control relative to its container. Thus, if a control is contained in a `Panel <Vcl.ExtCtrls.TPanel.htm>`__, the `Left <Vcl.Controls.TControl.Left.htm>`__ and `Top <Vcl.Controls.TControl.Top.htm>`__ properties are relative to the panel. If the control is contained directly by the ``Form``, it is relative to the ``Form``. For forms, the value of the `Top <Vcl.Controls.TControl.Top.htm>`__ property is relative to the *Screen* in pixels. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes window-creation parameters for the ``TabSheet``. + + The ``TabSheet`` calls ``CreateParams()`` internally when the ``TabSheet`` must be generated. ``CreateParams()`` overrides the inherited method to specify the type of window for the ``TabSheet``. + ''' + def DoHide(self) -> None: + ''' + Called when the user selects another tab. + + Generates an ``OnHide`` event. ``DoHide()`` is called automatically when the Tab``Visible`` property changes to ``False``. Override ``DoHide()`` in a derived class to perform class-specific actions when the ``TabSheet`` is temporarily removed from its ``PageControl``, or to block the ``OnHide`` event. + ''' + def DoShow(self) -> None: + ''' + Called when the user selects another tab. + + Generates an OnShow event. ``DoShow()`` is called automatically when the Tab``Visible`` property changes to ``False``. Override ``DoShow()`` in a derived class to perform class-specific actions when the ``TabSheet`` appears in its ``PageControl`` after being temporarily hidden, or to block the ``OnHide`` event. + ''' + def PaintWindow(self, DC: HDC) -> None: + ''' + Renders the image of a windowed control. + + Call `PaintWindow <Vcl.Controls.TWinControl.PaintWindow.htm>`__ to repaint the control. `PaintWindow <Vcl.Controls.TWinControl.PaintWindow.htm>`__ sends a ``WM_PAINT`` message to the windowed control's `DefaultHandler <Vcl.Controls.TWinControl.DefaultHandler.htm>`__ method, setting the message record's ``WParam`` field to the value passed in ``DC`` and the other parameter and ``Result`` fields to zeros. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Prepare control to be initialized from a *Stream*. + + `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ reimplements in order to assign Reader's parent as the Tab Sheet's parent. + ''' + def UpdateControlOriginalParentSize(self, AControl: Control, AOriginalParentSize: Point) -> None: + ''' + Updates the original size of the parent control. + + ``Vcl.ComCtrls.TTabSheet.UpdateControlOriginalParentSize`` inherits from `Vcl.Controls.TWinControl.UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__. + + `UpdateControlOriginalParentSize <Vcl.Controls.TWinControl.UpdateControlOriginalParentSize.htm>`__ is a protected method that updates the original size of the parent control. It is used internally to update the anchor rules of the control. + ''' + def UpdateImageName(self, Index: ImageIndex, Name: ImageName) -> None: + ''' + No have docs. + ''' + def UpdateImageIndex(self, Name: ImageName, Index: ImageIndex) -> None: + ''' + No have docs. + ''' + def CheckImageIndexAndName(self) -> None: + ''' + No have docs. + ''' + def SetParent(self, AParent: WinControl) -> None: + ''' + Sets the parent of the control. + + `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ is the protected implementation of the ``Parent`` property. Override `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ to execute additional code when the value of the ``Parent`` property changes. + + The ``AParent`` parameter specifies the new parent of the control. + + If the control already has a parent, `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ removes the control from that parent's list of controls by calling the parent's ``RemoveControl()`` method. If ``AParent`` is not ``nil`` (Delphi) or ``NULL`` (C++), `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ calls its ``InsertControl()`` method to add the control to its list of controls. + + The `Control <Vcl.Controls.TControl.htm>`__ destructor calls `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ (``nil`` (Delphi) or ``NULL`` (C++)) to remove the control from its parent's control list before destroying the component. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__. + + Call ``Create()`` to instantiate a ``TabSheet`` at runtime. Tab sheets added to a ``PageControl`` at design time are created automatically. + + ``Create()`` calls the inherited ``Create()`` method, then sets the initial values for the ``TabSheet`` component. + + When creating ``TabSheet``\ s at runtime, use the ``PageControl`` property to insert them into a ``PageControl`` object. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__. + + Do not call ``Destroy()`` directly at runtime. Instead, call ``Free()``. ``Free()`` verifies that the ``TabSheet`` is not ``nil`` and only then calls ``Destroy()``. ``Destroy()`` removes the ``TabSheet`` from the ``PageControl`` and then calls the inherited ``Destroy()`` method. + ''' + + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnHide(self, Sender: Object) -> None: + ''' + # OnHide: NotifyEvent + Occurs when the Tab``Visible`` property changes to ``False``. + + Write an ``OnHide`` event handler to take specific action when the ``TabSheet`` is temporarily removed from its ``PageControl``. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnShow(self, Sender: Object) -> None: + ''' + # OnShow: NotifyEvent + Occurs when the Tab``Visible`` property changes to ``True``. + + Write an ``OnShow`` event handler to take specific action when the ``TabSheet`` appears in its ``PageControl`` after being temporarily hidden. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class Timer(Component): + ''' + =================== + Vcl.ExtCtrls.TTimer + =================== + + ``Timer`` encapsulates the *Windows API Timer Functions*. + + ``Timer`` is used to simplify calling the *Windows API* timer functions ``SetTimer()`` and ``KillTimer()``, and to simplify processing the ``WM_TIMER`` messages. Use one timer component for each timer in the application. + + The execution of the timer occurs through its ``OnTimer`` event. ``Timer`` has an ``Interval`` property that determines how often the timer's ``OnTimer`` event occurs. The interval corresponds to the parameter for the *Windows API SetTimer Function*. + + .. warning:: Limitations on the total number of timers system-wide are system-dependent. + ''' + + __hash__: ClassVar[None] = ... + Enabled: bool + ''' + Controls whether the timer generates ``OnTimer`` events periodically. + + Use ``Enabled`` to enable or disable the timer. If ``Enabled`` is ``True``, the timer responds normally. If ``Enabled`` is ``False``, the timer does not generate ``OnTimer`` events. The default is ``True``. + ''' + Interval: int + ''' + Determines the amount of time, in milliseconds, that passes before the timer component initiates another ``OnTimer`` event. + + ``Interval`` determines how frequently the ``OnTimer`` event occurs. Each time the specified interval passes, the ``OnTimer`` event occurs. + + Use ``Interval`` to specify any cardinal value as the interval between ``OnTimer`` events. The default value is 1000 (one second). + + .. note:: A 0 value is valid, however the timer will not call an ``OnTimer`` event for a value of 0. + ''' + + def Create(self, AOwner: Component) -> None: + ''' + Instantiates a timer object. + + Call ``Create()`` to instantiate a timer at runtime. Timers added to forms or data modules at design time are created automatically. + + ``AOwner`` specifies the component, typically a form or data module, that is responsible for freeing the timer. + ''' + def Destroy(self) -> None: + ''' + Disposes of a timer object. + + Do not call ``Destroy()`` directly in an application. Instead, an application should call ``Free()``. ``Free()`` verifies that the timer is not ``nil`` before it calls ``Destroy()``. + + ``Destroy()`` deactivates the timer by setting `Enabled <Vcl.ExtCtrls.TTimer.Enabled.htm>`__ to ``False`` before freeing the resources required by the timer. + ''' + def Timer(self) -> None: + ''' + No have docs. + ''' + def Finalize(self) -> None: + ''' + No have docs. + ''' + + def OnTimer(self, Sender: Object) -> None: + ''' + Occurs when a specified amount of time, determined by the ``Interval`` property, has passed. + + Write an ``OnTimer`` event handler to execute an action at regular intervals. + + The ``Interval`` property of a timer determines how frequently the ``OnTimer`` event occurs. Each time the specified interval passes, the ``OnTimer`` event occurs. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ToggleSwitch(CustomToggleSwitch): + ''' + =========================== + Vcl.WinXCtrls.TToggleSwitch + =========================== + + A clickable control that allows a user to toggle between an ``On`` state and an ``Off`` state. + ''' + + __hash__: ClassVar[None] = ... + FClient: CustomToggleSwitch + ''' + A reference to the associated client control. + ''' + Action: BasicAction + ''' + Specifies the action associated with the control. + + `Action <Vcl.Controls.TControl.Action.htm>`__ is the ``Action`` object that is associated with the control. `Actions <Vcl.Controls.TControl.Action.htm>`__ allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event). To create actions at design time, place an ``ActionList`` component on a form or data module. Double-click the ``ActionList`` to bring up the ``ActionList`` editor. Add actions in the editor using its context menu. Once the actions have been added using the `Action List editor <Action_List_editor.htm>`__, they appear in the drop-down list for the `Action <Vcl.Controls.TControl.Action.htm>`__ property in the *Object Inspector*. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Alignment: Alignment + ''' + Specifies whether the ``ToggleSwitch`` caption is displayed on the right or the left side. + + Default is ``taRightJustify``. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Indicates whether the control adjusts its bounds based on the `SwitchHeight <Vcl.WinXCtrls.TCustomToggleSwitch.SwitchHeight.htm>`__, `SwitchWidth <Vcl.WinXCtrls.TCustomToggleSwitch.SwitchWidth.htm>`__, and `StateCaptions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ properties. + + Default is ``True``. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + DisabledColor: Color + ''' + The color of the ``ToggleSwitch`` when it is disabled. + + ``Vcl.WinXCtrls.TToggleSwitch.DisabledColor`` inherits from `Vcl.WinXCtrls.TCustomToggleSwitch.DisabledColor <Vcl.WinXCtrls.TCustomToggleSwitch.DisabledColor.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomToggleSwitch.DisabledColor <Vcl.WinXCtrls.TCustomToggleSwitch.DisabledColor.htm>`__. + + The color of the ``ToggleSwitch`` when it is disabled. + + Default is ``clBtnShadow``. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + FrameColor: BasicAction + ''' + The color of the ``ToggleSwitch`` frame. + + Default is ``clWindowText``. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + HelpContext: HelpContext + ''' + Specifies the vertical size of the control in pixels. + + In case of a ``.chm`` help file, you must map symbolic *Context IDs* of ``Help`` topics to numeric topic ``ID`` values in the ``[MAP]`` section of your project (``.hhp``) file. To enable *Context ID*-based context-sensitive ``Help`` for a control, set `Vcl.Controls.TControl.HelpType <Vcl.Controls.TControl.HelpType.htm>`__ to ``htContext`` and set `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ to a numeric topic ``ID``. + + A topic ``ID`` of ``'0'`` (default) means that no ``Help`` topic is provided for the control. To use the ``Help``, insert in the ``uses`` clause of your application the `Vcl.HtmlHelpViewer <Vcl.HtmlHelpViewer.htm>`__ or another unit that provides an interface to the external *Help* viewer to use. For C++, you need to include the ``HTMLHelpViewer.hpp`` header file. + ''' + Hint: str + ''' + `Hint <Vcl.Controls.TControl.Hint.htm>`__ contains the text string that appears when the user moves the mouse over the control. + + Use the `Hint <Vcl.Controls.TControl.Hint.htm>`__ property to provide a string of *Help* text either as a *Help Hint* or as *Help* text on a particular location, such as a ``StatusBar``. + + A *Help Hint* is a box containing *Help* text that appears for a control when the user moves the mouse pointer over the control and pauses momentarily. + + *To set up Help Hints* + + - Specify the ``Hint`` property of each control for which a *Help Hint* should appear. + - Set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of each appropriate control to ``True``, or set the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of all controls to ``True`` and set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the form to ``True``. + - At run time, set the value of the application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property to ``True``. + - To show the ``Hint`` on a ``StatusBar`` or another location, use the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler of the application. The application's `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event occurs when the mouse pointer moves over the control. + - Specify a hint to be used for both a *Help Hint* box and by an `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler by specifying values separated by a ``'|'`` (pipe) character. + + For example, + + .. code-block:: python + + Edit1.Hint := 'Name|Enter Name in the ``Edit`` box|1'; + + .. code-block:: python + + Edit1->Hint = "Name|Enter Name in the ``Edit`` box|1"; + + Here: + + - The ``Name`` part is the short hint and appears at the top of the *Help Hint* box. + - Enter full name in the ``Edit`` box`` is the long hint and appears below the short hint. It can be extracted using the `GetLongHint <Vcl.Controls.GetLongHint.htm>`__ function for use in an `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler. + - ``'1'`` is an optional ``ImageIndex`` in an ``ImageList`` in the ``Images`` property of the control and specifies the index of the image to appear in the hint. + + If ``Hint`` contains only one value, the entire string is used as a *Help Hint* and returned by the `GetLongHint <Vcl.Controls.GetLongHint.htm>`__ and `GetShortHint <Vcl.Controls.GetShortHint.htm>`__ functions. If a control has no `Hint <Vcl.Controls.TControl.Hint.htm>`__ value specified, but its parent control does, the control uses the value of the parent control (as long as the control's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property is ``True``). + + .. note:: If the application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property is ``False``, the *Help Hint* does not appear, but the `OnHint <Vcl.Forms.TApplication.OnHint.htm>`__ event handler is still called. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``VCL.WinXCtrls.TToggleSwitch.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Indicates whether the ``ToggleSwitch`` is in read-only mode. + + If ``True``, the user cannot change the state of the ``ToggleSwitch``. You can still change the `State <Vcl.WinXCtrls.TCustomToggleSwitch.State.htm>`__ programatically. + + Default is ``False``. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + ShowStateCaption: bool + ''' + Indicates whether to display the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ of the switch. + + ``Vcl.WinXCtrls.TToggleSwitch.ShowStateCaption`` inherits from `Vcl.WinXCtrls.TCustomToggleSwitch.ShowStateCaption <Vcl.WinXCtrls.TCustomToggleSwitch.ShowStateCaption.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomToggleSwitch.ShowStateCaption <Vcl.WinXCtrls.TCustomToggleSwitch.ShowStateCaption.htm>`__. + + Indicates whether to display the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__ of the switch. + + Default is ``True``. + ''' + State: ToggleSwitchState + ''' + The current `state <Vcl.WinXCtrls.TToggleSwitchState.htm>`__ of the ``ToggleSwitch``. + + Possible values are: + + - ``tssOff``: Default. The ``ToggleSwitch`` is in the off state. + - ``tssOn``: The ``ToggleSwitch`` is in the on state. + ''' + StateCaptions: ToggleSwitchStateCaptions + ''' + The `captions <Vcl.WinXCtrls.TToggleSwitchStateCaptions.htm>`__ of the ``ToggleSwitch``. + + ``Vcl.WinXCtrls.TToggleSwitch.StateCaptions`` inherits from `Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + SwitchHeight: int + ''' + The `height <Vcl.WinXCtrls.TCustomToggleSwitch.Height.htm>`__ of the ``ToggleSwitch`` excluding the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. + + ``Vcl.WinXCtrls.TToggleSwitch.SwitchHeight`` inherits from `Vcl.WinXCtrls.TCustomToggleSwitch.SwitchHeight <Vcl.WinXCtrls.TCustomToggleSwitch.SwitchHeight.htm>`__. All content below this line refers to `Vcl.WinXCtrls.TCustomToggleSwitch.SwitchHeight <Vcl.WinXCtrls.TCustomToggleSwitch.SwitchHeight.htm>`__. + ''' + SwitchWidth: int + ''' + The `width <Vcl.WinXCtrls.TCustomToggleSwitch.Width.htm>`__ of the ``ToggleSwitch`` excluding the `captions <Vcl.WinXCtrls.TCustomToggleSwitch.StateCaptions.htm>`__. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + ThumbColor: Color + ''' + The color of the ``ToggleSwitch`` thumb. + + Default is ``clWindowText``. + ''' + ThumbWidth: int + ''' + The color of the ``ToggleSwitch`` thumb. + + Default is ``clWindowText``. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + Width: int + ''' + Specifies the horizontal size of the control or form in pixels. + + Use the `Width <Vcl.Controls.TControl.Width.htm>`__ property to read or change the width of the control. + + .. note:: For ``TabSheet`` controls, changing this property at run time has no effect. + ''' + + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object, Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + OnStartDrag: StartDragEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ToolBar(ToolWindow): + ''' + ===================== + Vcl.ComCtrls.TToolBar + ===================== + + ``ToolBar`` manages tool buttons and other controls, arranging them in rows and automatically adjusting their sizes and positions. + + ``ToolBar`` is a container for tool buttons (``TToolButton``). It provides an easy way to arrange and manage visual controls. + + All tool buttons on a ``ToolBar`` maintain a uniform ``Width`` and ``Height``. + + Other controls can sit on a ``ToolBar``. These controls (which are held in place by invisible tool buttons) maintain a uniform height. + + Controls can automatically wrap around and start a new row when they do not fit horizontally on the ``ToolBar``. + + The *flat* property allows the background to show through the ``ToolBar`` and gives pop-up borders to the tool buttons. + + Spaces and dividers (which are in fact specially configured tool buttons) can group controls on the ``ToolBar`` both visually and functionally. + + Typically, the tool buttons correspond to items in an application's menu and give the user more direct access to the application's commands. + ''' + + __hash__: ClassVar[None] = ... + FButtonHashTable: HashTable + ''' + No have docs. + ''' + ButtonCount: int + ''' + Gives the number of buttons in the ``ToolBar``. + + ``ButtonCount`` gives the number of buttons in the ``Buttons`` array. + ''' + Canvas: Canvas + ''' + Specifies the drawing surface for the ``ToolBar``. + + Use ``Canvas`` to draw or paint on the surface of the ``ToolBar`` in an `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ or `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ event handler. The `Canvas <Vcl.Graphics.TCanvas.htm>`__ object provides the properties and methods needed for drawing and painting. + ''' + CustomizeKeyName: str + ''' + Specifies the registry key where the tool bar saves its current button configuration before the user changes it using the ``ToolBar`` customize dialog. + + Use ``CustomizeKeyName`` to specify where the ``ToolBar`` saves its button configuration when the user first displays the ``ToolBar`` customize dialog. This is a subkey of ``HKEY_CURRENT_USER``. + + When the user double-clicks the tool bar to display the ``ToolBar`` customize dialog, the tool bar receives an `OnCustomizing <Vcl.ComCtrls.TToolBar.OnCustomizing.htm>`__ event and then automatically saves its current configuration to this key using the name specified by the `CustomizeValueName <Vcl.ComCtrls.TToolBar.CustomizeValueName.htm>`__ property. If the user instructs the dialog to restore this configuration, the ``ToolBar`` fetches the saved configuration from this registry key. + ''' + CustomizeValueName: str + ''' + Specifies the registry value under which the tool bar saves its current button configuration before the user changes it using the ``ToolBar`` customize dialog. + + Use ``CustomizeValueName`` to specify the name that the ``ToolBar`` uses to save its button configuration when the user first displays the ``ToolBar`` customize dialog. This is a value under the registry key specified by the `CustomizeKeyName <Vcl.ComCtrls.TToolBar.CustomizeKeyName.htm>`__ property. + + When the user double-clicks the tool bar to display the ``ToolBar`` customize dialog, the tool bar receives an `OnCustomizing <Vcl.ComCtrls.TToolBar.OnCustomizing.htm>`__ event and then automatically saves its current configuration to the ``Registry`` using this value. If the user instructs the dialog to restore this configuration, the ``ToolBar`` fetches this saved configuration. + ''' + RowCount: int + ''' + Indicates the number of rows in the ``ToolBar``. + + Reading ``RowCount()`` returns the number of rows in which the tool buttons are arranged. + ''' + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a tool palette, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the tool palette remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoSize: bool + ''' + Specifies whether the control sizes itself automatically to accommodate its contents. + + Use `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ to specify whether the control sizes itself automatically. When `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``True``, the control resizes automatically when its contents change. + + By default, `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ is ``False``. + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + ButtonHeight: int + ''' + Specifies the height of the controls in the ``ToolBar``. + + ``ButtonHeight`` represents the height, in pixels, of the controls in the ``ToolBar``. + ''' + ButtonWidth: int + ''' + Specifies the width of the tool buttons (``TToolButton``) in the ``ToolBar``. + + ``ButtonWidth`` represents the width, in pixels, of the ``ToolButton`` components on the ``ToolBar``. It has no effect on tool buttons whose ``Style`` property is set to tbsSeparator or tbsDivider. + ''' + Buttons: list[ToolButton] + ''' + Lists the ``ToolButton``\ s (``TToolButton``) in the ``ToolBar``. + + ``Buttons`` maintains a list of TToolButton instances. All ``ToolButton``\ s that share a `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ parent have the same height and (except for separators and dividers) the same width. Other controls on a ``ToolBar`` are held in place by invisible separators, which are automatically created and destroyed. To add ``ToolButton``\ s to the ``ToolBar`` at design time, select the ``ToolBar``, right-click, and choose New Button. To create a space (separator) between one button and the next, select New Separator. To create a divider between buttons, add a ``Button`` and set its `Style <Vcl.ComCtrls.TToolButton.Style.htm>`__ property to tbsDivider. Other controls may be added to the ``ToolBar`` directly from the *Component Palette*. + ''' + Caption: str + ''' + Specifies a text string that identifies the control to the user. + + Use `Caption <Vcl.Controls.TControl.Caption.htm>`__ to specify the text string that labels the control. To underline a character in a `Caption <Vcl.Controls.TControl.Caption.htm>`__ that labels a component, include an ampersand (``'&'``) before the character. This type of character is called an accelerator character. The user can then select the component by pressing *Alt* while typing the underlined character. To display an ampersand character in the caption, use two ampersands (``'&&'``). + + **NOTES**: + + - Controls that display text use either the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property or the `Text <Vcl.Controls.TControl.Text.htm>`__ property to specify the text value. The property that is used depends on the type of control. In general, `Caption <Vcl.Controls.TControl.Caption.htm>`__ is used for text that appears as a window title or ``Label``, while `Text <Vcl.Controls.TControl.Text.htm>`__ is used for text that appears as the content of a control. + - For some controls, such as `Button <Vcl.StdCtrls.TButton.htm>`__, it is not possible to change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__. If you want to change the color of a button ``Caption``, you should use an alternate button type such as `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ instead of `Button <Vcl.StdCtrls.TButton.htm>`__. With either `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__ or `BitBtn <Vcl.Buttons.TBitBtn.htm>`__, you can change the color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property by using the `Font <Vcl.Controls.TControl.Font.htm>`__ property. + - For `LinkLabel <Vcl.ExtCtrls.TLinkLabel.htm>`__, an *HTML* tag is declared inside the `Caption <Vcl.Controls.TControl.Caption.htm>`__ property either at run time or at design time. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the title bar. For example, *Windows XP* uses much larger title bars than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + Customizable: bool + ''' + Specifies whether the user can customize the ``ToolBar`` at runtime. + + Set ``Customizable`` to ``True`` to allow the user to add, delete, and move ``ToolBar`` buttons at runtime. There are two ways the user can change a customizable ``ToolBar``: + + By holding the shift key, the user can drag a ``Button`` to a new position on the tool bar, or drag it off the ``ToolBar`` entirely to delete the button. + + By double-clicking on the ``ToolBar``, the user can display the ``ToolBar`` customize dialog. The ``ToolBar`` customize dialog shows all the possible buttons in two ``ListBox``\ es, one that contains buttons not on the tool bar, and one that contains buttons currently on the tool bar. The user can use this dialog to add or remove buttons and to change their order. + + .. note:: When ``Customizable`` is ``True``, a number of events inform the tool bar component when the user makes changes. + ''' + DisabledImages: CustomImageList + ''' + Lists the images that can appear on disabled tool buttons. + + ``DisabledImages`` contains a list of images that can appear on tool buttons when they are disabled. Each tool button's ``ImageIndex`` property determines the specific image displayed on it. If ``DisabledImages`` is unassigned, disabled tool buttons display grayed versions of their regular images (specified by the ``Images`` property). + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ to ``True`` to allow other controls to be docked to this windowed control. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + DrawingStyle: BDrawingStyle + ''' + Stores the style type. + + This property stores either the ``dsNormal`` or ``dsGradient`` style choice. + ''' + EdgeBorders: EdgeBorders + ''' + Determines which sides of the control have visible borders. + + Use the `EdgeBorders <Vcl.ToolWin.TToolWindow.EdgeBorders.htm>`__ property to add or remove borders. The appearance of the borders can be set with the `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ and `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ properties. + ''' + EdgeInner: EdgeStyle + ''' + Determines the border style for the control's inner edge. + + Use `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ to provide the ``ToolWindow`` with a three-dimensional beveled look. A ``ToolWindow`` has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ specifies the appearance of the inner border. It can be raised (``\ esRaised``), lowered (``\ esLowered``), or left off altogether (``\ esNone``). + + .. note:: The `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ property has an effect only on the sides specified by the `EdgeBorders <Vcl.ToolWin.TToolWindow.EdgeBorders.htm>`__ property. + + Use `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ with `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ to give the component a three-dimensional look. + ''' + EdgeOuter: EdgeStyle + ''' + Determines the border style for the control's outer edge. + + Use `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ to provide the ``ToolWindow`` with a three-dimensional beveled look. A ``ToolWindow`` has two borders on each side, an outer border drawn next to the outer edge, and an inner border drawn inside the outer border. `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ specifies the appearance of the outer border. It can be raised (``\ esRaised``), lowered (``\ esLowered``), or left off altogether (``\ esNone``). + + .. note:: The `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ property has an effect only on the sides specified by the `EdgeBorders <Vcl.ToolWin.TToolWindow.EdgeBorders.htm>`__ property. + + Use `EdgeOuter <Vcl.ToolWin.TToolWindow.EdgeOuter.htm>`__ with `EdgeInner <Vcl.ToolWin.TToolWindow.EdgeInner.htm>`__ to give the component a three-dimensional look. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Flat: bool + ''' + Makes the ``ToolBar`` transparent and eliminates tool-button borders. + + If *flat* is set to ``True``, the ``ToolBar`` and its tool buttons are transparent; background colors and graphics show through them. In addition, when *flat* is ``True``, tool buttons (``TToolButton``) on the ``ToolBar`` have pop-up borders that appear only when the mouse is passed over the button. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the caption or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + GradientEndColor: Color + ''' + ``Color`` used as end color for the gradient. + + This property stores the color that is used to paint the gradient when the drawing ends. (The end color blends with the start color). + ''' + GradientStartColor: Color + ''' + ``Color`` used as start color for the gradient. + + The property stores the value that represents the drawing color when the gradient starts painting. + ''' + Height: int + ''' + Specifies the vertical size of the control in pixels. + + Use the `Height <Vcl.Controls.TControl.Height.htm>`__ property to read or change the height of the control. + ''' + HideClippedButtons: bool + ''' + Specifies handling of buttons obscured by adjacent ``ToolBar``. + + If ``HideClippedButtons`` is set to ``True``, any button partially obscured by a neighboring band is hidden. + ''' + HotImages: CustomImageList + ''' + Lists the images that can appear on tool buttons when the mouse points to them. + + ``HotImages`` contains a list of images that can appear on tool buttons when the mouse passes over them at runtime. Each tool button's ``ImageIndex`` property determines the specific image displayed when the mouse points to it. If ``HotImages`` is unassigned, tool buttons retain their regular images (specified by the ``Images`` property) when pointed to. Use a ``ImageList`` control to hold the images that will be shown for hot images. Typically, then, the application will have two TImageList controls, one for the `Images <Vcl.ComCtrls.TToolBar.Images.htm>`__ property and one for the ``HotImages`` property. To use ``HotImages`` set the `Flat <Vcl.ComCtrls.TToolBar.Flat.htm>`__ property to ``True``. + ''' + HotTrackColor: Color + ''' + ``Color`` used as hot tracking color when in gradient style. + + This is the color used as the hot tracking color when the ``ToolBar``\ s. `DrawingStyle <Vcl.ComCtrls.TToolBar.DrawingStyle.htm>`__ property is set to ``dsGradient``. The hot tracking color is the color the button turns when the mouse moves over it. + ''' + Images: CustomImageList + ''' + Lists the images that can appear on tool buttons. + + ``Images`` contains a list of images that can appear on the ``ToolBar``\ s. tool buttons. Each tool button's ``ImageIndex`` property determines the specific image displayed on it. If ``Images`` is unassigned, no images are displayed on the tool buttons. + + ``Images`` in the list should be 16x16. + ''' + Indent: int + ''' + Specifies the margin on the left side of the ``ToolBar``. + + ``Indent`` specifies, in pixels, the margin that separates the left edge of the ``ToolBar`` from the controls within it. + ''' + List: bool + ''' + Aligns captions on the right and images on the left in tool buttons. + + When ``List`` is ``False``, tool buttons (``TToolButton``) appear in the ``ToolBar`` with their images (if any) centered and their captions (if visible) underneath. Setting ``List`` to ``True`` aligns captions to the right and images to the left. + ''' + Menu: MainMenu + ''' + Causes the ``ToolBar`` to populate itself with buttons that correspond to items in a menu. + + Use the ``Menu`` property to populate the tool bar to match a menu component. Setting ``Menu`` causes the ``ToolBar`` to delete all of its current buttons and replace them with tool buttons that match the items in the specified menu component. + + In applications that use ``Menu`` to populate the ``ToolBar``, do not change the `Buttons <Vcl.ComCtrls.TToolBar.Buttons.htm>`__ property by adding, deleting, or editing ``ToolBar`` buttons. + + .. note:: The ``ToolBar`` does not dynamically track any changes to the menu specified by ``Menu``. That is, it sets the tool buttons to reflect the set of items in the menu at the point when the application sets this property, and ignores any subsequent changes. + ''' + GradientDirection: GradientDirection + ''' + Specifies whether the direction of the gradient is horizontal or vertical. + + This property stores the value for the gradient direction. + ''' + GradientDrawingOptions: BGradientDrawingOptions + ''' + Stores the drawing option chosen. + + This property contains either the ``gdoHotTrack`` or ``gdoGradient`` option, depending on which one was chosen. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all `Help Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ShowCaptions: bool + ''' + Determines whether text captions are displayed on tool buttons. + + If ``ShowCaptions`` is set to ``True``, tool buttons appear in the ``ToolBar`` with their captions displayed. Setting ``ShowCaptions`` to ``True`` may increase the size of the tool buttons. + ''' + AllowTextButtons: bool + ''' + Determines whether tool buttons that consist only of text can be placed on the ``Toolbar``. + + When set to ``True``, the ``tbsTextButton`` style is available for the ``ToolButton`` control, allowing you to create tool buttons on the ``Toolbar`` that consist only of text. When set to ``False``, the ``tbsTextButton`` style is not available for the ``ToolButton`` control. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Transparent: bool + ''' + Specifies whether the ``ToolBar`` is transparent. + + Use ``Transparent`` to ``get`` or ``set`` whether the ``ToolBar`` is transparent. Note the ``Transparent`` property applies only to the ``ToolBar`` itself—not its buttons. + + .. tip:: To avoid painting problems, set the ``Transparent`` property before the ``ToolBar`` becomes visible. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + Wrapable: bool + ''' + Enables automatic line-wrap for components in the ``ToolBar``. + + If ``Wrapable`` is ``True``, components automatically wrap around and form new rows when they do not fit horizontally in the ``ToolBar``. + ''' + + def ControlChange(self, Inserting: bool, Child: Control) -> None: + ''' + No have docs. + ''' + def AlignControls(self, AControl: Control, Rect: Rect) -> None: + ''' + Aligns any child controls of the ``ToolBar`` within a specified area of the control. + + The protected ``AlignControls()`` method is called automatically to align all controls within an area of container control (in this case the tool bar). In `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__, ``AlignControls()`` takes into account the special needs of a tool bar in arranging its buttons. + + ``Control`` is a child control that should have precedence when laying out the child controls. If ``Control`` is ``nil`` (Delphi) or ``NULL`` (C++), none of the child controls has precedence. + + ``Rect`` is the area in which to align the child controls. + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Indicates whether the ``ToolBar`` can resize itself automatically to accommodate its contents. + + ``CanAutoSize()`` is called automatically when the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True`` and an attempt is made to resize the control. It allows the ``ToolBar`` to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property before the resize sequence that ends with the ``OnResize`` event. + + When ``CanAutoSize()`` is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the ``ToolBar``. ``CanAutoSize()`` adjusts these values so that the ``ToolBar``\ s. size adjusts to its buttons. If the adjustment results in values of ``NewWidth`` and ``NewHeight`` that differ from the control's current ``Width`` and ``Height``, ``CanAutoSize()`` returns ``True``, indicating that the resize sequence should proceed. If, after adjustment, ``NewWidth`` and ``NewHeight`` equal ``Width`` and `Height <Vcl.ComCtrls.TTextAttributes.Height.htm>`__, ``CanAutoSize()`` returns ``False``, and the resize sequence is aborted. + ''' + def CancelMenu(self) -> None: + ''' + Called when the menu associated with a ``ToolBar`` button is canceled. + + Override ``CancelMenu`` in a derived class to handle the canceling of a menu on one of the tool buttons. + + By default, ``CancelMenu`` clears the highlighting and hot item in the menu. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Repositions and resizes the ``ToolBar`` by a specified ratio. + + Use ``ChangeScale()`` to change the scale of the ``ToolBar``. + + ``ChangeScale()`` modifies the position and size of a ``ToolBar`` as well as rescaling the buttons. Thus, ``ChangeScale()`` modifies the `Top <Vcl.ComCtrls.TListItem.Top.htm>`__, ``Left``, ``Width``, and `Height <Vcl.ComCtrls.TTextAttributes.Height.htm>`__ properties. + + The ``'M'`` and ``'D'`` parameters define a fraction by which to scale the control. The ``'M'`` parameter is the multiplier and the ``'D'`` parameter is the divisor. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100 (75/100). Alternately, the same results are achieved by specifying the value of ``'M'`` as 3, and the value of ``'D'`` as 4 (3/4). Both fractions are equal and result in the control being scaled by the same amount, 75%. + ''' + def CheckMenuDropdown(self, Button: ToolButton) -> bool: + ''' + Displays a ``ToolBar`` button's drop-down menu. + + ``CheckMenuDropdown()`` is called automatically when the drop-down arrow portion of a ``ToolButton`` is clicked or if a ``ToolButton`` has an assigned `MenuItem <Vcl.ComCtrls.TToolButton.MenuItem.htm>`__ property. + + ``Button`` is the drop-down ``ToolBar`` button that was clicked. + + ``CheckMenuDropdown()`` has no effect unless the button's `Style <Vcl.ComCtrls.TToolButton.Style.htm>`__ property contains ``tbsDropDown``. + ''' + def ClickButton(self, Button: ToolButton) -> None: + ''' + Simulates the clicking of a ``ToolBar`` button. + + Call ``ClickButton()`` to simulate the clicking of a ``ToolBar`` button. + + ``Button`` is the ``ToolBar`` button to click. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter record passed in the ``Params`` parameter. + + ``CreateParams()`` is called automatically to initialize the window-creation parameters whenever the window for the ``ToolBar`` needs to be created. ``CreateParams()`` overrides the inherited method to implement those properties that require a specialize window style. + ''' + def CreateWnd(self) -> None: + ''' + Creates the window that implements the ``ToolBar``. + + The *Windows* control for the ``ToolBar`` can be temporarily destroyed and recreated in order to set properties that require changing the window creation parameters. `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ calls ``CreateWnd()`` to create this *Windows* control when necessary. + ''' + def GradientDrawToolBar(self, ARect: Rect) -> bool: + ''' + Use this method for drawing the ``ToolBar`` when ``gdoGradient`` and ``dsGradient`` are both set. + + This method is used for drawing the ``ToolBar`` when ``gdoGradient`` and ``dsGradient`` are both set + ''' + def GradientDrawButton(self, Button: ToolButton, State: CustomDrawState, Flags: TBCustomDrawFlags) -> bool: + ''' + Use this method for drawing toolbuttons when ``gdoGradient`` and ``dsGradient`` are both set. + + This method is used for drawing toolbuttons when ``gdoGradient`` and ``dsGradient`` are both set. + ''' + def CustomDraw(self, ARect: Rect, Stage: CustomDrawStage) -> bool: + ''' + Generates `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ and `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ events. + + ``CustomDraw()`` is called automatically at discrete stages during the drawing process to generate the `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ and `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ events. + + ``ARect`` specifies the boundaries of the ``ToolBar`` on the ``ToolBar``\ s. `Canvas <Vcl.ComCtrls.TToolBar.Canvas.htm>`__. + + ``Stage`` indicates the current stage of the paint process. When ``Stage`` is ``cdPrePaint``, ``CustomDraw()`` generates an `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ event followed by an `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ event. At all other stages, ``CustomDraw()`` generates only the ``OnAdvancedCustomDraw`` event. + + ``CustomDraw()`` returns ``True`` if the ``ToolBar`` should continue with its default painting sequence, ``False`` if the painting sequence should end after the call. + ''' + def CustomDrawButton(self, Button: ToolButton, State: CustomDrawState, Stage: CustomDrawStage, Flags: TBCustomDrawFlags) -> bool: + ''' + Generates `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ and `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ events. + + ``CustomDrawButton()`` is called automatically at discrete stages during the drawing process to generate the `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ and `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ events. + + ``Button`` specifies the tool button that needs to be drawn. + + ``State`` describes the state of the button, so that the event handler can reflect that state in the button's image. + + ``Stage`` indicates the current stage of the paint process. When ``Stage`` is ``cdPrePaint``, ``CustomDrawButton`` generates an `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ event followed by an `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ event. At all other stages, ``CustomDrawButton`` generates only the `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ event. + + ``Flags`` is used only when ``Stage`` is ``cdPrePaint``. It influences how the button is subsequently rendered by the default drawing process. ``CustomDrawButton()`` returns the set of flags that indicates how the ``ToolBar`` should proceed with rendering the button. + ''' + def DoQueryInsert(self, Index: int) -> bool: + ''' + Generates an `OnCustomizeCanInsert <Vcl.ComCtrls.TToolBar.OnCustomizeCanInsert.htm>`__ event. + + ``DoQueryInsert()`` is called automatically when the user tries to add a ``Button`` to a customizable tool bar. It generates an `OnCustomizeCanInsert <Vcl.ComCtrls.TToolBar.OnCustomizeCanInsert.htm>`__ event, allowing the application to block the insertion. + + ``Index`` is the index (in the `Buttons <Vcl.ComCtrls.TToolBar.Buttons.htm>`__ property) where the user is trying to insert a new button. + + ''' + def DoQueryDelete(self, Index: int) -> bool: + ''' + Generates an `OnCustomizeCanDelete <Vcl.ComCtrls.TToolBar.OnCustomizeCanDelete.htm>`__ event. + + ``DoQueryDelete()`` is called automatically when the user tries to delete a ``Button`` from a customizable tool bar. It generates an `OnCustomizeCanDelete <Vcl.ComCtrls.TToolBar.OnCustomizeCanDelete.htm>`__ event, allowing the application to block the deletion. + + ``Index`` is the index (in the `Buttons <Vcl.ComCtrls.TToolBar.Buttons.htm>`__ property) of the button that the user is trying to delete. + ''' + def FindButtonFromAccel(self, Accel: int) -> ToolButton: + ''' + Returns the ``ToolBar`` button with the specified accelerator. + + Use ``FindButtonFromAccel()`` to determine which ``ToolBar`` button has the specified accelerator. + + If the accelerator is not found, ``FindButtonFromAccel()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def InitMenu(self, Button: ToolButton) -> None: + ''' + Called when the menu associated with a drop-down ``ToolBar`` button is about to be displayed. + + ``InitMenu()`` initializes the highlighting and hot-tracking for the drop-down menu associated with the tool button that ``Button`` specifies. + + Override ``InitMenu()`` in a derived class to perform other initializations to the ``ToolBar`` button's menu. + ''' + def IsCustomDrawn(self, Target: CustomDrawTarget, Stage: CustomDrawStage) -> bool: + ''' + Indicates whether an event handler exists to respond at a particular stage in the paint process. + + `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ uses ``IsCustomDrawn()`` internally to determine whether it needs generate the various custom draw events. + + ``Target`` indicates what object is currently being painted. If ``Target`` is ``dtControl``, it is the background of the ``ToolBar``, and ``IsCustomDrawn()`` checks whether there is an `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ or `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ event handler. If ``Target`` is ``dtItem``, it is one of the tool buttons, and ``IsCustomDrawn()`` checks for an `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ or `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ event handler. `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ does not use ``dtSubItem`` as a target. + + ``Stage`` indicates the current stage of the paint process. If stage is not ``cdPrePaint``, then the tool bar only generates an event if it has one of the advanced custom draw event handlers. + + ``IsCustomDrawn()`` returns ``True`` if the ``ToolBar`` should generate an event (there is an event handler to respond.) ``IsCustomDrawn()`` returns ``False`` if there is no need to generate a custom draw event. + ''' + def Loaded(self) -> None: + ''' + Initializes the component after the ``Form`` file has been read into memory. + + `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ overrides ``Loaded()`` in order to managed the ``ButtonWidth`` property. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to a notification that a component has been added or is about to be deleted. + + ``Notification()`` is called automatically when a component has just been added to the ``Form`` or is about to be deleted. + + ``AComponent`` is the component that was just added or that is about to be deleted. + + ``Operation`` indicates whether ``AComponent`` was added or is about to be deleted. + + As implemented in `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__, ``Notification()`` checks whether the ``ImageList`` that is the value of the ``Images``, ``HotImages``, or ``DisabledImages`` property is about to be deleted. If so, it resets the property to ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def RepositionButtons(self, Index: int) -> None: + ''' + Updates the positions of all buttons in the ``ToolBar`` from a specified button on. + + `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ uses ``RepositionButtons()`` internally when laying out the buttons in the ``ToolBar``. ``RepositionButtons()`` calculates where to place all the buttons with the specified index or greater, and updates their positions and sizes. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the ``ToolBar``. + + ``WndProc()`` overrides the ``WndProc()`` for ``WinControl`` to handle mouse messages, and sends all others to the inherited ``WndProc()``. + + Derived classes that override ``WndProc()`` to provide specialized responses to messages should call the inherited ``WndProc()`` at the end to dispatch any other messages. + ''' + def WrapButtons(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Rearranges the ``ToolBar``\ s. buttons so they fit in the ``ToolBar``. + + Call ``WrapButtons()`` to rearrange the ``ToolBar``\ s. buttons. + + ``NewWidth`` is the width in which the buttons must fit. + + ``NewHeight`` is the height in which the buttons must fit. + + ``WrapButtons()`` returns ``True`` if the buttons fit; otherwise, ``WrapButtons()`` returns ``False``. + ''' + def Resize(self) -> None: + ''' + Respond to control resize. + + `Resize <Vcl.Controls.TControl.Resize.htm>`__ is called automatically immediately after the control's dimensions change. As implemented in `Control <Vcl.Controls.TControl.htm>`__, `Resize <Vcl.Controls.TControl.Resize.htm>`__ calls the control's `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event handler if it is assigned. + ''' + def SetAutoSize(self, Value: bool) -> None: + ''' + Sets the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + + `SetAutoSize <Vcl.Controls.TControl.SetAutoSize.htm>`__ is a protected method in the `Control <Vcl.Controls.TControl.htm>`__ class and is used to set the value of the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes a `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ instance. + + Call ``Create()`` to create a ``ToolBar`` at runtime. Toolbars added to forms at design time are created automatically. + + ``AOwner`` is the component, typically the ``Form``, that is responsible for freeing the ``ToolBar`` instance. It becomes the value of the ``Owner()`` property. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` the `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ instance and frees its memory. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `ToolBar <Vcl.ComCtrls.TToolBar.htm>`__ reference is not ``nil``, and only then calls ``Destroy()``. + ''' + def FlipChildren(self, AllLevels: bool) -> None: + ''' + Prevents the ``ToolBar`` buttons from reversing position when the parent control is flipped. + + ``FlipChildren()`` overrides the inherited method in order to prevent the flipping of the ``ToolBar``\ s. children. + ''' + def GetEnumerator(self) -> ToolBarEnumerator: + ''' + Returns a TComponent enumerator. + + ``VCL.ComCtrls.TToolBar.GetEnumerator`` inherits from `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. All content below this line refers to `System.Classes.TComponent.GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__. + + `GetEnumerator <System.Classes.TComponent.GetEnumerator.htm>`__ returns a `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ reference, which enumerates the components contained within a specified containing component. To process all these subcomponents, call the `ComponentEnumerator <System.Classes.TComponentEnumerator.htm>`__ `GetCurrent <System.Classes.TComponentEnumerator.GetCurrent.htm>`__ method within a While `MoveNext <System.Classes.TComponentEnumerator.MoveNext.htm>`__ do loop. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Allows the streaming system to load and save child controls in the order they appear in the ``ToolBar``. + + ``GetChildren()`` is introduced in ``Component`` for the streaming system that loads and saves *VCL Components*. It executes the *callback* specified by ``Proc`` for all the button in the ``ToolBar``, as well as any other controls that have the ``ToolBar`` as a parent and the component specified by Root as an ``Owner()``. + + ``Proc`` is a *callback* that the streaming system uses to load or save persistent objects on a form. + + ``Root`` is the the top-level component (such as a form or data module) that is currently being loaded or saved. + ''' + def TrackMenu(self, Button: ToolButton) -> bool: + ''' + Called when the accelerator for a ``ToolBar`` button is pressed. + + ``TrackMenu()`` is called automatically in response to the accelerator on a ``ToolBar`` button. It initializes the menu of a drop-down menu button, and forwards a click to the underlying *Windows* control. + + ``Button`` is the ``ToolBar`` button for which an accelerator was pressed. + + Override ``TrackMenu()`` in a derived class to perform additional actions when the accelerator for a ``ToolBar`` button is pressed. + ''' + + def OnAdvancedCustomDraw(self, Sender: Object, ARect: Rect, Stage: CustomDrawStage, DefaultDraw: bool) -> None: + ''' + # OnAdvancedCustomDraw: TBAdvancedCustomDrawEvent + Occurs at discrete stages during the painting of the ``ToolBar``\ s. background. + + Write an ``OnAdvancedCustomDraw`` event handler to enhance or replace the automatic painting of the ``ToolBar``. Use the ``ToolBar``\ s. `Canvas <Vcl.ComCtrls.TToolBar.Canvas.htm>`__ property to render the ``ToolBar``\ s. image. ``OnAdvancedCustomDraw`` is for painting the background of the ``ToolBar``. The painting of individual buttons on the ``ToolBar`` should be handled in an `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ or `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ event handler. + + .. note:: ``OnAdvancedCustomDraw`` occurs at several points during the painting of the ``ToolBar``\ s. background. If you only need to respond immediately prior to the default painting of the ``ToolBar``, use `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ instead. + + ``OnAdvancedCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTBAdvancedCustomDrawEvent <Vcl.ComCtrls.TTBAdvancedCustomDrawEvent.htm>`__. + ''' + def OnAdvancedCustomDrawButton(self, Sender: Object, Button: ToolButton, State: CustomDrawState, Stage: CustomDrawStage, Flags: TBCustomDrawFlags, DefaultDraw: bool) -> None: + ''' + # OnAdvancedCustomDrawButton: TBAdvancedCustomDrawBtnEvent + Occurs at discrete stages during the painting of the ``ToolBar``\ s. buttons. + + Write an ``OnAdvancedCustomDrawButton`` event handler to enhance or replace the automatic painting of the ``ToolBar``\ s. buttons. Use the ``ToolBar``\ s. `Canvas <Vcl.ComCtrls.TToolBar.Canvas.htm>`__ property to render the button's image. ``OnAdvancedCustomDrawButton`` occurs during the erasure and painting of individual buttons on the ``ToolBar``. The painting of the ``ToolBar`` itself should be handled in an `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ or `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ event handler. + + .. note:: ``OnAdvancedCustomDrawButton`` occurs at several points during the painting of the ``ToolBar``\ s. buttons. If you only need to respond immediately prior to the default painting of each button and are not using the Flags parameter, use `OnCustomDrawButton <Vcl.ComCtrls.TToolBar.OnCustomDrawButton.htm>`__ instead. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnCustomDraw(self, Sender: Object, ARect: Rect, DefaultDraw: bool) -> None: + ''' + # OnCustomDraw: TBCustomDrawEvent + Occurs when the ``ToolBar`` must be painted. + + Write an ``OnCustomDraw`` event handler to enhance or replace the automatic painting of the ``ToolBar``. Use the ``ToolBar``\ s. `Canvas <Vcl.ComCtrls.TToolBar.Canvas.htm>`__ property to render the ``ToolBar``\ s. image. ``OnCustomDraw`` is for painting the background of the ``ToolBar``. The painting of individual buttons on the ``ToolBar`` should be handled in an ``OnCustomDraw``\ ``Button`` or `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ event handler. + + .. note:: ``OnCustomDraw`` only occurs prior to painting the ``ToolBar``\ s. background. To respond at other points in the paint process (when the background is erased, or after the default painting of the ``ToolBar``\ s. background), use `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ instead. + + ``OnCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTBCustomDrawEvent <Vcl.ComCtrls.TTBCustomDrawEvent.htm>`__. + ''' + def OnCustomDrawButton(self, Sender: Object, Button: ToolButton, State: CustomDrawState, DefaultDraw: bool) -> None: + ''' + # OnCustomDrawButton: TBCustomDrawBtnEvent + Occurs when one of the buttons in the ``ToolBar`` must be painted. + + Write an ``OnCustomDrawButton`` event handler to enhance or replace the automatic painting of the ``ToolBar``\ s. buttons. Use the ``ToolBar``\ s. `Canvas <Vcl.ComCtrls.TToolBar.Canvas.htm>`__ property to render the button's image. ``OnCustomDrawButton`` is for painting individual buttons on the ``ToolBar``. The painting of the ``ToolBar`` itself should be handled in an `OnCustomDraw <Vcl.ComCtrls.TToolBar.OnCustomDraw.htm>`__ or `OnAdvancedCustomDraw <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDraw.htm>`__ event handler. + + .. note:: ``OnCustomDrawButton`` only occurs prior to painting the button. To respond at other points in the process of painting a ``Button`` (when the background is erased, or after the default painting of the button), use `OnAdvancedCustomDrawButton <Vcl.ComCtrls.TToolBar.OnAdvancedCustomDrawButton.htm>`__ instead. + + ``OnCustomDrawButton`` is an event handler of type `Vcl.ComCtrls.TTBCustomDrawBtnEvent <Vcl.ComCtrls.TTBCustomDrawBtnEvent.htm>`__. + ''' + def OnCustomizeAdded(self, Sender: Object, Button: ToolButton) -> None: + ''' + # OnCustomizeAdded: TBButtonEvent + Occurs when the user adds a ``Button`` to the ``ToolBar``. + + Write an ``OnCustomizeAdded`` handler to respond when the user adds a new button to the ``ToolBar`` using the ``ToolBar`` customize dialog. + + This event occurs after the new button is already added to the ``ToolBar``. To respond before the button is added, possibly even preventing the user from adding the button, use the `OnCustomizeCanInsert <Vcl.ComCtrls.TToolBar.OnCustomizeCanInsert.htm>`__ event instead. + + OnCustomizeAdded is an event handler of type `Vcl.ComCtrls.TTBButtonEvent <Vcl.ComCtrls.TTBButtonEvent.htm>`__. + ''' + def OnCustomizeCanDelete(self, Sender: Object, Index: int, Allow: bool) -> None: + ''' + # OnCustomizeCanDelete: TBCustomizeQueryEvent + Occurs when user tries to delete one of the buttons on the ``ToolBar``. + + When the `Customizable <Vcl.ComCtrls.TToolBar.Customizable.htm>`__ property is ``True``, the user can remove buttons from the ``ToolBar`` by dragging them off the ``ToolBar`` when the *Shift* key is pressed or using the ``ToolBar`` customize dialog. ``OnCustomizeCanDelete`` occurs when the user tries to delete a button in one of these ways, and allows the application to reject the deletion. If the ``OnCustomizeCanDelete`` event handler sets its ``Allow`` parameter to ``False``, the tool button returns to the position it occupied before the user tried to delete it. + + ``OnCustomizeCanDelete`` is an event handler of type `Vcl.ComCtrls.TTBCustomizeQueryEvent <Vcl.ComCtrls.TTBCustomizeQueryEvent.htm>`__. + ''' + def OnCustomizeCanInsert(self, Sender: Object, Index: int, Allow: bool) -> None: + ''' + # OnCustomizeCanInsert: TBCustomizeQueryEvent + Occurs when user tries to add a ``Button`` to the ``ToolBar``. + + When the `Customizable <Vcl.ComCtrls.TToolBar.Customizable.htm>`__ property is ``True``, the user can add buttons to the ``ToolBar`` using the ``ToolBar`` customize dialog. ``OnCustomizeCanInsert`` occurs when the user tries to add a ``Button``, and allows the application to reject the insertion. If the ``OnCustomizeCanInsert`` event handler sets its ``Allow`` parameter to ``False``, the ``ToolBar`` customize dialog rejects the insertion. + + OnCustomizeCanInsert is an event handler of type `Vcl.ComCtrls.TTBCustomizeQueryEvent <Vcl.ComCtrls.TTBCustomizeQueryEvent.htm>`__. + ''' + def OnCustomized(self, Sender: Object) -> None: + ''' + # OnCustomized: NotifyEvent + Occurs when the user finishes making changes to the ``ToolBar``. + + Write an ``OnCustomized`` event handler to take action after the user has finished making changes to the ``ToolBar``. This event occurs when the user finishes a drag operation (with the *Shift* key down) that moves or deletes a tool button, and when the user exits the ``ToolBar`` customize dialog. + ''' + def OnCustomizeDelete(self, Sender: Object, Button: ToolButton) -> None: + ''' + # OnCustomizeDelete: TBButtonEvent + Occurs when the user deletes a ``Button`` from the ``ToolBar``. + + Write an ``OnCustomizeDelete`` event handler to respond when the user deletes a tool button by dragging it off the ``ToolBar`` when the *Shift* key is pressed or by using the ``ToolBar`` customize dialog. + + This event occurs after the button has been removed from the ``ToolBar``. To respond before the button is being deleted, possibly preventing the user from deleting the button, use the `OnCustomizeCanDelete <Vcl.ComCtrls.TToolBar.OnCustomizeCanDelete.htm>`__ event instead. + + ``OnCustomizeDelete`` is an event handler of type `Vcl.ComCtrls.TTBButtonEvent <Vcl.ComCtrls.TTBButtonEvent.htm>`__. + ''' + def OnCustomizeNewButton(self, Sender: Object, Index: int, Button: ToolButton) -> None: + ''' + # OnCustomizeNewButton: TBNewButtonEvent + Occurs when the user tries to add a new button to the tool bar. + + Write an ``OnCustomizeNewButton`` event handler to supply your own ``ToolButton`` objects to represent the tool buttons that a user adds in the ``ToolBar`` customize dialog. + + ``OnCustomizeNewButton`` is an event handler of type `Vcl.ComCtrls.TTBNewButtonEvent <Vcl.ComCtrls.TTBNewButtonEvent.htm>`__. + ''' + def OnCustomizeReset(self, Sender: Object) -> None: + ''' + # OnCustomizeReset: NotifyEvent + Occurs when the user cancels a customization to the ``ToolBar``. + + Write an ``OnCustomizeReset`` event handler to respond when the user cancels changes made in the ``ToolBar`` customize dialog. + ''' + def OnCustomizing(self, Sender: Object) -> None: + ''' + # OnCustomizing: NotifyEvent + Occurs when the user displays the ``ToolBar`` customize dialog in order to make changes to the ``ToolBar``. + + Write an ``OnCustomizing`` event handler to take action when the user first displays the ``ToolBar`` customize dialog. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + # OnDockDrop: DockDropEvent + Occurs when another control is docked to the control. + + Write code in the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event to perform actions when another control is docked on the control. + + `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDockOver: DockOverEvent + Occurs when another control is dragged over the control. + + Write code in the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + # OnGetSiteInfo: GetSiteInfoEvent + Returns the control's docking information. + + Write code in the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or shift key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and shift key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnResize(self, Sender: Object) -> None: + ''' + # OnResize: NotifyEvent + Occurs immediately after the control is resized. + + Use `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ to make any final adjustments after a control is resized. To modify the way a control responds when an attempt is made to resize it, use ``OnCanResize`` or ``OnConstrainedResize``. + + .. note:: Some controls call this event handler when the control is first created. + + `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + # OnUnDock: UnDockEvent + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler to adjust the windowed control when a dock client is undocked. The `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class ToolButton(Control): + '''Wrapper for Delphi TToolButton''' + __hash__: ClassVar[None] = ... + Action: BasicAction + '''BasicAction: Specifies the action associated with the control. + Action is the action object that is associated with the control. Actions allow an application to centralize the response to user commands. When a control is associated with an action, the action determines the appropriate properties and events of the control (such as whether the control is enabled or how it responds to an OnClick event). + To create actions at design time, place an action list component on a form or data module. Double-click the action list to bring up the action list editor. Add actions in the editor using its context menu. Once the actions have been added using the Action List editor, they appear in the drop-down list for the Action property in the Object Inspector.''' + AllowAllUp: bool + '''bool:''' + AutoSize: bool + '''bool: Specifies whether the control sizes itself automatically to accommodate its contents. + Use AutoSize to specify whether the control sizes itself automatically. When AutoSize is True, the control resizes automatically when its contents change. + By default, AutoSize is False.''' + Caption: str + '''str: Specifies a text string that identifies the control to the user. + Use Caption to specify the text string that labels the control. + To underline a character in a Caption that labels a component, include an ampersand (&) before the character. This type of character is called an accelerator character. The user can then select the component by pressing ALT while typing the underlined character. To display an ampersand character in the caption, use two ampersands (&&). + + Notes: + Controls that display text use either the Caption property or the Text property to specify the text value. The property that is used depends on the type of control. In general, Caption is used for text that appears as a window title or label, while Text is used for text that appears as the content of a control. + For some controls, such as TButton, it is not possible to change the color of the Caption. If you want to change the color of a button caption, you should use an alternate button type such as TSpeedButton or TBitBtn instead of TButton. With either TSpeedButton or TBitBtn, you can change the color of the Caption property by using the Font property. + For TLinkLabel, an HTML tag is declared inside the Caption property either at run time or at design time.''' + Down: bool + '''bool:''' + DragCursor: int + '''int: Specifies the image used to represent the mouse pointer when the control is being dragged. + Use the DragCursor property to change the cursor image presented when the control is being dragged. + + Note: To make a custom cursor available for the DragCursor property, see the Cursor property.''' + DragKind: DragKind + '''DragKind: Specifies whether the control is being dragged normally or for docking. + Use DragKind to get or set whether the control participates in drag-and-drop operations or drag-and-dock operations.''' + DragMode: DragMode + '''DragMode: Specifies how the control initiates drag-and-drop or drag-and-dock operations. + Use DragMode to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the DragMode property value to dmManual. Enable automatic dragging by setting DragMode to dmAutomatic. For more information about dmManual and dmAutomatic, see TDragMode.''' + DropdownMenu: PopupMenu + '''PopupMenu:''' + EnableDropdown: bool + '''bool:''' + Enabled: bool + '''bool: Controls whether the control responds to mouse, keyboard, and timer events. + Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. + To re-enable a control, set Enabled to True. + + Note: This property applies to all TControl descendants.''' + Grouped: bool + '''bool:''' + Height: int + '''int: Specifies the vertical size of the control in pixels. + Use the Height property to read or change the height of the control.''' + ImageIndex: int + '''int:''' + ImageName: str + '''str:''' + Indeterminate: bool + '''bool:''' + Index: int + '''int:''' + Marked: bool + '''bool:''' + MenuItem: MenuItem + '''MenuItem:''' + OnClick: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnContextPopup: Callable[[Object, Point, bool], None] + '''Callable[[Object, Point, bool], None]:''' + OnDragDrop: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnDragOver: Callable[[Object, Object, int, int, DragState, bool], None] + '''Callable[[Object, Object, int, int, DragState, bool], None]:''' + OnEndDock: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnEndDrag: Callable[[Object, Object, int, int], None] + '''Callable[[Object, Object, int, int], None]:''' + OnMouseActivate: Callable[[Object, MouseButton, ShiftState, int, int, int, MouseActivate], None] + '''Callable[[Object, MouseButton, ShiftState, int, int, int, MouseActivate], None]:''' + OnMouseDown: Callable[[Object, MouseButton, ShiftState, int, int], None] + '''Callable[[Object, MouseButton, ShiftState, int, int], None]:''' + OnMouseEnter: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseLeave: Callable[[Object], None] + '''Callable[[Object], None]:''' + OnMouseMove: Callable[[Object, ShiftState, int, int], None] + '''Callable[[Object, ShiftState, int, int], None]:''' + OnMouseUp: Callable[[Object, MouseButton, ShiftState, int, int], None] + '''Callable[[Object, MouseButton, ShiftState, int, int], None]:''' + OnStartDock: Callable[[Object, DragDockObject], None] + '''Callable[[Object, DragDockObject], None]:''' + OnStartDrag: Callable[[Object, DragObject], None] + '''Callable[[Object, DragObject], None]:''' + Parent: Any + '''Returns/Sets the Control Parent''' + ParentShowHint: bool + '''bool: Specifies where a control looks to find out if its Help Hint should be shown. + Use ParentShowHint to ensure that all the controls on a form either uniformly show their Help Hints or uniformly do not show them. + If ParentShowHint is True, the control uses the ShowHint property value of its parent. If ParentShowHint is False, the control uses the value of its own ShowHint property. + To provide Help Hints only for selected controls on a form, set the ShowHint property for those controls that should have Help Hints to True, and ParentShowHint becomes False automatically. + + Note: Enable or disable all Help Hints for the entire application using the ShowHint property of the application object.''' + PopupMenu: PopupMenu + '''PopupMenu: Specifies the pop-up menu associated with the control. + Assign a value to PopupMenu to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the TPopupMenu's AutoPopup property is True, the pop-up menu appears automatically. If the menu's AutoPopup property is False, display the menu with a call to its Popup method from the control's OnContextPopup event handler.''' + ShowHint: bool + '''bool: ShowHint specifies whether to show the Help Hint when the mouse pointer moves over the control. + ShowHint determines whether the Help Hint appears for the control. The Help Hint is the value of the TControl.Hint property. The Help Hint appears in a box just beneath the control when the mouse pointer moves over the control. + To enable Help Hints for a particular control, two conditions must be satisfied: + + The application's ShowHint property must be True. + Either the control's own ShowHint property must be True, or the control's ParentShowHint property must be True and its parent's ShowHint property must be True. + For example, imagine a check box within a group box. If the ShowHint property of the group box is True and the ParentShowHint property of the check box is True, but the ShowHint property of the check box is False, the check box still displays its Help Hint. + Changing the ShowHint value automatically sets the ParentShowHint property to False.''' + Style: ToolButtonStyle + '''ToolButtonStyle:''' + Visible: bool + '''bool: Specifies whether the component appears onscreen. + Use the Visible property to control the visibility of the control at run time. If Visible is True, the control appears. If Visible is False, the control is not visible. + Calling the Show method sets the control's Visible property to True. Calling the Hide method sets it to False. + For TCustomForm descendants, the Show and ShowModal methods set Visible to True and bring the form to the front of all open windows. + For TTabSheet descendants, Visible does not control the visibility of the control at run time. For more information, see the description of the TabVisible property.''' + Width: int + '''int: Specifies the horizontal size of the control or form in pixels. + Use the Width property to read or change the width of the control. + + Note: For tab sheet controls, changing this property at run time has no effect.''' + Wrap: bool + '''bool:''' + + def BringToFront(self) -> Any: + '''TControl.BringToFront() + Puts the control in front of all other controls in its parent control.''' + def CheckMenuDropdown(self, *args, **kwargs) -> Any: ... + def Click(self, *args, **kwargs) -> Any: + '''Respond to user click. + Click is called automatically when the user left-clicks the control. Component or application code can call Click to simulate a user mouse click. This is often done in menu actions and hotkey handlers. + As implemented in TControl, Click queries whether the OnClick event handler exists and is different from the OnExecute handler for the control's Action. If this is true, the OnClick event handler is called. If this is false, and the Action OnExecute event handler exists, the Action's Execute method is called. Override Click to provide additional behavior.''' + def ClientToScreen(self) -> Any: + '''TControl.ClientToScreen() + Translates a given point from client area coordinates to global screen coordinates.''' + def Create(self, AOwner: Component) -> None: + '''TToolButton.Create(AOwner: Component) -> None + Creates an instance of TControl. + Calling Create constructs and initializes an instance of TControl. However, you should never attempt to instantiate a TControl. This class is intended solely as a base class from which other control classes descend and you should only call Create to instantiate one of these descendants. + Create calls the parent constructor and initializes the control. + When overriding Create, always call the inherited Create method first, then proceed with the control's initialization. Remember to specify the override directive when overriding the Create method. + + Note: If a control's constructor allocates resources or memory, also override the destructor to free those resources.''' + def Hide(self) -> Any: + '''TControl.Hide() + Hides the wrapped Control''' + def Invalidate(self) -> Any: + '''TControl.Invalidate() + Completely repaint control.''' + def Repaint(self) -> Any: + '''TControl.Repaint() + Forces the control to repaint its image on the screen.''' + def ScreenToClient(self) -> Any: + '''TControl.ScreenToClient() + Converts the screen coordinates of a specified point on the screen to client coordinates.''' + def SendToBack(self) -> Any: + '''TControl.SendToBack() + Puts a windowed control behind all other windowed controls, or puts a non-windowed control behind all other non-windowed controls.''' + def SetBounds(self, Left, Top, Width, Height) -> Any: + '''TControl.SetBounds(Left, Top, Width, Height) + Sets the Left, Top, Width, and Height properties all at once.''' + def Show(self) -> Any: + '''TControl.Show() + Shows the wrapped Control''' + def Update(self) -> Any: + '''TControl.Update() + Processes any pending paint messages immediately.''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class TrackBar(WinControl): + ''' + ====================== + Vcl.ComCtrls.TTrackBar + ====================== + + ``TrackBar`` is a wrapper for a ``TrackBar`` control. + + Use ``TrackBar`` to put a ``TrackBar`` on a form. A ``TrackBar`` represents a position along a continuum using a slider and, optionally, tick marks. A ``TrackBar`` can also display a selected range marked by triangular ticks at the starting and ending positions of the selection. + + During program execution, the slider can be moved to the desired position by dragging it with the mouse or by clicking the mouse on the bar. To use the keyboard to move the slider, press the arrow keys or the *PAGE UP* and *PAGE DOWN* keys. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + LineSize: int + ''' + Indicates the amount the value of ``Position`` changes when the user presses the arrow keys. + + Use ``LineSize`` to specify the distance along the slider that represents a single unit. The current ``Position`` is marked by a slider. The right and down arrow keys increment the value of ``Position`` by ``LineSize``, and the left and up arrow keys decrement the value of Position by ``LineSize``. + + Use the ``PageSize`` property to set the number of ticks moved using the *PAGE UP* and *PAGE DOWN* keys. + ''' + Max: int + ''' + Specifies the maximum ``Position`` of a `TrackBar <Vcl.ComCtrls.TTrackBar.htm>`__. + + Use ``Max`` to set an upper limit to the value that can be represented using the ``TrackBar``. A slider indicates the current Position in a range between Min and ``Max``. + ''' + Min: int + ''' + Specifies the minimum Position of a `TrackBar <Vcl.ComCtrls.TTrackBar.htm>`__. + + Use ``Min`` to set a lower limit to the value that can be represented using the ``TrackBar``. A slider indicates the current Position in a range between ``Min`` and Max. + ''' + Orientation: TrackBarOrientation + ''' + Specifies whether the ``TrackBar`` is horizontal or vertical. + + Set ``Orientation`` to the desired orientation of the ``TrackBar``. ``Orientation`` has these possible values: + + =================== ========================================================================================================================================================== + **Value** **Meaning** + =================== ========================================================================================================================================================== + ``tbHorizontal`` The long edge of the track is parallel to the top of the ``Form``. The ``Min`` position is on the left and the ``Max`` position is on the right. + ``tbVertical`` The long edge of the track is parallel to the side of the ``Form``. The ``Min`` position is on the top and the ``Max`` position is on the bottom. + =================== ========================================================================================================================================================== + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ComCtrls.TTrackBar.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PageSize: int + ''' + Specifies the amount ``Position`` is changed when the *PageUp* or *PageDown* key is pressed, or when the bar is clicked. + + Set ``PageSize`` to the distance along the ``TrackBar`` that corresponds to a single view. A *Slider* marks the current ``Position``. The *PAGE UP* key increments the value of Position by ``PageSize``, and *PAGE DOWN* key decrements the value of Position by ``PageSize``. + + Use the ``LineSize`` property to set the number of ticks moved using the arrow keys. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + Frequency: int + ''' + Specifies the increment between tick marks on the ``TrackBar``. + + Use ``Frequency`` to specify the spacing of the tick marks, using the logical units used by the ``Position`` property. For example, a ``Frequency`` of 5 sets a tick mark at every fifth possible increment. To provide visual feedback about the units used by the ``TrackBar``, set ``Frequency`` to ``LineSize`` or ``PageSize``. + + .. note:: If the value of the ``TickStyle`` property is not set to tsAuto, the value of ``Frequency`` is ignored. + ''' + Position: int + ''' + Contains the current position of the slider of a ``TrackBar`` <Vcl.ComCtrls.TTrackBar.htm>`__. + + Read ``Position`` to determine the current value represented by the ``TrackBar``. ``Position`` is a value in the range between ``Min`` and ``Max`` (inclusive). Set ``Position`` to programmatically move the slider of the ``TrackBar`` to a new value. + ''' + PositionToolTip: PositionToolTip + ''' + Determines the position of the (optional) *Tool Tip* displaying the position of the ``TrackBar``. + + You can set this property to one of the following values. + + ============== ==================================================================== + **Value** **Meaning** + ============== ==================================================================== + ``ptNone`` No *Tool Tip* is shown. + ``ptTop`` The *Tool Tip* appears at the top side of the ``TrackBar``. + ``ptBottom`` The *Tool Tip* appears at the bottom side of the ``TrackBar``. + ``ptLeft`` The *Tool Tip* appears at the left side of the ``TrackBar``. + ``ptRight`` The *Tool Tip* appears at the right side of the ``TrackBar``. + ============== ==================================================================== + + .. note:: Use ``ptLeft`` and ``ptRight`` for the vertical ``TrackBar``\ s. Use ptTop and ptBottom for the horizontal ``TrackBar``\ s. + ''' + SliderVisible: bool + ''' + Specifies whether the ``TrackBar``\ s. slider is visible. + + Use ``SliderVisible`` to ``get`` or ``set`` whether the ``TrackBar``\ s. slider is visible. + ''' + SelEnd: int + ''' + Specifies the position of the end point of the selection range. + + Set ``SelEnd`` to determine the length of a selection that begins at `SelStart <Vcl.ComCtrls.TTrackBar.SelStart.htm>`__. The ``TrackBar`` indicates a selection range on the bar by placing special tick marks at the positions specified by the `SelStart <Vcl.ComCtrls.TTrackBar.SelStart.htm>`__ and ``SelEnd`` properties and highlighting the selected portion of the bar. + + ``SelEnd`` must be greater than or equal to `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__. If ``SelEnd`` is set to a value less than `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__, `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__ changes to ``SelEnd``. ``SelEnd`` must be greater than or equal to `SelStart <Vcl.ComCtrls.TTrackBar.SelStart.htm>`__. If ``SelEnd`` is the same as `SelStart <Vcl.ComCtrls.TTrackBar.SelStart.htm>`__, there is no selection, and the value of `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__ is the same as `SelStart <Vcl.ComCtrls.TTrackBar.SelStart.htm>`__ and ``SelEnd``. + ''' + SelStart: int + ''' + Specifies the position of the starting point of the selection range. + + Set ``SelStart`` to determine the beginning of a selection that runs to `SelEnd <Vcl.ComCtrls.TTrackBar.SelEnd.htm>`__. The ``TrackBar`` indicates a selection range on the bar by placing special tick marks at the positions specified by the ``SelStart`` and `SelEnd <Vcl.ComCtrls.TTrackBar.SelEnd.htm>`__ properties and highlighting the selected portion of the bar. + + ``SelStart`` must be less than or equal to `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__. If ``SelStart`` is set to a value greater than `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__, `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__ changes to ``SelStart``. ``SelStart`` must be less than or equal to `SelEnd <Vcl.ComCtrls.TTrackBar.SelEnd.htm>`__. If ``SelStart`` is the same as `SelEnd <Vcl.ComCtrls.TTrackBar.SelEnd.htm>`__, there is no selection, and the value of `Position <Vcl.ComCtrls.TTrackBar.Position.htm>`__ is the same as ``SelStart`` and `SelEnd <Vcl.ComCtrls.TTrackBar.SelEnd.htm>`__. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + ShowSelRange: bool + ''' + Specifies whether the ``TrackBar`` shows the selection range. + + If set to ``True``, the selection range on the ``TrackBar`` is displayed. If set to ``False``, the selection range is not displayed. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + ThumbLength: int + ''' + Specifies the length of the ``TrackBar``\ s. slider. + + Use ``ThumbLength`` to ``get`` or ``set`` the length of the ``TrackBar``\ s. slider. + ''' + TickMarks: TickMark + ''' + Specifies the location of the tick marks. + + Set ``TickMarks`` to specify where the tick marks should be drawn. ``TickMarks`` has these possible values: + + ================== =========================================================================================================== + **Value** **Meaning** + ================== =========================================================================================================== + ``tmBottomRight`` Tick marks are on the bottom or right of the ``TrackBar``, depending of the value of ``Orientation``. + ``tmTopLeft`` Tick marks are on the top or left of the ``TrackBar``, depending of the value of ``Orientation``. + ``tmBoth`` Tick marks are on both sides of the ``TrackBar``. + ================== =========================================================================================================== + + If the ``TickStyle`` property is ``tsNone``, the value of ``TickMarks`` is ignored. + ''' + TickStyle: TickStyle + ''' + Specifies how tick marks are placed on the ``TrackBar``. + + Set ``TickStyle`` to specify whether the ``TrackBar`` should display tick marks, and if so, how those tick marks are set. ``TickStyle`` has these possible values: + + ============== ============================================================================================================================================== + **Value** **Meaning** + ============== ============================================================================================================================================== + ``tsAuto`` Tick marks are automatically displayed at increments equal to the value of the ``Frequency`` property. + ``tsManual`` Tick marks are displayed at the ``Min`` and ``Max`` values. Additional tick marks can be set using the ``SetTick()`` method. + ``tsNone`` No tick marks are displayed. + ============== ============================================================================================================================================== + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to customize the way a control creates its *Windows* representation. When overriding `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__, always call the inherited method first to set the default values, then make any desired adjustments. + + `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling *Windows* to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ by setting all the fields of ``Params`` to generic base values. A number of the standard controls override `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ to change one or more of the default values in ``Params``. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ rescales the control in the same manner as the `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ method in ``Control``. If the control contains any children, their `ChangeScale <Vcl.Controls.TWinControl.ChangeScale.htm>`__ methods are called before the parent itself is rescaled. To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ to pass additional initialization messages to the *Screen* object when it is created. + ''' + def DestroyWnd(self) -> None: + ''' + Destroys the control's window. + + `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ is called when the control needs to replace its window. For example, changing properties that are implemented by window parameter settings require the control to be destroyed and then recreated using the `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method. + + Before the window is destroyed, `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ saves a copy of the control's text in memory, frees any device contexts, and finally calls `DestroyWindowHandle <Vcl.Controls.TWinControl.DestroyWindowHandle.htm>`__. When the window is recreated, the stored copy of the control's text is assigned to the new window. + ''' + def Changed(self) -> None: + ''' + Sends a ``CM_CHANGED`` message to the control. + + Call `Changed <Vcl.Controls.TControl.Changed.htm>`__ after changing the properties of the control in a way that affects the properties of a parent object. `Changed <Vcl.Controls.TControl.Changed.htm>`__ sends a ``CM_CHANGED`` message back to the control. If the control is a windowed control, this message is sent to the parent so that it can make any necessary adjustments. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` and initializes an instance of `TrackBar <Vcl.ComCtrls.TTrackBar.htm>`__. + + Call ``Create()`` to instantiate a `TrackBar <Vcl.ComCtrls.TTrackBar.htm>`__ object at runtime. ``TrackBar``\ s placed on forms at design time are created automatically. + + ``Create()`` allocates memory and initializes the following properties: + + ``ControlStyle`` is set to ``[csCaptureMouse, csClickEvents, csSetCaption]``. + + ``Frequency`` is set to 1. + + ``Height`` is set to 45 and ``Width`` to 150. + + ``LineSize`` is set to 1 and ``PageSize`` to 2. + + ``Max`` is set to 10 and ``Min`` to 0. + + ``Orientation`` is set to ``trHorizontal``. + + ``TickMarks`` is set to ``tbBottomRight`` and ``TickStyle`` to ``tsAuto``. + + ``TabStop`` is set to ``True``. + ''' + def SetTick(self, Value: int) -> None: + ''' + Adds a tick mark to the ``TrackBar`` at a specified location. + + Use ``SetTick()`` to place a tick mark on the bar at the position that corresponds to the ``Value`` parameter. Tick marks specified in this manner are only displayed when the TickStyle is set to tsManual. + ''' + + def OnChange(self, Sender: Object) -> None: + ''' + # OnChange: NotifyEvent + Occurs immediately after the value of Position changes. + + Write an ``OnChange`` event handler to take specific action whenever the position of the slider may have changed. For example, if the ``TrackBar`` is being used to control another object, update the other object from an ``OnChange`` event handler. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnDragDrop(self, Sender: Object, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender: Object, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class TreeNode(Persistent): + '''Wrapper for Delphi TTreeNode''' + __hash__: ClassVar[None] = ... + AbsoluteIndex: int + '''int:''' + CheckState: NodeCheckState + '''NodeCheckState:''' + Checked: bool + '''bool:''' + ClassName: Any + '''Returns the TObject.ClassName''' + Count: int + '''int:''' + Cut: bool + '''bool:''' + Data: Pointer + '''Pointer:''' + Deleting: bool + '''bool:''' + DropHighlighted: bool + '''bool:''' + DropTarget: bool + '''bool:''' + Enabled: bool + '''bool:''' + Expanded: bool + '''bool:''' + ExpandedImageIndex: int + '''int:''' + Focused: bool + '''bool:''' + Handle: int + '''int:''' + HasChildren: bool + '''bool:''' + ImageIndex: int + '''int:''' + Index: int + '''int:''' + IsVisible: bool + '''bool:''' + Item: TreeNode + '''TreeNode:''' + ItemId: HREEITEM + '''HREEITEM:''' + Level: int + '''int:''' + OverlayIndex: int + '''int:''' + Owner: TreeNodes + '''TreeNodes:''' + Parent: TreeNode + '''TreeNode:''' + Selected: bool + '''bool:''' + SelectedIndex: int + '''int:''' + StateIndex: int + '''int:''' + Text: str + '''str:''' + TreeView: CustomTreeView + '''CustomTreeView:''' + __bound__: Any + '''Returns True if the wrapper is still bound to the Delphi instance.''' + __owned__: Any + '''Returns True if the wrapper owns the Delphi instance.''' + + def AlphaSort(self, ARecurse: bool) -> bool: + '''TTreeNode.AlphaSort(ARecurse: bool) -> bool''' + def Assign(self, persistent) -> Any: + '''TPersistent.Assign(persistent) + Assigns to this object the values of another TPersistent object''' + def Collapse(self, Recurse: bool) -> None: + '''TTreeNode.Collapse(Recurse: bool) -> None''' + def Create(self, AOwner: TreeNodes) -> None: + '''TTreeNode.Create(AOwner: TreeNodes) -> None + Constructs an object and initializes its data before the object is first used. + Create constructs an object. The purpose, size, and behavior of objects differ greatly. The Create constructor defined by TObject allocates memory but does not initialize data. + Descendant objects usually define a constructor that creates the particular kind of object and initializes its data. + + Note: If an exception escapes from a constructor, the object's destructor is called to clean up the failed instance.''' + def CustomSort(self, SortProc: Callable[[int, int, int], int], Data: int, ARecurse: bool) -> bool: + '''TTreeNode.CustomSort(SortProc: Callable[[int, int, int], int], Data: int, ARecurse: bool) -> bool''' + def Delete(self, *args, **kwargs) -> Any: ... + def DeleteChildren(self, *args, **kwargs) -> Any: ... + def Destroy(self, *args, **kwargs) -> Any: + '''Destroys the TPersistent instance and frees its memory. + Do not call Destroy directly. Call Free instead. Free checks that the object reference is not nil before calling Destroy.''' + def DisplayRect(self, TextOnly: bool) -> Rect: + '''TTreeNode.DisplayRect(TextOnly: bool) -> Rect''' + def EditText(self, *args, **kwargs) -> Any: ... + def EndEdit(self, Cancel: bool) -> None: + '''TTreeNode.EndEdit(Cancel: bool) -> None''' + def Expand(self, Recurse: bool) -> None: + '''TTreeNode.Expand(Recurse: bool) -> None''' + def GetHandle(self, *args, **kwargs) -> Any: ... + def GetLastChild(self, *args, **kwargs) -> Any: ... + def GetNamePath(self) -> Any: + '''TPersistent.GetNamePath() + Returns the name of the object as it appears in the Object Inspector.''' + def GetNext(self, *args, **kwargs) -> Any: ... + def GetNextChild(self, Value: TreeNode) -> TreeNode: + '''TTreeNode.GetNextChild(Value: TreeNode) -> TreeNode''' + def GetNextVisible(self, *args, **kwargs) -> Any: ... + def GetPrev(self, *args, **kwargs) -> Any: ... + def GetPrevChild(self, Value: TreeNode) -> TreeNode: + '''TTreeNode.GetPrevChild(Value: TreeNode) -> TreeNode''' + def GetPrevVisible(self, *args, **kwargs) -> Any: ... + def HasAsParent(self, Value: TreeNode) -> bool: + '''TTreeNode.HasAsParent(Value: TreeNode) -> bool''' + def IndexOf(self, Value: TreeNode) -> int: + '''TTreeNode.IndexOf(Value: TreeNode) -> int''' + def IsFirstNode(self, *args, **kwargs) -> Any: ... + def MakeVisible(self, *args, **kwargs) -> Any: ... + def MoveTo(self, Destination: TreeNode, Mode: NodeAttachMode) -> None: + '''TTreeNode.MoveTo(Destination: TreeNode, Mode: NodeAttachMode) -> None''' + def getFirstChild(self, *args, **kwargs) -> Any: ... + def getNextSibling(self, *args, **kwargs) -> Any: ... + def getPrevSibling(self, *args, **kwargs) -> Any: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class TreeView(CustomTreeView): + ''' + ====================== + Vcl.ComCtrls.TTreeView + ====================== + + ``TreeView`` represents a window that displays a hierarchical list of items, such as the headings in a document, the entries in an index, or the files and directories on a disk. + + Use ``TreeView`` to add an expanding and contracting outline to a form. Each node in a ``TreeView`` control consists of a label and a number of optional bitmapped images. Each node can have a list of subnodes associated with it. By clicking on a node, the user can expand or collapse the associated list of subnodes. + ''' + + __hash__: ClassVar[None] = ... + Align: Align + ''' + Determines how the control aligns within its container (parent control). + + Use `Align <Vcl.Controls.TControl.Align.htm>`__ to align a control to the *top*, *bottom*, *left*, or *right* of a ``Form`` or ``Panel`` and have it remain there even if the size of the ``Form``, ``Panel``, or component that contains the control changes. When the parent is resized, an aligned control also resizes so that it continues to span the *top*, *bottom*, *left*, or *right* edge of the parent. + + For example, to use a panel component with various controls on it as a *Tool Palette*, change the panel's `Align <Vcl.Controls.TControl.Align.htm>`__ value to ``alLeft``. The value of ``alLeft`` for the `Align <Vcl.Controls.TControl.Align.htm>`__ property of the panel guarantees that the *Tool Palette* remains on the left side of the ``Form`` and always equals the client height of the ``Form``. + + The default value of `Align <Vcl.Controls.TControl.Align.htm>`__ is ``alNone``, which means a control remains where it is positioned on a ``Form`` or ``Panel``. + + .. tip:: If `Align <Vcl.Controls.TControl.Align.htm>`__ is set to ``alClient``, the control fills the entire client area so that it is impossible to select the parent form by clicking it. In this case, select the parent by selecting the control on the ``Form`` and pressing *ESC*, or by using the *Object Inspector*. + + Any number of child components within a single parent can have the same `Align <Vcl.Controls.TControl.Align.htm>`__ value, in which case they stack up along the edge of the parent. The child controls stack up in z-order. To adjust the order in which the controls stack up, drag the controls into their desired positions. + + .. note:: To cause a control to maintain a specified relationship with an edge of its parent, but not necessarily lie along one edge of the parent, use the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property instead. + ''' + Anchors: Anchors + ''' + Specifies how the control is anchored to its parent. + + Use `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. + + If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property set to ``[akLeft, akRight]``, the control stretches when the width of its parent changes. + + `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the ``Form`` is created in a maximized state, the control is not stretched because the ``Form`` is not resized after the control is created. + + .. note:: If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the `Align <Vcl.Controls.TControl.Align.htm>`__ property instead. Unlike `Anchors <Vcl.Controls.TControl.Anchors.htm>`__, `Align <Vcl.Controls.TControl.Align.htm>`__ allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent's size. + ''' + AutoExpand: bool + ''' + Specifies whether the nodes in the ``TreeView`` automatically expand and collapse depending on the selection. + + Set `AutoExpand <Vcl.ComCtrls.TCustomTreeView.AutoExpand.htm>`__ to ``True`` to cause the selected item to expand and the unselected items to collapse. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use `BevelEdges <Vcl.Controls.TWinControl.BevelEdges.htm>`__ to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelCut + ''' + Specifies the cut of the inner bevel. + + Use `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__ to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ to modify the appearance of a bevel. `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ influences how sharply the bevel stands out. + + `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ to specify the width, in pixels, of the inner and outer bevels. + ''' + BiDiMode: BiDiMode + ''' + Specifies the bidirectional mode for the control. + + Use `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ to enable the control to adjust its appearance and behavior automatically when the application runs in a locale that reads from ``Right`` to ``Left`` instead of ``Left`` to ``Right``. The bidirectional mode controls the reading order for the text, the placement of the vertical ``ScrollBar``, and whether the alignment is changed. + + Alignment does not change for controls that are known to contain number, date, time, or currency values. For example, with data-aware controls, the alignment does not change for the following field types: ``ftSmallint``, ``ftInteger``, ``ftWord``, ``ftFloat``, ``ftCurrency``, ``ftBCD``, ``ftDate``, ``ftTime``, ``ftDateTime``, ``ftAutoInc``. + ''' + BorderStyle: BorderStyle + ''' + Specifies the width of the control's border. + + Set `BorderStyle <Vcl.ComCtrls.TCustomTreeView.BorderStyle.htm>`__ to specify whether the ``TreeView`` control should be outlined with a single-line border. These are the possible values: + + =============== ================== + **Value** **Meaning** + =============== ================== + ``bsNone`` No visible border + ``bsSingle`` Single-line border + =============== ================== + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use `BorderWidth <Vcl.Controls.TWinControl.BorderWidth.htm>`__ to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + ChangeDelay: int + ''' + Specifies the delay between when a ``Node`` is selected and when the `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event occurs. + + Use `ChangeDelay <Vcl.ComCtrls.TCustomTreeView.ChangeDelay.htm>`__ to ``get`` or ``set`` the delay, in milliseconds, between when a ``Node`` is selected and when the `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event occurs. + + Set the `ChangeDelay <Vcl.ComCtrls.TCustomTreeView.ChangeDelay.htm>`__ to 50 milliseconds to emulate the behavior of the tree-view control used in Windows Explorer. + ''' + Color: Color + ''' + Specifies the background color of the control. + + Use `Color <Vcl.Controls.TControl-Color.htm>`__ to read or change the background color of the control. + + If a control's `Vcl.Controls.TControl.ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is ``True``, then changing the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control's parent automatically changes the `Color <Vcl.Controls.TControl-Color.htm>`__ property of the control. When the value of the `Color <Vcl.Controls.TControl-Color.htm>`__ property is changed, the control's `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ property is automatically set to ``False``. + + The ``Color`` of a `Label <Vcl.StdCtrls.TLabel.htm>`__ is always the color of the background unless you set `Label.Transparent <Vcl.StdCtrls.TCustomLabel.Transparent.htm>`__ to ``False``. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + Constraints: SizeConstraints + ''' + Specifies the size constraints for the control. + + Use `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ to specify the minimum and maximum ``Width`` and ``Height`` of the control. When `Constraints <Vcl.Controls.TControl.Constraints.htm>`__ contains maximum or minimum values, the control cannot be resized to violate those constraints. + + .. note:: Constraints apply to the height of the ``Form``. However, the height of the ``Form`` depends on how large Windows makes the ``TitleBar``. For example, *Windows XP* uses much larger ``TitleBar``\ s than other windowing systems. To work around this, note the `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ when you design your form and set the constraints in the `FormCreate <Vcl.CustomizeDlg.TCustomizeFrm.FormCreate.htm>`__ event. In the following example, `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ is represented by x: ``Constraints.MinHeight := x + Height - ClientHeight``. + + .. warning:: Do not set up constraints that conflict with the value of the `Align <Vcl.Controls.TControl.Align.htm>`__ or `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ property. When these properties conflict, the response of the control to resize attempts is not well-defined. + ''' + CheckStyles: CheckStyles + ''' + ``CheckStyles`` determines a style of a check state, assuming ``CheckBox``\ es are enabled (see `Checkboxes <Vcl.ComCtrls.TCustomTreeView.CheckBoxes.htm>`__). + + There are three optional states that can be used with the ``TreeView``\ s. set property ``CheckStyles``: + + - ``csPartial`` (a small square in the ``CheckBox``) + - ``csDimmed`` (a dimmed checkmark) + - ``csExclusion`` (a cross) + ''' + CheckState: NodeCheckState + ''' + ``CheckState`` queries or sets the check state of a given node, assuming ``CheckBox``\ es are enabled (see `Checkboxes <Vcl.ComCtrls.TCustomTreeView.CheckBoxes.htm>`__). + + There are two optional states that can be used on a node: + + - ``ncsChecked`` + - ``ncsUnchecked`` (being the default) + ''' + CheckBoxes: bool + ''' + No have docs. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``False``, the windowed control paints itself directly to the window. When `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ must be set to ``False``. + ''' + DragKind: DragKind + ''' + Specifies whether the control is being dragged normally or for docking. + + Use `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ to ``get`` or ``set`` whether the control participates in drag-and-drop operations or drag-and-dock operations. + ''' + DragCursor: Cursor + ''' + Specifies the image used to represent the mouse pointer when the control is being dragged. + + Use the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property to change the cursor image presented when the control is being dragged. + + .. note:: To make a custom cursor available for the `DragCursor <Vcl.Controls.TControl.DragCursor.htm>`__ property, see the `Cursor <Vcl.Controls.TControl.Cursor.htm>`__ property. + ''' + DragMode: DragMode + ''' + Specifies how the control initiates drag-and-drop or drag-and-dock operations. + + Use `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to control when the user can drag the control. Disable the drag-and-drop or drag-and-dock capability at run time by setting the `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ property value to ``dmManual``. Enable automatic dragging by setting `DragMode <Vcl.Controls.TControl.DragMode.htm>`__ to ``dmAutomatic``. For more information about ``dmManual`` and ``dmAutomatic``, see `DragMode <Vcl.Controls.TDragMode.htm>`__. + ''' + Enabled: bool + ''' + Controls whether the control responds to mouse, keyboard, and timer events. + + Use `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to change the availability of the control to the user. To disable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``False``. Some disabled controls appear dimmed (for example: buttons, ``CheckBox``\ es, ``Label``s), while others (container controls) simply lose their functionality without changing their appearance. If `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ is set to ``False``, the control ignores mouse, keyboard, and timer events. To re-enable a control, set `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ to ``True``. + + .. note:: This property applies to all `Control <Vcl.Controls.TControl.htm>`__ descendants. + ''' + Font: Font + ''' + Specifies the attributes of text written on or in the control. To change to a new font, specify a new `Font <Vcl.Graphics.TFont.htm>`__ object. To modify a font, change the value of the `Charset <Vcl.Graphics.TFont.Charset.htm>`__, `Color <Vcl.Graphics.TFont-Color.htm>`__, `Height <Vcl.Graphics.TFont.Height.htm>`__, `Name <Vcl.Graphics.TFont.Name.htm>`__ , `Pitch <Vcl.Graphics.TFont.Pitch.htm>`__, `Size <Vcl.Graphics.TFont.Size.htm>`__, or `Style <Vcl.Graphics.TFont.Style.htm>`__ of the `Font <Vcl.Graphics.TFont.htm>`__ object. + + .. note:: Changing the font color of the `Caption <Vcl.Controls.TControl.Caption.htm>`__ is not supported for some controls (such as `Button <Vcl.StdCtrls.TButton.htm>`__). In most cases, there is an alternate control you can use whose ``Font`` property will change the color of the ``Caption`` or text (such as `BitBtn <Vcl.Buttons.TBitBtn.htm>`__ or `SpeedButton <Vcl.Buttons.TSpeedButton.htm>`__). + ''' + HideSelection: bool + ''' + Specifies whether list items are highlighted when the mouse passes over them. + + Use `HideSelection <Vcl.ComCtrls.TCustomTreeView.HideSelection.htm>`__ to specify whether the user is given visual feedback about the current selection in the ``TreeView`` when it does not have focus. If ``True``, the selected ``Node`` is not visually distinct from other nodes until focus returns to the control. If ``False``, the node always appears selected. + ''' + HotTrack: bool + ''' + Specifies whether list items are highlighted when the mouse passes over them. + + Set `HotTrack <Vcl.ComCtrls.TCustomTreeView.HotTrack.htm>`__ to ``True`` to provide visual feedback about which item is under the mouse. Set `HotTrack <Vcl.ComCtrls.TCustomTreeView.HotTrack.htm>`__ to ``False`` to suppress the visual feedback about which item is under the mouse. + ''' + Images: CustomImageList + ''' + Determines which ``ImageList`` is associated with the ``TreeView``. + + Use `Images <Vcl.ComCtrls.TCustomTreeView.Images.htm>`__ to provide a customized list of bitmaps that can be displayed to the left of a node's label. Individual nodes specify the image from this list that should appear by setting their ``ImageIndex`` property. + ''' + Indent: int + ''' + Specifies the amount of indentation in pixels when a list of child nodes is expanded. + + Use `Indent <Vcl.ComCtrls.TCustomTreeView.Indent.htm>`__ to determine how far child nodes are indented from their parent nodes when the parent is expanded. + ''' + MultiSelect: bool + ''' + Determines whether the user can select more than one tree node at a time. + + Set `MultiSelect <Vcl.ComCtrls.TCustomTreeView.MultiSelect.htm>`__ to specify whether users can select multiple nodes using the ``Control`` and *Shift* keys. A selection style must also be chosen in `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__. + ''' + MultiSelectStyle: MultiSelectStyle + ''' + Determines how multiple node selections work. + + `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__ determines how multiple selections are made when `MultiSelect <Vcl.ComCtrls.TCustomTreeView.MultiSelect.htm>`__ is ``True``. `MultiSelectStyle <Vcl.ComCtrls.TCustomTreeView.MultiSelectStyle.htm>`__ must include at least one of the following values. + + ====================== ========================================================================================================================================================================= + **Value** **Meaning** + ====================== ========================================================================================================================================================================= + ``msControlSelect`` Clicking on any node with the `Control <Vcl.ComCtrls.TCoolBand.Control.htm>`__ key pressed toggles the selection of that node. + ``msShiftSelect`` Clicking on any node with the *Shift* key pressed selects that node, the last single node selected, and the nodes in between. All other nodes are deselected. + ``msVisibleOnly`` Multiple selections with the *Shift* key do not include child nodes of collapsed nodes. + ``msSiblingOnly`` Selected nodes are restricted to a single set of siblings. + ====================== ========================================================================================================================================================================= + + If ``msControlSelect`` or ``msShiftSelect`` are in effect, the last singly-selected node becomes the primary selection, referenced by `Selections <Vcl.ComCtrls.TCustomTreeView.Selections.htm>`__ [0]. The primary selection is the anchor for extended selections using the *Shift* key. + ''' + ParentBiDiMode: bool + ''' + Specifies whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. + + Use `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``get`` or ``set`` whether the control uses its parent's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__. When `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``True``, the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property is always equal to that of its parent. If `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ is ``False``, the control uses its own `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property. + + Set `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ to ``True`` for all controls in a form to ensure that the entire user interface adjusts to *Middle Eastern* locales in a uniform manner. + + When the value of the control's `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property changes, `ParentBiDiMode <Vcl.Controls.TControl.ParentBiDiMode.htm>`__ becomes ``False`` automatically. + ''' + ParentColor: bool + ''' + Specifies where a control looks for its color information. To have a control use the same color as its parent control, set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True``. If `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``False``, the control uses its own `Color <Vcl.Controls.TControl-Color.htm>`__ property. + + Set `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ to ``True`` for all controls to ensure that all the controls on a form have a uniform appearance. For example, if `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ is ``True`` for all controls in a form, changing the background color of the ``Form`` to gray causes all the controls on the ``Form`` to also have a gray background. + + When the value of a control's `Color <Vcl.Controls.TControl-Color.htm>`__ property changes, `ParentColor <Vcl.Controls.TControl.ParentColor.htm>`__ becomes ``False`` automatically. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + `ParentCtl3D <Vcl.Controls.TWinControl.ParentCtl3D.htm>`__ determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + ParentDoubleBuffered: bool + ''' + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``Vcl.ComCtrls.TTreeView.ParentDoubleBuffered`` inherits from `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. All content below this line refers to `Vcl.Controls.TWinControl.ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__ is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentFont: bool + ''' + Specifies where a control looks for its font information. To have a control use the same font as its parent control, set `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True``. If `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``False``, the control uses its own `Font <Vcl.Controls.TControl.Font.htm>`__ property. Many controls default `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ to ``True`` so that all the controls in a form or other container present a uniform appearance. When the value of a control's `Font <Vcl.Controls.TControl.Font.htm>`__ property changes, `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ becomes ``False`` automatically. + + When `ParentFont <Vcl.Controls.TControl.ParentFont.htm>`__ is ``True`` for a form, the ``Form`` uses the default font. Currently, the default font is *Tahoma 8 pt*. + + .. attention:: When designing forms that will run at *High DPI*, do not turn ``ParentFont`` to ``True`` for a form. + ''' + ParentShowHint: bool + ''' + Specifies where a control looks to find out if its `Help Hint <Vcl.Controls.TControl.Hint.htm>`__ should be shown. + + Use `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ to ensure that all the controls on a form either uniformly show their *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ or uniformly do not show them. + + If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``True``, the control uses the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property value of its parent. If `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ is ``False``, the control uses the value of its own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property. To provide *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ only for selected controls on a form, set the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property for those controls that should have *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ to ``True``, and `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ becomes ``False`` automatically. + + .. note:: Enable or disable all *Help* `Hints <Vcl.Controls.TControl.Hint.htm>`__ for the entire application using the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``Application`` object. + ''' + PopupMenu: PopupMenu + ''' + Specifies the pop-up menu associated with the control. + + Assign a value to `PopupMenu <Vcl.Controls.TControl.PopupMenu.htm>`__ to make a pop-up menu appear when the user selects the control and clicks the right mouse button. If the `PopupMenu <Vcl.Menus.TPopupMenu.htm>`__'s `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``True``, the pop-up menu appears automatically. If the menu's `AutoPopup <Vcl.Menus.TPopupMenu.AutoPopup.htm>`__ property is ``False``, display the menu with a call to its `Popup <Vcl.Menus.TPopupMenu.Popup.htm>`__ method from the control's `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler. + ''' + ReadOnly: bool + ''' + Determines whether the user can edit the node labels. + + Use `ReadOnly <Vcl.ComCtrls.TCustomTreeView.ReadOnly.htm>`__ to specify whether the user can edit the nodes of the ``TreeView``. If `ReadOnly <Vcl.ComCtrls.TCustomTreeView.ReadOnly.htm>`__ is ``True``, the user can expand and collapse nodes, but can't edit their labels. If `ReadOnly <Vcl.ComCtrls.TCustomTreeView.ReadOnly.htm>`__ is ``False``, the user can edit the ``Label``\ s as well. The default ``Value`` is ``False``. + ''' + RightClickSelect: bool + ''' + Determines whether the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property returns nodes that are selected using the right mouse button. + + Use `RightClickSelect <Vcl.ComCtrls.TCustomTreeView.RightClickSelect.htm>`__ to allow the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property to indicate nodes the user clicks with the right mouse button. If `RightClickSelect <Vcl.ComCtrls.TCustomTreeView.RightClickSelect.htm>`__ is ``True``, the value of `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ is the value of the node last clicked with either the right or left mouse button. If `RightClickSelect <Vcl.ComCtrls.TCustomTreeView.RightClickSelect.htm>`__ is ``False``, the value of `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ is the node last clicked using the left mouse button. + + `RightClickSelect <Vcl.ComCtrls.TCustomTreeView.RightClickSelect.htm>`__ affects only the value of the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property. It does not cause the ``TreeView`` to highlight a new node if the ``Node`` is selected using the right mouse button. + + .. note:: `RightClickSelect <Vcl.ComCtrls.TCustomTreeView.RightClickSelect.htm>`__ must be set to ``True`` before the user right-clicks the ``TreeView`` for it to affect the value of the `Selected <Vcl.ComCtrls.TCustomTreeView.Selected.htm>`__ property. + ''' + RowSelect: bool + ''' + Specifies whether the entire row of the selected item is highlighted. + + Set `RowSelect <Vcl.ComCtrls.TCustomTreeView.RowSelect.htm>`__ to ``True`` to cause the entire row of the selected item to be highlighted. + + `RowSelect <Vcl.ComCtrls.TCustomTreeView.RowSelect.htm>`__ is ignored if `ShowLines <Vcl.ComCtrls.TCustomTreeView.ShowLines.htm>`__ is ``True``. + ''' + ShowButtons: bool + ''' + Specifies whether to display plus (``'+'``) and minus (``'-'``) buttons to the left side of each parent item. + + If `ShowButtons <Vcl.ComCtrls.TCustomTreeView.ShowButtons.htm>`__ is ``True``, a ``Button`` will appear to the left of each parent item. The user can click the button to expand or collapse the child items as an alternative to double-clicking the parent item. + ''' + ShowHint: bool + ''' + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ specifies whether to show the *Help Hint* when the mouse pointer moves over the control. + + `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ determines whether the *Help Hint* appears for the control. The *Help Hint* is the value of the `Control.Hint <Vcl.Controls.TControl.Hint.htm>`__ property. The *Help Hint* appears in a box just beneath the control when the mouse pointer moves over the control. To enable *Help Hints* for a particular control, two conditions must be satisfied: + - The application's `ShowHint <Vcl.Forms.TApplication.ShowHint.htm>`__ property must be ``True``. + - Either the control's own `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``, or the control's `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property must be ``True`` and its parent's `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property must be ``True``. + + For example, imagine a ``CheckBox`` within a ``GroupBox``. If the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``GroupBox`` is ``True`` and the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property of the ``CheckBox`` is ``True``, but the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ property of the ``CheckBox`` is ``False``, the ``CheckBox`` still displays its *Help Hint*. + + Changing the `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__ value automatically sets the `ParentShowHint <Vcl.Controls.TControl.ParentShowHint.htm>`__ property to ``False``. + ''' + ShowLines: bool + ''' + Specifies whether to display the lines that link child nodes to their corresponding parent nodes. + + If `ShowLines <Vcl.ComCtrls.TCustomTreeView.ShowLines.htm>`__ is ``True``, lines linking child nodes to their parent nodes are displayed. ``Nodes`` at the root of the hierarchy are not automatically linked. To link nodes at the root, the `ShowRoot <Vcl.ComCtrls.TCustomTreeView.ShowRoot.htm>`__ property must also be set to ``True``. + ''' + ShowRoot: bool + ''' + Specifies whether lines connecting top-level nodes are displayed. To show lines connecting top-level nodes to a single root, set the ``TreeView``\ s. `ShowRoot <Vcl.ComCtrls.TCustomTreeView.ShowRoot.htm>`__ and `ShowLines <Vcl.ComCtrls.TCustomTreeView.ShowLines.htm>`__ properties to ``True``. + ''' + SortType: SortType + ''' + Determines if and how the nodes in a ``TreeView`` are automatically sorted. + + Once a ``TreeView`` is sorted, the original hierarchy is lost. That is, setting the `SortType <Vcl.ComCtrls.TCustomTreeView.SortType.htm>`__ back to ``stNone`` will not restore the original order of items. These are the possible values: + + =============== ============================================================================================================ + **Value** **Meaning** + =============== ============================================================================================================ + ``stNone`` No sorting is done. + ``stData`` The items are sorted when the ``Data`` object or ``SortType`` is changed. + ``stText`` The items are sorted when the ``Caption`` or ``SortType`` is changed. + ``stBoth`` The items are sorted when either the ``Data`` object, the ``Caption`` or ``SortType`` is changed + =============== ============================================================================================================ + + Optionally, the ``OnCompare`` event can be hooked to handle comparisons. + ''' + StateImages: CustomImageList + ''' + Determines which ``ImageList`` to use for state images. + + Use `StateImages <Vcl.ComCtrls.TCustomTreeView.StateImages.htm>`__ to provide a set of bitmaps that reflect the state of ``TreeView`` nodes. The state image appears as an additional image to the left of the item's icon. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is the order in which child windows are visited when the user presses the *Tab* key. The control with the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value of 0, the second is 1, the third is 2, and so on. Change this by changing the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property. + + Each control has a unique tab-order value within its parent. If you change the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value of one control to be the same as the value of a second control, the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__, but instead is given the number that assures the control is the last in the tab order. + + .. note:: `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ property of a form is not used unless the form is the child of another form.) A control with a `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ to allow or disallow access to the control using the *Tab* key. + + If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``True``, the control is in the tab order. If `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + ToolTips: bool + ''' + Specifies whether the items in the ``TreeView`` have tool tips. + + Set `ToolTips <Vcl.ComCtrls.TCustomTreeView.ToolTips.htm>`__ to ``True`` to specify that items in the ``TreeView`` control have tool tips (Help Hints). + + Specify the ``ToolTip`` text in an `OnHint <Vcl.ComCtrls.TCustomStatusBar.OnHint.htm>`__ event handler using the ``Hint`` property. + ''' + Touch: TouchManager + ''' + Specifies the touch manager component associated with the control. + + Use the `Touch <Vcl.Controls.TControl.Touch.htm>`__ property to access gesturing options associated with a control. `Touch <Vcl.Controls.TControl.Touch.htm>`__ specifies a class of type `TouchManager <Vcl.Controls.TTouchManager.htm>`__. + + `Touch <Vcl.Controls.TControl.Touch.htm>`__ is used to: + + - Associate a `GestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__. + + (`TGestureManager <Vcl.Touch.GestureMgr.TGestureManager.htm>`__ manages all the gestures that can be used by the control.) + + - Select the standard, interactive, or custom gestures to associate with the control. + + (You can also connect each gesture to an action; see `Assigning Actions to Gestures <Gesturing_Overview.htm#Assigning_Actions_to_Gestures>`__.) + + - Specify a set of options for interactive or tablet gestures. + ''' + Visible: bool + ''' + Specifies whether the component appears onscreen. + + Use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to control the visibility of the control at run time. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``True``, the control appears. If `Visible <Vcl.Controls.TControl.Visible.htm>`__ is ``False``, the control is not visible. + + Calling the `Show <Vcl.Controls.TControl.Show.htm>`__ method sets the control's `Visible <Vcl.Controls.TControl.Visible.htm>`__ property to ``True``. Calling the `Hide <Vcl.Controls.TControl.Hide.htm>`__ method sets it to ``False``. + + For `CustomForm <Vcl.Forms.TCustomForm.htm>`__ descendants, the `Show <Vcl.Forms.TCustomForm.Show.htm>`__ and `ShowModal <Vcl.Forms.TCustomForm.ShowModal.htm>`__ methods set `Visible <Vcl.Controls.TControl.Visible.htm>`__ to ``True`` and bring the ``Form`` to the front of all open windows. + + For `TabSheet <Vcl.ComCtrls.TTabSheet.htm>`__ descendants, `Visible <Vcl.Controls.TControl.Visible.htm>`__ does not control the visibility of the control at run time. For more information, see the description of the `TabVisible <Vcl.ComCtrls.TTabSheet.TabVisible.htm>`__ property. + ''' + StyleElements: StyleElements + ''' + Specifies the style elements that are used by the control. + + Use `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ to customize the style of the control. If a custom style is enabled, you can enable or disable style elements in the control. + + `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ is a set of values that specify which elements of the current style are to be applied to this control. By default, all the elements of the style are enabled. + ''' + StyleName: str + ''' + No have docs. + ''' + Items: TreeNodes + ''' + Lists the individual nodes that appear in the ``TreeView`` control. + + Individual nodes in a ``TreeView`` are ``TreeNode`` objects. These individual nodes can be accessed by using the `Items <Vcl.ComCtrls.TCustomTreeView.Items.htm>`__ property along with the item's index into the ``TreeView``. For example, to access the second item in the ``TreeView``, you could use the following code. + + .. code-block:: python + + MyTreeNode := TreeView1.Items[1]; + + .. code-block:: python + + MyTreeNode = TreeView1->Items[1]; + + When setting this property at design-time in the *Object Inspector* the ``TreeView`` `Items <Vcl.ComCtrls.TCustomTreeView.Items.htm>`__ Editor appears. Use the *New Item* and *New SubItem* buttons to add items to the ``TreeView``. Use the ``Text`` property to modify what text is displayed in the ``Label`` of the item. + + At run-time nodes can be added and inserted by using the ``TreeNodes()`` methods ``AddChildFirst()``, ``AddChild()``, ``AddChildObjectFirst()``, ``AddChildObject()``, ``AddFirst()``, ``Add()``, ``AddObjectFirst()``, ``AddObject()``, and ``Insert()``. + + .. note:: Accessing ``TreeView`` items by ``Index`` can be time-intensive, particularly when the ``TreeView`` contains many items. For optimal performance, try to design your application so that it has as few dependencies on the ``TreeView``\ s. item index as possible. + ''' + + def OnAddition(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnAddition: TVExpandedEvent + Occurs when new ``Node`` is added. + + `OnAddition <Vcl.ComCtrls.TCustomTreeView.OnAddition.htm>`__ occurs when a new ``Node`` is added to the control. + + ``OnAddition`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnAdvancedCustomDraw(self, Sender: CustomTreeView, ARect: Rect, Stage: CustomDrawStage, DefaultDraw: bool) -> None: + ''' + # OnAdvancedCustomDraw: VAdvancedCustomDrawEvent + Occurs at discrete stages during the painting of the ``TreeView`` control. + + ``Vcl.ComCtrls.TTreeView.OnAdvancedCustomDraw`` inherits from `Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__. + + Write an `OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__ event handler to paint an owner-drawn ``TreeView``. Use the `Canvas <Vcl.ComCtrls.TCustomTreeView.Canvas.htm>`__ property as a drawing surface when painting the image of the ``TreeView``. To paint individual items, use the `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ or `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event instead. + + .. note:: `OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__ occurs at several stages during the paint process, not just immediately prior to the default rendering. If you only need to use the ``cdPrePaint`` stage, it is more efficient to use the `OnCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnCustomDraw.htm>`__ event. + + ``OnAdvancedCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTVAdvancedCustomDrawEvent <Vcl.ComCtrls.TTVAdvancedCustomDrawEvent.htm>`__. + ''' + def OnAdvancedCustomDrawItem(self, Sender: CustomTreeView, Node: TreeNode, State: CustomDrawState, Stage: CustomDrawStage, PaintImages: bool, DefaultDraw: bool) -> None: + ''' + # OnAdvancedCustomDrawItem: VAdvancedCustomDrawItemEvent + Occurs at discrete stages during the painting of ``TreeView`` nodes. + + ``Vcl.ComCtrls.TTreeView.OnAdvancedCustomDrawItem`` inherits from `Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__. + + Write an `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ event handler to customize the painting of individual items in the ``TreeView``. + + .. note:: `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ occurs at several stages during the paint process and allows you to suppress the default painting of tree node images while still allowing the default painting of the node. If you only need to use the ``cdPrePaint`` stage and do not want to suppress only the painting of tree node images, it is more efficient to use the `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event. + + ``OnAdvancedCustomDrawItem`` is an event handler of type `Vcl.ComCtrls.TTVAdvancedCustomDrawItemEvent <Vcl.ComCtrls.TTVAdvancedCustomDrawItemEvent.htm>`__. + ''' + def OnCancelEdit(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnCancelEdit: VChangedEvent + Occurs when user cancels editing of a node's `Caption <Vcl.ListActns.TListControlItem.Caption.htm>`__. + + The `OnCancelEdit <Vcl.ComCtrls.TCustomTreeView.OnCancelEdit.htm>`__ event occurs when a user cancels a node-editing operation. + + ``OnCancelEdit`` is an event handler of type `Vcl.ComCtrls.TTVChangedEvent <Vcl.ComCtrls.TTVChangedEvent.htm>`__. + ''' + def OnChange(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnChange: VChangedEvent + Occurs whenever the selection has changed from one node to another. + + Write an `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event handler to take specific action when the selected node changes. The ``Sender`` parameter is the ``TreeView`` whose selected node changes, and the ``Node`` parameter is the newly selected node. + + .. note:: The `OnChange <Vcl.ComCtrls.TCustomTreeView.OnChange.htm>`__ event does not occur for nodes selected using the right mouse button when ``RightClickSelect`` is ``True``. To respond to changes in the value of the ``Selected`` property when ``RightClickSelect`` is ``True``, use the ``OnMouseUp`` event. + + ``OnChange`` is an event handler of type `Vcl.ComCtrls.TTVChangedEvent <Vcl.ComCtrls.TTVChangedEvent.htm>`__. + ''' + def OnChanging(self, Sender: Object, Node: TreeNode, AllowChange: bool) -> None: + ''' + # OnChanging: VChangingEvent + Occurs when the selection is about to change from one node to another. + + Write an `OnChanging <Vcl.ComCtrls.TCustomTreeView.OnChanging.htm>`__ event handler to selectively prevent selection from moving to specific nodes. + + The ``VChangingEvent`` type points to a method that is called when the selection is about to be changed from one node to another. + + ``OnChanging`` is an event handler of type `Vcl.ComCtrls.TTVChangingEvent <Vcl.ComCtrls.TTVChangingEvent.htm>`__. + ''' + def OnClick(self, Sender: Object) -> None: + ''' + # OnClick: NotifyEvent + Occurs when the user clicks the control. + + Use the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to respond when the user clicks the control. If the control has an associated action, and that action has an ``OnExecute()`` method, the action's ``OnExecute()`` method responds to click events unless it is superseded by an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + Usually, `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: + + - The user selects an item in a grid, outline, list, or ``ComboBox`` by pressing an arrow key. + - The user presses the *SPACEBAR* while a ``Button`` or ``CheckBox`` has focus. + - The user presses *ENTER* when the active form has a default button (specified by the ``Default`` property). + - The user presses *ESC* when the active form has a *Cancel* button (specified by the ``Cancel`` property). + - The user presses the accelerator key for a ``Button`` or ``CheckBox``. For example, if the value of the ``Caption`` property of a ``CheckBox`` is ``'&Bold'``, the B is underlined at run time and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` is triggered when the user presses *Alt+B*. However, focus does not move to the control in these instances. + - The ``Checked`` property of a ``RadioButton`` is set to ``True``. + - The value of the ``Checked`` property of a ``CheckBox`` is changed. + + .. note:: When you change the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property programmatically, the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event of the ``CheckBox`` control occurs. Do not modify the value of the `Checked <Vcl.StdCtrls.TCheckBox.Checked.htm>`__ property in the event handler of the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event, because that leads into a deadlock situation. + + - The ``Click()`` method of a ``MenuItem()`` is called. + + For a form, an `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event occurs when the user clicks a disabled component or in a blank area of the ``Form``. + + `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnCollapsed(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnCollapsed: TVExpandedEvent + Occurs after a node has been collapsed. + + Write an `OnCollapsed <Vcl.ComCtrls.TCustomTreeView.OnCollapsed.htm>`__ event handler to respond after a node in the ``TreeView`` collapses. The ``Node`` parameter is the node whose children are no longer visible. + + ``OnAdvancedCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnCollapsing(self, Sender: Object, Node: TreeNode, AllowCollapse: bool) -> None: + ''' + # OnCollapsing: VCollapsingEvent + Occurs when a ``Node`` is about to be collapsed. + + The ``VCollapsingEvent`` type points to a method that is called when a ``Node`` is about to be collapsed. + + ``OnCollapsing`` is an event handler of type `Vcl.ComCtrls.TTVCollapsingEvent <Vcl.ComCtrls.TTVCollapsingEvent.htm>`__. + ''' + def OnCompare(self, Sender: Object, Node1: TreeNode, Node2: TreeNode, Data: int, Compare: int) -> None: + ''' + Occurs when two nodes must be compared during a sort of the nodes in the ``TreeView``. + + Write an `OnCompare <Vcl.ComCtrls.TCustomTreeView.OnCompare.htm>`__ event handler to customize the sort order of the nodes in the ``TreeView``. If an `OnCompare <Vcl.ComCtrls.TCustomTreeView.OnCompare.htm>`__ event handler is not provided, ``TreeView`` nodes are sorted alphabetically, based on their labels. + + ``OnCompare`` is an event handler of type `Vcl.ComCtrls.TTVCompareEvent <Vcl.ComCtrls.TTVCompareEvent.htm>`__. + ''' + def OnContextPopup(self, Sender: Object, MousePos: Point, Handled: bool) -> None: + ''' + # OnContextPopup: ContextPopupEvent + Occurs when the user right-clicks the control or otherwise invokes the pop-up menu (such as using the keyboard). + + The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler is called when the user utilizes the mouse or keyboard to request a pop-up menu. The `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event is generated by a ``WM_CONTEXTMENU`` message, which is itself generated by the user clicking the right mouse button or by pressing *Shift+F10* or the ``Application``\ s key. + + This event is especially useful when the control does not have an associated pop-up menu (the ``PopupMenu`` property is not set) or if the Auto``Popup`` property of the control's associated pop-up menu is ``False``. However, the `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ can also be used to override the automatic context menu that appears when the control has an associated pop-up menu with an ``AutoPopup`` property of ``True``. In this last case, if the event handler displays its own menu, it should set the ``Handled`` parameter to ``True`` to suppress the default context menu. + + The handler's ``MousePos`` parameter indicates the position of the mouse, in client coordinates. If the event was not generated by a mouse click, ``MousePos`` is ``(-1,-1)``. + + .. note:: Parent controls receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event before their child controls. In addition, for many child controls, the default window procedure causes the parent control to receive an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event after the child control. As a result, when parent controls do not set ``Handled`` to ``True`` in an `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ event handler, the event handler may be called multiple times for each context menu invocation. + + `OnContextPopup <Vcl.Controls.TControl.OnContextPopup.htm>`__ is an event handler of type `Vcl.Controls.TContextPopupEvent <Vcl.Controls.TContextPopupEvent.htm>`__. + ''' + def OnCreateNodeClass(self, Sender: CustomTreeView, NodeClass: TreeNodeClass) -> None: + ''' + # OnCreateNodeClass: VCreateNodeClassEvent + `OnCreateNodeClass <Vcl.ComCtrls.TCustomTreeView.OnCreateNodeClass.htm>`__ occurs when a new node object is about to be created. + + ``Vcl.ComCtrls.TTreeView.OnCreateNodeClass`` inherits from `Vcl.ComCtrls.TCustomTreeView.OnCreateNodeClass <Vcl.ComCtrls.TCustomTreeView.OnCreateNodeClass.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCustomTreeView.OnCreateNodeClass <Vcl.ComCtrls.TCustomTreeView.OnCreateNodeClass.htm>`__. + + ``OnCreateNodeClass`` is an event handler of type `Vcl.ComCtrls.TTVCreateNodeClassEvent <Vcl.ComCtrls.TTVCreateNodeClassEvent.htm>`__. + ''' + def OnCustomDraw(self, Sender: CustomTreeView, ARect: Rect, DefaultDraw: bool) -> None: + ''' + # OnCustomDraw: VCustomDrawEvent + Occurs immediately prior to painting the ``TreeView`` control. + + Write an `OnCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnCustomDraw.htm>`__ event handler to paint an owner-drawn ``TreeView``. Use the `Canvas <Vcl.ComCtrls.TCustomTreeView.Canvas.htm>`__ property as a drawing surface when painting the image of the ``TreeView``. To paint individual items, use the `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event instead. + + .. note:: `OnCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnCustomDraw.htm>`__ only occurs prior to painting the ``TreeView`` control. To customize the painting at other stages of the paint process (such as after the default drawing), use `OnAdvancedCustomDraw <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDraw.htm>`__ instead. + + ``OnCustomDraw`` is an event handler of type `Vcl.ComCtrls.TTVCustomDrawEvent <Vcl.ComCtrls.TTVCustomDrawEvent.htm>`__. + ''' + def OnCustomDrawItem(self, Sender: CustomTreeView, Node: TreeNode, State: CustomDrawState, DefaultDraw: bool) -> None: + ''' + # OnCustomDrawItem: VCustomDrawItemEvent + Occurs immediately prior to painting a node in a ``TreeView`` control. + + Write an `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ event handler to paint individual items in the ``TreeView``, or to provide a background to the item before the default rendering of the item. + + .. note:: `OnCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnCustomDrawItem.htm>`__ only occurs prior to painting individual tree items. To customize the painting of items at other stages of the paint process (such as after the item is painted), use `OnAdvancedCustomDrawItem <Vcl.ComCtrls.TCustomTreeView.OnAdvancedCustomDrawItem.htm>`__ instead. + + ``OnCustomDrawItem`` is an event handler of type `Vcl.ComCtrls.TTVCustomDrawItemEvent <Vcl.ComCtrls.TTVCustomDrawItemEvent.htm>`__. + ''' + def OnDblClick(self, Sender: Object) -> None: + ''' + # OnDblClick: NotifyEvent + Occurs when the user double-clicks the left mouse button when the mouse pointer is over the control. + + Use the `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ event to respond to mouse double-clicks. + + `OnDblClick <Vcl.Controls.TControl.OnDblClick.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnDeletion(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnDeletion: TVExpandedEvent + Occurs when a node in the ``TreeView`` is deleted. + + Write an `OnDeletion <Vcl.ComCtrls.TCustomTreeView.OnDeletion.htm>`__ event handler to respond when a ``Node`` is deleted from the ``TreeView`` control. + + ``OnDeletion`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnDragDrop(self, Sender, Source: Object, X: int, Y: int) -> None: + ''' + # OnDragDrop: DragDropEvent + Occurs when the user drops an object being dragged. + + Use the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event handler to specify what happens when the user drops an object. The ``Source`` parameter of the `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ event is the object being dropped, and the ``Sender`` is the control on which the object is being dropped. The ``'X'`` and ``'Y'`` parameters are the coordinates of the mouse positioned over the control. + + `OnDragDrop <Vcl.Controls.TControl.OnDragDrop.htm>`__ is an event handler of type `DragDropEvent <Vcl.Controls.TDragDropEvent.htm>`__. + ''' + def OnDragOver(self, Sender, Source: Object, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + # OnDragOver: DragOverEvent + Occurs when the user drags an object over a control. + + Use an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event to signal that the control can accept a dragged object so the user can drop or dock it. + + Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, change the ``Accept`` parameter to ``False`` to reject the dragged object. Leave ``Accept`` as ``True`` to allow the user to drop or dock the dragged object on the control. To change the shape of the cursor, indicating that the control can accept the dragged object, change the value of the ``DragCursor`` property for the control before the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event occurs. + + The ``Source`` is the object being dragged, the ``Sender`` is the potential drop or dock site, and ``'X'`` and ``'Y'`` are screen coordinates in pixels. The ``State`` parameter specifies how the dragged object is moving over the control. + + .. note:: Within the `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler, the ``Accept`` parameter defaults to ``True``. However, if an `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ event handler is not supplied, the control rejects the dragged object, as if the ``Accept`` parameter were changed to ``False``. + + `OnDragOver <Vcl.Controls.TControl.OnDragOver.htm>`__ is an event handler of type `DragOverEvent <Vcl.Controls.TDragOverEvent.htm>`__. + ''' + def OnEdited(self, Sender: Object, Node: TreeNode, S: str) -> None: + ''' + # OnEdited: VEditedEvent + Occurs after the user edits the ``Text`` property of a node. + + Write an `OnEdited <Vcl.ComCtrls.TCustomTreeView.OnEdited.htm>`__ event handler to respond to changes the user makes to the node labels. The ``Node`` parameter is the node whose label was edited. The ``'S'`` parameter is the new value of the node's ``Text`` property. The node's label can be changed in an `OnEdited <Vcl.ComCtrls.TCustomTreeView.OnEdited.htm>`__ event handler before the user's edits are committed. This event can occur only if ``ReadOnly`` is set to ``False``. + + ``OnEdited`` is an event handler of type `Vcl.ComCtrls.TTVEditedEvent <Vcl.ComCtrls.TTVEditedEvent.htm>`__. + ''' + def OnEditing(self, Sender: Object, Node: TreeNode, AllowEdit: bool) -> None: + ''' + # OnEditing: VEditingEvent + Occurs when the user starts to edit the ``Text`` property of a node. + + Write an `OnEditing <Vcl.ComCtrls.TCustomTreeView.OnEditing.htm>`__ event handler to determine whether the user is allowed to edit the ``Label`` of a specific node in the ``TreeView``. Set the ``AllowEdit`` parameter to ``False`` to prevent the user from editing the node specified by the ``Node`` parameter. To disallow editing of all nodes in the ``TreeView``, use the ``ReadOnly`` property instead. + + ``OnEditing`` is an event handler of type `Vcl.ComCtrls.TTVEditingEvent <Vcl.ComCtrls.TTVEditingEvent.htm>`__. + ''' + def OnEndDock(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDock: EndDragEvent + Occurs when the dragging of an object ends, either by docking the object or by canceling the dragging. + + Use `OnEndDock <Vcl.Controls.TControl.OnEndDock.htm>`__ to specify actions or special processing that happen when a drag-and-dock operation stops. + ''' + def OnEndDrag(self, Sender: Object, Target: Object, X: int, Y: int) -> None: + ''' + # OnEndDrag: EndDragEvent + Occurs when the dragging of an object ends, either by dropping the object or by canceling the dragging. + + Use the `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ event handler to specify any special processing that occurs when dragging stops. + + `OnEndDrag <Vcl.Controls.TControl.OnEndDrag.htm>`__ is an event handler of type `Vcl.Controls.TEndDragEvent <Vcl.Controls.TEndDragEvent.htm>`__. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + # OnEnter: NotifyEvent + Occurs when a control receives the input focus. + + Use the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler to cause any special processing to occur when a control becomes active. + + The `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs for the container before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + # OnExit: NotifyEvent + Occurs when the input focus shifts away from one control to another. + + Use the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler to provide special processing when the control ceases to be active. + + The `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs for the control inside the container before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event occurs. + + `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExpanded(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnExpanded: TVExpandedEvent + Occurs after a ``Node`` is expanded. + + Write an `OnExpanded <Vcl.ComCtrls.TCustomTreeView.OnExpanded.htm>`__ event handler to respond when a node in the ``TreeView`` is expanded. The ``Node`` parameter specifies the node whose children are now displayed to the user. + + ``OnExpanded`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnExpanding(self, Sender: Object, Node: TreeNode, AllowExpansion: bool) -> None: + ''' + # OnExpanding: TVExpandingEvent + Occurs when a ``Node`` is about to be expanded. + + Write an `OnExpanding <Vcl.ComCtrls.TCustomTreeView.OnExpanding.htm>`__ event handler to determine whether a node can be expanded. Set the ``AllowExpansion`` parameter to ``False`` to prevent the node from expanding. + + ``OnExpanding`` is an event handler of type `Vcl.ComCtrls.TTVExpandingEvent <Vcl.ComCtrls.TTVExpandingEvent.htm>`__. + ''' + def OnGesture(self, Sender: Object, EventInfo: GestureEventInfo, Handled: bool) -> None: + ''' + # OnGesture: GestureEvent + Occurs when you perform a gesture associated with this control. + + Write an event handler for `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ to perform custom processing for gesture events. `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is fired on controls that subscribed for specific gestures using the `TouchManager <Vcl.Controls.TTouchManager.htm>`__ class. If your code did process the gesture event, do not forget to set the ``Handled`` parameter to ``True`` so that the event is not propagated further. + + If no event handler is associated with the control, the default `DoGesture <Vcl.Controls.TControl.DoGesture.htm>`__ method is executed performing its own processing for the event. + + `OnGesture <Vcl.Controls.TControl.OnGesture.htm>`__ is an event handler of type `Vcl.Controls.TGestureEvent <Vcl.Controls.TGestureEvent.htm>`__. + ''' + def OnGetImageIndex(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnGetImageIndex: TVExpandedEvent + Occurs when the ``TreeView`` looks up the ``ImageIndex`` of a node. + + Write an `OnGetImageIndex <Vcl.ComCtrls.TCustomTreeView.OnGetImageIndex.htm>`__ event handler to change the ``ImageIndex`` for the particular node before it is drawn. For example, the bitmap of a node can be changed to indicate a different state for the node. + + ``OnGetImageIndex`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnGetSelectedIndex(self, Sender: Object, Node: TreeNode) -> None: + ''' + # OnGetSelectedIndex: TVExpandedEvent + Occurs when the ``TreeView`` looks up the ``SelectedIndex`` of a node. + + ``Vcl.ComCtrls.TTreeView.OnGetSelectedIndex`` inherits from `Vcl.ComCtrls.TCustomTreeView.OnGetSelectedIndex <Vcl.ComCtrls.TCustomTreeView.OnGetSelectedIndex.htm>`__. All content below this line refers to `Vcl.ComCtrls.TCustomTreeView.OnGetSelectedIndex <Vcl.ComCtrls.TCustomTreeView.OnGetSelectedIndex.htm>`__. + + Write an `OnGetSelectedIndex <Vcl.ComCtrls.TCustomTreeView.OnGetSelectedIndex.htm>`__ event handler to change the selected ``ImageIndex`` of a node before it is drawn. + + ``OnGetSelectedIndex`` is an event handler of type `Vcl.ComCtrls.TTVExpandedEvent <Vcl.ComCtrls.TTVExpandedEvent.htm>`__. + ''' + def OnHint(self, Sender: Object, Node: TreeNode, Hint: str) -> None: + ''' + # OnHint: VHintEvent + Occurs whenever a hint is about to be shown for a node. + + Write an `OnHint <Vcl.ComCtrls.TCustomTreeView.OnHint.htm>`__ event handler to take specific action when a hint is about to be shown for a node. + + .. note:: You can change the value of the ``Hint`` parameter. + + ``OnHint`` is an event handler of type `Vcl.ComCtrls.TTVHintEvent <Vcl.ComCtrls.TTVHintEvent.htm>`__. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyDown: KeyEvent + Occurs when a user presses any key while the control has focus. + + Use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler to specify special processing to occur when a key is pressed. The `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ events for arrow keys. + + `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + # OnKeyPress: KeyPressEvent + Occurs when a key is pressed. + + Use the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler is of type `Char <System.Char.htm>`__; therefore, the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Key combinations (such as *Shift+A*) generate only one `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event (for this example, *Shift+A* results in a ``Key`` value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + # OnKeyUp: KeyEvent + Occurs when the user releases a key that was pressed. + + Use the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler to provide special processing that occurs when a key is released. The `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event will be prevented. + + `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + ''' + def OnMouseActivate(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X, Y, HitTest: int, MouseActivate: MouseActivate) -> None: + ''' + # OnMouseActivate: MouseActivateEvent + Occurs when the user presses a mouse button with the mouse pointer over a control and the parent form is not active. + + Use the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button on a control when the parent top-level form is not active. + + The event type is: + + .. code-block:: python + :caption: Delphi + + TMouseActivateEvent = procedure (self, Sender: Object; Button: MouseButton; ShiftState: ShiftState; X, Y: int; HitTest: int; var MouseActivate: MouseActivate) of object; + + When you click a control and the parent top-level form is not active, this event fires on the control that the mouse cursor is over. ``MouseActivate()`` is a protected virtual function in `Control <Vcl.Controls.TControl.htm>`__. ``MouseActivate()`` can be overridden in custom control descendants to provide special built-in processing of the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ events. If you leave the default value of ``MouseActivate()`` as ``maDefault``, the parent control fires the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event and repeats the process all the way up to the top-level form. If no control in the chain sets the value of ``MouseActivate()``, the behavior is the same as if a control set MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ to ``maActivate``. At any point, a control can set the value of MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ and the parent processing stops. + + Some controls set focus to themselves when they get a ``Button`` down message so, in some cases, setting ``maNoActivate`` appears to have no effect. For instance, a ``Button`` control sets focus to itself in the ``WM_LBUTTONDOWN`` message regardless of whether or not MouseActivate <Vcl.Controls.TMouseActivate.htm>`__ is set to ``maNoActivate``. In this case, setting ``maNoActivateAndEat`` will work because the top-level form is not activated and the ``WM_LBUTTONDOWN`` message is suppressed. + + The `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ parameter is the hit test value obtained from the ``WM_NCHITTEST`` message. See ``Windows.pas`` for valid values and their meanings. In most cases this value will be ``HTCLIENT``, which means that the user clicked in the client area of a control. However, in the case of a top-level form, this can take other values such as ``HTCAPTION`` or ``HTBOTTOM``. This allows the code to decide which value to set for ``MouseActivate()``, based on the `HitTest <Vcl.Controls.TDockTree.HitTest.htm>`__ code. For example, the following code in the `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event handler for a ``Form`` forces the user to click into a non-client area to activate the ``Form``: + + .. code-block:: python + :caption: Delphi + + if HitTest = HTCLIENT then + MouseActivate := maNoActivateAndEat; + + Even though this event is tied to how *Windows* processes ``WM_MOUSEACTIVATE``, the actual handling of the message is done at the `Control <Vcl.Controls.TControl.htm>`__ level, which is the point in the VCL hierarchy where the control has no window handle. The `OnMouseActivate <Vcl.Controls.TControl.OnMouseActivate.htm>`__ event is then simulated because all the `Control <Vcl.Controls.TControl.htm>`__ descendants also have `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__, `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__, and `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ events. This information is applicable to both *VCL Win32* and *VCL.NET*. + ''' + def OnMouseDown(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseDown: MouseEvent + Occurs when the user presses a mouse button with the mouse pointer over a control. + + Use the `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler to implement any special processing that should occur as a result of pressing a mouse button. + + The `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseDown <Vcl.Controls.TControl.OnMouseDown.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnMouseEnter(self, Sender: Object) -> None: + ''' + # OnMouseEnter: NotifyEvent + Occurs when the user moves the mouse into a control. + + Use the ``OnMouseEnter`` event handler to implement any special processing that should occur as a result of moving the mouse into a control when the parent top-level form is not active. + + ``OnMouseEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseLeave(self, Sender: Object) -> None: + ''' + # OnMouseLeave: NotifyEvent + Occurs when the user moves the mouse outside of a control. + + Use the ``OnMouseLeave`` event handler to implement any special processing that should occur as a result of moving the mouse outside of a control when the parent top-level form is not active. + + ``OnMouseLeave`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnMouseMove(self, Sender: Object, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseMove: MouseMoveEvent + Occurs when the user moves the mouse pointer while the mouse pointer is over a control. + + Use the `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ event handler to respond when the mouse pointer moves after the control has captured the mouse. + + Use the ``Shift`` parameter of the ``OnMouseMove`` event handler to determine the state of the *Shift* keys and mouse buttons. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys or *Shift* key-mouse button combinations. ``'X'`` and ``'Y'`` are pixel coordinates of the new location of the mouse pointer in the client area of the ``Sender``. + + `OnMouseMove <Vcl.Controls.TControl.OnMouseMove.htm>`__ is an event handler of type `Vcl.Controls.TMouseMoveEvent <Vcl.Controls.TMouseMoveEvent.htm>`__. + ''' + def OnMouseUp(self, Sender: Object, Button: MouseButton, Shift: ShiftState, X: int, Y: int) -> None: + ''' + # OnMouseUp: MouseEvent + Occurs when the user releases a mouse button that was pressed with the mouse pointer over a component. + + Use an `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler to implement special processing when the user releases a mouse button. + + The `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ event handler can respond to *left*, *right*, or *center* mouse button presses and *Shift* key plus mouse-button combinations. *Shift* keys are the *Shift*, *Ctrl*, and *Alt* keys. ``'X'`` and ``'Y'`` are the pixel coordinates of the mouse pointer in the client area of the ``Sender``. + + `OnMouseUp <Vcl.Controls.TControl.OnMouseUp.htm>`__ is an event handler of type `Vcl.Controls.TMouseEvent <Vcl.Controls.TMouseEvent.htm>`__. + ''' + def OnStartDock(self, Sender: Object, DragObject: DragDockObject) -> None: + ''' + # OnStartDock: StartDockEvent + Occurs when the user begins to drag a control with a `DragKind <Vcl.Controls.TControl.DragKind.htm>`__ of ``dkDock``. + + Use the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler to implement special processing when the user starts a drag-and-dock operation by dragging the control. + + The `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler can create a `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ object for the ``DragObject`` parameter to specify the appearance of the dragging rectangle and how the dragged control interacts with potential docking sites. If you return `DragDockObjectEx <Vcl.Controls.TDragDockObjectEx.htm>`__ as the drag object, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you use `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__, your application is responsible for freeing the drag object. + + If the `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ object is automatically created. + + .. note:: This information applies to *Win32* applications only. + + `OnStartDock <Vcl.Controls.TControl.OnStartDock.htm>`__ is an event handler of type StartDockEvent <Vcl.Controls.TStartDockEvent.htm>`__. + ''' + def OnStartDrag(self, Sender: Object, DragObject: DragObject) -> None: + ''' + # OnStartDrag: StartDragEvent + Occurs when the user begins to drag the control or an object it contains by left-clicking the control and holding the mouse button down. + + Use the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler to implement special processing when the user starts to drag the control or an object it contains. `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ only occurs if ``DragKind`` is ``dkDrag``. + + ``Sender`` is the control that is about to be dragged, or that contains the object about to be dragged. + + The `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler can create a ``DragControlObjectEx`` instance for the ``DragObject`` parameter to specify the drag cursor, or, optionally, a drag ``ImageList``. If you create a ``DragControlObjectEx`` instance, there is no need to call the ``Free()`` method for the ``DragObject`` when dragging is over. If you create, instead, a ``DragControlObject`` instance, your application is responsible for freeing the drag object instance. + + If the `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ event handler sets the ``DragObject`` parameter to ``nil`` (Delphi) or ``NULL`` (C++), a ``DragControlObject`` object is automatically created and dragging begins on the control itself. + + .. note:: On some controls, such as ``RichEdit``, the underlying *Windows* control handles internal drag operations. For these controls, there are no `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ or ``OnEndDrag`` events for drag operations within the control. + + `OnStartDrag <Vcl.Controls.TControl.OnStartDrag.htm>`__ is an event handler of type StartDragEvent <Vcl.Controls.TStartDragEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class VarParameter: + __hash__: ClassVar[None] = ... + Value: ... + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + +class WinControl(Control): + ''' + ======================== + Vcl.Controls.TWinControl + ======================== + + ``WinControl`` is the base class for all controls that are wrappers for Microsoft Windows screen objects. + + ``WinControl`` provides the common functionality for all controls that act as wrappers for Microsoft Windows screen objects ("windows"). Controls that are wrap underlying windows have the following features: + + - The control can incorporate the functionality of an underlying window. For example, if the underlying screen object is a text editor, the control can incorporate the editor ability to manage and display a text buffer. + - The control can receive user input focus. The focused control can handle keyboard input events. Some controls change their appearance when they have the focus. For example, button controls typically indicate the focus by drawing a rectangle around the caption. + - The control can serve as a container for other controls, referred to as child controls. This relationship is signified by the child's `Parent <Vcl.Controls.TControl.Parent.htm>`__ property. Container controls provide important services to their children, including display services for controls + that do not implement their own canvases. Examples of container controls include forms, panels, and toolbars. + + Controls based on ``WinControl`` can display standard screen objects provided by Microsoft Windows, or customized screen objects developed by the VCL programmer. + + Descendants of ``WinControl`` include abstract base classes that support most kinds of user interface objects. The most significant descendant is ``CustomControl``, which provides code to implement a canvas and handle paint messages. Other important abstract descendants include ``ScrollingWinControl``, ``ButtonControl``, ``CustomComboBox``, ``CustomEdit``, and ``CustomListBox``. When defining new control classes, consider these descendants before deriving directly from ``WinControl``. + + Every ``WinControl`` object has a `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property which provides the window handle for the underlying Microsoft Windows screen object. Use the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property to bypass the VCL API and directly access the underlying window. + ''' + + __hash__: ClassVar[None] = ... + FDoubleBuffered: bool + ''' + The internal field corresponding to the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property + + ``FDoubleBuffered`` is the internal field corresponding to the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + FInImeComposition: bool + ''' + Specifies whether the *IME* is in the process of generating the composition string. + + ``FInImeComposition`` is an internal field specifying whether the *IME* is in the process of generating the composition string. To be more specific, ``FInImeComposition`` is ``True`` when the *IME* starts generating the composition string, and ``False`` when it ends the composition. + ''' + FDesignSize: Point + ''' + Specifies the design-time dimensions of the control. + + ``FDesignSize`` is an internal field specifying the design-time dimensions of the control. + ''' + FHandle: HWndWrapper + ''' + No have docs. + ''' + FAsyncList: List + ''' + Internal `List <System.Classes.TList.htm>`__ that stores pending asynchronous method calls for the control. + + The asynchronous method calls refer to instances of: + + - `WinControl <Vcl.Controls.TWinControl.htm>`__ + - Descendants of `Control <Vcl.Controls.TControl.htm>`__ + ''' + AlignControlList: List + ''' + No have docs. + ''' + BevelEdges: BevelEdges + ''' + Specifies which edges of the control are beveled. + + Use ``BevelEdges`` to ``get`` or ``set`` which edges of the control are beveled. The `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__, `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, and `BevelKind <Vcl.Controls.TWinControl.BevelKind.htm>`__ properties determine the appearance of the specified edges. + ''' + BevelInner: BevelInner + ''' + Specifies the cut of the inner bevel. + + Use ``BevelInner`` to specify whether the inner bevel has a *raised*, *lowered*, or *flat* look. + + The inner bevel appears immediately inside the outer bevel. If there is no outer bevel (``BevelOuter`` is ``bvNone``), the inner bevel appears immediately inside the border. + ''' + BevelOuter: BevelCut + ''' + Specifies the cut of the outer bevel. + + Use ``BevelOuter`` to specify whether the outer bevel has a *raised*, *lowered*, or *flat* look. + + The outer bevel appears immediately inside the border and outside the inner bevel. + ''' + BevelKind: BevelKind + ''' + Specifies the control's bevel style. + + Use ``BevelKind`` to modify the appearance of a bevel. ``BevelKind`` influences how sharply the bevel stands out. + + ``BevelKind``, in combination with `BevelWidth <Vcl.Controls.TWinControl.BevelWidth.htm>`__ and the cut of the bevel specified by `BevelInner <Vcl.Controls.TWinControl.BevelInner.htm>`__ or `BevelOuter <Vcl.Controls.TWinControl.BevelOuter.htm>`__, can create a variety of effects. Experiment with various combinations to get the look you want. + ''' + BevelWidth: BevelWidth + ''' + Specifies the width of the inner and outer bevels. + + Use ``BevelWidth`` to specify the width, in pixels, of the inner and outer bevels. + ''' + BorderWidth: BorderWidth + ''' + Specifies the width of the control's border. + + Use ``BorderWidth`` to ``get`` or ``set`` the width of the control's border. Graphics or text drawn by the control is clipped to the area within the border. + ''' + Ctl3D: bool + ''' + Determines whether a control has a three-dimensional (3-D) or two-dimensional look. + + ``Ctl3D`` is provided for backward compatibility. It is not used by 32-bit versions of *Windows* or *NT 4.0* and later, with the exception of *Windows XP Home*, where it is used on occasion. + + On earlier platforms, ``Ctl3D`` controlled whether the control had a flat or beveled appearance. + + .. note:: *RAD Studio* no longer supports *Windows Vista* or earlier. + ''' + ImeMode: ImeMode + ''' + Determines the behavior of the *Input Method Editor* (IME). + + Set ``ImeMode`` to configure the way an *IME* processes user keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + ``ImeMode`` allows a control to influence the type of conversion performed by the *IME* so that it is appropriate for the input expected by the control. For example, a control that only accepts numeric input might specify an ``ImeMode`` of ``imClose``, as no conversion is necessary for numeric input. + + .. note:: The value of ``ImeMode`` only takes effect when the control receives focus. To change the value of ``ImeMode`` when the control already has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ImeName: ImeName + ''' + Specifies the *Input Method Editor* (IME) to use for converting keyboard input to Asian language characters. + + Set ``ImeName`` to specify which *IME* to use for converting keystrokes. An *IME* is a front-end input processor for Asian language characters. The *IME* hooks all keyboard input, converts it to Asian characters in a conversion window, and sends the converted characters or strings on to the application. + + ``ImeName`` must specify one of the *IME*s that has been installed through the *Windows* control panel. The property inspector provides a drop-down list of all currently installed *IME*s on the system. At runtime, applications can obtain a list of currently installed *IME*s from the global ``Screen`` variable. + + If ``ImeName`` specifies an unavailable *IME*, the *IME* that was active when the application started is used instead. No exception is generated. + + .. note:: The value of ``ImeName`` only takes effect when the control receives focus. To change the value of ``ImeName`` after the control has input focus, call the `SetIme <Vcl.Controls.TWinControl.SetIme.htm>`__ method. + ''' + ParentBackground: bool + ''' + Determines whether the control uses its parent's theme background. + + If ``ParentBackground`` is ``True``, the control uses the parent's theme background to draw its own background. + + If ``ParentBackground`` is ``False``, the control uses its own properties, such as ``Color``, to draw its background. + + ``ParentBackground`` has no effect unless *XP* themes are enabled. + ''' + ParentCtl3D: bool + ''' + Determines where a component looks to determine whether it should have a three-dimensional look. + + ``ParentCtl3D`` is provided for backwards compatibility. It has no effect on 32-bit versions of *Windows* or *NT 4.0* and later. + + ``ParentCtl3D`` determines whether the control uses its parent's `Ctl3D <Vcl.Controls.TWinControl.Ctl3D.htm>`__ property. + ''' + TipMode: TipMode + ''' + No have docs. + ''' + DefWndProc: Pointer + ''' + Specifies the default window procedure for the windowed control. + + Windowed controls use the *Windows API* function ``CallWindowProc`` with ``DefWndProc`` to invoke the standard *Windows Message* handling for a window message. Using ``DefWndProc`` instead of the `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method bypasses any message processing introduced by the `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method. + + ``DefWndProc`` fills the role for windowed controls that `DefaultHandler <Vcl.Controls.TWinControl.DefaultHandler.htm>`__ fills for all objects. The `DefaultHandler <Vcl.Controls.TWinControl.DefaultHandler.htm>`__ for `WinControl <Vcl.Controls.TWinControl.htm>`__ uses ``DefWndProc`` to pass messages to Windows for processing. + + For windowed controls, ``DefWndProc`` is initially set to the window procedure of the window class specified in the ``Params`` parameter in the `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ method. Change ``DefWndProc`` to subclass the window class of a windowed control. + ''' + WindowHandle: HWnd + ''' + Provides access to a window handle for the control. + + The ``WindowHandle`` property provides access to the same window handle as the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property, but ``WindowHandle`` is protected, and therefore only accessible to code inside the control. + + The advantage to using ``WindowHandle`` is that it can be written to, while the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property is read-only. Use ``WindowHandle`` when implementing methods that need to change the value of the control's window handle. Unlike the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property, reading the value of ``WindowHandle`` doesn't automatically create a valid handle. Reading ``WindowHandle`` can return a zero value. + ''' + DockClientCount: int + ''' + Specifies the number of controls that are docked on the windowed control. + + Use ``DockClientCount`` to get the number of controls that are docked to the windowed control. This value can be used as an upper bound when iterating through the `DockClients <Vcl.Controls.TWinControl.DockClients.htm>`__ property. + + .. note:: The `DockClients <Vcl.Controls.TWinControl.DockClients.htm>`__ property can contain controls that are not visible. To get the number of docked clients that are visible, use the `Visible <Vcl.Controls.TControl.Visible.htm>`__ ``DockClientCount`` property instead. + ''' + DockClients: list + ''' + Lists the controls that are docked to the windowed control. + + Use ``DockClients()`` to access any control that is docked to the windowed control. + ''' + DockSite: bool + ''' + Specifies whether the control can be the target of drag-and-dock operations. + + Set ``DockSite`` to ``True`` to allow other controls to be docked to this windowed control. + ''' + DockManager: IDockManager + ''' + Specifies the control's docking manager interface. + + Use ``DockManager`` to specify the control's docking manager. The docking manager handles the layout of docking zones (where controls are docked) and any painting associated with docking zones. + + If you set `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ and `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ to ``True``, but do not assign a value to ``DockManager``, the windowed control generates a default docking manager, using the global `DefaultDockTreeClass <Vcl.Controls.DefaultDockTreeClass.htm>`__ variable. + ''' + DoubleBuffered: bool + ''' + Determines whether the control's image is rendered directly to the window or painted to an in-memory bitmap first. + + When ``DoubleBuffered`` is ``False``, the windowed control paints itself directly to the window. When ``DoubleBuffered`` is ``True``, the windowed control paints itself to an in-memory bitmap that is then used to paint the window. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive. + + When a windowed control is a dock site and has an associated dock manager, it must be double-buffered. + + .. note:: Some controls, such as ``RichEdit``, can't paint themselves into a bitmap. For such controls, ``DoubleBuffered`` must be set to ``False``. + ''' + AlignDisabled: bool + ''' + Indicates child control realignment disabled. + + ``AlignDisabled()`` returns ``True`` if child control realignment has been temporarily disabled by a call to `DisableAlign <Vcl.Controls.TWinControl.DisableAlign.htm>`__. + ''' + MouseInClient: bool + ''' + Indicates whether the mouse pointer is currently in the client area of the control. + + Use ``MouseInClient()`` to check whether the mouse pointer is currently located in the client area of the control. ``MouseInClient`` is also used internally to fire the `OnMouseEnter <Vcl.Controls.TControl.OnMouseEnter.htm>`__ and `OnMouseLeave <Vcl.Controls.TControl.OnMouseLeave.htm>`__ events. + ''' + VisibleDockClientCount: int + ''' + Specifies the number of visible controls that are docked on the windowed control. + + Use ``VisibleDockClientCount`` to determine the number of controls in the `DockClients <Vcl.Controls.TWinControl.DockClients.htm>`__ list that have a `Visible <Vcl.Controls.TControl.Visible.htm>`__ property value of ``True``. This ``Value`` is less than or equal to the value of `DockClientCount <Vcl.Controls.TWinControl.DockClientCount.htm>`__. + ''' + Brush: Brush + ''' + Determines the color and pattern used for painting the background of the control. + + The ``Brush`` property accesses the `Brush <Vcl.Graphics.TBrush.htm>`__ object that determines pattern and color for the control background. ``Brush`` is a read-only property, but an application can manipulate the `Brush <Vcl.Graphics.TBrush.htm>`__ object by setting its properties or by using its `Assign <Vcl.Graphics.TBrush.Assign.htm>`__ method. + ''' + Controls: list + ''' + Lists all child controls. + + ``Controls`` is an array of all the child controls. These are all controls that list this control as their `Parent <Vcl.Controls.TControl.Parent.htm>`__ property. The ``Controls`` property is convenient for referring to the children of a control by number rather than name. For example, ``Controls`` may be used to iterate over all the child controls. + + Don't confuse the ``Controls`` property with the Components property. The ``Controls`` property lists all the controls that are child windows of the control, while the Components property lists all components that it owns. the ``Form`` owns all components put on it, and therefore, they appear in the ``Form``\ s. Components property list, even when they are child windows of a control on the ``Form``. + + ``Controls`` is a read-only property. To add or delete a child control, use the `InsertControl <Vcl.Controls.TWinControl.InsertControl.htm>`__ or `RemoveControl <Vcl.Controls.TWinControl.RemoveControl.htm>`__ methods. To move a child control from one parent to another, set the `Parent <Vcl.Controls.TControl.Parent.htm>`__ of the child control, as that will handle both the `RemoveControl <Vcl.Controls.TWinControl.RemoveControl.htm>`__ from the original parent and the `InsertControl <Vcl.Controls.TWinControl.InsertControl.htm>`__ to the new parent. + ''' + ControlCount: int + ''' + Returns the number of child controls. + + Read ``ControlCount`` when iterating over all the children of this control. The children of the control are listed in the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property array. + + ``ControlCount`` is a read-only property. + + .. note:: The value of ``ControlCount`` is always 1 greater than the highest `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ index, because the first `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ index is 0. + ''' + Handle: HWND + ''' + Provides access to the underlying *Windows* *Screen* object for the control. + + The ``Handle`` property returns the window handle for the underlying *Microsoft Windows* *Screen* object. Use the ``Handle`` property to bypass the VCL API and directly access the underlying window. + + Do not refer to the ``Handle`` property during component creation or streaming. The underlying window does not exist until the first time the ``Handle`` property is referenced. When this occurs, the `HandleNeeded <Vcl.Controls.TWinControl.HandleNeeded.htm>`__ method is called automatically. + + ``Handle`` is a read-only property. + + .. note:: On Win64, the size of HANDLE types has changed to 64-bits --except for OLE_HANDLE, which is now a 32bit Long even in Win64. This means that you need to change any code that assumed OLE_HANDLE and other HANDLE types are interchangeable. See also http://stackoverflow.com/questions/401812/what-is-the-proper-way-to-cast-from-an-ole-handle-to-an-hicon. + ''' + Padding: Padding + ''' + Specifies the padding of a control. + + Use ``Padding`` to specify the padding of a control. This ``Value`` is an instance of the class `Padding <Vcl.Controls.TPadding.htm>`__. + ''' + ParentDoubleBuffered: bool + ''' + ``ParentDoubleBuffered`` defers the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component to the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + + ``ParentDoubleBuffered`` is a boolean indicating that the `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property of this component is overridden by the value of the parent's `DoubleBuffered <Vcl.Controls.TWinControl.DoubleBuffered.htm>`__ property. + ''' + ParentWindow: HWND + ''' + Reference to parent's underlying control. + + ``ParentWindow`` refers to the window handle that underlies the parent control. To designate a non-VCL Control* as a parent, assign that control's handle to ``ParentWindow``. This assignment causes the control to be moved into the parent's screen area. Setting ``ParentWindow`` has no effect if `Parent <Vcl.Controls.TControl.Parent.htm>`__ is not ``nil`` (Delphi) or ``NULL`` (C++). + + ``ActiveXControl`` objects use ``ParentWindow`` to insert a control in an *ActiveX* container window. ``ParentWindow`` is set automatically when a control is constructed with a call to `CreateParented <Vcl.Controls.TWinControl.CreateParented.htm>`__ (Delphi) or the appropriate overloaded constructor(C++). + + Use ``ParentWindow`` with windowed controls that are packaged in a *DLL*. This allows references to the control by applications based on other applications. + ''' + Showing: bool + ''' + Indicates whether the control is showing on the *Screen*. + + ``Showing`` is used internally to optimize the allocation of *Windows* resources. Use ``Showing`` to determine when you must allocate resources that are required when the control is visible. When ``Showing`` is ``False``, the control is not visible and you can delay the allocation of resources. + + If the `Visible <Vcl.Controls.TControl.Visible.htm>`__ properties of a component and all the parents in its parent hierarchy are ``True``, ``Showing`` is guaranteed to be ``True``. If one of the parents containing the control has a `Visible <Vcl.Controls.TControl.Visible.htm>`__ property value of ``False``, ``Showing`` may be either ``True`` or ``False``. + + ``Showing`` is a read-only property. + ''' + TabOrder: TabOrder + ''' + Indicates the position of the control in its parent's tab order. + + ``TabOrder`` is the order in which child windows are visited when the user presses the *Tab* key. The control with the ``TabOrder`` value of 0 is the control that has the focus when the ``Form`` first appears. + + Initially, the tab order is always the order in which the controls were added to the ``Form``. The first control added to the ``Form`` has a ``TabOrder`` value of 0, the second is 1, the third is 2, and so on. Change this by changing the ``TabOrder`` property. + + Each control has a unique tab-order value within its parent. If you change the ``TabOrder`` property value of one control to be the same as the value of a second control, the ``TabOrder`` value for all the other controls changes. For example, suppose a control is sixth in the tab order. If you change the control's ``TabOrder`` property value to 3 (making the control fourth in the tab order), the control that was originally fourth in the tab order now becomes fifth, and the control that was fifth becomes sixth. + + Assigning ``TabOrder`` a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of ``TabOrder``, but instead is given the number that assures the control is the last in the tab order. + + .. note:: ``TabOrder`` is meaningful only if the `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property is ``True`` and if the control has a parent. (The ``TabOrder`` property of a form is not used unless the ``Form`` is the child of another form.) A control with a ``TabOrder`` of -1 has no parent, and therefore cannot be reached by pressing the *Tab* key. To remove a parented control from the Tab order, set its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property to ``False``. + ''' + TabStop: bool + ''' + Determines whether the user can tab to a control. + + Use the ``TabStop`` to allow or disallow access to the control using the *Tab* key. + + If ``TabStop`` is ``True``, the control is in the tab order. If ``TabStop`` is ``False``, the control is not in the tab order and the user cannot press the *TAB* key to move to the control. + + .. note:: ``TabStop`` is not meaningful for a form unless the ``Form`` assigns another form to be its parent. + ''' + UseDockManager: bool + ''' + Specifies whether the docking manager is used in drag-and-dock operations. + + Use ``UseDockManager`` to ``get`` or ``set`` whether a docking manager is used in drag-and-dock operations. + + The docking manager handles the positioning of docked controls and any painting of docking zones around those controls. If you do not use a docking manager, docked controls are aligned to the windowed control based on the closest edge to where they are released. When you do not use a docking manager, there is no region for a user to grab to automatically undock a docked control. + ''' + + def InvokeAsyncCalls(self) -> None: + ''' + Processes pending asynchronous method calls listed in `FAsyncList <Vcl.Controls.TWinControl.FAsyncList.htm>`__. + + The `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ of the control calls ``InvokeAsyncCalls()`` as a result of a specific message that the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ retrieves. + + .. note:: ``InvokeAsyncCalls()`` synchronizes the access to `FAsyncList <Vcl.Controls.TWinControl.FAsyncList.htm>`__. It prohibits other threads from accessing it until the calling one calls `Exit <System.TMonitor.Exit.htm>`__. + ''' + def UpdateStyleElements(self) -> None: + ''' + Called when the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + + Override the `UpdateStyleElements <Vcl.Controls.TControl.UpdateStyleElements.htm>`__ method in a descendant class to provide customized behavior for the control when the value of the `StyleElements <Vcl.Controls.TControl.StyleElements.htm>`__ property changes. + ''' + def AsyncSchedule(self, AsyncResult: BaseAsyncResult) -> None: + ''' + Schedules asynch method calls. + + ``Vcl.Controls.TWinControl.AsyncSchedule`` inherits from `System.Classes.TComponent.AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__. All content below this line refers to `System.Classes.TComponent.AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__. + + Schedules asynch method calls. + + By default, `AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__ uses `Queue <System.Classes.TThread.Queue.htm>`__ in order to queue the asynch method call with the main thread. + + Override `AsyncSchedule <System.Classes.TComponent.AsyncSchedule.htm>`__ in descendant components in order to modify the management of the asynchronous scheduling. + ''' + def ActionChange(self, Sender: Object, CheckDefaults: bool) -> None: + ''' + Updates the control to reflect changes in its associated action. + + ``ActionChange()`` is called automatically when the associated action changes. It updates the control to reflect the action's current `Caption <Vcl.Controls.TControl.Caption.htm>`__, `Enabled <Vcl.Controls.TControl.Enabled.htm>`__, `Hint <Vcl.Controls.TControl.Hint.htm>`__, `Visible <Vcl.Controls.TControl.Visible.htm>`__, and `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ properties and its `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. + + The ``Sender`` parameter is the associated action. The ``CheckDefaults`` parameter specifies whether properties and event handlers should be changed if they differ from the default values. When ``CheckDefaults`` is ``True``, properties and event handlers are only changed when the current values are the default values (that is, when the values have not been previously changed). When ``CheckDefaults`` is ``False``, properties and event handlers are changed, regardless of their current values. + ''' + def AddBiDiModeExStyle(self, ExStyle: DWORD) -> None: + ''' + Sets control's window style according to its bi-directional support. + + The `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ method calls ``AddBiDiModeExStyle()`` to update the control's style flags (passed as the ``ExStyle`` parameter) according the control's bi-directional support. ``AddBiDiModeExStyle()`` uses the `UseRightToLeftReading <Vcl.Controls.TControl.UseRightToLeftReading.htm>`__, `UseRightToLeftScrollBar <Vcl.Controls.TControl.UseRightToLeftScrollBar.htm>`__, `UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__, and `GetControlsAlignment <Vcl.Controls.TControl.GetControlsAlignment.htm>`__ methods to determine the current bi-directional support. + ''' + def AssignTo(self, Dest: Persistent) -> None: + ''' + Copies the properties of the windowed control to another object. + + Do not call the protected ``AssignTo()`` method. Instead, applications call the ``Action()`` method to copy the properties of another object. If the object's ``Action()`` method does not include the ability to copy from the source object, the ``Action()`` method calls the source object's protected ``AssignTo()`` method, to copy the source objects properties to the object specified by the ``Dest`` parameter. This allows objects to expand the abilities of another object's ``Action()`` method to copy from additional sources. + + The ``AssignTo()`` method implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__ copies the `Caption <Vcl.Controls.TControl.Caption.htm>`__, `Enabled <Vcl.Controls.TControl.Enabled.htm>`__, `Hint <Vcl.Controls.TControl.Hint.htm>`__, `Visible <Vcl.Controls.TControl.Visible.htm>`__, and `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__ properties and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler to a ``CustomAction`` object. + ''' + def AdjustClientRect(self, Rect: Rect) -> None: + ''' + Provides the interface that adjusts the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property for idiosyncrasies of the window. + + ``AdjustClientRect()`` is called internally when the control needs accurate information on where to place child controls within the client area. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``AdjustClientRect()`` does nothing. Override this method in descendants such as ``TabControl`` where the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property is not the same as the region in which child objects can appear. + ''' + def AdjustSize(self) -> None: + ''' + Adjusts the control's size according to its contents and constraints. + + If the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True``, ``AdjustSize()`` is called automatically when the control needs to automatically resize itself to its contents. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``AdjustSize()`` calls `SetBounds <Vcl.Controls.TWinControl.SetBounds.htm>`__ with the values of its `Left <Vcl.Controls.TControl.Left.htm>`__, `Top <Vcl.Controls.TControl.Top.htm>`__, `Width <Vcl.Controls.TControl.Width.htm>`__, and `Height <Vcl.Controls.TControl.Height.htm>`__ properties. This call can result in a change of size if these values are altered in the control's `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ or `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event handlers, or if the control's `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event handler makes any final adjustments. + + Descendant classes override ``AdjustSize()`` to change the size of the control to adjust to its contents. + + Component writers may call ``AdjustSize()`` when making changes to a control's contents. + ''' + def AlignControls(self, AControl: Control, Rect: Rect) -> None: + ''' + Returns placement order of custom-aligned child control. + + ``CustomAlignInsertBefore()`` determines the order in which custom-aligned child controls are placed. The control calls ``CustomAlignInsertBefore()`` once for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. ``CustomAlignInsertBefore()`` returns ``True`` if **C2** should be presented before **C1**, and false otherwise. + + Once the custom-aligned child controls are sorted, their specific positions are determined by calls to `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. + + ``CustomAlignInsertBefore()`` triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, ``CustomAlignInsertBefore()`` returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding ``CustomAlignInsertBefore()``. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``CustomAlignInsertBefore()`` returns ``False`` if `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ is not implemented, so the controls are placed in the order they appear in the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property. + ''' + def ArrangeControl(self, AControl: Control, ParentSize: Point, AAlign: Align, AAlignInfo: AlignInfo, Rect: Rect, UpdateAnchorOrigin: bool) -> None: + ''' + Aligns the given control with the specified alignment options. + + ``ArrangeControl()`` is a protected method used internally by `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__ to align each control, with the specified alignment options. + + To be more specific, ``ArrangeControl()`` aligns the control given by + + ``AControl``, with the alignment options specified through the parameters ``ParentSize``, ``AAlign``, ``AAlignInfo``, ``Rect``, and ``UpdateAnchorOrigin``. The meaning of these parameters is summarized in the following table. + + +---------------------------+-------------------------------------------------------------------+ + | **Parameter** | **Meaning** | + +===========================+===================================================================+ + | ``ParentSize`` | The size of the parent control within which | + | | ``AControl`` is aligned. | + +---------------------------+-------------------------------------------------------------------+ + | ``AAlign`` | Determines how | + | | ``AControl`` aligns within its parent control. | + +---------------------------+-------------------------------------------------------------------+ + | ``AAlignInfo`` | Describes the alignment details of | + | | ``AControl`` within its parent. | + +---------------------------+-------------------------------------------------------------------+ + | ``Rect`` | The rectangular area inside the parent control in which to align | + | | ``AControl``. | + +---------------------------+-------------------------------------------------------------------+ + | ``UpdateAnchorOrigin`` | Specifies whether to update the anchor origin of | + | | ``AControl``, following the alignment. | + +---------------------------+-------------------------------------------------------------------+ + ''' + def CanAutoSize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Indicates how the control can be resized. + + ``CanAutoSize()`` is called automatically when the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property is ``True`` and an attempt is made to resize the control. It allows controls to implement the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property before the resize sequence that begins with the `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ and `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ events and ends with the `OnResize <Vcl.Controls.TControl.OnResize.htm>`__ event. + + When ``CanAutoSize()`` is called, the ``NewWidth`` and ``NewHeight`` parameters indicate the proposed new dimensions of the control. ``CanAutoSize()`` adjusts these values so that the control's size adjusts to its contents. If the adjustment results in values of ``NewWidth`` and ``NewHeight`` that differ from the control's current width and height, ``CanAutoSize()`` returns ``True``, indicating that the resize sequence should proceed. If, after adjustment, ``NewWidth`` and ``NewHeight`` equal `Width <Vcl.Controls.TControl.Width.htm>`__ and `Height <Vcl.Controls.TControl.Height.htm>`__, ``CanAutoSize()`` returns ``False``, and the resize sequence is aborted. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``CanAutoSize()`` returns ``True``, adjusting ``NewWidth`` and ``NewHeight`` so that all the control's children fit. + ''' + def CanResize(self, NewWidth: int, NewHeight: int) -> bool: + ''' + Indicates how the control can respond to a resize attempt. + + ``CanResize()`` is called automatically when an attempt is made to resize the control. The ``NewWidth`` and ``NewHeight`` parameters specify the attempted new values for the control's height and width. ``CanResize()`` returns ``True`` if the control can be resized to the returned values of ``NewWidth`` and ``NewHeight``. ``CanResize()`` returns ``False`` if the control can't be resized. + + ``CanResize()`` generates an `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event. An `OnCanResize <Vcl.Controls.TControl.OnCanResize.htm>`__ event handler may change the values of NewHeight and NewWidth. + ''' + def ChangeScale(self, M: int, D: int, isDpiChange: bool) -> None: + ''' + Resize and reposition children and self. + + ``ChangeScale()`` rescales the control in the same manner as the ``ChangeScale()`` method in TControl. If the control contains any children, their ``ChangeScale()`` methods are called before the parent itself is rescaled. + + To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. To rescale the control without repositioning, use `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__. + ''' + def ConstrainedResize(self, MinWidth: int, MinHeight: int, MaxWidth: int, MaxHeight: int) -> None: + ''' + Generates an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event. + + ``ConstrainedResize()`` is called automatically as part of a control's resize sequence. It generates an `OnConstrainedResize <Vcl.Controls.TControl.OnConstrainedResize.htm>`__ event, passing in the ``MinWidth``, ``MinHeight``, ``MaxWidth``, and ``MaxHeight`` parameters, which can be altered by the event handler before they are applied to the attempted resize. + ''' + def ControlsAligned(self) -> None: + ''' + ``ControlsAligned()`` automatically executes after a call to `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__. + + Implement ``ControlsAligned()`` in descendant classes to display a notification, after aligning the controls by a call to `AlignControls <Vcl.Controls.TWinControl.AlignControls.htm>`__. + + .. note:: As a member of the `WinControl <Vcl.Controls.TWinControl.htm>`__ class, ``ControlsAligned()`` has no effect. + ''' + def CreateDockManager(self) -> IDockManager: + ''' + Creates the dock manager for the control. + + ``CreateDockManager()`` is called automatically during drag-and-dock operations when the `UseDockManager <Vcl.Controls.TWinControl.UseDockManager.htm>`__ property is ``True``. ``CreateDockManager()`` creates the object that implements the `DockManager <Vcl.Controls.TWinControl.DockManager.htm>`__ property. + + Override ``CreateDockManager()`` to create a custom dock manager for the control. + ''' + def CreateHandle(self) -> None: + ''' + Creates underlying screen object. + + ``CreateHandle()`` creates the Microsoft Windows screen object that underlies the control. if it does not already exist. The new window handle becomes the value of the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property. + + ``CreateHandle()`` creates or locates the parent control's window before it creates a window for the control itself. + + .. note:: If the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property is ``nil`` (Delphi) or ``NULL`` (C++), ``CreateHandle()`` raises an exception. + ''' + def CreateParams(self, Params: CreateParams) -> None: + ''' + Initializes a window-creation parameter data structure. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls ``CreateParams()`` to initialize the parameters it passes to `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__. Override ``CreateParams()`` to customize the way a control creates its Windows representation. When overriding ``CreateParams()``, always call the inherited method first to set the default values, then make any desired adjustments. + + ``CreateParams()`` fills in the parameter that is passed as the value of the ``Params`` parameter. This data structure holds information needed when telling Windows to create a window handle. The fields of a `CreateParams <Vcl.Controls.TCreateParams.htm>`__ record become the parameters to a call to the ``CreateWindowEx`` API function. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ implements ``CreateParams()`` by setting all the fields of Params to generic base values. A number of the standard controls override ``CreateParams()`` to change one or more of the default values in Params. + ''' + def CreateWindowHandle(self, Params: CreateParams) -> None: + ''' + Creates a Windows control to represent the control. + + The `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method calls ``CreateWindowHandle()`` to create the window for a control. ``CreateWindowHandle()`` creates the window by calling the CreateWindowEx API function, passing parameters from the record passed in the ``Params`` parameter. Once the window is created, its handle is available as the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property. + ''' + def CreateWnd(self) -> None: + ''' + Creates the underlying window. + + ``CreateWnd()`` is called automatically when the control is first created or when the underlying screen object must be destroyed and recreated to reflect property changes. Override ``CreateWnd()`` to pass additional initialization messages to the screen object when it is created. + ''' + def CustomAlignInsertBefore(self, C1: Control, C2: Control) -> bool: + ''' + Returns placement order of custom-aligned child control. + + ``CustomAlignInsertBefore()`` determines the order in which custom-aligned child controls are placed. The control calls ``CustomAlignInsertBefore()`` once for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. ``CustomAlignInsertBefore()`` returns ``True`` if **C2** should be presented before **C1**, and false otherwise. + + Once the custom-aligned child controls are sorted, their specific positions are determined by calls to `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. + + ``CustomAlignInsertBefore()`` triggers the `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ event. If this event is defined, ``CustomAlignInsertBefore()`` returns the value returned by `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__. Defining this event allows users to define the order of control alignment without overriding ``CustomAlignInsertBefore()``. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``CustomAlignInsertBefore()`` returns ``False`` if `OnAlignInsertBefore <Vcl.Controls.TWinControl.OnAlignInsertBefore.htm>`__ is not implemented, so the controls are placed in the order they appear in the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property. + ''' + def CustomAlignPosition(self, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + Returns aligned position of custom-aligned child control. + + ``CustomAlignPosition()`` determines the specific position of custom-aligned child controls. ``CustomAlignPosition()`` is called once for each child control with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``, in an order previously determined by calls to `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + + ``CustomAlignPosition()`` triggers the `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__ event. If this event is defined, ``CustomAlignPosition()`` uses the alignment parameters it obtains from `OnAlignPosition <Vcl.Controls.TWinControl.OnAlignPosition.htm>`__. Defining this event allows users to set the alignment parameters without overriding ``CustomAlignPosition()``. + + These are the parameters: + + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Control** | **The child control being placed.** | + +===================================================================+=============================================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ TControl_Anchors constraints for the control. | + | | ``CustomAlignPosition()`` can modify these values to reposition the control. | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. ``CustomAlignPosition()`` can modify this value. | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, | | + | ``CustomAlignPosition()`` does nothing. | | + +-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def DefineProperties(self, Filer: Filer) -> None: + ''' + Provides methods to read and write the `IsControl <Vcl.Controls.TControl.IsControl.htm>`__ property to a stream such as a form file. + + `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ is called automatically by the streaming system that loads and saves *VCL Components*. It allows persistent objects to read and write properties that are not published. Published properties are loaded and stored automatically. + + `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ uses the methods of the filer passed as the Filer parameter to assign methods that can load and save the `IsControl <Vcl.Controls.TControl.IsControl.htm>`__ property. + + Override `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ to persist unpublished properties. Call the DefineBinaryProperty or DefineProperty method of the Filer parameter to assign methods that load or save property values. + + .. note:: When overriding this method, call the parent class's `DefineProperties <Vcl.Controls.TControl.DefineProperties.htm>`__ method first. + ''' + def DestroyHandle(self) -> None: + ''' + Destroys the control's window without destroying the control. + + Call ``DestroyHandle()`` to dispose of the window, but leave the control intact. The control can later recreate the window if needed. ``DestroyHandle()`` is the converse operation to `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__. Applications should call the high-level `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__ and ``DestroyHandle()`` methods, rather than the lower-level methods of `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ and `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__, whenever possible. + + If the control has `WinControl <Vcl.Controls.TWinControl.htm>`__ objects as child controls, ``DestroyHandle()`` calls each of their ``DestroyHandle()`` methods before calling `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ to destroy its own handle. + ''' + def DestroyWindowHandle(self) -> None: + ''' + Destroys the window created in the `CreateWindowHandle <Vcl.Controls.TWinControl.CreateWindowHandle.htm>`__ method. + + Call ``DestroyWindowHandle()`` to dispose of the window for the control. + + `WinControl <Vcl.Controls.TWinControl.htm>`__'s `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ method calls ``DestroyWindowHandle()`` to destroy any window associated with a windowed control before destroying the object. The `DestroyWnd <Vcl.Controls.TWinControl.DestroyWnd.htm>`__ method also calls ``DestroyWindowHandle()``. + ''' + def DestroyWnd(self) -> None: + ''' + Destroys the control's window. + + ``DestroyWnd()`` is called when the control needs to replace its window. For example, changing properties that are implemented by window parameter settings require the control to be destroyed and then recreated using the `CreateWnd <Vcl.Controls.TWinControl.CreateWnd.htm>`__ method. + + Before the window is destroyed, ``DestroyWnd()`` saves a copy of the control's text in memory, frees any device contexts, and finally calls `DestroyWindowHandle <Vcl.Controls.TWinControl.DestroyWindowHandle.htm>`__. When the window is recreated, the stored copy of the control's text is assigned to the new window. + ''' + def DoAddDockClient(self, Client: Control, ARect: Rect) -> None: + ''' + Performs actions when a control is docked to the windowed control. + + ``DoAddDockClient()`` is called automatically when a client control is docked to the windowed control. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``DoAddDockClient()`` sets the client's `Parent <Vcl.Controls.TControl.Parent.htm>`__ property to the control. + + Client is the control that has been docked. + + ``ARect`` describes the boundaries of the region where ``Client`` has been docked. + + Override ``DoAddDockClient()`` to perform actions when a control is docked to the windowed control. + + .. note:: ``DoAddDockClient()`` is called in response to a message sent by the `DockDrop <Vcl.Controls.TWinControl.DockDrop.htm>`__ method, before the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event. + ''' + def DockOver(self, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Responds when a docking client is dragged over the windowed control. + + ``DockOver()`` is called automatically for dock sites when a dockable object is dragged over them. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``DockOver()`` positions the docking rectangle and then calls `DoDockOver <Vcl.Controls.TWinControl.DoDockOver.htm>`__ to generate an `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + Override ``DockOver()`` to perform additional actions when another control is dragged over the control. + + ``DockOver()`` is called only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ''' + def DockReplaceDockClient(self, Client: Control, NewDockSite: WinControl, DropControl: Control, ControlSide: Align, ReplacementClient: Control) -> bool: + ''' + Invalidates the first dock site in the list of child controls. + + Currently, ``DockReplaceDockClient()`` always returns ``False`` and has no effect as a member of the `WinControl <Vcl.Controls.TWinControl.htm>`__ class. + + Implement ``DockReplaceDockClient()`` in descendant classes in order to manually replace + + ``Client`` with ``ReplacementClient``. Also, manually dock ``Client`` to ``NewDockSite`` on the control specified by ``DropControl`` and using the alignment options given in ``ControlSide``. + ''' + def DoDockOver(self, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Generates an `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + ``DoDockOver()`` is called by the `DockOver <Vcl.Controls.TWinControl.DockOver.htm>`__ method to generate an `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event when the user drags a dockable control over the windowed control. Override this method to perform some other action or to suppress the event. + ''' + def DoEnter(self) -> None: + ''' + Respond to receiving input focus. + + ``DoEnter()`` is called automatically when the control receives the input focus. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``DoEnter()`` calls the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event handler, if defined. + + Descendant classes that override ``DoEnter()`` should always call the inherited method. + ''' + def DoExit(self) -> None: + ''' + Responds to losing input focus. + + ``DoExit()`` is called automatically when the control loses the input focus. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``DoExit()`` calls the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event handler, if defined. + + Descendant classes that override ``DoExit()`` should always call the inherited method. + ''' + def DoFlipChildren(self) -> None: + ''' + Flips the control's children. + + The `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ method calls ``DoFlipChildren()`` to reverse the positions of child controls. ``DoFlipChildren()()`` moves the control's children to opposite positions on the control; that is, children on the left side of the control are moved to the right side of the control and vice versa. + + Override `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ to control how the control's children are flipped. + + .. note:: ``DoFlipChildren()`` is a protected helper method for the public `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__ method. Unlike `FlipChildren <Vcl.Controls.TWinControl.FlipChildren.htm>`__, ``DoFlipChildren()`` does not adjust the alignment of controls that are aligned to one of the edges of the windowed control. + ''' + def DoKeyDown(self, Message: WMKey) -> bool: + ''' + Performs some preprocessing before generating an `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + The return value from ``DoKeyDown()`` determines if the control should continue processing key-down messages passed in the ``Message`` parameter. A return value of true indicates that the key-down occurrence has been handled completely, and no further processing is needed. A return value of ``False`` indicates that the application should continue passing the key-down message through the inherited processing. + + ``DoKeyDown()`` checks whether the ``KeyPreview`` property of the parent form is ``True``; if so, it allows the form to preemptively process key-down messages before they are handled by the windowed control. If the form does not handle the message, ``DoKeyDown()`` translates the message parameters into the appropriate types and calls `KeyDown <Vcl.Controls.TWinControl.KeyDown.htm>`__, which in turn calls the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler, if any. + ''' + def DoKeyPress(self, Message: WMKey) -> bool: + ''' + Performs some preprocessing before generating an `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. + + The return value from ``DoKeyPress()`` determines whether the control should continue processing the key-press message passed in the ``Message`` parameter. A return value of true indicates that the key-press occurrence has been handled completely, and no further processing is needed. A return value of false indicates that the application should continue passing the key-press message through the inherited processing. + + ``DoKeyPress()`` checks whether the ``KeyPreview`` property of the parent form is ``True``, and if so, allows the form to preemptively process key-press messages before they are handled by the windowed control. If the form does not handle the message, ``DoKeyPress()`` translates the message parameters into the appropriate types and calls `KeyPress <Vcl.Controls.TWinControl.KeyPress.htm>`__, which in turn calls the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler, if any. + ''' + def DoKeyUp(self, Message: WMKey) -> bool: + ''' + Performs some preprocessing before generating an `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event. + + The return value from ``DoKeyUp()`` determines whether the control should continue processing the key-up message passed in the ``Message`` parameter. A return value of true indicates that the key-up occurrence has been handled completely, and no further processing is needed. A return value of ``False`` indicates that the application should continue passing the key-up message through the inherited processing. + + ``DoKeyUp()`` checks whether the ``KeyPreview`` property of the parent form is ``True``, and if so, allows the form to preemptively process key-up messages before they are handled by the windowed control. If the form does not handle the message, ``DoKeyUp()`` translates the message parameters into the appropriate types and calls `KeyUp <Vcl.Controls.TWinControl.KeyUp.htm>`__, which in turn calls the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler, if any. + ''' + def DoHandleStyleMessage(self, Message: Message) -> bool: + ''' + No have docs. + ''' + def DoRemoveDockClient(self, Client: Control) -> None: + ''' + Responds when a control is undocked from the windowed control. + + ``DoRemoveDockClient()`` is called automatically when a client control is undocked from the windowed control. As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``DoRemoveDockClient()`` does nothing. + + Client is the control that has been undocked. + + Override ``DoRemoveDockClient()`` to perform any necessary adjustments when a control is undocked from the windowed control. + + .. note:: ``DoRemoveDockClient()`` occurs at the end of the undocking process. To make changes when undocking starts, override the `DoUnDock <Vcl.Controls.TWinControl.DoUnDock.htm>`__ method instead. + ''' + def DoUnDock(self, NewTarget: WinControl, Client: Control) -> bool: + ''' + Undocks a control that is currently docked to the windowed control. + + ``DoUnDock()`` is called automatically when a control is undocked from the windowed control. It handles all necessary changes to the windowed control to accomplish the undocking. These are + + 1. Generates an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event. + + 2. If there is no `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler, or if the event handler indicates that the client can be undocked, it removes the client from the `DockClients <Vcl.Controls.TWinControl.DockClients.htm>`__ property list. + + The ``NewTarget`` parameter indicates the new host to which the undocked control is moving. + + The ``Client`` parameter indicates the control to be undocked from the windowed control. + + ``DoUnDock()`` returns ``True`` if the client is successfully undocked, ``False`` if the undocking attempt was blocked by an `OnUnDock <Vcl.Controls.TWinControl.OnUnDock.htm>`__ event handler. + + Override ``DoUnDock()`` to change the way controls are undocked from the windowed control. + + .. note:: ``DoUnDock()`` occurs at the start of the undocking process. To handle changes when undocking is complete, override the `DoRemoveDockClient <Vcl.Controls.TWinControl.DoRemoveDockClient.htm>`__ method instead. + ''' + def FindNextControl(self, CurControl: WinControl, GoForward: bool, CheckTabStop: bool, CheckParent: bool) -> WinControl: + ''' + Returns the control's next child in the tab order after the specified control. + + Call ``FindNextControl()`` to find the next child control in the tab order after ``CurControl``. If ``CurControl`` is not a child of the control, ``FindNextControl()`` returns the first child control in the tab order. + + The ``GoForward`` parameter controls the direction of the search. If ``GoForward`` is ``True``, ``FindNextControl()`` searches forward through the child controls in tab order. If Go Forward is ``False``, ``FindNextControl()`` searches backward through the controls. + + The ``CheckTabStop`` and ``CheckParent`` parameters control whether ``FindNextControl()`` performs certain checks on the controls it finds. If ``CheckTabStop`` is ``True``, the returned control must have its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property set to true. If ``CheckParent`` is ``True``, the returned control's `Parent <Vcl.Controls.TControl.Parent.htm>`__ property must indicate the parent control. + + ``FindNextControl()`` calls the `GetTabOrderList <Vcl.Controls.TWinControl.GetTabOrderList.htm>`__ method to build its list of possible "next" controls. + ''' + def FixupTabList(self) -> None: + ''' + Sorts the child controls by their tab order. + + Applications should not call ``FixupTabList()`` directly. The `ReadState <Vcl.Controls.TWinControl.ReadState.htm>`__ method calls ``FixupTabList()`` to initialize the tab order list based on the `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__ properties of the child controls being read from a stream. + ''' + def GetActionLinkClass(self) -> ControlActionLinkClass: + ''' + Returns the associated ``ActionLink`` class. + + ``GetActionLinkClass()`` returns the appropriate class type for the ``ActionLink`` used with a control. This class is used internally to create an ``ActionLink`` object for the control when it has an associated action. The ``ActionLink`` links the action to the control client. Each `Action <Vcl.Controls.TControl.Action.htm>`__ link class is designed to link specific properties and event handlers of the action to its client, based on the types of properties the client supports. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``GetActionLinkClass()`` returns the `WinControl <Vcl.Controls.TWinControl.htm>`__ ``ActionLink`` class type, which associates the `HelpContext <Vcl.Controls.TControl.HelpContext.htm>`__, `ShowHint <Vcl.Controls.TControl.ShowHint.htm>`__, `Caption <Vcl.Controls.TControl.Caption.htm>`__, `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ and `Visible <Vcl.Controls.TControl.Visible.htm>`__ properties and the `OnClick <Vcl.Controls.TControl.OnClick.htm>`__ event handler. Descendants of `WinControl <Vcl.Controls.TWinControl.htm>`__ override this method to specify a descendant of TControlActionLink that handles their configuration of properties and events. + ''' + def GetClientOrigin(self) -> Point: + ''' + Returns the value of the `ClientOrigin <Vcl.Controls.TControl.ClientOrigin.htm>`__ property. + + ``GetClientOrigin()`` is the protected implementation of the `ClientOrigin <Vcl.Controls.TControl.ClientOrigin.htm>`__ property. + + ``GetClientOrigin()`` returns a point indicating the position of the top-left corner of the control in screen coordinates. + ''' + def GetClientRect(self) -> Rect: + ''' + Returns the value of the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property. + + ``GetClientRect()`` is the protected implementation of the `ClientRect <Vcl.Controls.TControl.ClientRect.htm>`__ property. ``GetClientRect()`` returns a rectangle with the rectangle's `Top <Vcl.Controls.TControl.Top.htm>`__ and `Left <Vcl.Controls.TControl.Left.htm>`__ fields set to zero, and its ``Bottom`` and ``Right`` fields set to the control's `ClientHeight <Vcl.Controls.TControl.ClientHeight.htm>`__ and `ClientWidth <Vcl.Controls.TControl.ClientWidth.htm>`__, respectively. + ''' + def GetControlExtents(self) -> Rect: + ''' + Returns the smallest rectangle in which all the control's children fit. + + Call ``GetControlExtents()`` to determine the smallest rectangle in which all the control's children fit. Windowed controls call ``GetControlExtents()`` when implementing the `AutoSize <Vcl.Controls.TControl.AutoSize.htm>`__ property. + ''' + def GetDeviceContext(self, WindowHandle: HWND) -> HDC: + ''' + Provides access to a device context for the control. + + Call ``GetDeviceContext()`` to obtain a handle to a device context for the control. + + ``GetDeviceContext()`` calls the *Windows API Function GetDC*, passing the windowed control's `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property. It returns the window's handle in the `WindowHandle <Vcl.Controls.TWinControl.WindowHandle.htm>`__ parameter and the ``HDC`` as the return value. If the call is unsuccessful, the ``EOutOfResources`` exception is raised. + ''' + def GetParentHandle(self) -> HWND: + ''' + Returns the window handle for the window of the control's parent. + + Use the handle returned by ``GetParentHandle`` as a parameter to *Windows API Function* calls that need the window handle for the parent window of the control. If the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property is not ``nil`` (Delphi) or ``NULL`` (C++), ``GetParentHandle()`` returns the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property of the parent control. If the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property is ``nil`` (Delphi) or ``NULL`` (C++), ``GetParentHandle()`` returns the value of `ParentWindow <Vcl.Controls.TWinControl.ParentWindow.htm>`__. + ''' + def GetSiteInfo(self, Client: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + Generates an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + ``GetSiteInfo()`` is called automatically during drag-and-dock operations to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. + + ``Client`` is a potential docking client. + + ``InfluenceRect()`` returns the area in which the client would be docked. + + ``MousePos`` is the current mouse position. + + ``CanDock()`` returns whether the client can dock to the windowed control. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``GetSiteInfo()`` generates an influence rectangle equal to `BoundsRect <Vcl.Controls.TControl.BoundsRect.htm>`__ expanded by 10 pixels on every side, and then calls the `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event handler. + ''' + def GetTopParentHandle(self) -> HWnd: + ''' + Returns the window handle of the first window not associated with a VCL Control* that contains the windowed control. + + Use ``GetTopParentHandle()`` to access the handle of the window that is hosting the windowed control. ``GetTopParentHandle()`` walks up the containers of the windowed control until it finds a control whose `Parent <Vcl.Controls.TControl.Parent.htm>`__ property is ``nil`` (Delphi) or ``NULL`` (C++). If that topmost parent is contained in a non-VCL window (its `ParentWindow <Vcl.Controls.TWinControl.ParentWindow.htm>`__ is nonzero), ``GetTopParentHandle()`` returns the non-VCL window. If the windowed control is not contained in a non-VCL window, ``GetTopParentHandle()`` returns the windowed control's own window handle. + ''' + def InvalidateDockHostSite(self, FocusLost: bool) -> None: + ''' + Invalidates the first dock site that appears in the list of child controls. + + Call ``InvalidateDockHostSite()`` to invalidate the first dock site that appears in the list of child controls. + ''' + def IsControlMouseMsg(self, Message: WMMouse) -> bool: + ''' + Indicates whether a specified mouse message is directed to one of the windowed control's child controls. + + Call ``IsControlMouseMsg()`` to find out if a mouse message is directed to one of the control's child controls. Specify the mouse message as the value of the ``Message`` parameter. + + Windows takes care of sending messages to windowed child controls, but for nonwindowed child controls, Windows sends the messages to the parent control, which must then determine which, if any, of its child controls should receive the message. + + The `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method of a windowed control calls ``IsControlMouseMsg()`` to process all mouse message sent to the windowed control. + ''' + def IsControlActivateMsg(self, Message: WMMouseActivate, Control: Control) -> bool: + ''' + Indicates whether a specified mouse activation message is directed to the given child control. + + Call ``IsControlActivateMsg()`` to find out whether a mouse activation message is directed to the child control given by the + + ``Control`` parameter. Specify the mouse activation message as the value of the ``Message`` parameter. + + The `WndProc <Vcl.Controls.TWinControl.WndProc.htm>`__ method of a windowed control calls ``IsControlActivateMsg()`` to process all mouse activation messages sent to the windowed control. + ''' + def IsQualifyingSite(self, Client: Control) -> bool: + ''' + Checks whether the control is docked inside another control or has at least two docked controls. + + ``IsQualifyingSite()`` is a protected method that returns ``True`` if either the given ``Client`` control is docked inside another control, or there are at least two controls docked inside ``Client``. + ''' + def KeyDown(self, Key: int, Shift: ShiftState) -> None: + ''' + Responds to key press events. + + When a windowed control receives a key-down message (``WM_KEYDOWN``) from Windows, its message handler calls the `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ method. If `DoKeyDown <Vcl.Controls.TWinControl.DoKeyDown.htm>`__ determines that the control should, in fact, process the character, it calls ``KeyDown()``, passing the key code and shift-key state in the ``Key`` and ``Shift`` parameters, respectively. + + ``KeyDown()`` calls any event handler attached to the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Override ``KeyDown()`` to provide other responses in addition to the event handler call. + + The ``Key`` parameter is the key on the keyboard. For nonalphanumeric keys, you must use WinAPI virtual key codes to determine the key pressed. For more information see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the *Shift*, *Alt*, or *Ctrl* keys are combined with the keystroke. + + Either ``KeyDown()`` or the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + ''' + def KeyUp(self, Key: int, Shift: ShiftState) -> None: + ''' + Respond to released key. + + When a windowed control receives a key-up message (``WM_KEYUP``) from Windows, its message handler calls the `DoKeyUp <Vcl.Controls.TWinControl.DoKeyUp.htm>`__ method. If `DoKeyUp <Vcl.Controls.TWinControl.DoKeyUp.htm>`__ determines that the control should, in fact, process the character, it calls ``KeyUp()``, passing the key code and shift-key state to ``KeyUp()`` in the Key and ``Shift`` parameters, respectively. + + ``KeyUp()`` calls any event handler attached to the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event. Override ``KeyUp()`` to provide other responses in addition to the event-handler call. + + Either ``KeyUp()`` or the `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler it calls can suppress further processing of a key by setting the ``Key`` parameter to zero. + + The ``Key`` parameter is the key on the keyboard. For non-alphanumeric keys, use WinAPI virtual key codes to determine the key pressed. For more information, see `Representing Keys and Shortcuts <Representing_Keys_and_Shortcuts.htm>`__. + + The ``Shift`` parameter indicates whether the Shift, Alt, or Ctrl keys are combined with the keystroke. + ''' + def KeyPress(self, Key: str) -> None: + ''' + Responds to keyboard input. + + When a windowed control receives a key-press message (``WM_CHAR``) from Windows, its message handler calls the `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ method. If `DoKeyPress <Vcl.Controls.TWinControl.DoKeyPress.htm>`__ determines that the control should, in fact, process the character, it calls ``KeyPress()``, passing the key code in the ``Key`` parameter. + + ``KeyPress()`` calls any event handler attached to the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Override ``KeyPress()`` to provide other responses in addition to the event handler call. + + Either ``KeyPress()`` or the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event handler it calls can suppress further processing of a character by setting the ``Key`` parameter to zero. + + .. note:: The ``Key`` parameter is the character represented by the key that is pressed, not a Windows virtual key code. + ''' + def MainWndProc(self, Message: Message) -> None: + ''' + Receives *Windows* messages for the control. + + ``MainWndProc()`` is the window procedure for the control that is associated with the control's window when it is created. When Windows sends a message to the control's window, ``MainWndProc()`` receives it. + + ``MainWndProc()`` does not process or dispatch the messages itself, but rather calls the method specified by ``WindowProc()`` to do that. ``MainWndProc()`` provides an exception-handling block around ``WindowProc()``, ensuring that if any unhandled exceptions occur during the processing of a message, the application's ``HandleException()`` method will handle them. + ''' + def Notification(self, AComponent: Component, Operation: Operation) -> None: + ''' + Responds to notifications indicating that components are being created or destroyed. + + `Notification <Vcl.Controls.TControl.Notification.htm>`__ allows `Control <Vcl.Controls.TControl.htm>`__ to update its internal state if an associated component is removed. The internal state is updated if: + + - The associated pop-up menu is destroyed. + - The control docking site is destroyed. + - The custom hint associated with the control is destroyed. + - The associated gesture manager is destroyed. + + Override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to respond to notifications indicating that other components are about to be destroyed or have just been created. Use the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update controls that rely on other objects. Data-aware objects override the `Notification <Vcl.Controls.TControl.Notification.htm>`__ method to update themselves when their data source is removed. Some objects respond to notifications indicating that other objects of a specific type are being created. For example, the session component sets the ``Session`` property of new data-aware controls to itself when the ``AutoSessionName`` property is ``True``. + + By default, components pass along the notification to their owned components, if any. + ''' + def NotifyControls(self, Msg: int) -> None: + ''' + Sends a message to all the child controls. + + ``NotifyControls()`` sends a message with the message ``ID`` passed in the ``Msg`` parameter to all the controls in the windowed control's `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ array property. ``NotifyControls()`` is used to update all the controls in a form of such occurrences as changes in the parent color or font. + + ``NotifyControls()`` constructs a generic message record, filling its message ``ID`` field with the value of ``Msg`` and setting its parameter and result fields to zeros, then calls the `Broadcast <Vcl.Controls.TWinControl.Broadcast.htm>`__ method to send the message to all the child controls. + ''' + def PaintControls(self, DC: HDC, First: Control) -> None: + ''' + Paints each of the child controls in a windowed control using the specified device context. + + Call ``PaintControls()`` to paint all the child controls of this control. Pass the device context as the value of the ``DC`` parameter. The ``First`` parameter indicates the starting point in the windowed control's child-control list to paint. If First is ``nil`` (Delphi) or ``NULL`` (C++) or does not indicate one of the child controls, ``PaintControls()`` paints all the child controls. + + The `Repaint <Vcl.Controls.TWinControl.Repaint.htm>`__ method calls ``PaintControls()`` for the control's parent, passing the control in ``First`` to repaint the control and any controls it might intersect. ``PaintHandler()`` also calls ``PaintControls()`` after calling `PaintWindow <Vcl.Controls.TWinControl.PaintWindow.htm>`__. + ''' + def PaintHandler(self, Message: WMPaint) -> None: + ''' + Responds to ``WM_PAINT`` messages. + + ``PaintHandler()`` is called automatically when the control receives a ``WM_PAINT`` message. It calls the BeginPaint and EndPaint API functions, and between them paints the control's background by calling `PaintWindow <Vcl.Controls.TWinControl.PaintWindow.htm>`__ and any child controls by calling `PaintControls <Vcl.Controls.TWinControl.PaintControls.htm>`__. + ''' + def PaintWindow(self, DC: HDC) -> None: + ''' + Renders the image of a windowed control. + + Call ``PaintWindow()`` to repaint the control. ``PaintWindow()`` sends a ``WM_PAINT`` message to the windowed control's `DefaultHandler <Vcl.Controls.TWinControl.DefaultHandler.htm>`__ method, setting the message record's ``WParam`` field to the value passed in ``DC`` and the other parameter and result fields to zeros. + ''' + def PaletteChanged(self, Foreground: bool) -> bool: + ''' + Responds to changes in the system's palette by realizing the control's palette and the palette for each child control. + + ``PaletteChanged()`` is called automatically when the Windows system palette changes. `WinControl <Vcl.Controls.TWinControl.htm>`__ responds to these notifications by trying to realize the windowed control's palette, if any, into the current device context, and then passing on the ``PaletteChanged()`` notification to each of the child controls in turn. If the change in the system palette causes the actual value of the control's palette to change, ``PaletteChanged()`` will invalidate the control so that it can repaint with the new palette. + + Windows paints the active window with a foreground palette, while other windows are forced to use background palettes. Background palettes are approximate matches to the colors specified by the control's logical palette, given the limitations imposed by implementing the foreground palette. Windows only allows a single foreground palette. + + ``PaletteChanged()`` allows the control to obtain a new realization of its palette when the system palette changes. When ``Foreground`` is ``True``, the form has been activated and the control is specifying the new foreground palette. When ``Foreground`` is ``False``, another application or form has changed the foreground palette, and controls that are sensitive to the available palette should realize new background palettes to best match their logical palettes. + + If the control does not have a logical palette to be realized into the current device context, `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ will return a handle of 0, and ``PaletteChanged()`` will not try to realize a palette for the windowed control. Instead, it simply passes the notification on to the child controls. If the windowed control or any of its child controls realize a palette into the current device context in response to ``PaletteChanged()``, this method returns ``True``. + + Override ``PaletteChanged()`` to change the way in which controls are given an opportunity to realize a new palette when the Windows system palette changes. For example, override ``PaletteChanged()`` to change the order in which child controls realize their palettes, giving a particular control the foreground palette when the form is activated, or to pass palette change notification to custom controls implemented outside of the VCL, such as in DLLs. + + Override `GetPalette <Vcl.Controls.TControl.GetPalette.htm>`__ instead to affect whether the windowed control actually has a palette to realize, or to change the value of the control's logical palette. + + .. note:: ``PaletteChanged()`` is called only when the run-time video mode requires palette support, such as for 256 color mode, but not 16 million color mode. + ''' + def ReadState(self, Reader: Reader) -> None: + ''' + Prepares the control for having its properties assigned values from a stream. + + Override ``ReadState()`` to change the preparations the control makes as it readies itself to have its property values assigned from a stream. For example, a control might destroy temporary internal data structures or objects before new instances are loaded from the stream. Be sure to include a call to the inherited method when overriding ``ReadState()``. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``ReadState()`` disables control alignment until all the child controls have been read from the stream, calls the inherited ``ReadState()`` method, and re-enables the alignment of all the controls. The method then builds the tab order list of controls and synchronizes its visibility with that of its parent control. + ''' + def RecreateWnd(self) -> None: + ''' + Recreate underlying Windows screen object. + + Call ``RecreateWnd()`` to recreate the control from scratch. ``RecreateWnd()`` destroys the underlying Windows screen object. The next time the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property is referenced (when the object is repainted, for example), a new Windows screen object is created. Some changes in control properties are not implemented until this re-creation occurs. + ''' + def ReloadDockedControl(self, AControlName: str, AControl: Control) -> None: + ''' + Reloads a docked control. + + Use ``ReloadDockedControl()`` to obtain a reference to control given its name. The ``AControlName`` parameter is the name of the child control. The corresponding control is returned as the ``AControl`` parameter. ``ReloadDockedControl()`` can only locate a control if it has the same ``Owner()`` as the windowed control. + + The dock manager calls ``ReloadDockedControl()`` to obtain a control reference that it then docks to the windowed control. + ''' + @overload + def ResetIme(self) -> None: + ''' + Restores the *Input Method Editor* (IME) that was active when the application started. + + For controls that specify the `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ property, call ``ResetIme()`` to revert to the *IME* that was active when the application started. If the *IME* was deactivated by setting the `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ property to imDisable, ``ResetIme()`` restarts the default *IME*. + + Applications cannot call ``ResetIme()``. ``ResetIme()`` is called automatically when the control loses input focus. It is exposed as a protected method so descendant objects can restore the default *IME* at other times. + ''' + @overload + def ResetIme(self, hWnd: HWND) -> None: ... + def ResetImeComposition(self, Action: DWORD) -> bool: + ''' + Directs the composition window of the *Input Method Editor* (IME) to perform a specific action. + + Call ``ResetImeComposition()`` to direct what the composition window does with the input typed by the user. The composition window is the window displayed by the IME that provides feedback to the user about what keystrokes have been typed, and how they are converted into asian characters. + + The `Action <Vcl.Controls.TControl.Action.htm>`__ parameter indicates what the composition window should do with its current contents. ``Action`` can have one of the following values: + + ================== =============================================================================== + **Value** **Meaning** + ================== =============================================================================== + ``CPS_CANCEL`` Clear the composition string and set the status to no composition string. + ``CPS_COMPLETE`` Set the composition string as the result string. + ``CPS_CONVERT`` Convert the composition string. + ``CPS_REVERT`` Cancel the current composition string and revert to the unconverted string. + ================== =============================================================================== + + ``ResetImeComposition()`` returns ``True`` if the composition window performs the requested action. + ''' + def RequestAlign(self) -> None: + ''' + Instructs the parent of a control to reposition the control, enforcing its ``Align`` property. + + Controls call `RequestAlign <Vcl.Controls.TControl.RequestAlign.htm>`__ internally when changes are made to the size or position of the control, so that they remain properly aligned within the parent control. Do not call `RequestAlign <Vcl.Controls.TControl.RequestAlign.htm>`__ in application code. + ''' + def ScaleControlsForDpi(self, NewPPI: int) -> None: + ''' + Scales all the contained controls to the *NewPPI* value. + ''' + def GetCurrentPPIScreen(self, AControl: WinControl) -> int: + ''' + No have docs. + ''' + def ScaleControls(self, M: int, D: int) -> None: + ''' + Rescale child controls only. + + Call ``ScaleControls()`` to rescale only the children of the control, while leaving the control itself the same size. The parameters have the same meaning as in the `ScaleBy <Vcl.Controls.TWinControl.ScaleBy.htm>`__ method. + ''' + def ScalePadding(self, M: int, D: int) -> None: + ''' + Scales the control padding to the given ratio. + + Call ``ScalePadding()`` to scale the padding coordinates of the control to the given ``M/`` ``'D'`` ratio. + ''' + def SelectFirst(self) -> None: + ''' + Locates first selectable child control. + + Call If ``SelectFirst()`` to find the first child that can be selected within the control's tab order. If ``SelectFirst()`` calls the `FindNextControl <Vcl.Controls.TWinControl.FindNextControl.htm>`__ method, passing ``nil`` (Delphi) or ``NULL`` (C++) as the current control. Once the first selectable control is found, If ``SelectFirst()`` makes the control the active control on the form. + ''' + def SelectNext(self, CurControl: WinControl, GoForward, CheckTabStop: bool) -> None: + ''' + Moves the input focus from the current child control to the next one in the tab order. + + Call ``SelectNext()`` to move the child control focus. ``SelectNext()`` selects the first child that follows or precedes ``CurControl`` in the tab order and that meets the criteria specified in the other parameters. + + The ``GoForward`` parameter controls the direction of the search. If ``GoForward`` is ``True``, `FindNextControl <Vcl.Controls.TWinControl.FindNextControl.htm>`__ searches forward through the child controls in tab order. If ``GoForward`` is ``False``, ``SelectNext()`` searches backward through the controls. The search wraps past the end of the collection back to ``CurControl``. + + The ``CheckTabStop`` parameter controls whether the control ``SelectNext()`` finds must be a ``TabStop``. If ``CheckTabStop`` is ``True``, the returned control must have its `TabStop <Vcl.Controls.TWinControl.TabStop.htm>`__ property set to true, or the search for the next control continues. + + If a child control matches the search criteria, that control obtains the focus. If no such child control is found, the focus remains unchanged. + ''' + def SetChildOrder(self, Child: Component, Order: int) -> None: + ''' + Changes the order in which the child component appears in the list of child components returned by the `GetChildren <Vcl.Controls.TWinControl.GetChildren.htm>`__ method. + + Use ``SetChildOrder()`` when you want to change the order in which child objects are streamed in. Specify the child component whose order you want to change as the value of the ``Child`` parameter. Indicate the position you want the component to be in as the value of the ``Order`` parameter. + + When ``SetChildOrder()`` is called, items previously below the child's old position move up, and those below the new position move down. + ''' + @overload + def SetIme(self) -> None: + ''' + Activates an *Input Method Editor* (IME) using the values specified by the `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ and `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ properties. + + Applications cannot call ``SetIme()``. ``SetIme()`` is called automatically when the control receives input focus. It is exposed as a protected method so that descendant objects can cause the `ImeMode <Vcl.Controls.TWinControl.ImeMode.htm>`__ and `ImeName <Vcl.Controls.TWinControl.ImeName.htm>`__ properties to take effect at other times. + ''' + @overload + def SetIme(self, hWnd: HWND) -> None: ... + def SetImeCompositionWindow(self, Font: Font, XPos: int, YPos: int) -> bool: + ''' + Sets the position and font of the composition window. + + Call SetImeComposition to change the position or font of the composition window. The composition window is the window displayed by the *Input Method Editor* (IME) that provides feedback to the user about what keystrokes have been typed, and how they are converted into asian characters. + + The `Font <Vcl.Controls.TControl.Font.htm>`__ parameter describes the font that the composition window should use. Setting the `Font <Vcl.Controls.TControl.Font.htm>`__ parameter to ``nil`` (Delphi) or ``NULL`` (C++) repositions the composition window without changing the font. XPos and YPos specify the desired global coordinates for the composition window. + + ``SetImeCompositionWindow()`` returns ``True`` if the font and position are successfully assigned. + ''' + def SetParent(self, AParent: WinControl) -> None: + ''' + Sets the parent of the control. + + `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ is the protected implementation of the ``Parent`` property. Override `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ to execute additional code when the value of the ``Parent`` property changes. + + The ``AParent`` parameter specifies the new parent of the control. + + If the control already has a parent, `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ removes the control from that parent's list of controls by calling the parent's RemoveControl method. If ``AParent`` is not ``nil`` (Delphi) or ``NULL`` (C++), `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ calls its InsertControl method to add the control to its list of controls. + + The `Control <Vcl.Controls.TControl.htm>`__ destructor calls `SetParent <Vcl.Controls.TControl.SetParent.htm>`__ (``nil`` (Delphi) or ``NULL`` (C++)) to remove the control from its parent's control list before destroying the component. + ''' + def SetParentBackground(self, Value: bool) -> None: + ''' + Sets the `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ property. + + ``SetParentBackground()`` is a protected method that sets the value of `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__. + ''' + def SetParentDoubleBuffered(self, Value: bool) -> None: + ''' + Sets the `ParentBackground <Vcl.Controls.TWinControl.ParentBackground.htm>`__ property. + + ``SetParentDoubleBuffered()`` is a protected method that sets the value of `ParentDoubleBuffered <Vcl.Controls.TWinControl.ParentDoubleBuffered.htm>`__. + ''' + def SetZOrder(self, TopMost: bool) -> None: + ''' + Moves the control to the top or bottom of the parent control's (or screen's) list of `WinControl <Vcl.Controls.TWinControl.htm>`__ controls. + + Use ``SetZOrder()`` to rearrange overlapping controls within a parent control or (if the control has no parent) overlapping windows on the screen. If the ``TopMost`` parameter is ``True``, the control becomes the top control; otherwise, it becomes the bottom control. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ controls always stack on top of other controls, regardless of the *Z order*. + + After changing the order, ``SetZOrder()`` invalidates the control to ensure repainting to reflect the new order. + ''' + def ShowControl(self, AControl: Control) -> None: + ''' + Ensures that a specified child control is visible. + + Call ``ShowControl()`` to display a child control. Specify the control you want to ensure will be visible as the value of the ``AControl`` parameter. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``ShowControl()`` simply calls the ``ShowControl()`` method of the control's parent. Derived objects override ``ShowControl()`` to perform whatever actions are necessary to allow the indicated child object to be visible. Possible actions include scrolling the particular child object into view, or changing to the appropriate notebook page. + ''' + def UpdateBounds(self) -> None: + ''' + Updates the bounds of the control. + + ``UpdateBounds()`` is a protected method that updates the bounds of the control. + ''' + def UpdateControlOriginalParentSize(self, AControl: Control, AOriginalParentSize: Point) -> None: + ''' + Updates the original size of the parent control. + + ``UpdateControlOriginalParentSize()`` is a protected method that updates the original size of the parent control. It is used internally to update the anchor rules of the control. + ''' + def UpdateRecreatingFlag(self, Recreating: bool) -> None: + ''' + Toggles the ``csRecreating`` flag in the `ControlState <Vcl.Controls.TControl.ControlState.htm>`__ property. ``Switches`` on or off the ``csRecreating`` flag in the `ControlState <Vcl.Controls.TControl.ControlState.htm>`__ property, if the ``Recreating`` parameter is ``True`` or False, correspondingly. + + If the control has any children, then the ``UpdateRecreatingFlag()`` method is applied to all the children, using the same + + ``Recreating`` parameter. + ''' + def UpdateTIPStatus(self) -> None: + ''' + No have docs. + ''' + def UpdateUIState(self, CharCode: int) -> None: + ''' + Updates form *User Interface State* as needed + + ``UpdateUIState()`` is called in component code to ensure that the *User Interface State* is consistently updated. *User Interface State* determinates whether keyboard accelerators and focus indicators are hidden or shown. A control should call ``UpdateUIState()`` whenever it receives a keyboard event that might invalidate the *User Interface State*. ``CharCode`` is the virtual key code of the keyboard event. + ''' + def WndProc(self, Message: Message) -> None: + ''' + Provides specific message responses for the control. + + Override ``WndProc()`` to change the initial *Windows* message handler for the control. The ``WindowProc()`` property is initialized to point to the ``WndProc()`` method. + + ``WndProc()`` for `WinControl <Vcl.Controls.TWinControl.htm>`__ overrides the inherited method to define responses for focus, mouse, and keyboard messages. It sends all others to its inherited ``WndProc()``. + + When overriding ``WndProc()`` to provide specialized responses to messages, call the inherited ``WndProc()`` at the end to dispatch any unhandled messages. + ''' + def FocusChanged(self, NewFocusControl: WinControl) -> None: + ''' + No have docs. + ''' + def FloatControl(self, DockSource: DragDockObject) -> None: + ''' + No have docs. + ''' + def DockClients(self, DockSource: DragDockObject, MousePos: Point) -> int: # replaces use of CM_DockClient + ''' + Lists the controls that are docked to the windowed control. + + Use ``DockClients()`` to access any control that is docked to the windowed control. + ''' + def CreateSubClass(self, Params: CreateParams, ControlClassName: str) -> None: + ''' + Creates a windowed control derived from an existing Windows window class. + + Call ``CreateSubClass()`` in the `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ method of a subclassed control, after calling the inherited `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__. Specify the parameter record as the value of the ``Params`` parameter. ``CreateSubClass()`` allows *VCL Controls* to create registered Windows controls. + ''' + def GetDeviceContext(self, WindowHandle: HWndWrapper) -> HDC: + ''' + Provides access to a device context for the control. + + Call ``GetDeviceContext()`` to obtain a handle to a device context for the control. + + ``GetDeviceContext()`` calls the *Windows API Function GetDC*, passing the windowed control's `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property. It returns the window's handle in the `WindowHandle <Vcl.Controls.TWinControl.WindowHandle.htm>`__ parameter and the ``HDC`` as the return value. If the call is unsuccessful, the ``EOutOfResources`` exception is raised. + ''' + def CreateSubClass(self, Params: CreateParams, ControlClassName: PChar) -> None: + ''' + Creates a windowed control derived from an existing Windows window class. + + Call ``CreateSubClass()`` in the `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__ method of a subclassed control, after calling the inherited `CreateParams <Vcl.Controls.TWinControl.CreateParams.htm>`__. Specify the parameter record as the value of the ``Params`` parameter. ``CreateSubClass()`` allows *VCL Controls* to create registered Windows controls. + ''' + def RemoveWindowProps(self) -> None: + ''' + Removes the ``ControlAtom`` and ``WindowAtom`` properties of the control. + + Call ``RemoveWindowProps()`` to remove the ``ControlAtom`` and ``WindowAtom`` properties of the control. + ''' + def GetAllocatedWindowHandle(self) -> HWnd: + ''' + No have docs. + ''' + def GetTextPiece(self, Size: int) -> Caption: + ''' + No have docs. + ''' + def GetTextLen(self) -> int: + ''' + No have docs. + ''' + def SetText(self, Value: Caption) -> None: + ''' + No have docs. + ''' + def Create(self, AOwner: Component) -> None: + ''' + ``Creates`` an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Call ``Create()`` to construct and initialize a new control and insert the newly-constructed control into its owner, as specified by the ``AOwner`` parameter. ``Create()`` inserts the control in the owner by calling the owner's InsertComponent method. + + Most controls override ``Create()`` to initialize their unique properties. Objects that override the ``Create()`` method must always call the inherited ``Create()`` method first, and then proceed with the component-specific initialization. Specify the override directive when overriding the ``Create()`` method. + + If a component's ``Create()`` method allocates resources or memory, override the `Destroy <Vcl.Controls.TWinControl.Destroy.htm>`__ method to free those resources. + ''' + def Destroy(self) -> None: + ''' + ``Destroys`` an instance of `WinControl <Vcl.Controls.TWinControl.htm>`__. + + Do not call ``Destroy()`` directly in an application. Instead, call ``Free()``. ``Free()`` verifies that the `WinControl <Vcl.Controls.TWinControl.htm>`__ reference is not nil, and only then calls ``Destroy()``. + ''' + @overload + def CreateParented(self, AParentWindow: HWND) -> WinControl: + ''' + Creates and initializes a control as the child of a specified non-*VCL Container*. + + Call ``CreateParented()`` to embed a new control in a non-*VCL Parent Window*. ``ActiveXControl`` objects call ``CreateParented()`` to create an *ActiveX* control as a child of the host application's client site window. + ''' + @overload + def CreateParented(self, ParentWindow: HWnd) -> None: ... + def CreateParentedControl(self, ParentWindow: HWND) -> WinControl: + ''' + Creates and initializes a control as the child of a specified non-VCL window. + + Call ``CreateParentedControl()`` to embed a new control in a non-VCL parent. + + ``CreateParentedControl()`` allocates memory for a new instance of the same class as the control (Delphi) or is the class specified by the vmt parameter (C++), sets its `ParentWindow <Vcl.Controls.TWinControl.ParentWindow.htm>`__ property to `ParentWindow <Vcl.Controls.TWinControl.ParentWindow.htm>`__, and calls the constructor, passing in ``nil`` (Delphi) or ``NULL`` (C++) for the ``Owner()`` parameter. ``CreateParentedControl()`` returns the newly created control. + + ``CreateParentedControl()`` has the same purpose as `CreateParented <Vcl.Controls.TWinControl.CreateParented.htm>`__, but is a simple class function instead of a constructor. Unlike `CreateParented <Vcl.Controls.TWinControl.CreateParented.htm>`__, ``CreateParentedControl()`` can be called from C++ code. + ''' + def ScaleForPPI(self, NewPPI: int) -> None: + ''' + No have docs. + ''' + def Broadcast(self, Message) -> None: + ''' + Sends a message to each of the child controls. + + Use ``Broadcast()`` when you want to send the same message to each of the child controls contained within the windowed control. Specify the message to be passed as the value of the ``Message`` parameter. + ''' + def CanFocus(self) -> bool: + ''' + Indicates whether a control can receive focus. + + Call ``CanFocus()`` to find out if the control can receive input from the user. + + ``CanFocus()`` returns ``True`` if both the control and its parent(s) have their `Visible <Vcl.Controls.TControl.Visible.htm>`__ and `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ properties set to true. If any of the `Visible <Vcl.Controls.TControl.Visible.htm>`__ and `Enabled <Vcl.Controls.TControl.Enabled.htm>`__ properties of the control or the controls in which it is contained are not true, then ``CanFocus()`` returns ``False``. + ''' + def ContainsControl(self, Control: Control) -> bool: + ''' + Indicates whether a specified control exists within the control. + + Use ``ContainsControl()`` to find out if a particular control exists within this control. ``ContainsControl()`` returns ``True`` if the specified value of the ``Control`` parameter is a child control of this control. The ``Control`` parameter need not be an immediate child (in the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property), but may be contained in a child of the control, or in a child of a child of the control, for indefinitely many levels deep. + + If the method returns ``False``, the specified control is not within the control. + ''' + def ControlAtPos(self, Pos: Point, AllowDisabled: bool, AllowWinControls: bool, AllLevels: bool) -> Control: + ''' + Returns the child control located at a specified position within the control. + + Use ``ControlAtPos()`` to determine which child control is at the specified location within the control. ``ControlAtPos()`` returns an immediate child of the control; that is, one of the entries of the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property, that has this control for its `Parent <Vcl.Controls.TControl.Parent.htm>`__ property. + + Specify the position in client coordinates as the value of the ``Pos`` parameter. ``Pos`` can be anywhere within the boundaries of the child control, not just the upper left corner. + + The ``AllowDisabled`` parameter determines whether the search for controls includes disabled controls. + + The ``AllowWinControls`` parameter determines whether descendants of `WinControl <Vcl.Controls.TWinControl.htm>`__ are considered when looking for the child control. + + If there is no control that matches the ``AllowDisabled`` and ``AllowWinControls`` parameters at the specified position, ``ControlAtPos()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + ''' + def DefaultHandler(self, Message) -> None: + ''' + Provides message handling for all messages that the control does not fully process by itself. + + Override ``DefaultHandler()`` to change the default message handling for the control. The ``Message`` parameter can be cast to a ``Message`` type, to obtain the ``WParam``, ``LParam``, and ``Result`` of the message. If the ``Result`` of the message is non-zero, the message has already been handled. Set the ``Result`` field to anon-zero value to prevent further processing of the message by the inherited method. + + .. note:: In Delphi code, calling inherited in a message-handling method results in a call to the ancestor's ``DefaultHandler()`` method unless that ancestor specifies an explicit handler for the message. + + `WinControl <Vcl.Controls.TWinControl.htm>`__ overrides the ``Control`` ``DefaultHandler()``method to handle messages for all its descendant types. ``DefaultHandler()`` passes any otherwise-unhandled messages to the control's window procedure using the ``CallWindowProc`` API function. + ''' + def DisableAlign(self) -> None: + ''' + Disables the realignment of child controls. + + Call ``DisableAlign()`` to temporarily prevent child controls from realigning. For example, while performing multiple manipulations of controls, such as reading from a form file or scaling, performance improves if child controls are not realigned until all manipulations are complete. The `EnableAlign <Vcl.Controls.TWinControl.EnableAlign.htm>`__ method restores normal child realignment. + + Every call to ``DisableAlign()`` must be followed by a matching call to `EnableAlign <Vcl.Controls.TWinControl.EnableAlign.htm>`__. If an exception could be raised after the call to ``DisableAlign()``, use an exception block to ensure that `EnableAlign <Vcl.Controls.TWinControl.EnableAlign.htm>`__ will always be called. + + ``DisableAlign()``/``EnableAlign()`` call sequences can be nested. An internal counter records the level of nesting. As long as the counter is positive, realignment is disabled and the `AlignDisabled <Vcl.Controls.TWinControl.AlignDisabled.htm>`__ property returns ``True``. Once the counter returns to zero, realignment is enabled and `AlignDisabled <Vcl.Controls.TWinControl.AlignDisabled.htm>`__ returns ``False``. + ''' + def DockDrop(self, Source: DragDockObject, X: int, Y: int) -> None: + ''' + Generates an `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event. + + ``DockDrop()`` is called automatically when a control is docked to the windowed control. It instructs the control that is being dropped to prepare for the dock operation and then generates an `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event. + + Although you can override ``DockDrop()`` to perform actions in addition to the generated `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event, typically descendant classes override the `DoAddDockClient <Vcl.Controls.TWinControl.DoAddDockClient.htm>`__ method instead. This is because `DoAddDockClient <Vcl.Controls.TWinControl.DoAddDockClient.htm>`__ is called by the client after it has performed its own preparations, but before the `OnDockDrop <Vcl.Controls.TWinControl.OnDockDrop.htm>`__ event. + + ``DockDrop()`` is called only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def EnableAlign(self) -> None: + ''' + Decrements the reference count incremented by the `DisableAlign <Vcl.Controls.TWinControl.DisableAlign.htm>`__ method, eventually realigning the child controls. + + Call ``EnableAlign()`` to allow child controls within the control to realign again after they were prevented from realigning by a call to `DisableAlign <Vcl.Controls.TWinControl.DisableAlign.htm>`__. + + Each time the `DisableAlign <Vcl.Controls.TWinControl.DisableAlign.htm>`__ method is called, it increments a reference count. Each time ``EnableAlign()`` is called, it decrements the same reference count. When the reference count reaches zero, ``EnableAlign()`` calls the `Realign <Vcl.Controls.TWinControl.Realign.htm>`__ method to perform any pending realignments. + + Be sure to pair each call to `DisableAlign <Vcl.Controls.TWinControl.DisableAlign.htm>`__ with a call to ``EnableAlign()``. If an exception could be raised after the call to `DisableAlign <Vcl.Controls.TWinControl.DisableAlign.htm>`__, use an exception block to ensure that the corresponding call to ``EnableAlign()`` is executed. + ''' + def FindChildControl(self, ControlName: str) -> Control: + ''' + Returns a child control given its name. + + Call ``FindChildControl()`` to locate a specified child control. ``FindChildControl()`` searches the control's children and returns the control with the specified name. If no child controls match the specified name, ``FindChildControl()`` returns ``nil`` (Delphi) or ``NULL`` (C++). + + .. note:: ``FindChildControl()`` only locates immediate children of the control. It can't find a control that is a child of one of the control's children. + ''' + def FlipChildren(self, AllLevels: bool) -> None: + ''' + Reverses the positions of child controls. + + Call ``FlipChildren()`` to flip the control's children; that is, to move children on the left side of the control to the right side and vice versa. ``FlipChildren()`` reverses the position of all child controls and adjusts their `Align <Vcl.Controls.TControl.Align.htm>`__ properties, if necessary, to enforce the new position. + + AllLevels specifies whether ``FlipChildren()`` should be called recursively on the control's children. + + ``FlipChildren()`` can be used to reverse the layout of an application when it is running in *Middle Eastern* locales where users read from right to left instead of left to right: Call `UseRightToLeftAlignment <Vcl.Controls.TControl.UseRightToLeftAlignment.htm>`__ to determine whether the `BiDiMode <Vcl.Controls.TControl.BiDiMode.htm>`__ property dictates a reversal of alignment based on the system locale. + + .. note:: ``FlipChildren()`` does the same thing as the *Flip Children* command on the control's context menu in the *IDE*. + ''' + def Focused(self) -> bool: + ''' + Determines whether the control has input focus. + + Use the ``Focused()`` method to see if the control is the active control. When ``Focused()`` returns ``True``, the control has the input focus. If ``Focused()`` returns ``False``, the user cannot interact with the control. + ''' + def GetChildren(self, Proc: GetChildProc, Root: Component) -> None: + ''' + Calls a specified method for each child of the control. + + ``GetChildren()`` is called by the streaming system that loads and saves components. Applications seldom need to call this routine. + + ``GetChildren()`` executes the callback specified by the ``Proc`` parameter for every child control listed by the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property that lists the Root parameter as its ``Owner()``. + + Override ``GetChildren()`` to limit or augment which child controls are saved with the control. When overriding ``GetChildren()``, call the procedure passed as the ``Proc`` parameter for every child control that should be saved. The Root parameter indicates the component (usually a form) that owns the control. + ''' + def GetTabControlList(self, List: List) -> None: + ''' + Builds a list of owned controls. + + Call ``GetTabControlList()`` to construct a list of child controls. + + ``GetTabControlList()`` iterates through the control's internal tab order list, adding each of the child controls to ``List``. The result is a list of all the owned controls in `TabOrder <Vcl.Controls.TWinControl.TabOrder.htm>`__. + ''' + def GetTabOrderList(self, List: List) -> None: + ''' + Builds a list of controls in tab order. + + Call ``GetTabOrderList()`` to construct a list of child controls in tab order. + + ``GetTabOrderList()`` iterates through the control's internal tab order list, adding each of the child controls to List, including any controls contained in those controls. The result is a list of all the controls and their owned controls, in tab order. + + The `FindNextControl <Vcl.Controls.TWinControl.FindNextControl.htm>`__ method calls ``GetTabOrderList()`` to build a complete list of the controls that `FindNextControl <Vcl.Controls.TWinControl.FindNextControl.htm>`__ uses to locate the next control in the tab order. + ''' + def HandleAllocated(self) -> bool: + ''' + Reports whether a screen object handle exists for the control. + + Query ``HandleAllocated()`` to find out if the control's underlying screen object has been generated. + + If the screen object exists, ``HandleAllocated()`` returns ``True``. If the screen object does not exist, ``HandleAllocated()`` returns ``False``. Testing the `Handle <Vcl.Controls.TWinControl.Handle.htm>`__ property of a control directly causes the window to be created if it does not already exist. Call the ``HandleAllocated()`` method to determine whether a window exists without creating one as a side effect. + ''' + def HandleNeeded(self) -> None: + ''' + Creates a screen object for the control if it doesn't already exist. + + Call ``HandleNeeded()`` to create a screen object for the control. + + If the screen object does not exist, ``HandleNeeded()`` calls the `CreateHandle <Vcl.Controls.TWinControl.CreateHandle.htm>`__ method for the parent of the control before it creates a screen object for this control. + ''' + def InsertControl(self, AControl: Control) -> None: + ''' + Inserts a control into the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ array property. + + Applications should not need to call ``InsertControl()`` directly. Child controls are automatically inserted and removed when added or deleted at design time. At run time, use the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property of the child control to insert it in the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ array. If the child control is already the child of another control, setting the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property ensures that the child is removed from the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ of the original parent. + + ``InsertControl()`` makes the inserted control a child, and the containing control the parent. The ``AControl`` parameter is the child control that is inserted into the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ array. + ''' + def Invalidate(self) -> None: + ''' + Schedules a control repaint. + + ``Invalidate()`` informs a control that its entire surface needs to be repainted. Calling ``Invalidate()`` can prevent flicker caused by a series of partial repaints. There is no performance penalty for calling ``Invalidate()`` multiple times before the control is actually repainted. + + The actual repaint does not occur until the control is updated. To force an immediate repaint, call `Repaint <Vcl.Controls.TWinControl.Repaint.htm>`__ instead. + ''' + @overload + def PaintTo(self, DC: HDC, X: int, Y: int) -> None: + ''' + Draws the windowed control to a device context. + + Call ``PaintTo()()`` to draw the control on a device context. Specify the device context as the value of the ``DC`` parameter and specify the ``'X'`` and ``'Y'`` coordinates on the device context where the top-left corner of the windowed control is to be drawn. ``PaintTo()`` first erases the background of the device context and then paints the control. + + ``PaintTo()`` is useful for drawing an image of the control into a bitmap ``DC``. + + .. warning:: When using ``PaintTo()`` to draw on a canvas, you must lock the canvas first (and unlock it after the call to ``PaintTo()``. If you do not lock the canvas, Windows calls that occur while the control is painting can cause the canvas to lose its handle. + ''' + @overload + def PaintTo(self, Canvas: Canvas, X: int, Y: int) -> None: ... + def PreProcessMessage(self, Msg: Msg) -> bool: + ''' + returns ``False``, no matter the value of ``Msg``. + + As a member of the `WinControl <Vcl.Controls.TWinControl.htm>`__ class, ``PreProcessMessage()`` always returns ``False``, no matter the value of ``Msg``. + + .. note:: When overriding ``PreProcessMessage()`` in descendant classes, we recommend to implement it such that it returns ``True`` if ``Msg`` is a preprocess message, and ``False`` otherwise. + ''' + def RemoveControl(self, AControl: Control) -> None: + ''' + Removes a specified control from the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ array. + + ``RemoveControl()`` removes a child control from the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ property. After calling ``RemoveControl()``, the control is no longer the parent of the child specified by the ``AControl`` parameter. + + Applications should not call ``RemoveControl()`` directly. Child controls are automatically inserted and removed when added or deleted at design time. At runtime, use the `Parent <Vcl.Controls.TControl.Parent.htm>`__ property of the child control to remove it from the `Controls <Vcl.Controls.TWinControl.Controls.htm>`__ array. + ''' + def Realign(self) -> None: + ''' + Forces the control to realign children. + + The `EnableAlign <Vcl.Controls.TWinControl.EnableAlign.htm>`__ method calls ``Realign()`` when the reference count reaches zero. It adjusts the size and position of any child controls according to their `Align <Vcl.Controls.TControl.Align.htm>`__ properties. + + If all of the child controls have their `Align <Vcl.Controls.TControl.Align.htm>`__ properties set to ``alNone``, ``Realign()`` has no effect. + ''' + def Repaint(self) -> None: + ''' + ``Repaints`` the entire control. + + Call ``Repaint()`` to repaint the control. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``Repaint()`` calls the `Invalidate <Vcl.Controls.TWinControl.Invalidate.htm>`__ method and then the `Update <Vcl.Controls.TWinControl.Update.htm>`__ method to repaint the control. + ''' + def ScaleBy(self, M: int, D: int) -> None: + ''' + Rescale control and its children. + + ``ScaleBy()`` resizes a control without moving its upper left corner. This is similar to changing the `Height <Vcl.Controls.TControl.Height.htm>`__ and `Width <Vcl.Controls.TControl.Width.htm>`__ properties, but the control also attempts to rescale and rearrange any child controls to maintain their relative size and placement. + + The ``'M'`` and ``'D'`` parameters define a multiplier and divisor by which to scale the control. For example, to make a control 75% of its original size, specify the value of M as 75, and the value of D as 100. Any pair of values that has the same ratio has the same effect. Thus M = 3 and D = 4 also makes the control 75% of its previous size. + + To rescale the control's children without rescaling the control itself, use `ScaleControls <Vcl.Controls.TWinControl.ScaleControls.htm>`__. + ''' + def ScrollBy(self, DeltaX, DeltaY: int) -> None: + ''' + Scroll control contents. + + Call ``ScrollBy()`` to scroll the contents within the control. While ``ScrollBy()`` can be used for any `WinControl <Vcl.Controls.TWinControl.htm>`__, it makes the most sense to use it for descendants of ``ScrollingWinControl``. + + Applications seldom need to call the ``ScrollBy()`` method unless they implement their own scrolling interface rather than relying on a ``ScrollBar``. + + The ``DeltaX`` parameter is the change in pixels along the ``'X'`` axis. A positive ``DeltaX`` value scrolls the contents to the right; a negative value scrolls the contents to the left. The ``DeltaY`` parameter is the change in pixels along the ``'Y'`` axis. A positive ``DeltaY`` value scrolls the contents down; a negative value scrolls the contents up. + ''' + def SetBounds(self, ALeft: int, ATop: int, AWidth: int, AHeight: int) -> None: + ''' + Sets the windowed control's boundary properties all at once. + + Use ``SetBounds()`` to change all of the control's boundary properties at once. The same effect can be achieved by setting the `Left <Vcl.Controls.TControl.Left.htm>`__, `Top <Vcl.Controls.TControl.Top.htm>`__, `Width <Vcl.Controls.TControl.Width.htm>`__, and `Height <Vcl.Controls.TControl.Height.htm>`__ properties separately. By setting all four properties at once, ``SetBounds()`` ensures that the control will not repaint between changes + + Specify the values for the `Left <Vcl.Controls.TControl.Left.htm>`__, `Top <Vcl.Controls.TControl.Top.htm>`__, `Width <Vcl.Controls.TControl.Width.htm>`__, and `Height <Vcl.Controls.TControl.Height.htm>`__ properties as the value of the ``ALeft``, ``ATop``, ``AWidth``, and ``AHeight`` parameters, respectively. + ''' + def SetDesignVisible(self, Value: bool) -> None: + ''' + Makes a control visible at design time. + + `SetDesignVisible <Vcl.Controls.TControl.SetDesignVisible.htm>`__ is used internally by Delphi during form design. + ''' + def SetFocus(self) -> None: + ''' + Gives the input focus to the control. + + Use ``SetFocus()`` to change input focus to the control. When a control has focus, it receives keyboard events. + ''' + def Update(self) -> None: + ''' + Forces the control to update. + + ``Update()`` repaints any part of the control surface that is out of date. Normally, updates occur automatically, but an ``Update()`` call may be necessary before lengthy processing that might interfere with automatic updates. Calling ``Update()`` unnecessarily can increase overhead and cause screen flicker. + + ``Update()`` only repaints areas of the control the have been determined to be out of date. To force immediate repainting of the entire control, call the `Repaint <Vcl.Controls.TWinControl.Repaint.htm>`__ method. To notify a control that it is out of date (without forcing an immediate repaint), call the `Invalidate <Vcl.Controls.TWinControl.Invalidate.htm>`__ method. + ''' + def UpdateControlState(self) -> None: + ''' + Respond to state change. + + ``UpdateControlState()`` is called automatically when any display change occurs that might affect the internal state of the control. + + As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``UpdateControlState`` climbs the chain of parent controls to verify that each control in the chain has `Showing <Vcl.Controls.TWinControl.Showing.htm>`__ equal to true. If this is the case, ``UpdateControlState`` makes sure that the `Showing <Vcl.Controls.TWinControl.Showing.htm>`__ property is accurate for this control and for all its descendants. Descendant classes can extend this behavior. + ''' + + def OnDockDrop(self, Sender: Object, Source: DragDockObject, X: int, Y: int) -> None: + ''' + Occurs when another control is docked to the control. + + Write code in the ``OnDockDrop`` event to perform actions when another control is docked on the control. + + ``OnDockDrop`` can only occur if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnDockDrop`` is an event handler of type `Vcl.Controls.TDockDropEvent <Vcl.Controls.TDockDropEvent.htm>`__. + ''' + def OnGetSiteInfo(self, Sender: Object, DockClient: Control, InfluenceRect: Rect, MousePos: Point, CanDock: bool) -> None: + ''' + Returns the control's docking information. + + Write code in the ``OnGetSiteInfo`` event handler to initialize a `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ with information about where a dragged object can be docked, if at all. ``OnGetSiteInfo`` occurs before the `OnDockOver <Vcl.Controls.TWinControl.OnDockOver.htm>`__ event. + + ``OnGetSiteInfo`` occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + + ``OnGetSiteInfo`` is an event handler of type `Vcl.Controls.TGetSiteInfoEvent <Vcl.Controls.TGetSiteInfoEvent.htm>`__. See TGetSiteInfoEvent for a description of the parameters. + ''' + def OnKeyDown(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when a user presses any key while the control has focus. + + Use the ``OnKeyDown`` event handler to specify special processing to occur when a key is pressed. The ``OnKeyDown`` handler can respond to keyboard keys, including function keys and keys combined with the *Shift*, *Alt*, and *Ctrl* keys, and pressed mouse buttons. + + .. note:: `CheckBox <Vcl.StdCtrls.TCheckBox.htm>`__ does not fire ``OnKeyDown`` events for arrow keys. + + ``OnKeyDown`` is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the ``OnKeyDown`` event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your ``OnKeyDown`` event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. If you set the ``Key`` to ``#0``, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will be prevented from being fired only for keys that do not have chars. For keys that represent characters, `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the `OnKeyPress <Vcl.Controls.TWinControl.OnKeyPress.htm>`__ event. Code that deals with keys that do not generate characters should be put into the ``OnKeyDown`` event. + ''' + def OnKeyPress(self, Sender: Object, Key: str) -> None: + ''' + Occurs when a key is pressed. + + Use the ``OnKeyPress`` event handler to make something happen as a result of a single character key press. + + The ``Key`` parameter in the ``OnKeyPress`` event handler is of type `Char <System.Char.htm>`__; therefore, the ``OnKeyPress`` event registers the ASCII character of the key pressed. Keys that do not correspond to an ASCII `Char <System.Char.htm>`__ value (*Shift* or *F1*, for example) do not generate an ``OnKeyPress`` event. Key combinations (such as *Shift+A*) generate only one ``OnKeyPress`` event (for this example, *Shift+A* results in a + + Key value of "A" if *Caps Lock* is off). To respond to non-ASCII keys or key combinations, use the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ or `OnKeyUp <Vcl.Controls.TWinControl.OnKeyUp.htm>`__ event handler. + + An application gets *Windows* ``WM_KEYDOWN`` messages for all keys when the user presses a key. These messages indirectly fire the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. Setting the ``Key`` parameter to ``#0`` prevents any further processing of this message. But for keys that generate characters Windows also produces ``WM_CHAR``. At the time your `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event fires, the ``WM_CHAR`` message for the key will already be in the message queue. Setting ``Key`` to ``#0`` does not stop it from being delivered, so it fires the ``OnKeyPress`` event. If you set the ``Key`` to ``#0``, ``OnKeyPress`` will be prevented from being fired only for keys that do not have chars. For keys that represent characters, ``OnKeyPress`` will continue to be fired. + + This method of organizing key processing has advantages. Code that only deals with characters, including control characters like ``#13`` for carriage return,``#3``for *Ctrl-C*, and so on, should go into the ``OnKeyPress`` event. Code that deals with keys that do not generate characters should be put into the `OnKeyDown <Vcl.Controls.TWinControl.OnKeyDown.htm>`__ event. + + ``OnKeyPress`` is an event handler of type `Vcl.Controls.TKeyPressEvent <Vcl.Controls.TKeyPressEvent.htm>`__. + ''' + def OnKeyUp(self, Sender: Object, Key: int, Shift: ShiftState) -> None: + ''' + Occurs when the user releases a key that was pressed. + + Use the ``OnKeyUp`` event handler to provide special processing that occurs when a key is released. The ``OnKeyUp`` handler can respond to all keyboard keys, keys that represent characters, function keys, and keys combined with the *Shift*, *Alt*, and *Ctrl* keys. + + If ``Key`` is set to ``#0``, any further processing of the ``OnKeyUp`` event will be prevented. + + ``OnKeyUp`` is an event handler of type `Vcl.Controls.TKeyEvent <Vcl.Controls.TKeyEvent.htm>`__. See ``KeyEvent`` for a description of the parameters. + ''' + def OnUnDock(self, Sender: Object, Client: Control, NewTarget: WinControl, Allow: bool) -> None: + ''' + Occurs when the application tries to undock a control that is docked to the windowed control. + + Write an ``OnUnDock`` event handler to adjust the windowed control when a dock client is undocked. The ``OnUnDock`` event handler can make any necessary adjustments, or it can block the undock attempt by setting the ``Allow`` parameter to ``False``. + + ``OnUnDock`` is an event handler of type `Vcl.Controls.TUnDockEvent <Vcl.Controls.TUnDockEvent.htm>`__. + ''' + def OnAlignInsertBefore(self, Sender: WinControl, C1: Control, C2: Control) -> bool: + ''' + Occurs when an object with custom alignment is aligned. + + ``OnAlignInsertBefore`` occurs for each pair of child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom``. + + It can determine the order in which custom-aligned child controls are placed. ``OnAlignInsertBefore()`` returns ``True`` if ``C2`` should be presented before ``C1``, and ``False`` otherwise. It holds a `AlignInsertBeforeEvent <Vcl.Controls.TAlignInsertBeforeEvent.htm>`__ type. + + `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ triggers the ``OnAlignInsertBefore`` event. If this event is defined, `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__ returns the value returned by ``OnAlignInsertBefore``. Defining this event allows users to define the order of control alignment without overriding `CustomAlignInsertBefore <Vcl.Controls.TWinControl.CustomAlignInsertBefore.htm>`__. + ''' + def OnAlignPosition(self, Sender: WinControl, Control: Control, NewLeft: int, NewTop: int, NewWidth: int, NewHeight: int, AlignRect: Rect, AlignInfo: AlignInfo) -> None: + ''' + Occurs when an object with custom alignment is aligned. + + ``OnAlignPosition`` occurs when child controls with an `Align <Vcl.Controls.TControl.Align.htm>`__ property of ``alCustom`` are aligned. + + `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ triggers the ``OnAlignPosition`` event. If this event is defined, `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__ uses the alignment parameters it obtains from ``OnAlignPosition``. Defining this event allows users to set the alignment parameters without overriding `CustomAlignPosition <Vcl.Controls.TWinControl.CustomAlignPosition.htm>`__. It holds a `AlignPositionEvent <Vcl.Controls.TAlignPositionEvent.htm>`__ type. + + These are the parameters: + + +-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | **Parameter** | **Meaning** | | | | + +=====================================================================================================+=============================================================================================+================+================+=====================================================================================================================================================================================================+ + | ``NewLeft`` | ``NewTop`` | ``NewWidth`` | ``NewHeight`` | Location and size of child control, as determined by container's size and the `Anchors <Vcl.Controls.TControl.Anchors.htm>`__ ``Control_Anchors`` constraints for the control. ``OnAlignPosition`` | + | | can modify these values to reposition the control. | | | | + +-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignRect`` | The client area in which the control is aligned. ``OnAlignPosition`` can modify this value. | | | | + +-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | ``AlignInfo`` | Alignment information in a `AlignInfo <Vcl.Controls.TAlignInfo.htm>`__. | | | | + +-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | As implemented in `WinControl <Vcl.Controls.TWinControl.htm>`__, ``OnAlignPosition`` does nothing. | | | | | + +-----------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + ''' + def OnDockOver(self, Sender: Object, Source: DragDockObject, X: int, Y: int, State: DragState, Accept: bool) -> None: + ''' + Occurs when another control is dragged over the control. + + Write code in the ``OnDockOver`` event to indicate whether a dockable control that is dragged over the windowed control can be accepted as a dock client. ``OnDockOver`` occurs after the `DragDockObject <Vcl.Controls.TDragDockObject.htm>`__ has been initialized by an `OnGetSiteInfo <Vcl.Controls.TWinControl.OnGetSiteInfo.htm>`__ event. + + ``OnDockOver`` occurs only if `DockSite <Vcl.Controls.TWinControl.DockSite.htm>`__ is ``True``. + ''' + def OnEnter(self, Sender: Object) -> None: + ''' + Occurs when a control receives the input focus. + + Use the ``OnEnter`` event handler to cause any special processing to occur when a control becomes active. + + The ``OnEnter`` event does not occur when switching between forms or between another application and the application that includes the control. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an ``OnEnter`` event occurs for the container before the ``OnEnter`` event of the contained control. + + Similarly, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the container occurs after the `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the control in a container when focus moves to another control outside the container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event of the button occurs, followed by an ``OnEnter`` event on the ``GroupBox``, and finally an ``OnEnter`` event on the ``RadioButton`` that was clicked. If the user then clicks on the *OK* button, an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``RadioButton`` occurs followed by an `OnExit <Vcl.Controls.TWinControl.OnExit.htm>`__ event for the ``GroupBox``, and then the button's ``OnEnter`` event occurs. + + ``OnEnter`` is an event handler of type `System.Classes.TNotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + def OnExit(self, Sender: Object) -> None: + ''' + Occurs when the input focus shifts away from one control to another. + + Use the ``OnExit`` event handler to provide special processing when the control ceases to be active. + + The ``OnExit`` event does not occur when switching between forms or between another application and your application. + + When switching between controls in separate container controls such as the ``Panel`` and the ``GroupBox`` controls, an ``OnExit`` event occurs for the control inside the container before the ``OnExit`` event of the container. + + Similarly, an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the container occurs before the `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event of the control in a container when the focus moves to a control inside a container. + + For example, consider a form with an *OK* button and a ``GroupBox`` that contains three ``RadioButton``\ s., where the focus is currently on the *OK* button. When the user clicks one of the ``RadioButton``\ s., an ``OnExit`` event on the button occurs, followed by an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``GroupBox``, and finally an `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event on the ``RadioButton`` that was clicked. If the user then clicks the *OK* button, an ``OnExit`` event for the ``RadioButton`` occurs followed by an ``OnExit`` event for the ``GroupBox``, and then the button's `OnEnter <Vcl.Controls.TWinControl.OnEnter.htm>`__ event occurs. + + .. note:: In some control classes, the ``ActiveControl`` property updates before the ``OnExit`` event occurs. + + ``OnExit`` is an event handler of type `NotifyEvent <System.Classes.TNotifyEvent.htm>`__. + ''' + + def __init__(self, *args, **kwargs) -> None: + '''Initialize self. See help(type(self)) for accurate signature.''' + def __contains__(self, other) -> bool: + '''Return key in self.''' + def __delattr__(self, name) -> Any: + '''Implement delattr(self, name).''' + def __eq__(self, other) -> bool: + '''Return self==value.''' + def __ge__(self, other) -> bool: + '''Return self>=value.''' + def __getitem__(self, index) -> Any: + '''Return self[key].''' + def __gt__(self, other) -> bool: + '''Return self>value.''' + def __iter__(self) -> Any: + '''Implement iter(self).''' + def __le__(self, other) -> bool: + '''Return self<=value.''' + def __len__(self) -> int: + '''Return len(self).''' + def __lt__(self, other) -> bool: + '''Return self<value.''' + def __ne__(self, other) -> bool: + '''Return self!=value.''' + def __setattr__(self, name, value) -> Any: + '''Implement setattr(self, name, value).''' + + + +def Abort() -> None: + '''Raises a silent exception. + ''' +def CreateComponent(ClassName: str, Owner: Component) -> Component: + ''' + Creates a component of type ComponentClass owned by Owner')) + + def TPyDelphiWrapper.CreateModuleFunctions; + var + i : int; + begin + if Assigned(FModule) then + begin + RegisterFunction(PAnsiChar('CreateComponent'), CreateComponent, + PAnsiChar('CreateComponent(ComponentClass, Owner)'#10 + + 'Creates a component of type ComponentClass owned by Owner')) + RegisterFunction(PAnsiChar('Abort'), Abort_Wrapper, + PAnsiChar('Abort()'#10 + + 'Raises a silent exception.')) + for i := 0 to RegisteredUnits.Count-1 do + RegisteredUnits[i].DefineFunctions(Self) + end; + end; + ''' +def FreeConsole(): + ''' + Frees the MS-DOS console associated with the process.' + + Os aplicativos GUI são executados em interação com a janela de comando + (console). Para melhorar o desempenho da GUI sem atrasos, + usamos ``FreeConsole()`` concedendo o controle primário à interface GUI. + ``Application.Run()`` inicia o loop de interação GUI entre a GUI e o usuário + da aplicação GUI. Quando fechamos a aplicação GUI, ``app.Destroy()`` cuida + de não travar. + + procedure TFormsRegistration.DefineFunctions( + APyDelphiWrapper: PyDelphiWrapper); + begin + inherited; + APyDelphiWrapper.RegisterFunction(PAnsiChar('FreeConsole'), FreeConsole_Wrapper, + PAnsiChar('FreeConsole_Wrapper()'#10 + + 'Frees the MS-DOS console associated with the process.')); + end; + ''' +def GetProcessDpiAwareness() -> Any: + '''GetProcessDpiAwareness() + Get the DPI awareness of the process.''' +def IsDpiAware(*args, **kwargs) -> Any: + '''IsDPIAware() + Check for process DPI awareness.''' +def SetHighDpiAware() -> Any: + '''SetHighDpiAware() + Automatically set the DPI awareness that best fits to the process.''' +def SetProcessDpiAwareness() -> Any: + '''SetProcessDpiAwareness() + Set the DPI awareness to the process.''' +@overload +def ShowMessage(self, Msg: str) -> None: + ''' + ======================= + Vcl.Dialogs.ShowMessage + ======================= + + .. code-block:: python + :caption: Delphi + + procedure ShowMessage(const Msg: string); + procedure ShowMessage(const Msg: string; TaskDlgFlags: TaskDialogFlags); + + Displays a message box with an *OK* button. + + Call ``ShowMessage()`` to display a simple message box with an *OK* button. The name of the application's executable file appears as the caption of the message box. + + ``Msg`` parameter is the message string that appears in the message box. + + ``Params`` lists the values to insert into ``Msg`` if the ``Msg`` string includes formatting specifiers. For more information about how messages are formatted, see *Format Strings*. + + ``Params_size`` is the index of the last value in ``Params`` (one less than the number of elements). + + .. note:: To display a message in a message box with other buttons, or with an icon, use the `MessageDlg <Vcl.Dialogs.MessageDlg.htm>`__ function. + + .. note:: If the user types *Ctrl+C* in the message box, the text of the message is copied to the clipboard. + ''' +@overload +def ShowMessage(self, Msg: str, TaskDlgFlags: TaskDialogFlags) -> None: + ''' + ======================= + Vcl.Dialogs.ShowMessage + ======================= + ''' +def StyleServices() -> Any: + ''' + StyleServices_Wrapper() + Get a StyleServices instance. + + def TVclThemesRegistration.DefineFunctions( + APyDelphiWrapper: PyDelphiWrapper): ... + begin + inherited; + APyDelphiWrapper.RegisterFunction(PAnsiChar('StyleServices'), + GetCallBack(APyDelphiWrapper, @StyleServices_Wrapper, 2, DEFAULT_CALLBACK_TYPE), + PAnsiChar('StyleServices_Wrapper()'#10 + + 'Get a StyleServices instance. + end; + ''' + + +def IsPositiveResult(self, AModalResult: ModalResult) -> None: + ''' + Checks the return value from a modal form dialog and indicates whether the user selected *Ok*, *Yes*, *Yes to All*, or *All*. + + Call ``IsPositiveResult()`` to check whether the user closed a modal form by indicating a *Yes* or *Ok* response. Pass the return value from the ``Form``\ s. ``ShowModal()`` method as the ``AModalResult`` argument. ``IsPositiveResult()`` returns ``True`` if ``AModalResult`` is ``mrYes``, ``mrOk``, ``mrYesToAll`` or ``mrAll``, ``False`` otherwise. + ''' +def IsNegativeResult(self, AModalResult: ModalResult) -> None: + ''' + Checks the return value from a modal form dialog and indicates whether the user selected *No* or *No to All*. + + Call ``IsNegativeResult()`` to check whether the user closed a modal form by indicating a *No* response. Pass the return value from the ``Form``\ s. ``ShowModal()`` method as the ``AModalResult`` argument. ``IsNegativeResult()`` returns ``True`` if ``AModalResult`` is ``mrNo`` or ``mrNoToAll``, ``False`` otherwise. + ''' +def IsAbortResult(self, AModalResult: ModalResult) -> None: + ''' + Checks the return value from a modal form dialog and indicates whether the user selected *Abort* or *Cancel*. + + Call ``IsAbortResult()`` to check whether the user clicked *Abort* or *Cancel* to close a modal form. Pass the return value from the ``Form``\ s. ``ShowModal()`` method as the ``AModalResult`` argument. ``IsAbortResult()`` returns ``True`` if ``AModalResult`` is ``mrAbort`` or ``mrCancel``, ``False`` otherwise. + ''' +def IsAnAllResult(self, AModalResult: ModalResult) -> None: + ''' + Checks the return value from a modal form dialog and indicates whether the user selected *All*, *Yes to All*, or *No to All*. + + Call ``IsAnAllResult()`` to check whether the user closed a modal form by indicating a response that applies to *all*. Pass the return value from the ``Form``\ s. ``ShowModal()`` method as the ``AModalResult`` argument. ``IsAnAllResult()`` returns ``True`` if ``AModalResult`` is ``mrAll``, ``mrNoToAll``, or ``mrYesToAll``, ``False`` otherwise. + + .. note:: If ``IsAnAllResult()`` returns ``True``, you can convert the result to a simple *Ok*, *No*, or *Yes* result by calling ``StripAllFromResult``. + ''' +def StripAllFromResult(self, AModalResult: ModalResult) -> ModalResult: + ''' + Converts a ``ModalResult`` value from a constant that refers to *all* to the corresponding simple constant. + + Call ``StripAllFromResult()`` to remove the *all* interpretation from a ``ModalResult`` value. For example, after checking the result from a form's ``ShowModal()`` method with the ``IsAnAllResult()`` function, you can call ``StripAllFromResult`` to allow common code to process results that apply to a single selected item or all items. + + ``StripAllFromResult`` makes the following conversions: + + ================ ================ + **AModalResult** **Return_value** + ================ ================ + ``mrAll`` ``mrOk`` + ``mrNoToAll`` ``mrNo`` + ``mrYesToAll`` ``mrYes`` + ================ ================ + '''