mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 13:59:14 +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;
|
exit;
|
||||||
|
|
||||||
FItemHeight := AValue;
|
FItemHeight := AValue;
|
||||||
|
|
||||||
|
if (not HandleAllocated) then
|
||||||
|
exit;
|
||||||
|
|
||||||
if Style in [csOwnerDrawFixed, csOwnerDrawVariable] then
|
if Style in [csOwnerDrawFixed, csOwnerDrawVariable] then
|
||||||
TWSCustomComboBoxClass(WidgetSetClass).SetItemHeight(Self, FItemHeight);
|
TWSCustomComboBoxClass(WidgetSetClass).SetItemHeight(Self, FItemHeight);
|
||||||
end;
|
end;
|
||||||
|
@ -35,7 +35,7 @@ uses
|
|||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
Classes, StdCtrls, Controls, Graphics, Forms, SysUtils,
|
Classes, StdCtrls, Controls, Graphics, Forms, SysUtils,
|
||||||
////////////////////////////////////////////////////
|
////////////////////////////////////////////////////
|
||||||
WSStdCtrls, WSLCLClasses, Windows, LCLType,
|
WSStdCtrls, WSLCLClasses, WSProc, Windows, LCLType,
|
||||||
Win32Int, Win32Proc, InterfaceBase, Win32WSControls;
|
Win32Int, Win32Proc, InterfaceBase, Win32WSControls;
|
||||||
|
|
||||||
type
|
type
|
||||||
@ -817,10 +817,11 @@ end;
|
|||||||
|
|
||||||
class procedure TWin32WSCustomComboBox.SetItemHeight(const ACustomComboBox: TCustomComboBox; const AItemHeight: Integer);
|
class procedure TWin32WSCustomComboBox.SetItemHeight(const ACustomComboBox: TCustomComboBox; const AItemHeight: Integer);
|
||||||
begin
|
begin
|
||||||
|
if not WSCheckHandleAllocated(ACustomComboBox, 'SetItemHeight') then
|
||||||
|
Exit;
|
||||||
// size requests are done through WM_MeasureItem
|
// size requests are done through WM_MeasureItem
|
||||||
// SendMessage(ACustomComboBox.Handle, CB_SETITEMHEIGHT, AItemHeight, -1);
|
// SendMessage(ACustomComboBox.Handle, CB_SETITEMHEIGHT, AItemHeight, -1);
|
||||||
// SendMessage(ACustomComboBox.Handle, CB_SETITEMHEIGHT, AItemHeight, 0);
|
// SendMessage(ACustomComboBox.Handle, CB_SETITEMHEIGHT, AItemHeight, 0);
|
||||||
if ACustomComboBox.HandleAllocated then
|
|
||||||
RecreateWnd(ACustomComboBox);
|
RecreateWnd(ACustomComboBox);
|
||||||
end;
|
end;
|
||||||
{ TWin32WSCustomEdit helper functions }
|
{ TWin32WSCustomEdit helper functions }
|
||||||
|
Loading…
Reference in New Issue
Block a user