Explorar el Código

Displaying forms in page tab instead of modal show
modified: TurboBird.lpi
modified: TurboBird.lpr
modified: main.pas
modified: querywindow.pas
modified: udfinfo.lfm
modified: udfinfo.lrs
modified: udfinfo.pas
modified: userpermissions.lfm
modified: userpermissions.lrs
modified: userpermissions.pas
modified: viewdomain.lfm
modified: viewdomain.lrs
modified: viewdomain.pas
modified: viewgen.lfm
modified: viewgen.lrs
modified: viewgen.pas
modified: viewsproc.lfm
modified: viewsproc.lrs
modified: viewsproc.pas
modified: viewtrigger.lfm
modified: viewtrigger.lrs
modified: viewtrigger.pas
modified: viewview.lfm
modified: viewview.lrs
modified: viewview.pas

Motaz Abdel Azeem hace 13 años
padre
commit
f84951411e
Se han modificado 25 ficheros con 467 adiciones y 201 borrados
  1. 94 96
      TurboBird.lpi
  2. 1 1
      TurboBird.lpr
  3. 71 3
      main.pas
  4. 2 1
      querywindow.pas
  5. 13 0
      udfinfo.lfm
  6. 5 1
      udfinfo.lrs
  7. 9 1
      udfinfo.pas
  8. 40 6
      userpermissions.lfm
  9. 18 9
      userpermissions.lrs
  10. 11 1
      userpermissions.pas
  11. 13 0
      viewdomain.lfm
  12. 4 1
      viewdomain.lrs
  13. 9 1
      viewdomain.pas
  14. 18 5
      viewgen.lfm
  15. 12 9
      viewgen.lrs
  16. 9 1
      viewgen.pas
  17. 13 0
      viewsproc.lfm
  18. 19 16
      viewsproc.lrs
  19. 9 1
      viewsproc.pas
  20. 16 3
      viewtrigger.lfm
  21. 25 22
      viewtrigger.lrs
  22. 9 1
      viewtrigger.pas
  23. 16 3
      viewview.lfm
  24. 22 18
      viewview.lrs
  25. 9 1
      viewview.pas

+ 94 - 96
TurboBird.lpi

@@ -60,10 +60,10 @@
         <Filename Value="TurboBird.lpr"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="TurboBird"/>
-        <EditorIndex Value="9"/>
+        <EditorIndex Value="8"/>
         <WindowIndex Value="0"/>
         <TopLine Value="1"/>
-        <CursorPos X="20" Y="26"/>
+        <CursorPos X="25" Y="18"/>
         <UsageCount Value="200"/>
         <Loaded Value="True"/>
       </Unit0>
@@ -76,8 +76,8 @@
         <IsVisibleTab Value="True"/>
         <EditorIndex Value="1"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="3288"/>
-        <CursorPos X="5" Y="3302"/>
+        <TopLine Value="2951"/>
+        <CursorPos X="31" Y="2979"/>
         <UsageCount Value="200"/>
         <Loaded Value="True"/>
         <LoadedDesigner Value="True"/>
@@ -99,7 +99,7 @@
         <ComponentName Value="fmReg"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="Reg"/>
-        <EditorIndex Value="13"/>
+        <EditorIndex Value="12"/>
         <WindowIndex Value="0"/>
         <TopLine Value="228"/>
         <CursorPos X="22" Y="269"/>
@@ -119,10 +119,10 @@
         <ComponentName Value="fmQueryWindow"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="QueryWindow"/>
-        <EditorIndex Value="8"/>
+        <EditorIndex Value="5"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="1" Y="1"/>
+        <TopLine Value="828"/>
+        <CursorPos X="41" Y="831"/>
         <UsageCount Value="200"/>
         <Loaded Value="True"/>
         <LoadedDesigner Value="True"/>
@@ -157,8 +157,8 @@
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="ViewView"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="23" Y="37"/>
+        <TopLine Value="9"/>
+        <CursorPos X="19" Y="21"/>
         <UsageCount Value="200"/>
       </Unit9>
       <Unit10>
@@ -167,10 +167,13 @@
         <ComponentName Value="fmViewTrigger"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="ViewTrigger"/>
+        <EditorIndex Value="6"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="6"/>
-        <CursorPos X="23" Y="14"/>
+        <TopLine Value="19"/>
+        <CursorPos X="72" Y="27"/>
         <UsageCount Value="200"/>
+        <Loaded Value="True"/>
+        <LoadedDesigner Value="True"/>
       </Unit10>
       <Unit11>
         <Filename Value="viewsproc.pas"/>
@@ -178,10 +181,13 @@
         <ComponentName Value="fmViewSProc"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="ViewSProc"/>
+        <EditorIndex Value="7"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="80" Y="37"/>
+        <TopLine Value="11"/>
+        <CursorPos X="11" Y="17"/>
         <UsageCount Value="200"/>
+        <Loaded Value="True"/>
+        <LoadedDesigner Value="True"/>
       </Unit11>
       <Unit12>
         <Filename Value="viewgen.pas"/>
@@ -190,8 +196,8 @@
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="ViewGen"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="37" Y="17"/>
+        <TopLine Value="8"/>
+        <CursorPos X="60" Y="22"/>
         <UsageCount Value="201"/>
       </Unit12>
       <Unit13>
@@ -375,7 +381,7 @@
         <ComponentName Value="fmEditTable"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="EditTable"/>
-        <EditorIndex Value="10"/>
+        <EditorIndex Value="9"/>
         <WindowIndex Value="0"/>
         <TopLine Value="78"/>
         <CursorPos X="33" Y="109"/>
@@ -418,10 +424,10 @@
         <ComponentName Value="fmUDFInfo"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="UDFInfo"/>
-        <EditorIndex Value="5"/>
+        <EditorIndex Value="2"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="20" Y="6"/>
+        <TopLine Value="12"/>
+        <CursorPos X="29" Y="29"/>
         <UsageCount Value="200"/>
         <Loaded Value="True"/>
         <LoadedDesigner Value="True"/>
@@ -432,10 +438,13 @@
         <ComponentName Value="fmViewDomain"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="ViewDomain"/>
+        <EditorIndex Value="3"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="36" Y="21"/>
+        <TopLine Value="12"/>
+        <CursorPos X="24" Y="17"/>
         <UsageCount Value="200"/>
+        <Loaded Value="True"/>
+        <LoadedDesigner Value="True"/>
       </Unit39>
       <Unit40>
         <Filename Value="newdomain.pas"/>
@@ -461,7 +470,7 @@
         <ComponentName Value="dmSysTables"/>
         <ResourceBaseClass Value="DataModule"/>
         <UnitName Value="SysTables"/>
-        <EditorIndex Value="7"/>
+        <EditorIndex Value="4"/>
         <WindowIndex Value="0"/>
         <TopLine Value="531"/>
         <CursorPos X="116" Y="556"/>
@@ -503,13 +512,10 @@
         <ComponentName Value="fmNewEditField"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="NewEditField"/>
-        <EditorIndex Value="4"/>
         <WindowIndex Value="0"/>
         <TopLine Value="165"/>
         <CursorPos X="3" Y="169"/>
         <UsageCount Value="202"/>
-        <Loaded Value="True"/>
-        <LoadedDesigner Value="True"/>
       </Unit46>
       <Unit47>
         <Filename Value="/usr/lib/lazarus/0.9.28.2/lcl/dbgrids.pas"/>
@@ -540,18 +546,16 @@
         <WindowIndex Value="0"/>
         <TopLine Value="17"/>
         <CursorPos X="37" Y="49"/>
-        <UsageCount Value="199"/>
+        <UsageCount Value="200"/>
       </Unit50>
       <Unit51>
         <Filename Value="scriptdb.pas"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="Scriptdb"/>
-        <EditorIndex Value="6"/>
         <WindowIndex Value="0"/>
         <TopLine Value="144"/>
         <CursorPos X="3" Y="179"/>
-        <UsageCount Value="186"/>
-        <Loaded Value="True"/>
+        <UsageCount Value="188"/>
       </Unit51>
       <Unit52>
         <Filename Value="connectas.pas"/>
@@ -569,9 +573,9 @@
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="UserPermissions"/>
         <WindowIndex Value="0"/>
-        <TopLine Value="1"/>
-        <CursorPos X="58" Y="14"/>
-        <UsageCount Value="162"/>
+        <TopLine Value="6"/>
+        <CursorPos X="38" Y="12"/>
+        <UsageCount Value="164"/>
       </Unit53>
       <Unit54>
         <Filename Value="/usr/lib/lazarus/0.9.29/ide/lazarus.pp"/>
@@ -587,13 +591,10 @@
         <ComponentName Value="fmTableManage"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="TableManage"/>
-        <EditorIndex Value="3"/>
         <WindowIndex Value="0"/>
         <TopLine Value="249"/>
         <CursorPos X="65" Y="256"/>
-        <UsageCount Value="145"/>
-        <Loaded Value="True"/>
-        <LoadedDesigner Value="True"/>
+        <UsageCount Value="147"/>
       </Unit55>
       <Unit56>
         <Filename Value="/usr/lib/lazarus/0.9.29/lcl/grids.pas"/>
@@ -633,17 +634,17 @@
         <ComponentName Value="fmBackupRestore"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="BackupRestore"/>
-        <EditorIndex Value="11"/>
+        <EditorIndex Value="10"/>
         <WindowIndex Value="0"/>
         <TopLine Value="40"/>
         <CursorPos X="14" Y="54"/>
-        <UsageCount Value="131"/>
+        <UsageCount Value="133"/>
         <Loaded Value="True"/>
       </Unit60>
       <Unit61>
         <Filename Value="unitfirebirdservices.pas"/>
         <UnitName Value="UnitFirebirdServices"/>
-        <EditorIndex Value="12"/>
+        <EditorIndex Value="11"/>
         <WindowIndex Value="0"/>
         <TopLine Value="321"/>
         <CursorPos X="1" Y="367"/>
@@ -706,7 +707,7 @@
         <WindowIndex Value="0"/>
         <TopLine Value="3"/>
         <CursorPos X="71" Y="7"/>
-        <UsageCount Value="101"/>
+        <UsageCount Value="103"/>
       </Unit68>
       <Unit69>
         <Filename Value="changepass.pas"/>
@@ -717,7 +718,7 @@
         <WindowIndex Value="0"/>
         <TopLine Value="3"/>
         <CursorPos X="88" Y="14"/>
-        <UsageCount Value="100"/>
+        <UsageCount Value="102"/>
       </Unit69>
       <Unit70>
         <Filename Value="permissionmanage.pas"/>
@@ -728,7 +729,7 @@
         <WindowIndex Value="0"/>
         <TopLine Value="53"/>
         <CursorPos X="21" Y="92"/>
-        <UsageCount Value="98"/>
+        <UsageCount Value="100"/>
       </Unit70>
       <Unit71>
         <Filename Value="sqlhistory.pas"/>
@@ -739,7 +740,7 @@
         <WindowIndex Value="0"/>
         <TopLine Value="1"/>
         <CursorPos X="18" Y="39"/>
-        <UsageCount Value="83"/>
+        <UsageCount Value="85"/>
       </Unit71>
       <Unit72>
         <Filename Value="../../lazarus/lazarus/lcl/include/menuitem.inc"/>
@@ -761,11 +762,11 @@
         <ComponentName Value="fmCopyTable"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="CopyTable"/>
-        <EditorIndex Value="14"/>
+        <EditorIndex Value="13"/>
         <WindowIndex Value="0"/>
         <TopLine Value="30"/>
         <CursorPos X="1" Y="151"/>
-        <UsageCount Value="54"/>
+        <UsageCount Value="56"/>
         <Loaded Value="True"/>
         <LoadedDesigner Value="True"/>
       </Unit74>
@@ -956,135 +957,132 @@
         <ComponentName Value="fmDBInfo"/>
         <ResourceBaseClass Value="Form"/>
         <UnitName Value="dbInfo"/>
-        <EditorIndex Value="2"/>
         <WindowIndex Value="0"/>
         <TopLine Value="1"/>
         <CursorPos X="12" Y="28"/>
-        <UsageCount Value="22"/>
-        <Loaded Value="True"/>
-        <LoadedDesigner Value="True"/>
+        <UsageCount Value="24"/>
       </Unit98>
     </Units>
     <JumpHistory Count="30" HistoryIndex="29">
       <Position1>
         <Filename Value="main.pas"/>
-        <Caret Line="374" Column="22" TopLine="355"/>
+        <Caret Line="1" Column="1" TopLine="1"/>
       </Position1>
       <Position2>
         <Filename Value="main.pas"/>
-        <Caret Line="389" Column="22" TopLine="360"/>
+        <Caret Line="1678" Column="31" TopLine="1643"/>
       </Position2>
       <Position3>
         <Filename Value="main.pas"/>
-        <Caret Line="403" Column="9" TopLine="379"/>
+        <Caret Line="1700" Column="54" TopLine="1665"/>
       </Position3>
       <Position4>
-        <Filename Value="systables.pas"/>
-        <Caret Line="573" Column="23" TopLine="556"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="1794" Column="14" TopLine="1790"/>
       </Position4>
       <Position5>
-        <Filename Value="systables.pas"/>
-        <Caret Line="50" Column="37" TopLine="49"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="1823" Column="1" TopLine="1802"/>
       </Position5>
       <Position6>
         <Filename Value="main.pas"/>
-        <Caret Line="376" Column="24" TopLine="358"/>
+        <Caret Line="1786" Column="1" TopLine="1784"/>
       </Position6>
       <Position7>
-        <Filename Value="querywindow.pas"/>
-        <Caret Line="249" Column="50" TopLine="233"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="1886" Column="104" TopLine="1880"/>
       </Position7>
       <Position8>
-        <Filename Value="querywindow.pas"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="3410" Column="24" TopLine="3393"/>
       </Position8>
       <Position9>
-        <Filename Value="querywindow.pas"/>
-        <Caret Line="886" Column="35" TopLine="838"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="3302" Column="5" TopLine="3288"/>
       </Position9>
       <Position10>
         <Filename Value="main.pas"/>
-        <Caret Line="342" Column="21" TopLine="340"/>
+        <Caret Line="1461" Column="3" TopLine="1454"/>
       </Position10>
       <Position11>
         <Filename Value="main.pas"/>
-        <Caret Line="1455" Column="3" TopLine="1453"/>
+        <Caret Line="2503" Column="1" TopLine="2487"/>
       </Position11>
       <Position12>
         <Filename Value="main.pas"/>
-        <Caret Line="1467" Column="3" TopLine="1460"/>
+        <Caret Line="2947" Column="14" TopLine="2914"/>
       </Position12>
       <Position13>
         <Filename Value="main.pas"/>
-        <Caret Line="1455" Column="1" TopLine="1453"/>
+        <Caret Line="2949" Column="33" TopLine="2923"/>
       </Position13>
       <Position14>
-        <Filename Value="main.pas"/>
-        <Caret Line="1454" Column="1" TopLine="1452"/>
+        <Filename Value="querywindow.pas"/>
+        <Caret Line="1" Column="1" TopLine="1"/>
       </Position14>
       <Position15>
         <Filename Value="main.pas"/>
-        <Caret Line="1452" Column="1" TopLine="1452"/>
+        <Caret Line="2946" Column="1" TopLine="2928"/>
       </Position15>
       <Position16>
-        <Filename Value="edittable.pas"/>
-        <Caret Line="109" Column="33" TopLine="78"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="2841" Column="1" TopLine="2821"/>
       </Position16>
       <Position17>
         <Filename Value="main.pas"/>
-        <Caret Line="3750" Column="10" TopLine="3714"/>
+        <Caret Line="1562" Column="12" TopLine="1560"/>
       </Position17>
       <Position18>
-        <Filename Value="tablemanage.pas"/>
-        <Caret Line="114" Column="22" TopLine="96"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="1503" Column="22" TopLine="1492"/>
       </Position18>
       <Position19>
-        <Filename Value="tablemanage.pas"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="1503" Column="22" TopLine="1492"/>
       </Position19>
       <Position20>
-        <Filename Value="tablemanage.pas"/>
-        <Caret Line="253" Column="32" TopLine="249"/>
+        <Filename Value="main.pas"/>
+        <Caret Line="1503" Column="1" TopLine="1497"/>
       </Position20>
       <Position21>
-        <Filename Value="main.pas"/>
-        <Caret Line="2422" Column="1" TopLine="2395"/>
+        <Filename Value="viewtrigger.pas"/>
+        <Caret Line="14" Column="23" TopLine="6"/>
       </Position21>
       <Position22>
         <Filename Value="main.pas"/>
-        <Caret Line="1" Column="1" TopLine="1"/>
+        <Caret Line="3049" Column="1" TopLine="3032"/>
       </Position22>
       <Position23>
-        <Filename Value="main.pas"/>
-        <Caret Line="1678" Column="31" TopLine="1643"/>
+        <Filename Value="viewsproc.pas"/>
+        <Caret Line="37" Column="80" TopLine="1"/>
       </Position23>
       <Position24>
-        <Filename Value="main.pas"/>
-        <Caret Line="1700" Column="54" TopLine="1665"/>
+        <Filename Value="viewsproc.pas"/>
+        <Caret Line="39" Column="80" TopLine="1"/>
       </Position24>
       <Position25>
         <Filename Value="main.pas"/>
-        <Caret Line="1794" Column="14" TopLine="1790"/>
+        <Caret Line="3008" Column="1" TopLine="2984"/>
       </Position25>
       <Position26>
-        <Filename Value="main.pas"/>
-        <Caret Line="1823" Column="1" TopLine="1802"/>
+        <Filename Value="udfinfo.pas"/>
+        <Caret Line="6" Column="20" TopLine="1"/>
       </Position26>
       <Position27>
         <Filename Value="main.pas"/>
-        <Caret Line="1786" Column="1" TopLine="1784"/>
+        <Caret Line="3109" Column="1" TopLine="3086"/>
       </Position27>
       <Position28>
-        <Filename Value="tablemanage.pas"/>
-        <Caret Line="253" Column="32" TopLine="249"/>
+        <Filename Value="viewdomain.pas"/>
+        <Caret Line="21" Column="36" TopLine="1"/>
       </Position28>
       <Position29>
-        <Filename Value="main.pas"/>
-        <Caret Line="1886" Column="104" TopLine="1880"/>
+        <Filename Value="viewdomain.pas"/>
+        <Caret Line="22" Column="36" TopLine="1"/>
       </Position29>
       <Position30>
         <Filename Value="main.pas"/>
-        <Caret Line="3410" Column="24" TopLine="3393"/>
+        <Caret Line="2163" Column="69" TopLine="2157"/>
       </Position30>
     </JumpHistory>
   </ProjectOptions>

+ 1 - 1
TurboBird.lpr

@@ -2,7 +2,7 @@
 {  TurboBird: FireBird database administration and management tool          }
 {  Developed by: Motaz Abdel Azeem http://code.sd/                          }
 {  Start development:  5.Dec.2009                                           }
-{  Last updated     : 18.Jan.2012                                           }
+{  Last updated     : 22.Jan.2012                                           }
 {  License          : GPL for GUI, LGPL for Units                           }
 {***************************************************************************}
 

+ 71 - 3
main.pas

@@ -1492,14 +1492,24 @@ var
   ObjType: Integer;
   ObjTypeName: string;
   ObjName: string;
+  ATab: TTabSheet;
 begin
   dbIndex:= tvMain.Selected.Parent.Parent.OverlayIndex;
   UserName:= tvMain.Selected.Text;
   List:= TStringList.Create;
   List.CommaText:= dmSysTables.GetUserObjects(dbIndex, UserName);
+  ATab:= TTabSheet.Create(nil);
+  ATab.Parent:= PageControl1;
   Form:= TfmUserPermissions.Create(nil);
+  Form.Parent:= ATab;
   Form.Caption:= 'Permissions for: ' + UserName;
+  ATab.Caption:= Form.Caption;
+  PageControl1.ActivePage:= ATab;
+  Form.Left:= 0;
+  Form.Top:= 0;
+  Form.Align:= alClient;
   Form.StringGrid1.RowCount:= 1;
+  Form.laObject.Caption:= UserName;
   with Form do
   for i:= 0 to List.Count - 1 do
   begin
@@ -2143,14 +2153,24 @@ var
   DomainSize: Integer;
   ADomainForm: TFmViewDomain;
   DefaultValue: string;
+  ATab: TTabSheet;
 begin
   SelNode:= tvMain.Selected;
   if (SelNode <> nil) and (SelNode.Parent <> nil) then
   begin
     ADomainName:= SelNode.Text;
-    ADomainForm:= TfmViewDomain(FindCusomForm('Domain : ' + ADomainName, TfmViewDomain));
-    if ADomainForm  = nil then
+    //ADomainForm:= TfmViewDomain(FindCusomForm('Domain : ' + ADomainName, TfmViewDomain));
+    //if ADomainForm  = nil then
+    begin
       ADomainForm:= TfmViewDomain.Create(Application);
+      ATab:= TTabSheet.Create(nil);
+      ATab.Parent:= PageControl1;
+      ADomainForm.Parent:= ATab;
+      ADomainForm.Left:= 0;
+      ADomainForm.Top:= 0;
+      ADomainForm.Align:= alClient;
+      PageControl1.ActivePage:= ATab;
+    end;
 
     dmSysTables.GetDomainInfo(SelNode.Parent.Parent.OverlayIndex, ADomainName, DomainType, DomainSize, DefaultValue);
     if Pos('default', LowerCase(DefaultValue)) = 1 then
@@ -2162,6 +2182,7 @@ begin
     with ADomainForm do
     begin
       Caption:= 'Domain : ' + ADomainName;
+      ATab.Caption:= Caption;
       edName.Caption:= ADomainName;
       laType.Caption:= DomainType;
       laSize.Caption:= IntToStr(DomainSize);
@@ -2826,6 +2847,7 @@ var
   AViewName: string;
   ViewBody, Columns: string;
   dbIndex: Integer;
+  ATab: TTabSheet;
 begin
   SelNode:= tvMain.Selected;
   if (SelNode <> nil) and (SelNode.Parent <> nil) then
@@ -2835,13 +2857,21 @@ begin
     AViewName:= SelNode.Text;
 
     // Fill ViewView grid
+    ATab:= TTabSheet.Create(nil);
+    ATab.Parent:= PageControl1;
     fmViewView:= TfmViewView.Create(nil);
+    fmViewView.Parent:= ATab;
+    fmViewView.Left:= 0;
+    fmViewView.Top:= 0;
+    fmViewView.Align:= alClient;
     fmViewView.SynSQLSyn1.TableNames.CommaText:= GetTableNames(dbIndex);
-    fmViewView.Caption:= 'Display View: ' + AViewName;
+    fmViewView.Caption:= 'View DDL: ' + AViewName;
+    ATab.Caption:= fmViewView.Caption;
     fmViewView.edName.Caption:= AViewName;
     GetViewInfo(SelNode.Parent.Parent.OverlayIndex, AViewName, Columns, ViewBody);
     fmViewView.seScript.Lines.Clear;
     fmViewView.seScript.Lines.Text:= 'create view "' + AviewName + '" (' + Columns + ')' + #13#10 + ViewBody;
+    PageControl1.ActivePage:= ATab;
     fmViewView.Show;
   end;
 
@@ -2924,6 +2954,7 @@ var
   Rec: TDatabaseRec;
   AGenName: string;
   dbIndex: Integer;
+  ATab: TTabSheet;
 begin
   SelNode:= tvMain.Selected;
   if (SelNode <> nil) and (SelNode.Parent <> nil) then
@@ -2940,12 +2971,22 @@ begin
 
     // Fill ViewGen form
     fmViewGen:= TfmViewGen.Create(nil);
+    ATab:= TTabSheet.Create(nil);
+    ATab.Parent:= PageControl1;
+    fmViewGen.Parent:= ATab;
+    fmViewGen.Left:= 0;
+    fmViewGen.Top:= 0;
+    fmViewGen.Align:= alClient;
+    PageControl1.ActivePage:= ATab;
+
     with fmViewGen do
     begin
       Caption:= 'Generator : ' + AGenName;
+      ATab.Caption:= Caption;
       edGenName.Caption:= AGenName;
       edValue.Caption:= SQLQuery1.Fields[0].AsString;
     end;
+    ATab.Caption:= fmViewGen.Caption;
     fmViewGen.Show;
   end;
 
@@ -2960,6 +3001,7 @@ var
   SPOwner: string;
   spBody: string;
   dbIndex: Integer;
+  ATab: TTabSheet;
 begin
   SelNode:= tvMain.Selected;
   if (SelNode <> nil) and (SelNode.Parent <> nil) then
@@ -2969,10 +3011,18 @@ begin
     SPBody:= GetStoredProcBody(dbIndex, AProcName, SPOwner);
     // Fill SProc Parameters
     fmViewSProc:= TfmViewSProc.Create(nil);
+    ATab:= TTabSheet.Create(nil);
+    ATab.Parent:= PageControl1;
+    fmViewSProc.Parent:= ATab;
+    fmViewSProc.Left:= 0;
+    fmViewSProc.Top:= 0;
+    fmViewSProc.Align:= alClient;
+    PageControl1.ActivePage:= ATab;
     with fmViewSProc do
     begin
       SynSQLSyn1.TableNames.CommaText:= GetTableNames(dbIndex);
       Caption:= 'StoredProcedure : ' + AProcName;
+      ATab.Caption:= Caption;
       edName.Caption:= AProcName;
       seScript.Lines.Clear;
       seScript.Lines.Add('create procedure ' + AProcName + '(');
@@ -3000,6 +3050,7 @@ var
   BeforeAfter: string;
   OnTable: string;
   TriggerPosition: Integer;
+  ATab: TTabSheet;
 begin
   SelNode:= tvMain.Selected;
   if (SelNode <> nil) and (SelNode.Parent <> nil) then
@@ -3010,9 +3061,17 @@ begin
 
     // Fill ViewTrigger form
     fmViewTrigger:= TfmViewTrigger.Create(nil);
+    ATab:= TTabSheet.Create(nil);
+    ATab.Parent:= PageControl1;
+    fmViewTrigger.Parent:= ATab;
+    fmViewTrigger.Left:= 0;
+    fmViewTrigger.Top:= 0;
+    fmViewTrigger.Align:= alClient;
+    PageControl1.ActivePage:= ATab;
     with fmViewTrigger do
     begin
       Caption:= 'Trigger : ' + ATriggerName;
+      ATab.Caption:= Caption;
       edName.Caption:= ATriggerName;
       edOnTable.Caption:= OnTable;
       laEvent.Caption:= Event;
@@ -3043,6 +3102,7 @@ var
   AFuncName: string;
   ModuleName, EntryPoint: string;
   Params: string;
+  ATab: TTabSheet;
 begin
   SelNode:= tvMain.Selected;
   if (SelNode <> nil) and (SelNode.Parent <> nil) then
@@ -3052,7 +3112,15 @@ begin
     with fmUDFINfo do
     begin
       fmUDFInfo:= TfmUDFInfo.Create(nil);
+      ATab:= TTabSheet.Create(nil);
+      ATab.Parent:= PageControl1;
+      fmUDFInfo.Parent:= ATab;
+      fmUDFInfo.Left:= 0;
+      fmUDFInfo.Top:= 0;
+      fmUDFInfo.Align:= alClient;
+      PageControl1.ActivePage:= ATab;
       Caption:= 'Function : ' + AFuncName;
+      ATab.Caption:= Caption;
       edName.Caption:= AFuncName;
       edModule.Caption:= ModuleName;
       edEntry.Caption:= EntryPoint;

+ 2 - 1
querywindow.pas

@@ -827,7 +827,8 @@ end;
 
 procedure TfmQueryWindow.lmCloseTabClick(Sender: TObject);
 begin
-  if MessageDlg('Do you want to close this query window?', mtCustom, [mbNo,mbyes], 0) = mryes then
+  if (Trim(meQuery.Lines.Text) = '') or
+    (MessageDlg('Do you want to close this query window?', mtConfirmation, [mbNo, mbYes], 0) = mrYes) then
   begin
     Close;
     Parent.Free;

+ 13 - 0
udfinfo.lfm

@@ -95,4 +95,17 @@ object fmUDFInfo: TfmUDFInfo
     TabOrder = 3
     Text = 'edGenName'
   end
+  object bbClose: TBitBtn
+    Left = 462
+    Height = 24
+    Top = 4
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 4
+  end
 end

+ 5 - 1
udfinfo.lrs

@@ -24,5 +24,9 @@ LazarusResources.Add('TfmUDFInfo','FORMDATA',[
   +'r'#2#2#4'Text'#6#8'edModule'#0#0#5'TEdit'#7'edEntry'#4'Left'#2'x'#6'Height'
   +#2#21#3'Top'#2'H'#5'Width'#3#0#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
   +#0#10'AutoSelect'#8#11'BorderStyle'#7#6'bsNone'#10'Font.Color'#7#6'clNavy'#10
-  +'ParentFont'#8#8'ReadOnly'#9#8'TabOrder'#2#3#4'Text'#6#9'edGenName'#0#0#0
+  +'ParentFont'#8#8'ReadOnly'#9#8'TabOrder'#2#3#4'Text'#6#9'edGenName'#0#0#7'TB'
+  +'itBtn'#7'bbClose'#4'Left'#3#206#1#6'Height'#2#24#3'Top'#2#4#5'Width'#2#27#7
+  +'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#4' X  '#5'Color'#4#219#242
+  +#247#0#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#12'bbCloseClick'#10'Parent'
+  +'Font'#8#8'TabOrder'#2#4#0#0#0
 ]);

+ 9 - 1
udfinfo.pas

@@ -6,13 +6,14 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls;
+  StdCtrls, Buttons;
 
 type
 
   { TfmUDFInfo }
 
   TfmUDFInfo = class(TForm)
+    bbClose: TBitBtn;
     edModule: TEdit;
     edEntry: TEdit;
     edName: TEdit;
@@ -21,6 +22,7 @@ type
     Label3: TLabel;
     Label7: TLabel;
     meBody: TMemo;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -40,6 +42,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmUDFInfo.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free;
+end;
+
 initialization
   {$I udfinfo.lrs}
 

+ 40 - 6
userpermissions.lfm

@@ -1,7 +1,7 @@
 object fmUserPermissions: TfmUserPermissions
-  Left = 578
+  Left = 580
   Height = 363
-  Top = 203
+  Top = 205
   Width = 500
   ActiveControl = StringGrid1
   Caption = 'fmUserPermissions'
@@ -12,22 +12,25 @@ object fmUserPermissions: TfmUserPermissions
   LCLVersion = '0.9.31'
   object StringGrid1: TStringGrid
     Left = 0
-    Height = 368
-    Top = 1
-    Width = 501
-    Anchors = [akTop, akLeft, akRight, akBottom]
+    Height = 331
+    Top = 31
+    Width = 477
+    Anchors = [akTop, akLeft, akBottom]
     ColCount = 3
     Columns = <    
       item
         Title.Caption = 'Obj Type'
+        Title.PrefixOption = poNone
         Width = 100
       end    
       item
         Title.Caption = 'Object'
+        Title.PrefixOption = poNone
         Width = 200
       end    
       item
         Title.Caption = 'Permission'
+        Title.PrefixOption = poNone
         Width = 200
       end>
     FixedColor = 14539471
@@ -37,4 +40,35 @@ object fmUserPermissions: TfmUserPermissions
     TabOrder = 0
     UseXORFeatures = True
   end
+  object bbClose: TBitBtn
+    Left = 474
+    Height = 24
+    Top = 1
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 1
+  end
+  object Label1: TLabel
+    Left = 8
+    Height = 18
+    Top = 12
+    Width = 46
+    Caption = 'Object'
+    ParentColor = False
+  end
+  object laObject: TLabel
+    Left = 62
+    Height = 18
+    Top = 11
+    Width = 62
+    Caption = 'laObject'
+    Font.Style = [fsBold]
+    ParentColor = False
+    ParentFont = False
+  end
 end

+ 18 - 9
userpermissions.lrs

@@ -1,16 +1,25 @@
 { This is an automatically generated lazarus resource file }
 
 LazarusResources.Add('TfmUserPermissions','FORMDATA',[
-  'TPF0'#18'TfmUserPermissions'#17'fmUserPermissions'#4'Left'#3'B'#2#6'Height'#3
-  +'k'#1#3'Top'#3#203#0#5'Width'#3#244#1#13'ActiveControl'#7#11'StringGrid1'#7
+  'TPF0'#18'TfmUserPermissions'#17'fmUserPermissions'#4'Left'#3'D'#2#6'Height'#3
+  +'k'#1#3'Top'#3#205#0#5'Width'#3#244#1#13'ActiveControl'#7#11'StringGrid1'#7
   +'Caption'#6#17'fmUserPermissions'#12'ClientHeight'#3'k'#1#11'ClientWidth'#3
   +#244#1#7'OnClose'#7#9'FormClose'#8'Position'#7#14'poScreenCenter'#10'LCLVers'
   +'ion'#6#6'0.9.31'#0#11'TStringGrid'#11'StringGrid1'#4'Left'#2#0#6'Height'#3
-  +'p'#1#3'Top'#2#1#5'Width'#3#245#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'
-  +#8'akBottom'#0#8'ColCount'#2#3#7'Columns'#14#1#13'Title.Caption'#6#8'Obj Typ'
-  +'e'#5'Width'#2'd'#0#1#13'Title.Caption'#6#6'Object'#5'Width'#3#200#0#0#1#13
-  +'Title.Caption'#6#10'Permission'#5'Width'#3#200#0#0#0#10'FixedColor'#4#207
-  +#218#221#0#9'FixedCols'#2#0#4'Flat'#9#7'Options'#11#15'goFixedVertLine'#15'g'
-  +'oFixedHorzLine'#10'goVertLine'#10'goHorzLine'#11'goColSizing'#11'goRowSelec'
-  +'t'#14'goSmoothScroll'#0#8'TabOrder'#2#0#14'UseXORFeatures'#9#0#0#0
+  +'K'#1#3'Top'#2#31#5'Width'#3#221#1#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBott'
+  +'om'#0#8'ColCount'#2#3#7'Columns'#14#1#13'Title.Caption'#6#8'Obj Type'#18'Ti'
+  +'tle.PrefixOption'#7#6'poNone'#5'Width'#2'd'#0#1#13'Title.Caption'#6#6'Objec'
+  +'t'#18'Title.PrefixOption'#7#6'poNone'#5'Width'#3#200#0#0#1#13'Title.Caption'
+  +#6#10'Permission'#18'Title.PrefixOption'#7#6'poNone'#5'Width'#3#200#0#0#0#10
+  +'FixedColor'#4#207#218#221#0#9'FixedCols'#2#0#4'Flat'#9#7'Options'#11#15'goF'
+  +'ixedVertLine'#15'goFixedHorzLine'#10'goVertLine'#10'goHorzLine'#11'goColSiz'
+  +'ing'#11'goRowSelect'#14'goSmoothScroll'#0#8'TabOrder'#2#0#14'UseXORFeatures'
+  +#9#0#0#7'TBitBtn'#7'bbClose'#4'Left'#3#218#1#6'Height'#2#24#3'Top'#2#1#5'Wid'
+  +'th'#2#27#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#4' X  '#5'Color'#4
+  +#219#242#247#0#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#12'bbCloseClick'#10
+  +'ParentFont'#8#8'TabOrder'#2#1#0#0#6'TLabel'#6'Label1'#4'Left'#2#8#6'Height'
+  +#2#18#3'Top'#2#12#5'Width'#2'.'#7'Caption'#6#6'Object'#11'ParentColor'#8#0#0
+  +#6'TLabel'#8'laObject'#4'Left'#2'>'#6'Height'#2#18#3'Top'#2#11#5'Width'#2'>'
+  +#7'Caption'#6#8'laObject'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#10
+  +'ParentFont'#8#0#0#0
 ]);

+ 11 - 1
userpermissions.pas

@@ -6,14 +6,18 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  Grids;
+  Grids, Buttons, StdCtrls;
 
 type
 
   { TfmUserPermissions }
 
   TfmUserPermissions = class(TForm)
+    bbClose: TBitBtn;
+    Label1: TLabel;
+    laObject: TLabel;
     StringGrid1: TStringGrid;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -34,6 +38,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmUserPermissions.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free;
+end;
+
 initialization
   {$I userpermissions.lrs}
 

+ 13 - 0
viewdomain.lfm

@@ -87,4 +87,17 @@ object fmViewDomain: TfmViewDomain
     TabOrder = 0
     Text = 'edGenName'
   end
+  object bbClose: TBitBtn
+    Left = 590
+    Height = 24
+    Top = 0
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 1
+  end
 end

+ 4 - 1
viewdomain.lrs

@@ -22,5 +22,8 @@ LazarusResources.Add('TfmViewDomain','FORMDATA',[
   +'ParentColor'#8#10'ParentFont'#8#0#0#5'TEdit'#6'edName'#4'Left'#2'x'#6'Heigh'
   +'t'#2#21#3'Top'#2#16#5'Width'#3'2'#1#10'AutoSelect'#8#11'BorderStyle'#7#6'bs'
   +'None'#10'Font.Color'#7#6'clNavy'#10'ParentFont'#8#8'ReadOnly'#9#8'TabOrder'
-  +#2#0#4'Text'#6#9'edGenName'#0#0#0
+  +#2#0#4'Text'#6#9'edGenName'#0#0#7'TBitBtn'#7'bbClose'#4'Left'#3'N'#2#6'Heigh'
+  +'t'#2#24#3'Top'#2#0#5'Width'#2#27#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Capt'
+  +'ion'#6#4' X  '#5'Color'#4#219#242#247#0#10'Font.Style'#11#6'fsBold'#0#7'OnC'
+  +'lick'#7#12'bbCloseClick'#10'ParentFont'#8#8'TabOrder'#2#1#0#0#0
 ]);

+ 9 - 1
viewdomain.pas

@@ -6,13 +6,14 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls;
+  StdCtrls, Buttons;
 
 type
 
   { TfmViewDomain }
 
   TfmViewDomain = class(TForm)
+    bbClose: TBitBtn;
     edName: TEdit;
     Label1: TLabel;
     Label3: TLabel;
@@ -21,6 +22,7 @@ type
     laDefault: TLabel;
     laType: TLabel;
     laSize: TLabel;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -40,6 +42,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmViewDomain.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free;
+end;
+
 initialization
   {$I viewdomain.lrs}
 

+ 18 - 5
viewgen.lfm

@@ -2,10 +2,10 @@ object fmViewGen: TfmViewGen
   Left = 362
   Height = 85
   Top = 201
-  Width = 400
+  Width = 615
   Caption = 'fmViewGen'
   ClientHeight = 85
-  ClientWidth = 400
+  ClientWidth = 615
   OnClose = FormClose
   Position = poScreenCenter
   LCLVersion = '0.9.31'
@@ -27,9 +27,9 @@ object fmViewGen: TfmViewGen
   end
   object edGenName: TEdit
     Left = 120
-    Height = 27
+    Height = 21
     Top = 8
-    Width = 256
+    Width = 207
     Anchors = [akTop, akLeft, akRight]
     AutoSelect = False
     BorderStyle = bsNone
@@ -41,7 +41,7 @@ object fmViewGen: TfmViewGen
   end
   object edValue: TEdit
     Left = 120
-    Height = 27
+    Height = 21
     Top = 40
     Width = 144
     AutoSelect = False
@@ -52,4 +52,17 @@ object fmViewGen: TfmViewGen
     TabOrder = 1
     Text = 'edGenName'
   end
+  object bbClose: TBitBtn
+    Left = 588
+    Height = 24
+    Top = 4
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 2
+  end
 end

+ 12 - 9
viewgen.lrs

@@ -2,17 +2,20 @@
 
 LazarusResources.Add('TfmViewGen','FORMDATA',[
   'TPF0'#10'TfmViewGen'#9'fmViewGen'#4'Left'#3'j'#1#6'Height'#2'U'#3'Top'#3#201
-  +#0#5'Width'#3#144#1#7'Caption'#6#9'fmViewGen'#12'ClientHeight'#2'U'#11'Clien'
-  +'tWidth'#3#144#1#7'OnClose'#7#9'FormClose'#8'Position'#7#14'poScreenCenter'
-  +#10'LCLVersion'#6#6'0.9.31'#0#6'TLabel'#6'Label1'#4'Left'#2#11#6'Height'#2#18
-  +#3'Top'#2#15#5'Width'#2'F'#7'Caption'#6#9'Generator'#11'ParentColor'#8#0#0#6
-  +'TLabel'#6'Label3'#4'Left'#2#11#6'Height'#2#18#3'Top'#2'0'#5'Width'#2']'#7'C'
-  +'aption'#6#13'Current Value'#11'ParentColor'#8#0#0#5'TEdit'#9'edGenName'#4'L'
-  +'eft'#2'x'#6'Height'#2#27#3'Top'#2#8#5'Width'#3#0#1#7'Anchors'#11#5'akTop'#6
+  +#0#5'Width'#3'g'#2#7'Caption'#6#9'fmViewGen'#12'ClientHeight'#2'U'#11'Client'
+  +'Width'#3'g'#2#7'OnClose'#7#9'FormClose'#8'Position'#7#14'poScreenCenter'#10
+  +'LCLVersion'#6#6'0.9.31'#0#6'TLabel'#6'Label1'#4'Left'#2#11#6'Height'#2#18#3
+  +'Top'#2#15#5'Width'#2'F'#7'Caption'#6#9'Generator'#11'ParentColor'#8#0#0#6'T'
+  +'Label'#6'Label3'#4'Left'#2#11#6'Height'#2#18#3'Top'#2'0'#5'Width'#2']'#7'Ca'
+  +'ption'#6#13'Current Value'#11'ParentColor'#8#0#0#5'TEdit'#9'edGenName'#4'Le'
+  +'ft'#2'x'#6'Height'#2#21#3'Top'#2#8#5'Width'#3#207#0#7'Anchors'#11#5'akTop'#6
   +'akLeft'#7'akRight'#0#10'AutoSelect'#8#11'BorderStyle'#7#6'bsNone'#10'Font.C'
   +'olor'#7#6'clNavy'#10'ParentFont'#8#8'ReadOnly'#9#8'TabOrder'#2#0#4'Text'#6#9
-  +'edGenName'#0#0#5'TEdit'#7'edValue'#4'Left'#2'x'#6'Height'#2#27#3'Top'#2'('#5
+  +'edGenName'#0#0#5'TEdit'#7'edValue'#4'Left'#2'x'#6'Height'#2#21#3'Top'#2'('#5
   +'Width'#3#144#0#10'AutoSelect'#8#11'BorderStyle'#7#6'bsNone'#10'Font.Color'#7
   +#6'clNavy'#10'ParentFont'#8#8'ReadOnly'#9#8'TabOrder'#2#1#4'Text'#6#9'edGenN'
-  +'ame'#0#0#0
+  +'ame'#0#0#7'TBitBtn'#7'bbClose'#4'Left'#3'L'#2#6'Height'#2#24#3'Top'#2#4#5'W'
+  +'idth'#2#27#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#4' X  '#5'Color'
+  +#4#219#242#247#0#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#12'bbCloseClick'
+  +#10'ParentFont'#8#8'TabOrder'#2#2#0#0#0
 ]);

+ 9 - 1
viewgen.pas

@@ -6,17 +6,19 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls;
+  StdCtrls, Buttons;
 
 type
 
   { TfmViewGen }
 
   TfmViewGen = class(TForm)
+    bbClose: TBitBtn;
     edGenName: TEdit;
     edValue: TEdit;
     Label1: TLabel;
     Label3: TLabel;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -36,6 +38,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmViewGen.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free
+end;
+
 initialization
   {$I viewgen.lrs}
 

+ 13 - 0
viewsproc.lfm

@@ -683,6 +683,19 @@ object fmViewSProc: TfmViewSProc
     TabOrder = 2
     Text = 'edGenName'
   end
+  object bbClose: TBitBtn
+    Left = 503
+    Height = 24
+    Top = 3
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 3
+  end
   object SynSQLSyn1: TSynSQLSyn
     DefaultFilter = 'SQL Files (*.sql)|*.sql'
     Enabled = False

+ 19 - 16
viewsproc.lrs

@@ -137,20 +137,23 @@ LazarusResources.Add('TfmViewSProc','FORMDATA',[
   +'der'#2#1#4'Text'#6#9'edGenName'#0#0#5'TEdit'#7'edOwner'#4'Left'#3#144#0#6'H'
   +'eight'#2#21#3'Top'#2'0'#5'Width'#3#168#0#10'AutoSelect'#8#11'BorderStyle'#7
   +#6'bsNone'#10'Font.Color'#7#6'clNavy'#10'ParentFont'#8#8'ReadOnly'#9#8'TabOr'
-  +'der'#2#2#4'Text'#6#9'edGenName'#0#0#10'TSynSQLSyn'#10'SynSQLSyn1'#13'Defaul'
-  +'tFilter'#6#23'SQL Files (*.sql)|*.sql'#7'Enabled'#8#23'CommentAttri.Foregro'
-  +'und'#7#6'clTeal'#23'CommentAttri.FrameEdges'#7#9'sfeAround'#24'DataTypeAttr'
-  +'i.FrameEdges'#7#9'sfeAround'#30'DefaultPackageAttri.FrameEdges'#7#9'sfeArou'
-  +'nd'#25'ExceptionAttri.FrameEdges'#7#9'sfeAround'#24'FunctionAttri.FrameEdge'
-  +'s'#7#9'sfeAround'#26'IdentifierAttri.Foreground'#4'1'#26#255#0#26'Identifie'
-  +'rAttri.FrameEdges'#7#9'sfeAround'#19'KeyAttri.FrameEdges'#7#9'sfeAround'#22
-  +'NumberAttri.Foreground'#7#9'clMedGray'#22'NumberAttri.FrameEdges'#7#9'sfeAr'
-  +'ound'#21'PLSQLAttri.FrameEdges'#7#9'sfeAround'#21'SpaceAttri.FrameEdges'#7#9
-  +'sfeAround'#23'SQLPlusAttri.FrameEdges'#7#9'sfeAround'#22'StringAttri.Foregr'
-  +'ound'#4#161#16#16#0#22'StringAttri.FrameEdges'#7#9'sfeAround'#22'SymbolAttr'
-  +'i.Foreground'#4'b'#8#8#0#22'SymbolAttri.FrameEdges'#7#9'sfeAround'#25'Table'
-  +'NameAttri.Foreground'#7#6'clNavy'#25'TableNameAttri.FrameEdges'#7#9'sfeArou'
-  +'nd'#20'TableNameAttri.Style'#11#6'fsBold'#0#24'VariableAttri.FrameEdges'#7#9
-  +'sfeAround'#10'SQLDialect'#7#9'sqlSybase'#4'left'#3#168#1#3'top'#3#228#0#0#0
-  +#0
+  +'der'#2#2#4'Text'#6#9'edGenName'#0#0#7'TBitBtn'#7'bbClose'#4'Left'#3#247#1#6
+  +'Height'#2#24#3'Top'#2#3#5'Width'#2#27#7'Anchors'#11#5'akTop'#7'akRight'#0#7
+  +'Caption'#6#4' X  '#5'Color'#4#219#242#247#0#10'Font.Style'#11#6'fsBold'#0#7
+  +'OnClick'#7#12'bbCloseClick'#10'ParentFont'#8#8'TabOrder'#2#3#0#0#10'TSynSQL'
+  +'Syn'#10'SynSQLSyn1'#13'DefaultFilter'#6#23'SQL Files (*.sql)|*.sql'#7'Enabl'
+  +'ed'#8#23'CommentAttri.Foreground'#7#6'clTeal'#23'CommentAttri.FrameEdges'#7
+  +#9'sfeAround'#24'DataTypeAttri.FrameEdges'#7#9'sfeAround'#30'DefaultPackageA'
+  +'ttri.FrameEdges'#7#9'sfeAround'#25'ExceptionAttri.FrameEdges'#7#9'sfeAround'
+  +#24'FunctionAttri.FrameEdges'#7#9'sfeAround'#26'IdentifierAttri.Foreground'#4
+  +'1'#26#255#0#26'IdentifierAttri.FrameEdges'#7#9'sfeAround'#19'KeyAttri.Frame'
+  +'Edges'#7#9'sfeAround'#22'NumberAttri.Foreground'#7#9'clMedGray'#22'NumberAt'
+  +'tri.FrameEdges'#7#9'sfeAround'#21'PLSQLAttri.FrameEdges'#7#9'sfeAround'#21
+  +'SpaceAttri.FrameEdges'#7#9'sfeAround'#23'SQLPlusAttri.FrameEdges'#7#9'sfeAr'
+  +'ound'#22'StringAttri.Foreground'#4#161#16#16#0#22'StringAttri.FrameEdges'#7
+  +#9'sfeAround'#22'SymbolAttri.Foreground'#4'b'#8#8#0#22'SymbolAttri.FrameEdge'
+  +'s'#7#9'sfeAround'#25'TableNameAttri.Foreground'#7#6'clNavy'#25'TableNameAtt'
+  +'ri.FrameEdges'#7#9'sfeAround'#20'TableNameAttri.Style'#11#6'fsBold'#0#24'Va'
+  +'riableAttri.FrameEdges'#7#9'sfeAround'#10'SQLDialect'#7#9'sqlSybase'#4'left'
+  +#3#168#1#3'top'#3#228#0#0#0#0
 ]);

+ 9 - 1
viewsproc.pas

@@ -6,13 +6,14 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls, SynEdit, SynHighlighterSQL;
+  StdCtrls, Buttons, SynEdit, SynHighlighterSQL;
 
 type
 
   { TfmViewSProc }
 
   TfmViewSProc = class(TForm)
+    bbClose: TBitBtn;
     edName: TEdit;
     edOwner: TEdit;
     Label1: TLabel;
@@ -20,6 +21,7 @@ type
     Label3: TLabel;
     seScript: TSynEdit;
     SynSQLSyn1: TSynSQLSyn;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -39,6 +41,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmViewSProc.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free;
+end;
+
 initialization
   {$I viewsproc.lrs}
 

+ 16 - 3
viewtrigger.lfm

@@ -2,10 +2,10 @@ object fmViewTrigger: TfmViewTrigger
   Left = 362
   Height = 300
   Top = 201
-  Width = 601
+  Width = 667
   Caption = 'fmViewTrigger'
   ClientHeight = 300
-  ClientWidth = 601
+  ClientWidth = 667
   OnClose = FormClose
   Position = poScreenCenter
   LCLVersion = '0.9.31'
@@ -110,7 +110,7 @@ object fmViewTrigger: TfmViewTrigger
     Left = 11
     Height = 168
     Top = 120
-    Width = 569
+    Width = 635
     Anchors = [akTop, akLeft, akRight, akBottom]
     Font.Height = -13
     Font.Name = 'Courier New'
@@ -756,6 +756,19 @@ object fmViewTrigger: TfmViewTrigger
     TabOrder = 2
     Text = 'edGenName'
   end
+  object bbClose: TBitBtn
+    Left = 638
+    Height = 24
+    Top = 3
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 3
+  end
   object SynSQLSyn1: TSynSQLSyn
     DefaultFilter = 'SQL Files (*.sql)|*.sql'
     Enabled = False

+ 25 - 22
viewtrigger.lrs

@@ -2,11 +2,11 @@
 
 LazarusResources.Add('TfmViewTrigger','FORMDATA',[
   'TPF0'#14'TfmViewTrigger'#13'fmViewTrigger'#4'Left'#3'j'#1#6'Height'#3','#1#3
-  +'Top'#3#201#0#5'Width'#3'Y'#2#7'Caption'#6#13'fmViewTrigger'#12'ClientHeight'
-  +#3','#1#11'ClientWidth'#3'Y'#2#7'OnClose'#7#9'FormClose'#8'Position'#7#14'po'
-  +'ScreenCenter'#10'LCLVersion'#6#6'0.9.31'#0#6'TLabel'#6'Label1'#4'Left'#2#11
-  +#6'Height'#2#18#3'Top'#2#15#5'Width'#2'['#7'Caption'#6#12'Trigger Name'#11'P'
-  +'arentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#11#6'Height'#2#18#3'Top'#2
+  +'Top'#3#201#0#5'Width'#3#155#2#7'Caption'#6#13'fmViewTrigger'#12'ClientHeigh'
+  +'t'#3','#1#11'ClientWidth'#3#155#2#7'OnClose'#7#9'FormClose'#8'Position'#7#14
+  +'poScreenCenter'#10'LCLVersion'#6#6'0.9.31'#0#6'TLabel'#6'Label1'#4'Left'#2
+  +#11#6'Height'#2#18#3'Top'#2#15#5'Width'#2'['#7'Caption'#6#12'Trigger Name'#11
+  +'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#11#6'Height'#2#18#3'Top'#2
   +'`'#5'Width'#2'#'#7'Caption'#6#4'Body'#11'ParentColor'#8#0#0#6'TLabel'#6'Lab'
   +'el3'#4'Left'#2#11#6'Height'#2#18#3'Top'#2'*'#5'Width'#2';'#7'Caption'#6#8'O'
   +'n Table'#11'ParentColor'#8#0#0#6'TLabel'#6'Label4'#4'Left'#3#141#1#6'Height'
@@ -26,7 +26,7 @@ LazarusResources.Add('TfmViewTrigger','FORMDATA',[
   +'tColor'#8#0#0#6'TLabel'#5'laPos'#4'Left'#2'j'#6'Height'#2#18#3'Top'#2'H'#5
   +'Width'#2'd'#7'Caption'#6#13'laTriggerName'#10'Font.Color'#4'))'#156#0#11'Pa'
   +'rentColor'#8#10'ParentFont'#8#0#0#244#8'TSynEdit'#8'seScript'#4'Left'#2#11#6
-  +'Height'#3#168#0#3'Top'#2'x'#5'Width'#3'9'#2#7'Anchors'#11#5'akTop'#6'akLeft'
+  +'Height'#3#168#0#3'Top'#2'x'#5'Width'#3'{'#2#7'Anchors'#11#5'akTop'#6'akLeft'
   +#7'akRight'#8'akBottom'#0#11'Font.Height'#2#243#9'Font.Name'#6#11'Courier Ne'
   +'w'#10'Font.Pitch'#7#7'fpFixed'#12'Font.Quality'#7#16'fqNonAntialiased'#11'P'
   +'arentColor'#8#10'ParentFont'#8#8'TabOrder'#2#0#12'Gutter.Color'#4#249#242
@@ -153,20 +153,23 @@ LazarusResources.Add('TfmViewTrigger','FORMDATA',[
   +'ly'#9#8'TabOrder'#2#1#4'Text'#6#9'edGenName'#0#0#5'TEdit'#9'edOnTable'#4'Le'
   +'ft'#2'j'#6'Height'#2#21#3'Top'#2'*'#5'Width'#3#214#0#10'AutoSelect'#8#11'Bo'
   +'rderStyle'#7#6'bsNone'#10'Font.Color'#7#6'clNavy'#10'ParentFont'#8#8'ReadOn'
-  +'ly'#9#8'TabOrder'#2#2#4'Text'#6#9'edGenName'#0#0#10'TSynSQLSyn'#10'SynSQLSy'
-  +'n1'#13'DefaultFilter'#6#23'SQL Files (*.sql)|*.sql'#7'Enabled'#8#23'Comment'
-  +'Attri.Foreground'#7#6'clTeal'#23'CommentAttri.FrameEdges'#7#9'sfeAround'#24
-  +'DataTypeAttri.FrameEdges'#7#9'sfeAround'#30'DefaultPackageAttri.FrameEdges'
-  +#7#9'sfeAround'#25'ExceptionAttri.FrameEdges'#7#9'sfeAround'#24'FunctionAttr'
-  +'i.FrameEdges'#7#9'sfeAround'#26'IdentifierAttri.Foreground'#4'1'#26#255#0#26
-  +'IdentifierAttri.FrameEdges'#7#9'sfeAround'#19'KeyAttri.FrameEdges'#7#9'sfeA'
-  +'round'#22'NumberAttri.Foreground'#7#9'clMedGray'#22'NumberAttri.FrameEdges'
-  +#7#9'sfeAround'#21'PLSQLAttri.FrameEdges'#7#9'sfeAround'#21'SpaceAttri.Frame'
-  +'Edges'#7#9'sfeAround'#23'SQLPlusAttri.FrameEdges'#7#9'sfeAround'#22'StringA'
-  +'ttri.Foreground'#4#161#16#16#0#22'StringAttri.FrameEdges'#7#9'sfeAround'#22
-  +'SymbolAttri.Foreground'#4'b'#8#8#0#22'SymbolAttri.FrameEdges'#7#9'sfeAround'
-  +#25'TableNameAttri.Foreground'#7#6'clNavy'#25'TableNameAttri.FrameEdges'#7#9
-  +'sfeAround'#20'TableNameAttri.Style'#11#6'fsBold'#0#24'VariableAttri.FrameEd'
-  +'ges'#7#9'sfeAround'#10'SQLDialect'#7#9'sqlSybase'#4'left'#3#136#1#3'top'#3
-  +#168#0#0#0#0
+  +'ly'#9#8'TabOrder'#2#2#4'Text'#6#9'edGenName'#0#0#7'TBitBtn'#7'bbClose'#4'Le'
+  +'ft'#3'~'#2#6'Height'#2#24#3'Top'#2#3#5'Width'#2#27#7'Anchors'#11#5'akTop'#7
+  +'akRight'#0#7'Caption'#6#4' X  '#5'Color'#4#219#242#247#0#10'Font.Style'#11#6
+  +'fsBold'#0#7'OnClick'#7#12'bbCloseClick'#10'ParentFont'#8#8'TabOrder'#2#3#0#0
+  +#10'TSynSQLSyn'#10'SynSQLSyn1'#13'DefaultFilter'#6#23'SQL Files (*.sql)|*.sq'
+  +'l'#7'Enabled'#8#23'CommentAttri.Foreground'#7#6'clTeal'#23'CommentAttri.Fra'
+  +'meEdges'#7#9'sfeAround'#24'DataTypeAttri.FrameEdges'#7#9'sfeAround'#30'Defa'
+  +'ultPackageAttri.FrameEdges'#7#9'sfeAround'#25'ExceptionAttri.FrameEdges'#7#9
+  +'sfeAround'#24'FunctionAttri.FrameEdges'#7#9'sfeAround'#26'IdentifierAttri.F'
+  +'oreground'#4'1'#26#255#0#26'IdentifierAttri.FrameEdges'#7#9'sfeAround'#19'K'
+  +'eyAttri.FrameEdges'#7#9'sfeAround'#22'NumberAttri.Foreground'#7#9'clMedGray'
+  +#22'NumberAttri.FrameEdges'#7#9'sfeAround'#21'PLSQLAttri.FrameEdges'#7#9'sfe'
+  +'Around'#21'SpaceAttri.FrameEdges'#7#9'sfeAround'#23'SQLPlusAttri.FrameEdges'
+  +#7#9'sfeAround'#22'StringAttri.Foreground'#4#161#16#16#0#22'StringAttri.Fram'
+  +'eEdges'#7#9'sfeAround'#22'SymbolAttri.Foreground'#4'b'#8#8#0#22'SymbolAttri'
+  +'.FrameEdges'#7#9'sfeAround'#25'TableNameAttri.Foreground'#7#6'clNavy'#25'Ta'
+  +'bleNameAttri.FrameEdges'#7#9'sfeAround'#20'TableNameAttri.Style'#11#6'fsBol'
+  +'d'#0#24'VariableAttri.FrameEdges'#7#9'sfeAround'#10'SQLDialect'#7#9'sqlSyba'
+  +'se'#4'left'#3#136#1#3'top'#3#168#0#0#0#0
 ]);

+ 9 - 1
viewtrigger.pas

@@ -6,13 +6,14 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls, SynEdit, SynHighlighterSQL;
+  StdCtrls, Buttons, SynEdit, SynHighlighterSQL;
 
 type
 
   { TfmViewTrigger }
 
   TfmViewTrigger = class(TForm)
+    bbClose: TBitBtn;
     edName: TEdit;
     edOnTable: TEdit;
     Label1: TLabel;
@@ -28,6 +29,7 @@ type
     laEnabled: TLabel;
     seScript: TSynEdit;
     SynSQLSyn1: TSynSQLSyn;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -47,6 +49,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmViewTrigger.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free;
+end;
+
 initialization
   {$I viewtrigger.lrs}
 

+ 16 - 3
viewview.lfm

@@ -2,11 +2,11 @@ object fmViewView: TfmViewView
   Left = 362
   Height = 300
   Top = 201
-  Width = 400
+  Width = 501
   AlphaBlend = True
   Caption = 'fmViewView'
   ClientHeight = 300
-  ClientWidth = 400
+  ClientWidth = 501
   OnClose = FormClose
   Position = poScreenCenter
   LCLVersion = '0.9.31'
@@ -30,7 +30,7 @@ object fmViewView: TfmViewView
     Left = 8
     Height = 215
     Top = 76
-    Width = 380
+    Width = 481
     Anchors = [akTop, akLeft, akRight, akBottom]
     Font.Height = -13
     Font.Name = 'Courier New'
@@ -663,6 +663,19 @@ object fmViewView: TfmViewView
     TabOrder = 1
     Text = 'edGenName'
   end
+  object bbClose: TBitBtn
+    Left = 474
+    Height = 24
+    Top = 4
+    Width = 27
+    Anchors = [akTop, akRight]
+    Caption = ' X  '
+    Color = 16249563
+    Font.Style = [fsBold]
+    OnClick = bbCloseClick
+    ParentFont = False
+    TabOrder = 2
+  end
   object SynSQLSyn1: TSynSQLSyn
     DefaultFilter = 'SQL Files (*.sql)|*.sql'
     Enabled = False

+ 22 - 18
viewview.lrs

@@ -2,13 +2,13 @@
 
 LazarusResources.Add('TfmViewView','FORMDATA',[
   'TPF0'#11'TfmViewView'#10'fmViewView'#4'Left'#3'j'#1#6'Height'#3','#1#3'Top'#3
-  +#201#0#5'Width'#3#144#1#10'AlphaBlend'#9#7'Caption'#6#10'fmViewView'#12'Clie'
-  +'ntHeight'#3','#1#11'ClientWidth'#3#144#1#7'OnClose'#7#9'FormClose'#8'Positi'
+  +#201#0#5'Width'#3#245#1#10'AlphaBlend'#9#7'Caption'#6#10'fmViewView'#12'Clie'
+  +'ntHeight'#3','#1#11'ClientWidth'#3#245#1#7'OnClose'#7#9'FormClose'#8'Positi'
   +'on'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0.9.31'#0#6'TLabel'#6'Label1'#4
   +'Left'#2#11#6'Height'#2#18#3'Top'#2#15#5'Width'#2'M'#7'Caption'#6#9'View Nam'
   +'e'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#11#6'Height'#2#18#3
   +'Top'#2'0'#5'Width'#2'#'#7'Caption'#6#4'Body'#11'ParentColor'#8#0#0#244#8'TS'
-  +'ynEdit'#8'seScript'#4'Left'#2#8#6'Height'#3#215#0#3'Top'#2'L'#5'Width'#3'|'
+  +'ynEdit'#8'seScript'#4'Left'#2#8#6'Height'#3#215#0#3'Top'#2'L'#5'Width'#3#225
   +#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#11'Font.Height'
   +#2#243#9'Font.Name'#6#11'Courier New'#10'Font.Pitch'#7#7'fpFixed'#12'Font.Qu'
   +'ality'#7#16'fqNonAntialiased'#11'ParentColor'#8#10'ParentFont'#8#8'TabOrder'
@@ -133,19 +133,23 @@ LazarusResources.Add('TfmViewView','FORMDATA',[
   +'ingZeros'#8#0#0#0#0#5'TEdit'#6'edName'#4'Left'#2'h'#6'Height'#2#21#3'Top'#2
   +#12#5'Width'#3#24#1#10'AutoSelect'#8#11'BorderStyle'#7#6'bsNone'#10'Font.Col'
   +'or'#7#6'clNavy'#10'ParentFont'#8#8'ReadOnly'#9#8'TabOrder'#2#1#4'Text'#6#9
-  +'edGenName'#0#0#10'TSynSQLSyn'#10'SynSQLSyn1'#13'DefaultFilter'#6#23'SQL Fil'
-  +'es (*.sql)|*.sql'#7'Enabled'#8#23'CommentAttri.Foreground'#7#6'clTeal'#23'C'
-  +'ommentAttri.FrameEdges'#7#9'sfeAround'#24'DataTypeAttri.FrameEdges'#7#9'sfe'
-  +'Around'#30'DefaultPackageAttri.FrameEdges'#7#9'sfeAround'#25'ExceptionAttri'
-  +'.FrameEdges'#7#9'sfeAround'#24'FunctionAttri.FrameEdges'#7#9'sfeAround'#26
-  +'IdentifierAttri.Foreground'#4'1'#26#255#0#26'IdentifierAttri.FrameEdges'#7#9
-  +'sfeAround'#19'KeyAttri.FrameEdges'#7#9'sfeAround'#22'NumberAttri.Foreground'
-  +#7#9'clMedGray'#22'NumberAttri.FrameEdges'#7#9'sfeAround'#21'PLSQLAttri.Fram'
-  +'eEdges'#7#9'sfeAround'#21'SpaceAttri.FrameEdges'#7#9'sfeAround'#23'SQLPlusA'
-  +'ttri.FrameEdges'#7#9'sfeAround'#22'StringAttri.Foreground'#4#161#16#16#0#22
-  +'StringAttri.FrameEdges'#7#9'sfeAround'#22'SymbolAttri.Foreground'#4'b'#8#8#0
-  +#22'SymbolAttri.FrameEdges'#7#9'sfeAround'#25'TableNameAttri.Foreground'#7#6
-  +'clNavy'#25'TableNameAttri.FrameEdges'#7#9'sfeAround'#20'TableNameAttri.Styl'
-  +'e'#11#6'fsBold'#0#24'VariableAttri.FrameEdges'#7#9'sfeAround'#10'SQLDialect'
-  +#7#9'sqlSybase'#4'left'#3#253#0#3'top'#3#152#0#0#0#0
+  +'edGenName'#0#0#7'TBitBtn'#7'bbClose'#4'Left'#3#218#1#6'Height'#2#24#3'Top'#2
+  +#4#5'Width'#2#27#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Caption'#6#4' X  '#5
+  +'Color'#4#219#242#247#0#10'Font.Style'#11#6'fsBold'#0#7'OnClick'#7#12'bbClos'
+  +'eClick'#10'ParentFont'#8#8'TabOrder'#2#2#0#0#10'TSynSQLSyn'#10'SynSQLSyn1'
+  +#13'DefaultFilter'#6#23'SQL Files (*.sql)|*.sql'#7'Enabled'#8#23'CommentAttr'
+  +'i.Foreground'#7#6'clTeal'#23'CommentAttri.FrameEdges'#7#9'sfeAround'#24'Dat'
+  +'aTypeAttri.FrameEdges'#7#9'sfeAround'#30'DefaultPackageAttri.FrameEdges'#7#9
+  +'sfeAround'#25'ExceptionAttri.FrameEdges'#7#9'sfeAround'#24'FunctionAttri.Fr'
+  +'ameEdges'#7#9'sfeAround'#26'IdentifierAttri.Foreground'#4'1'#26#255#0#26'Id'
+  +'entifierAttri.FrameEdges'#7#9'sfeAround'#19'KeyAttri.FrameEdges'#7#9'sfeAro'
+  +'und'#22'NumberAttri.Foreground'#7#9'clMedGray'#22'NumberAttri.FrameEdges'#7
+  +#9'sfeAround'#21'PLSQLAttri.FrameEdges'#7#9'sfeAround'#21'SpaceAttri.FrameEd'
+  +'ges'#7#9'sfeAround'#23'SQLPlusAttri.FrameEdges'#7#9'sfeAround'#22'StringAtt'
+  +'ri.Foreground'#4#161#16#16#0#22'StringAttri.FrameEdges'#7#9'sfeAround'#22'S'
+  +'ymbolAttri.Foreground'#4'b'#8#8#0#22'SymbolAttri.FrameEdges'#7#9'sfeAround'
+  +#25'TableNameAttri.Foreground'#7#6'clNavy'#25'TableNameAttri.FrameEdges'#7#9
+  +'sfeAround'#20'TableNameAttri.Style'#11#6'fsBold'#0#24'VariableAttri.FrameEd'
+  +'ges'#7#9'sfeAround'#10'SQLDialect'#7#9'sqlSybase'#4'left'#3#253#0#3'top'#3
+  +#152#0#0#0#0
 ]);

+ 9 - 1
viewview.pas

@@ -6,18 +6,20 @@ interface
 
 uses
   Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
-  StdCtrls, SynEdit, SynHighlighterSQL;
+  StdCtrls, Buttons, SynEdit, SynHighlighterSQL;
 
 type
 
   { TfmViewView }
 
   TfmViewView = class(TForm)
+    bbClose: TBitBtn;
     edName: TEdit;
     Label1: TLabel;
     Label2: TLabel;
     seScript: TSynEdit;
     SynSQLSyn1: TSynSQLSyn;
+    procedure bbCloseClick(Sender: TObject);
     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
   private
     { private declarations }
@@ -37,6 +39,12 @@ begin
   CloseAction:= caFree;
 end;
 
+procedure TfmViewView.bbCloseClick(Sender: TObject);
+begin
+  Close;
+  Parent.Free;
+end;
+
 initialization
   {$I viewview.lrs}