Add Icons To ListBox
[code lang=”delphi”]procedure TForm1.Button1Click(Sender: TSender); var Icon: TIcon; begin Icon := TIcon.Create; Icon.LoadFromFile(‘ORANGE.ICO’); ListBox1.Items.AddObject(‘Orange’, Icon); end;[/code] [tags]Delphi, Components, ListBox[/tags]
Create Editable ListBox
NOTE : This will also work with an OwnerDraw ListBox But be sure you “pad” the Left Property of the Edit so Any…
Horizontal Scrollbar
ListBox with a horizontal Scrollbar? Yes, it’s possible: [code lang=”delphi”] SendMessage(ListBox1.handle, LB_SETHORIZONTALEXTENT, ItemWidth, 0); [/code] Also look at the component called LongList on…
ComboBox fires “KeyPressed” twice – fix
1. TComboBox.OnKeyPress is fired TWICE if style is not csDropDown or csSimple. Just drop a Combo and a Label. In the Combo OnKeyPress…
Edit-Field placed on DrawGrid never Trigger OnChange-Event
> If a TEdit is droped inside a TDrawGrid the edit control’s OnChange event is > never triggered even if the text was…
MonthCal Bold Days
MonthCalendar days bold Tage Fett Markieren Kennzeichnen [code lang=”delphi”]procedure TForm1.MonthCalendar1GetMonthInfo(Sender: TObject; Month: Cardinal; var MonthBoldInfo: Cardinal); var begin MonthCalendar1.BoldDays([1,8], MonthBoldInfo); end; [/code] [1,8]…
MouseEnter etc.
[code lang=”delphi”]procedure WndProc(var Message : TMessage); override; procedure TForm1.WndProc(var Message : TMessage); begin if Message.LParam = Longint(Label1) then begin if (Message.Msg = CM_MOUSELEAVE)…
Moving at runtime
[code lang=”delphi”]procedure TForm1.Button3MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); const SC_DragMove = $F012; begin Begin ReleaseCapture; Panel1.perform(WM_SysCommand, SC_DragMove, 0); End; end;[/code]…
Override “Enabled”-property in own components
It’s my guess that your problem is in the SetEnabled method. You must’ve re-defined FEnabled in your derived component otherwise you would be…
TEdit doesn’t like to launch a Dialog – fix
TEdit does not like that you launch a dialog box from the OnEnter. In D1 you loose the caret and the selection highlighting…