From 06f1e9145c4ba6aa02e7f9af7a5ced0517e4085c Mon Sep 17 00:00:00 2001
From: alexs75 <alexs75@8e941d3f-bd1b-0410-a28a-d453659cc2b4>
Date: Tue, 12 Jan 2010 17:11:41 +0000
Subject: [PATCH] fix draw text in RxDBLockupComboBox

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1125 8e941d3f-bd1b-0410-a28a-d453659cc2b4
---
 components/rx/rxlookup.pas    | 15 ++++++++++++++-
 components/rx/rxpopupunit.pas |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/components/rx/rxlookup.pas b/components/rx/rxlookup.pas
index 2ff1b3220..51a74e2f4 100644
--- a/components/rx/rxlookup.pas
+++ b/components/rx/rxlookup.pas
@@ -444,6 +444,9 @@ procedure TRxCustomDBLookupEdit.ShowPopUp;
 var
   R:TPoint;
   FValue:string;
+  {$IFDEF LINUX}
+  TempF:TPopUpForm;
+  {$ENDIF}
 begin
 
   if FLookupDataLink.Active then
@@ -456,8 +459,18 @@ begin
 
       FRxPopUpForm:=ShowRxDBPopUpForm(Self, FLookupDataLink.DataSet, @OnClosePopup,
         FPopUpFormOptions, FLookupDisplay, LookupDisplayIndex, 0 {ButtonWidth}, Font);
-    end
 
+      FRxPopUpForm:=ShowRxDBPopUpForm(Self, FLookupDataLink.DataSet, @OnClosePopup,
+        FPopUpFormOptions, FLookupDisplay, LookupDisplayIndex, 0 {ButtonWidth}, Font);
+  {$IFDEF LINUX}
+      TempF:=FRxPopUpForm;
+      if FRxPopUpForm.ShowModal = mrOk then
+        OnClosePopup(true);
+      TempF.Free;
+      FRxPopUpForm:=nil
+  {$ENDIF}
+
+    end
 end;
 
 
diff --git a/components/rx/rxpopupunit.pas b/components/rx/rxpopupunit.pas
index 0b380d29e..b501b13a3 100644
--- a/components/rx/rxpopupunit.pas
+++ b/components/rx/rxpopupunit.pas
@@ -211,7 +211,7 @@ begin
   Result.DataSet:=ADataSet;
   Result.LookupDisplayIndex:=ALookupDisplayIndex;
 
-  AControl.Caption:='';
+//  AControl.Caption:='';
   Result.WControl:=AControl;
 
   if Assigned(Font) then