From 963a3e38c454c317a8c763eb0f63d4c14b972fdd Mon Sep 17 00:00:00 2001
From: Guillaume Lelarge <guillaume@lelarge.info>
Date: Thu, 7 Apr 2011 12:04:54 +0200
Subject: [PATCH] Rework on dialogs UI

The aim is that all dialogs should work on a 800x600 screen.
---
 pgadmin/ui/dlgCast.xrc                    |   76 +++++++++++++++-----------
 pgadmin/ui/dlgCheck.xrc                   |   44 ++++++++++-----
 pgadmin/ui/dlgColumn.xrc                  |   76 +++++++++++++++-----------
 pgadmin/ui/dlgConversion.xrc              |   72 ++++++++++++++----------
 pgadmin/ui/dlgDatabase.xrc                |   58 ++++++++++++--------
 pgadmin/ui/dlgDomain.xrc                  |   79 ++++++++++++++++-----------
 pgadmin/ui/dlgExtTable.xrc                |    8 ++--
 pgadmin/ui/dlgExtension.xrc               |   58 ++++++++++++--------
 pgadmin/ui/dlgForeignDataWrapper.xrc      |   48 ++++++++++------
 pgadmin/ui/dlgForeignKey.xrc              |   74 +++++++++++++++-----------
 pgadmin/ui/dlgForeignServer.xrc           |   54 +++++++++++-------
 pgadmin/ui/dlgForeignTable.xrc            |   52 +++++++++++-------
 pgadmin/ui/dlgFunction.xrc                |   78 +++++++++++++++-----------
 pgadmin/ui/dlgIndex.xrc                   |   82 ++++++++++++++++------------
 pgadmin/ui/dlgIndexConstraint.xrc         |   81 ++++++++++++++++------------
 pgadmin/ui/dlgLanguage.xrc                |   64 +++++++++++++---------
 pgadmin/ui/dlgOperator.xrc                |   64 +++++++++++++---------
 pgadmin/ui/dlgRole.xrc                    |   84 ++++++++++++++++-------------
 pgadmin/ui/dlgRule.xrc                    |   84 ++++++++++++++++------------
 pgadmin/ui/dlgSchema.xrc                  |    4 +-
 pgadmin/ui/dlgSequence.xrc                |   66 +++++++++++-----------
 pgadmin/ui/dlgSynonym.xrc                 |   64 +++++++++++++---------
 pgadmin/ui/dlgTablespace.xrc              |   45 ++++++++++------
 pgadmin/ui/dlgTextSearchConfiguration.xrc |   57 ++++++++++++--------
 pgadmin/ui/dlgTextSearchDictionary.xrc    |   47 ++++++++++------
 pgadmin/ui/dlgTextSearchParser.xrc        |   78 +++++++++++++++------------
 pgadmin/ui/dlgTextSearchTemplate.xrc      |   57 ++++++++++++--------
 pgadmin/ui/dlgTrigger.xrc                 |   82 ++++++++++++++++------------
 pgadmin/ui/dlgType.xrc                    |   58 ++++++++++++--------
 pgadmin/ui/dlgView.xrc                    |    4 +-
 30 files changed, 1053 insertions(+), 745 deletions(-)

diff --git a/pgadmin/ui/dlgCast.xrc b/pgadmin/ui/dlgCast.xrc
index 276d29d..85f6da1 100644
--- a/pgadmin/ui/dlgCast.xrc
+++ b/pgadmin/ui/dlgCast.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>8</rows>
+                <rows>4</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>6</growablerows>
+                <growablerows>2</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -49,89 +49,101 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stSourceType">
-                    <label>Source type</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbSourceType">
-                    <content/>
-                    <style>wxCB_DROPDOWN</style>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTargetType">
-                    <label>Target type</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbTargetType">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+            </object>
+          </object>
+        </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>4</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stFunction">
-                    <label>Function</label>
+                  <object class="wxStaticText" name="stSourceType">
+                    <label>Source type</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbFunction">
+                  <object class="ctlComboBox" name="cbSourceType">
                     <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stImplicit">
-                    <label>Implicit</label>
+                  <object class="wxStaticText" name="stTargetType">
+                    <label>Target type</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxCheckBox" name="chkImplicit">
-                    <label></label>
+                  <object class="ctlComboBox" name="cbTargetType">
+                    <content/>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stFunction">
+                    <label>Function</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="wxComboBox" name="cbFunction">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stImplicit">
+                    <label>Implicit</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  <object class="wxCheckBox" name="chkImplicit">
+                    <label></label>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
diff --git a/pgadmin/ui/dlgCheck.xrc b/pgadmin/ui/dlgCheck.xrc
index 043a51b..5a73712 100644
--- a/pgadmin/ui/dlgCheck.xrc
+++ b/pgadmin/ui/dlgCheck.xrc
@@ -17,7 +17,7 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>4</rows>
+                <rows>3</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
                 <growablerows>1</growablerows>
@@ -36,20 +36,6 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stWhere">
-                    <label>Check</label>
-                  </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtWhere">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
@@ -82,6 +68,34 @@
               </object>
             </object>
           </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>1</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>0</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stWhere">
+                    <label>Check</label>
+                  </object>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtWhere">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <flag>wxEXPAND|wxTOP|wxLEFT|wxRIGHT</flag>
+              </object>
+            </object>
+          </object>
         </object>
         <flag>wxEXPAND|wxALIGN_CENTRE|wxALL</flag>
         <border>3</border>
diff --git a/pgadmin/ui/dlgColumn.xrc b/pgadmin/ui/dlgColumn.xrc
index 3ff9f6a..39e52c4 100644
--- a/pgadmin/ui/dlgColumn.xrc
+++ b/pgadmin/ui/dlgColumn.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>10</rows>
+                <rows>3</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>8</growablerows>
+                <growablerows>1</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -36,6 +36,48 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                    <size>10,10d</size>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>7</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stType">
                     <label>Data type</label>
                   </object>
@@ -132,36 +174,6 @@
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                    <size>10,10d</size>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
               </object>
             </object>
           </object>
diff --git a/pgadmin/ui/dlgConversion.xrc b/pgadmin/ui/dlgConversion.xrc
index 683d2f5..2f679ce 100644
--- a/pgadmin/ui/dlgConversion.xrc
+++ b/pgadmin/ui/dlgConversion.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>9</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>7</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,91 +64,103 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stDefault">
-                    <label>Default</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxCheckBox" name="chkDefault">
-                    <label></label>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stSourceEncoding">
-                    <label>Source encoding</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbSourceEncoding">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>4</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTargetEncoding">
-                    <label>Target encoding</label>
+                  <object class="wxStaticText" name="stDefault">
+                    <label>Default</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbTargetEncoding">
-                    <content/>
-                    <style>wxCB_DROPDOWN</style>
+                  <object class="wxCheckBox" name="chkDefault">
+                    <label></label>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stFunction">
-                    <label>Function</label>
+                  <object class="wxStaticText" name="stSourceEncoding">
+                    <label>Source encoding</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbFunction">
+                  <object class="wxComboBox" name="cbSourceEncoding">
                     <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stTargetEncoding">
+                    <label>Target encoding</label>
                   </object>
                   <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="wxComboBox" name="cbTargetEncoding">
+                    <content/>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stFunction">
+                    <label>Function</label>
                   </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="wxComboBox" name="cbFunction">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgDatabase.xrc b/pgadmin/ui/dlgDatabase.xrc
index 6c64ee4..af319f8 100644
--- a/pgadmin/ui/dlgDatabase.xrc
+++ b/pgadmin/ui/dlgDatabase.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgDatabase">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,16 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,260d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
+                <rows>4</rows>
                 <cols>2</cols>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>11</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -63,6 +64,33 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <rows>8</rows>
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>7</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stEncoding">
                     <label>Encoding</label>
                   </object>
@@ -121,19 +149,6 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stSchemaRestr">
-                    <label>Schema restriction</label>
-                  </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtSchemaRestr">
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
                   <object class="wxStaticText" name="stCollate">
                     <label>Collation</label>
                   </object>
@@ -163,7 +178,7 @@
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
-               <object class="sizeritem">
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stConnLimit">
                     <label>Connection Limit</label>
                   </object>
@@ -179,15 +194,14 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stSchemaRestr">
+                    <label>Schema restriction</label>
                   </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="wxTextCtrl" name="txtSchemaRestr">
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
diff --git a/pgadmin/ui/dlgDomain.xrc b/pgadmin/ui/dlgDomain.xrc
index af98acc..cb17896 100644
--- a/pgadmin/ui/dlgDomain.xrc
+++ b/pgadmin/ui/dlgDomain.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgDomain">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>11</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>9</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,6 +64,48 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>6</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>2</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stDatatype">
                     <label>Base type</label>
                   </object>
@@ -142,35 +184,6 @@
                   <object class="wxCheckBox" name="chkNotNull">
                     <label></label>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTER_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
diff --git a/pgadmin/ui/dlgExtTable.xrc b/pgadmin/ui/dlgExtTable.xrc
index 4a6571d..b7d8559 100644
--- a/pgadmin/ui/dlgExtTable.xrc
+++ b/pgadmin/ui/dlgExtTable.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgExtTable">
     <title></title>
-    <size>218,260d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,7 +10,7 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>214,235d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
@@ -108,13 +108,13 @@
                     <style>wxTE_MULTILINE</style>
                   </object>
                   <option>1</option>
-                  <flag>wxGROW</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER|wxALL</flag>
                 </object>
               </object>
             </object>
           </object>
         </object>
-        <flag>wxALL|wxGROW|wxALIGN_CENTRE</flag>
+        <flag>wxEXPAND|wxALIGN_CENTER|wxALL</flag>
         <border>3</border>
       </object>
       <object class="sizeritem">
diff --git a/pgadmin/ui/dlgExtension.xrc b/pgadmin/ui/dlgExtension.xrc
index baaae05..8b9de6a 100644
--- a/pgadmin/ui/dlgExtension.xrc
+++ b/pgadmin/ui/dlgExtension.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>6</rows>
+                <rows>4</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>4</growablerows>
+                <growablerows>2</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -51,62 +51,74 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stSchema">
-                    <label>Schema</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbSchema">
-                    <content/>
-                    <style>wxCB_DROPDOWN</style>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stVersion">
-                    <label>Version</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbVersion">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>2</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stSchema">
+                    <label>Schema</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="ctlComboBox" name="cbSchema">
+                    <content/>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stVersion">
+                    <label>Version</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="ctlComboBox" name="cbVersion">
                     <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgForeignDataWrapper.xrc b/pgadmin/ui/dlgForeignDataWrapper.xrc
index 190228f..0e08bdf 100644
--- a/pgadmin/ui/dlgForeignDataWrapper.xrc
+++ b/pgadmin/ui/dlgForeignDataWrapper.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>6</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>4</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,22 +67,6 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stValidator">
-                    <label>Validator</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbValidator">
-                    <content/>
-                    <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
@@ -117,6 +101,34 @@
             </object>
           </object>
           <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>1</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stValidator">
+                    <label>Validator</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="ctlComboBox" name="cbValidator">
+                    <content/>
+                    <size>135,-1d</size>
+                    <style>wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
             <label>Options</label>
             <object class="wxPanel" name="pnlOptions">
               <object class="wxFlexGridSizer">
diff --git a/pgadmin/ui/dlgForeignKey.xrc b/pgadmin/ui/dlgForeignKey.xrc
index ad54ce1..77fdacd 100644
--- a/pgadmin/ui/dlgForeignKey.xrc
+++ b/pgadmin/ui/dlgForeignKey.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>10</rows>
+                <rows>3</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>8</growablerows>
+                <growablerows>1</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -35,6 +35,47 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>7</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stReferences">
                     <label>References</label>
                   </object>
@@ -132,35 +173,6 @@
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
               </object>
             </object>
           </object>
diff --git a/pgadmin/ui/dlgForeignServer.xrc b/pgadmin/ui/dlgForeignServer.xrc
index 176aecb..fc4d146 100644
--- a/pgadmin/ui/dlgForeignServer.xrc
+++ b/pgadmin/ui/dlgForeignServer.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>7</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>5</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,62 +67,74 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stType">
-                    <label>Type</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtType">
+                  <object class="wxTextCtrl" name="txtComment">
                     <size>135,-1d</size>
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stVersion">
-                    <label>Version</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtVersion">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
                     <size>135,-1d</size>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>2</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stType">
+                    <label>Type</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
+                  <object class="wxTextCtrl" name="txtType">
                     <size>135,-1d</size>
-                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stVersion">
+                    <label>Version</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
+                  <object class="wxTextCtrl" name="txtVersion">
                     <size>135,-1d</size>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgForeignTable.xrc b/pgadmin/ui/dlgForeignTable.xrc
index 6faf607..ff22e5e 100644
--- a/pgadmin/ui/dlgForeignTable.xrc
+++ b/pgadmin/ui/dlgForeignTable.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgForeignTable">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>6</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>4</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,43 +64,55 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stForeignServer">
-                    <label>Foreign Server</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbForeignServer">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>1</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stForeignServer">
+                    <label>Foreign Server</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="wxComboBox" name="cbForeignServer">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
@@ -111,8 +123,8 @@
             </object>
           </object>
           <object class="notebookpage">
-            <label>Definition</label>
-            <object class="wxPanel" name="pnlDefinition">
+            <label>Columns</label>
+            <object class="wxPanel" name="pnlColumns">
               <object class="wxFlexGridSizer">
                 <cols>1</cols>
                 <rows>3</rows>
diff --git a/pgadmin/ui/dlgFunction.xrc b/pgadmin/ui/dlgFunction.xrc
index 1299f08..7138059 100644
--- a/pgadmin/ui/dlgFunction.xrc
+++ b/pgadmin/ui/dlgFunction.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgFunction">
     <title></title>
-    <size>300,280d</size>
+    <size>270,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablerows>0</growablerows>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>296,255d</size>
+          <size>266,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>8</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>6</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -49,86 +49,98 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stArguments">
-                    <label>Arguments</label>
+                  <object class="wxStaticText" name="stOID">
+                    <label>OID</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtArguments"/>
+                  <object class="wxTextCtrl" name="txtOID"/>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stOID">
-                    <label>OID</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtOID"/>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stReturntype">
-                    <label>Return type</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbReturntype">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>3</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stLanguage">
-                    <label>Language</label>
+                  <object class="wxStaticText" name="stArguments">
+                    <label>Arguments</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbLanguage">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
+                  <object class="wxTextCtrl" name="txtArguments"/>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stReturntype">
+                    <label>Return type</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="ctlComboBox" name="cbReturntype">
+                    <content/>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stLanguage">
+                    <label>Language</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="ctlComboBox" name="cbLanguage">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
@@ -378,8 +390,8 @@
             </object>
           </object>
           <object class="notebookpage">
-            <label>Definition</label>
-            <object class="wxPanel" name="pnlDefinition">
+            <label>Code</label>
+            <object class="wxPanel" name="pnlCode">
               <object class="wxFlexGridSizer">
                 <cols>1</cols>
                 <rows>2</rows>
diff --git a/pgadmin/ui/dlgIndex.xrc b/pgadmin/ui/dlgIndex.xrc
index 0a05852..b6a6848 100644
--- a/pgadmin/ui/dlgIndex.xrc
+++ b/pgadmin/ui/dlgIndex.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgIndex">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>10</rows>
+                <rows>3</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>8</growablerows>
+                <growablerows>1</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -35,6 +35,49 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+            <selected>1</selected>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>7</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>6</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stTablespace">
                     <label>Tablespace</label>
                   </object>
@@ -122,42 +165,13 @@
                   <object class="wxStaticText" name="stWhere">
                     <label>Constraint</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
                   <object class="wxTextCtrl" name="txtWhere">
                     <style>wxTE_MULTILINE</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
diff --git a/pgadmin/ui/dlgIndexConstraint.xrc b/pgadmin/ui/dlgIndexConstraint.xrc
index 6f58287..d62fcd3 100644
--- a/pgadmin/ui/dlgIndexConstraint.xrc
+++ b/pgadmin/ui/dlgIndexConstraint.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgIndexConstraint">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>10</rows>
+                <rows>3</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>7,8</growablerows>
+                <growablerows>1</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -36,6 +36,48 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Properties</label>
+            <object class="wxPanel" name="pnlProperties">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>7</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>6</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stTablespace">
                     <label>Tablespace</label>
                   </object>
@@ -124,42 +166,13 @@
                   <object class="wxStaticText" name="stWhere">
                     <label>Constraint</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
                   <object class="wxTextCtrl" name="txtWhere">
                     <style>wxTE_MULTILINE</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
diff --git a/pgadmin/ui/dlgLanguage.xrc b/pgadmin/ui/dlgLanguage.xrc
index ce1eda9..c81ec57 100644
--- a/pgadmin/ui/dlgLanguage.xrc
+++ b/pgadmin/ui/dlgLanguage.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>8</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>6</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -66,77 +66,89 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTrusted">
-                    <label>Trusted</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxCheckBox" name="chkTrusted">
-                    <label></label>
-                    <checked>1</checked>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stHandler">
-                    <label>Handler</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbHandler">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>3</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stValidator">
-                    <label>Validator</label>
+                  <object class="wxStaticText" name="stTrusted">
+                    <label>Trusted</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbValidator">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  <object class="wxCheckBox" name="chkTrusted">
+                    <label></label>
+                    <checked>1</checked>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stHandler">
+                    <label>Handler</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="wxComboBox" name="cbHandler">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stValidator">
+                    <label>Validator</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="wxComboBox" name="cbValidator">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgOperator.xrc b/pgadmin/ui/dlgOperator.xrc
index 3fb7c7b..ae4ae08 100644
--- a/pgadmin/ui/dlgOperator.xrc
+++ b/pgadmin/ui/dlgOperator.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>8</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>6</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,44 +64,55 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stLeftType">
-                    <label>Left type</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbLeftType">
-                    <content/>
-                    <style>wxCB_DROPDOWN</style>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stRightType">
-                    <label>Right type</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbRightType">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>3</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stProcedure">
-                    <label>Operator function</label>
+                  <object class="wxStaticText" name="stLeftType">
+                    <label>Left type</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbProcedure">
+                  <object class="ctlComboBox" name="cbLeftType">
                     <content/>
                     <style>wxCB_DROPDOWN</style>
                   </object>
@@ -109,32 +120,33 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stRightType">
+                    <label>Right type</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="ctlComboBox" name="cbRightType">
+                    <content/>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stProcedure">
+                    <label>Operator function</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="ctlComboBox" name="cbProcedure">
                     <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgRole.xrc b/pgadmin/ui/dlgRole.xrc
index 0d5287a..335e2dc 100644
--- a/pgadmin/ui/dlgRole.xrc
+++ b/pgadmin/ui/dlgRole.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgRole">
     <title></title>
-    <size>300,280d</size>
+    <size>270,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,16 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>294,255d</size>
+          <size>266,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>9</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>7</growablerows>
+                <growablerows>2</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -51,17 +50,47 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stLogin">
-                    <label>Can login</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxCheckBox" name="chkCanLogin">
-                    <label></label>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                   <border>4</border>
+                 </object>
+                 <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>4</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
@@ -135,35 +164,6 @@
                   <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
               </object>
             </object>
           </object>
@@ -176,6 +176,14 @@
                 <hgap>5</hgap>
                 <growablecols>0</growablecols>
                 <object class="sizeritem">
+                  <object class="wxCheckBox" name="chkCanLogin">
+                    <label>Can login</label>
+                    <size>166,12d</size>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxCheckBox" name="chkInherits">
                     <label>Inherits rights from parent roles</label>
                     <checked>1</checked>
diff --git a/pgadmin/ui/dlgRule.xrc b/pgadmin/ui/dlgRule.xrc
index 4013907..1ec95b7 100644
--- a/pgadmin/ui/dlgRule.xrc
+++ b/pgadmin/ui/dlgRule.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgRule">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>7</rows>
+                <rows>4</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>5</growablerows>
+                <growablerows>2</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -49,6 +49,47 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>2</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stEvent">
                     <label>Event</label>
                   </object>
@@ -88,51 +129,22 @@
                   <object class="wxStaticText" name="stCondition">
                     <label>Condition</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
                   <object class="wxTextCtrl" name="txtCondition">
                     <style>wxTE_MULTILINE</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                  </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
-                  <border>4</border>
-                </object>
               </object>
             </object>
           </object>
           <object class="notebookpage">
-            <label>Definition</label>
-            <object class="wxPanel" name="pnlDefinition">
+            <label>Statements</label>
+            <object class="wxPanel" name="pnlStatements">
               <object class="wxFlexGridSizer">
                 <cols>1</cols>
                 <rows>1</rows>
diff --git a/pgadmin/ui/dlgSchema.xrc b/pgadmin/ui/dlgSchema.xrc
index b431fe7..80f4612 100644
--- a/pgadmin/ui/dlgSchema.xrc
+++ b/pgadmin/ui/dlgSchema.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgSchema">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,7 +10,7 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,260d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
diff --git a/pgadmin/ui/dlgSequence.xrc b/pgadmin/ui/dlgSequence.xrc
index b6ee14e..5f118ac 100644
--- a/pgadmin/ui/dlgSequence.xrc
+++ b/pgadmin/ui/dlgSequence.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgSequence">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,17 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>7</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>5</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,32 +64,6 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stIncrement">
-                    <label>Increment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtIncrement">
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stStart">
-                    <label>Start</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtStart">
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
@@ -124,15 +98,41 @@
             </object>
           </object>
           <object class="notebookpage">
-            <label>Options</label>
-            <object class="wxPanel" name="pnlOptions">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>4</rows>
+                <rows>6</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stIncrement">
+                    <label>Increment</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtIncrement">
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stStart">
+                    <label>Start</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtStart">
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stMin">
                     <label>Minimum</label>
                   </object>
diff --git a/pgadmin/ui/dlgSynonym.xrc b/pgadmin/ui/dlgSynonym.xrc
index 4ebded9..b519f09 100644
--- a/pgadmin/ui/dlgSynonym.xrc
+++ b/pgadmin/ui/dlgSynonym.xrc
@@ -17,11 +17,11 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>7</rows>
+                <rows>4</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
                 <growablecols>1</growablecols>
-                <growablerows>5</growablerows>
+                <growablerows>2</growablerows>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
                     <label>Name</label>
@@ -51,44 +51,55 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTargetType">
-                    <label>Target type</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbTargetType">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTargetSchema">
-                    <label>Target schema</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbTargetSchema">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
-                </object>
+              </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>3</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTargetObject">
-                    <label>Target object</label>
+                  <object class="wxStaticText" name="stTargetType">
+                    <label>Target type</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbTargetObject">
+                  <object class="ctlComboBox" name="cbTargetType">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
@@ -96,34 +107,35 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stTargetSchema">
+                    <label>Target schema</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="ctlComboBox" name="cbTargetSchema">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stTargetObject">
+                    <label>Target object</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="wxComboBox" name="cbTargetObject">
                     <content/>
                     <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
-              </object>
+                </object>
               </object>
             </object>
           </object>
diff --git a/pgadmin/ui/dlgTablespace.xrc b/pgadmin/ui/dlgTablespace.xrc
index 26371c7..ef3e18d 100644
--- a/pgadmin/ui/dlgTablespace.xrc
+++ b/pgadmin/ui/dlgTablespace.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>4</rows>
+                <rows>3</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>3</growablerows>
+                <growablerows>2</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -38,21 +38,6 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stLocation">
-                    <label>Location</label>
-                    <pos>5,22d</pos>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtLocation">
-                    <pos>70,20d</pos>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
                   <object class="wxStaticText" name="stOwner">
                     <label>Owner</label>
                     <pos>5,37d</pos>
@@ -89,6 +74,32 @@
             </object>
           </object>
           <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stLocation">
+                    <label>Location</label>
+                    <pos>5,22d</pos>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtLocation">
+                    <pos>70,20d</pos>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
             <label>Variables</label>
             <object class="wxPanel" name="pnlVariables">
               <object class="wxFlexGridSizer">
diff --git a/pgadmin/ui/dlgTextSearchConfiguration.xrc b/pgadmin/ui/dlgTextSearchConfiguration.xrc
index 50f6b97..1bdb44a 100644
--- a/pgadmin/ui/dlgTextSearchConfiguration.xrc
+++ b/pgadmin/ui/dlgTextSearchConfiguration.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>7</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>5</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,66 +67,77 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stParser">
-                    <label>Parser</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbParser">
-                    <content/>
+                  <object class="wxTextCtrl" name="txtComment">
                     <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stCopy">
-                    <label>Copy Config</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbCopy">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
                     <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stParser">
+                    <label>Parser</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
+                  <object class="ctlComboBox" name="cbParser">
+                    <content/>
                     <size>135,-1d</size>
-                    <style>wxTE_MULTILINE</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stCopy">
+                    <label>Copy Config</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="ctlComboBox" name="cbCopy">
                     <content/>
                     <size>135,-1d</size>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgTextSearchDictionary.xrc b/pgadmin/ui/dlgTextSearchDictionary.xrc
index ed526ac..af4bb5a 100644
--- a/pgadmin/ui/dlgTextSearchDictionary.xrc
+++ b/pgadmin/ui/dlgTextSearchDictionary.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>6</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>4</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,22 +67,6 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stTemplate">
-                    <label>Template</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbTemplate">
-                    <content/>
-                    <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
                   <object class="wxStaticText" name="stComment">
                     <label>Comment</label>
                   </object>
@@ -117,6 +101,33 @@
             </object>
           </object>
           <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stTemplate">
+                    <label>Template</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="ctlComboBox" name="cbTemplate">
+                    <content/>
+                    <size>135,-1d</size>
+                    <style>wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
             <label>Options</label>
             <object class="wxPanel" name="pnlOptions">
               <object class="wxFlexGridSizer">
diff --git a/pgadmin/ui/dlgTextSearchParser.xrc b/pgadmin/ui/dlgTextSearchParser.xrc
index 21ac081..d8abc30 100644
--- a/pgadmin/ui/dlgTextSearchParser.xrc
+++ b/pgadmin/ui/dlgTextSearchParser.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgTextSearchParser">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,16 @@
       <growablerows>0</growablerows>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>10</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>8</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,46 +66,56 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stStart">
-                    <label>Start Function</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbStart">
-                    <content/>
+                  <object class="wxTextCtrl" name="txtComment">
                     <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stGetToken">
-                    <label>Gettoken Function</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbGetToken">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
                     <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stEnd">
-                    <label>End Function</label>
+                  <object class="wxStaticText" name="stStart">
+                    <label>Start Function</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbEnd">
+                  <object class="ctlComboBox" name="cbStart">
                     <content/>
                     <size>135,-1d</size>
                     <style>wxCB_DROPDOWN</style>
@@ -115,14 +124,14 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stLextypes">
-                    <label>Lextypes Function</label>
+                  <object class="wxStaticText" name="stGetToken">
+                    <label>Gettoken Function</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbLextypes">
+                  <object class="ctlComboBox" name="cbGetToken">
                     <content/>
                     <size>135,-1d</size>
                     <style>wxCB_DROPDOWN</style>
@@ -131,14 +140,14 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stHeadline">
-                    <label>Headline Function</label>
+                  <object class="wxStaticText" name="stEnd">
+                    <label>End Function</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbHeadline">
+                  <object class="ctlComboBox" name="cbEnd">
                     <content/>
                     <size>135,-1d</size>
                     <style>wxCB_DROPDOWN</style>
@@ -147,34 +156,35 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stLextypes">
+                    <label>Lextypes Function</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
+                  <object class="ctlComboBox" name="cbLextypes">
+                    <content/>
                     <size>135,-1d</size>
-                    <style>wxTE_MULTILINE</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stHeadline">
+                    <label>Headline Function</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="ctlComboBox" name="cbHeadline">
                     <content/>
                     <size>135,-1d</size>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgTextSearchTemplate.xrc b/pgadmin/ui/dlgTextSearchTemplate.xrc
index 52c2537..870c53d 100644
--- a/pgadmin/ui/dlgTextSearchTemplate.xrc
+++ b/pgadmin/ui/dlgTextSearchTemplate.xrc
@@ -17,10 +17,10 @@
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>7</rows>
+                <rows>5</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>5</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -67,66 +67,77 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stInit">
-                    <label>Init</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbInit">
-                    <content/>
+                  <object class="wxTextCtrl" name="txtComment">
                     <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stLexize">
-                    <label>Lexize</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="ctlComboBox" name="cbLexize">
+                  <object class="wxComboBox" name="cbClusterSet">
                     <content/>
                     <size>135,-1d</size>
-                    <style>wxCB_DROPDOWN</style>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stInit">
+                    <label>Init</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
+                  <object class="ctlComboBox" name="cbInit">
+                    <content/>
                     <size>135,-1d</size>
-                    <style>wxTE_MULTILINE</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stLexize">
+                    <label>Lexize</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
+                  <object class="ctlComboBox" name="cbLexize">
                     <content/>
                     <size>135,-1d</size>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                    <style>wxCB_DROPDOWN</style>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
               </object>
diff --git a/pgadmin/ui/dlgTrigger.xrc b/pgadmin/ui/dlgTrigger.xrc
index eb9c3c5..be4a0b1 100644
--- a/pgadmin/ui/dlgTrigger.xrc
+++ b/pgadmin/ui/dlgTrigger.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgTrigger">
     <title></title>
-    <size>220,320d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,16 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,295d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>13</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>10,11</growablerows>
+                <growablerows>2</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -49,6 +48,49 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
+                    <size>-1,40</size>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
+                  </object>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <border>4</border>
+                </object>
+                <object class="sizeritem">
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  </object>
+                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
+                  <border>4</border>
+                </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Definition</label>
+            <object class="wxPanel" name="pnlDefinition">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <rows>9</rows>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablerows>8</growablerows>
+                <growablecols>1</growablecols>
+                <object class="sizeritem">
                   <object class="wxStaticText" name="stRow">
                     <label>Row trigger</label>
                   </object>
@@ -206,7 +248,7 @@
                   <object class="wxStaticText" name="stWhen">
                     <label>When</label>
                   </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
+                  <flag>wxALIGN_CENTRE_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
@@ -214,36 +256,6 @@
                     <style>wxTE_MULTILINE</style>
                     <size>-1,40</size>
                   </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
-                    <size>-1,40</size>
-                  </object>
-                  <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
-                  </object>
-                  <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
-                  <border>4</border>
-                </object>
-                <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
-                  </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxALL</flag>
                   <border>4</border>
                 </object>
diff --git a/pgadmin/ui/dlgType.xrc b/pgadmin/ui/dlgType.xrc
index d362054..0b81d14 100644
--- a/pgadmin/ui/dlgType.xrc
+++ b/pgadmin/ui/dlgType.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgType">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,17 +10,16 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
             <object class="wxPanel" name="pnlProperties">
               <object class="wxFlexGridSizer">
                 <cols>2</cols>
-                <rows>6</rows>
                 <vgap>5</vgap>
                 <hgap>5</hgap>
-                <growablerows>4</growablerows>
+                <growablerows>3</growablerows>
                 <growablecols>1</growablecols>
                 <object class="sizeritem">
                   <object class="wxStaticText" name="stName">
@@ -64,51 +63,62 @@
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stType">
-                    <label>Type</label>
+                  <object class="wxStaticText" name="stComment">
+                    <label>Comment</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxRadioBox" name="rdbType">
-                    <label></label>
-                    <content>
-                      <item>Composite</item>
-                      <item>Enumeration</item>
-                      <item>External</item>
-                    </content>
-                    <dimension>1</dimension>
-                    <style>wxRA_SPECIFY_COLS</style>
+                  <object class="wxTextCtrl" name="txtComment">
+                    <style>wxTE_MULTILINE</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stComment">
-                    <label>Comment</label>
+                  <object class="wxStaticText" name="stClusterSet">
+                    <label>Use replication</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxTextCtrl" name="txtComment">
-                    <style>wxTE_MULTILINE</style>
+                  <object class="wxComboBox" name="cbClusterSet">
+                    <content/>
+                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
+              </object>
+            </object>
+          </object>
+          <object class="notebookpage">
+            <label>Type</label>
+            <object class="wxPanel" name="pnlProperties">
+              <object class="wxFlexGridSizer">
+                <cols>2</cols>
+                <vgap>5</vgap>
+                <hgap>5</hgap>
+                <growablecols>1</growablecols>
                 <object class="sizeritem">
-                  <object class="wxStaticText" name="stClusterSet">
-                    <label>Use replication</label>
+                  <object class="wxStaticText" name="stType">
+                    <label>Type</label>
                   </object>
                   <flag>wxALIGN_CENTRE_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
                 </object>
                 <object class="sizeritem">
-                  <object class="wxComboBox" name="cbClusterSet">
-                    <content/>
-                    <style>wxCB_READONLY|wxCB_DROPDOWN</style>
+                  <object class="wxRadioBox" name="rdbType">
+                    <label></label>
+                    <content>
+                      <item>Composite</item>
+                      <item>Enumeration</item>
+                      <item>External</item>
+                    </content>
+                    <dimension>1</dimension>
+                    <style>wxRA_SPECIFY_COLS</style>
                   </object>
                   <flag>wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
                   <border>4</border>
diff --git a/pgadmin/ui/dlgView.xrc b/pgadmin/ui/dlgView.xrc
index 0e9f78f..038782c 100644
--- a/pgadmin/ui/dlgView.xrc
+++ b/pgadmin/ui/dlgView.xrc
@@ -2,7 +2,7 @@
 <resource>
   <object class="wxDialog" name="dlgView">
     <title></title>
-    <size>220,280d</size>
+    <size>220,250d</size>
     <style>wxDEFAULT_DIALOG_STYLE|wxCAPTION|wxSYSTEM_MENU|wxRESIZE_BORDER</style>
     <object class="wxFlexGridSizer">
       <cols>1</cols>
@@ -10,7 +10,7 @@
       <growablecols>0</growablecols>
       <object class="sizeritem">
         <object class="wxNotebook" name="nbNotebook">
-          <size>216,255d</size>
+          <size>216,225d</size>
           <selected>0</selected>
           <object class="notebookpage">
             <label>Properties</label>
-- 
1.7.1

