mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:39:29 +02:00
gtk: only ownerdraw lists receive OnDrawItem (bug #910), windows: enable listbox with color in objectinspector
git-svn-id: trunk@8137 -
This commit is contained in:
parent
e763403d49
commit
e69285d376
@ -741,6 +741,7 @@ begin
|
||||
Enabled:=false;
|
||||
SetBounds(0,-30,80,25); // hidden
|
||||
Parent:=Self;
|
||||
Style := csOwnerDrawFixed;
|
||||
OnMouseDown := @ValueControlMouseDown;
|
||||
OnMouseMove := @ValueControlMouseMove;
|
||||
OnDblClick := @ValueEditDblClick;
|
||||
|
@ -72,6 +72,16 @@ begin
|
||||
if LCLList=nil then
|
||||
RaiseException('gtkListItemDrawAfterCB LCLList=nil');
|
||||
if [csDestroying,csLoading]*LCLList.Owner.ComponentState<>[] then exit;
|
||||
|
||||
// only owner draw lists are interested in drawing items themselves.
|
||||
//if not (csDesigning in LCLList.Owner.ComponentState) then begin
|
||||
if LclList.Owner is TCustomListbox then
|
||||
if TCustomListbox(LCLList.Owner).Style = lbStandard then
|
||||
exit;
|
||||
if LclList.Owner is TCustomCombobox then
|
||||
if TCustomCombobox(LclList.Owner).Style < csOwnerDrawFixed then
|
||||
exit;
|
||||
//end;
|
||||
|
||||
// get itemindex and area
|
||||
ItemIndex:=g_list_index(GtkList^.children,Data);
|
||||
|
Loading…
Reference in New Issue
Block a user