mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 22:19:19 +02:00
hopefully fixed gtk2 combobox popup problem
git-svn-id: trunk@10957 -
This commit is contained in:
parent
7ebf64c627
commit
5471f34e69
@ -761,6 +761,12 @@ begin
|
||||
LCLSendDropDownMsg(TControl(WidgetInfo^.LCLObject));
|
||||
end;
|
||||
|
||||
function GtkComboButtonPressCB(AWidget: PGtkWidget; Event: PGdkEventButton; ComboBox: PGtkComboBox): Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
gtk_combo_box_popup(ComboBox);
|
||||
end;
|
||||
|
||||
procedure GtkChangedCB(AWidget: PGtkWidget; WidgetInfo: PWidgetInfo); cdecl;
|
||||
begin
|
||||
if WidgetInfo^.UserData <> nil then Exit;
|
||||
@ -825,7 +831,8 @@ begin
|
||||
if GtkWidgetIsA(PGtkWidget(AChild), GTK_TYPE_ENTRY) then begin
|
||||
// Anything?
|
||||
end;
|
||||
|
||||
|
||||
g_signal_connect(AButton, 'button_press_event', TGCallback(@GtkComboButtonPressCB), AWidget);
|
||||
g_signal_connect(APrivate^.popup_widget, 'show', TGCallback(@GtkPopupShowCB), AWidgetInfo);
|
||||
g_object_set_data(G_OBJECT(AWidget), 'Menu', APrivate^.popup_widget);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user