mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 17:21:03 +02:00
- changed handle check in combobox SetItemHeight to more correct
git-svn-id: trunk@11154 -
This commit is contained in:
parent
211710b030
commit
37bdf71f61
@ -611,6 +611,10 @@ begin
|
||||
exit;
|
||||
|
||||
FItemHeight := AValue;
|
||||
|
||||
if (not HandleAllocated) then
|
||||
exit;
|
||||
|
||||
if Style in [csOwnerDrawFixed, csOwnerDrawVariable] then
|
||||
TWSCustomComboBoxClass(WidgetSetClass).SetItemHeight(Self, FItemHeight);
|
||||
end;
|
||||
|
@ -35,7 +35,7 @@ uses
|
||||
////////////////////////////////////////////////////
|
||||
Classes, StdCtrls, Controls, Graphics, Forms, SysUtils,
|
||||
////////////////////////////////////////////////////
|
||||
WSStdCtrls, WSLCLClasses, Windows, LCLType,
|
||||
WSStdCtrls, WSLCLClasses, WSProc, Windows, LCLType,
|
||||
Win32Int, Win32Proc, InterfaceBase, Win32WSControls;
|
||||
|
||||
type
|
||||
@ -817,11 +817,12 @@ end;
|
||||
|
||||
class procedure TWin32WSCustomComboBox.SetItemHeight(const ACustomComboBox: TCustomComboBox; const AItemHeight: Integer);
|
||||
begin
|
||||
if not WSCheckHandleAllocated(ACustomComboBox, 'SetItemHeight') then
|
||||
Exit;
|
||||
// size requests are done through WM_MeasureItem
|
||||
// SendMessage(ACustomComboBox.Handle, CB_SETITEMHEIGHT, AItemHeight, -1);
|
||||
// SendMessage(ACustomComboBox.Handle, CB_SETITEMHEIGHT, AItemHeight, 0);
|
||||
if ACustomComboBox.HandleAllocated then
|
||||
RecreateWnd(ACustomComboBox);
|
||||
RecreateWnd(ACustomComboBox);
|
||||
end;
|
||||
{ TWin32WSCustomEdit helper functions }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user