mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 22:09:27 +02:00
Cocoa: simplified TCocoaWSCustomComboBox.GetDroppedDown()
This commit is contained in:
parent
1bb6b52d68
commit
d15790c601
@ -720,6 +720,7 @@ end;
|
||||
|
||||
procedure TLCLComboboxCallback.ComboBoxSelectionDidChange;
|
||||
begin
|
||||
writeln( TComboBox(self.GetCallbackObject).DroppedDown );
|
||||
SendSimpleMessage(Target, LM_SELCHANGE);
|
||||
end;
|
||||
|
||||
@ -1894,21 +1895,13 @@ end;
|
||||
class function TCocoaWSCustomComboBox.GetDroppedDown(
|
||||
const ACustomComboBox: TCustomComboBox): Boolean;
|
||||
var
|
||||
cb : ICommonCallback;
|
||||
obj : TObject;
|
||||
comboBox: TCocoaComboBox;
|
||||
begin
|
||||
Result:=false;
|
||||
if (not Assigned(ACustomComboBox)) or (not ACustomComboBox.HandleAllocated) then
|
||||
Exit;
|
||||
|
||||
cb := NSView(ACustomComboBox.Handle).lclGetCallback;
|
||||
if Assigned(cb) then
|
||||
begin
|
||||
obj := cb.GetCallbackObject;
|
||||
if (obj is TLCLComboboxCallback) then
|
||||
Result := TLCLComboboxCallback(obj).isShowPopup;
|
||||
end;
|
||||
|
||||
comboBox:= TCocoaComboBox(ACustomComboBox.Handle);
|
||||
Result:= comboBox.isDown;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomComboBox.SetDroppedDown(const ACustomComboBox: TCustomComboBox; ADroppedDown: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user