# Pascal Script for Delphi - 3.0.75.1117,'Unable to register type TDrawItemEvent'

**URL:** https://talk.remobjects.com/t/pascal-script-for-delphi-3-0-75-1117-unable-to-register-type-tdrawitemevent/4531
**Category:** Pascal Script
**Created:** [June 28, 2014, 4:14am UTC](https://talk.remobjects.com/t/pascal-script-for-delphi-3-0-75-1117-unable-to-register-type-tdrawitemevent/4531 "2014-06-28T04:14:20Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Shakielpel](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/s/ce7236/32.png) [@Shakielpel](https://talk.remobjects.com/u/Shakielpel)
#### Post date: [June 28, 2014, 4:14am UTC](https://talk.remobjects.com/t/pascal-script-for-delphi-3-0-75-1117-unable-to-register-type-tdrawitemevent/4531/1 "2014-06-28T04:14:21Z")

</div>

using XE5

exception in

```
procedure SIRegister_StdCtrls_TypesAndConsts(cl: TPSPascalCompiler);
begin
  cl.AddTypeS('TEditCharCase', '(ecNormal, ecUpperCase, ecLowerCase)');
  cl.AddTypeS('TScrollStyle', '(ssNone, ssHorizontal, ssVertical, ssBoth)');
  cl.AddTypeS('TComboBoxStyle', '(csDropDown, csSimple, csDropDownList, csOwnerDrawFixed, csOwnerDrawVariable)');

cl.AddTypeS('TDrawItemEvent', 'procedure(Control: TWinControl; Index: Integer; Rect: TRect; State: Byte)'); cl.AddTypeS('TMeasureItemEvent', 'procedure(Control: TWinControl; Index: Integer; var Height: Integer)');

  cl.AddTypeS('TCheckBoxState', '(cbUnchecked, cbChecked, cbGrayed)');
  cl.AddTypeS('TListBoxStyle', '(lbStandard, lbOwnerDrawFixed, lbOwnerDrawVariable)');
  cl.AddTypeS('TScrollCode', '(scLineUp, scLineDown, scPageUp, scPageDown, scPosition, scTrack, scTop, scBottom, scEndScroll)');
  cl.AddTypeS('TScrollEvent', 'procedure(Sender: TObject; ScrollCode: TScrollCode;var ScrollPos: Integer)');

  Cl.addTypeS('TEOwnerDrawState', '(odSelected, odGrayed, odDisabled, odChecked,'
    +' odFocused, odDefault, odHotLight, odInactive, odNoAccel, odNoFocusRect,'
    +' odReserved1, odReserved2, odComboBoxEdit)');
  cl.AddTypeS('TTextLayout', '( tlTop, tlCenter, tlBottom )');
  cl.AddTypeS('TOwnerDrawState', 'set of TEOwnerDrawState');
end;

```

**cl.AddTypeS(‘TDrawItemEvent’, ‘procedure(Control: TWinControl; Index: Integer; Rect: TRect; State: Byte)’);  
cl.AddTypeS(‘TMeasureItemEvent’, ‘procedure(Control: TWinControl; Index: Integer; var Height: Integer)’);**

same problem [http://www.be-precision.com/forum/index.php?topic=311](http://www.be-precision.com/forum/index.php?topic=311)

---

<div class="post-metadata">

### Author: ![EvgenyK](https://talk.remobjects.com/user_avatar/talk.remobjects.com/evgenyk/32/16_2.png) [@EvgenyK](https://talk.remobjects.com/u/EvgenyK)
#### Post date: [July 1, 2014, 8:30am UTC](https://talk.remobjects.com/t/pascal-script-for-delphi-3-0-75-1117-unable-to-register-type-tdrawitemevent/4531/3 "2014-07-01T08:30:54Z")

</div>

moved to [https://github.com/remobjects/pascalscript/issues/85](https://github.com/remobjects/pascalscript/issues/85)
