Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

ThreadSearch layout modification

(1/5) > >>

yesno:
Hello,

I have shortened the headline of the headline of the ThreadSearch panel to fit on my screen (15", 1024x768 resolution).

The spacers are replaced by static lines. I don't know whether the lines are necessary, but the spacers are really too big.


--- Code: ---Index: SearchInPanel.cpp

===================================================================

--- SearchInPanel.cpp (Revision 5419)

+++ SearchInPanel.cpp (Arbeitskopie)

@@ -29,10 +29,10 @@

     wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL)
 {
     // begin wxGlade: SearchInPanel::SearchInPanel
-    m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open files"));
-    m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target files"));
-    m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project files"));
-    m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace files"));
+    m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open"));
+    m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target"));
+    m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project"));
+    m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace"));
     m_pChkSearchDir = new wxCheckBox(this, idChkSearchDirectoryFiles, wxT("Directory"));
 
     set_properties();
Index: ThreadSearchView.cpp

===================================================================

--- ThreadSearchView.cpp (Revision 5419)

+++ ThreadSearchView.cpp (Arbeitskopie)

@@ -55,7 +55,7 @@

     m_pCboSearchExpr = new wxComboBox(this, idCboSearchExpr, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_pCboSearchExpr_choices, wxCB_DROPDOWN|wxTE_PROCESS_ENTER);
     m_pBtnSearch = new wxButton(this, idBtnSearch, wxT("Search"));
     m_pBtnOptions = new wxButton(this, idBtnOptions, wxT("Options"));
-    m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in "));
+    m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in files:"));
     m_pPnlSearchIn = new SearchInPanel(this, -1);
     m_pBtnShowDirItems = new wxButton(this, idBtnShowDirItemsClick, wxT("Show dir items"));
     m_pPnlDirParams = new DirectoryParamsPanel(this, -1);
@@ -292,10 +292,14 @@

     m_pSizerSearchItems->Add(m_pCboSearchExpr, 2, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerSearchItems->Add(m_pBtnSearch, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerSearchItems->Add(m_pBtnOptions, 0, wxALL|wxADJUST_MINSIZE, 4);
-    m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+//    m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+    m_pStaLine1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(2, -1));
+    m_pSizerSearchItems->Add(m_pStaLine1, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL);
     m_pSizerSearchItems->Add(m_pStaTxtSearchIn, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerSearchItems->Add(m_pPnlSearchIn, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0);
-    m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+//    m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+    m_pStaLine2 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxSize(2, -1));
+    m_pSizerSearchItems->Add(m_pStaLine2, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL);
     m_pSizerSearchItems->Add(m_pBtnShowDirItems, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerTop->Add(m_pSizerSearchItems, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 0);
     m_pSizerSearchDirItems->Add(m_pPnlDirParams, 1, wxALIGN_CENTER_VERTICAL, 0);
Index: ThreadSearchView.h

===================================================================

--- ThreadSearchView.h (Revision 5419)

+++ ThreadSearchView.h (Arbeitskopie)

@@ -20,6 +20,7 @@

 #include <wx/datetime.h>
 #include <wx/panel.h>
 #include <wx/arrstr.h>
+#include <wx/statline.h>
 
 #include "editormanager.h"
 #include "cbproject.h"
@@ -181,6 +182,8 @@

     ThreadSearchLoggerBase* m_pLogger;
     wxPanel* m_pPnlListLog;
     wxSplitterWindow* m_pSplitter;
+    wxStaticLine* m_pStaLine1;
+    wxStaticLine* m_pStaLine2;
     // end wxGlade
     wxStaticBoxSizer* m_pSizerSearchDirItems;
     wxBoxSizer*       m_pSizerSearchItems;
Index: ThreadSearchConfPanel.cpp

===================================================================

--- ThreadSearchConfPanel.cpp (Revision 5419)

+++ ThreadSearchConfPanel.cpp (Arbeitskopie)

@@ -44,7 +44,7 @@

     SizerThreadSearchLayoutGlobal_staticbox = new wxStaticBox(this, -1, wxT("Show/Hide"));
     SizerListControlOptions_staticbox = new wxStaticBox(this, -1, wxT("List control options"));
     SizerThreadSearchLayout_staticbox = new wxStaticBox(this, -1, wxT("Layout"));
-    SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in"));
+    SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in files:"));
     m_pPnlSearchIn = new SearchInPanel(this, wxID_ANY);
     m_pPnlDirParams = new DirectoryParamsPanel(this, wxID_ANY);
     m_pChkWholeWord = new wxCheckBox(this, idChkWholeWord, wxT("Whole word"));

--- End code ---

With applied changes it would look like the attached image.

With kind regards


[attachment deleted by admin]

dje:
Hi!

All my graphical stuf is generated by wxGlade (wxSmith is really cool but I'm used to this one because I also code GUI with perl).
It's OK to apply your patch if you use this tool to change graphical classes.
It seems the wxGlade project has not been patched.

Dje

mariocup:
Hi dje,

instead of changing the text Open files in Open etc. I would rather prefer to substitute the Search and Options Label in the Thread Search Panel by the corresponding icons that are used in the Thread Search toolbar. This would be the better way in my eyes.

yesno:

--- Quote from: mariocup on January 25, 2009, 03:27:48 pm ---... I would rather prefer to substitute the Search and Options Label in the Thread Search Panel by the corresponding icons that are used in the Thread Search toolbar. ...

--- End quote ---

I think, this is the best idea. Have done it. Now it looks like the attached image.


--- Code: ---Index: SearchInPanel.cpp
===================================================================
--- SearchInPanel.cpp (Revision 5423)
+++ SearchInPanel.cpp (Arbeitskopie)
@@ -29,10 +29,10 @@
     wxPanel(parent, id, pos, size, wxTAB_TRAVERSAL)
 {
     // begin wxGlade: SearchInPanel::SearchInPanel
-    m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open files"));
-    m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target files"));
-    m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project files"));
-    m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace files"));
+    m_pChkSearchOpenFiles = new wxCheckBox(this, idChkSearchOpenFiles, wxT("Open"));
+    m_pChkSearchTargetFiles = new wxCheckBox(this, idChkSearchTargetFiles, wxT("Target"));
+    m_pChkSearchProjectFiles = new wxCheckBox(this, idChkSearchProjectFiles, wxT("Project"));
+    m_pChkSearchWorkspaceFiles = new wxCheckBox(this, idChkSearchWorkspaceFiles, wxT("Workspace"));
     m_pChkSearchDir = new wxCheckBox(this, idChkSearchDirectoryFiles, wxT("Directory"));
 
     set_properties();
Index: ThreadSearchConfPanel.cpp
===================================================================
--- ThreadSearchConfPanel.cpp (Revision 5423)
+++ ThreadSearchConfPanel.cpp (Arbeitskopie)
@@ -44,7 +44,7 @@
     SizerThreadSearchLayoutGlobal_staticbox = new wxStaticBox(this, -1, wxT("Show/Hide"));
     SizerListControlOptions_staticbox = new wxStaticBox(this, -1, wxT("List control options"));
     SizerThreadSearchLayout_staticbox = new wxStaticBox(this, -1, wxT("Layout"));
-    SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in"));
+    SizerSearchIn_staticbox = new wxStaticBox(this, -1, wxT("Search in files:"));
     m_pPnlSearchIn = new SearchInPanel(this, wxID_ANY);
     m_pPnlDirParams = new DirectoryParamsPanel(this, wxID_ANY);
     m_pChkWholeWord = new wxCheckBox(this, idChkWholeWord, wxT("Whole word"));
Index: ThreadSearchView.cpp
===================================================================
--- ThreadSearchView.cpp (Revision 5423)
+++ ThreadSearchView.cpp (Arbeitskopie)
@@ -9,6 +9,9 @@
  **************************************************************/
 
 #include "sdk.h"
+#include <wx/bitmap.h>
+#include <wx/bmpbuttn.h>
+#include <wx/statline.h>
 #ifndef CB_PRECOMP
  #include <wx/splitter.h>
  #include "cbeditor.h"
@@ -43,6 +46,7 @@
 {
  m_pFindThread = NULL;
  m_pToolBar    = NULL;
+ wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
 
     // begin wxGlade: ThreadSearchView::ThreadSearchView
     m_pSplitter = new wxSplitterWindow(this, -1, wxDefaultPosition, wxSize(1,1), wxSP_3D|wxSP_BORDER|wxSP_PERMIT_UNSPLIT);
@@ -53,11 +57,13 @@
 
     };
     m_pCboSearchExpr = new wxComboBox(this, idCboSearchExpr, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, m_pCboSearchExpr_choices, wxCB_DROPDOWN|wxTE_PROCESS_ENTER);
-    m_pBtnSearch = new wxButton(this, idBtnSearch, wxT("Search"));
-    m_pBtnOptions = new wxButton(this, idBtnOptions, wxT("Options"));
-    m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in "));
+    m_pBtnSearch = new wxBitmapButton(this, idBtnSearch, wxBitmap(prefix + wxT("findf.png"), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
+    m_pBtnOptions = new wxBitmapButton(this, idBtnOptions, wxBitmap(prefix + wxT("options.png"), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);//wxT("Options"));
+    m_pStaticLine1 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
+    m_pStaTxtSearchIn = new wxStaticText(this, -1, wxT("Search in files: "));
     m_pPnlSearchIn = new SearchInPanel(this, -1);
-    m_pBtnShowDirItems = new wxButton(this, idBtnShowDirItemsClick, wxT("Show dir items"));
+    m_pStaticLine2 = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
+    m_pBtnShowDirItems = new wxBitmapButton(this, idBtnShowDirItemsClick, wxBitmap(prefix + wxT("showdir.png"), wxBITMAP_TYPE_PNG), wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW);
     m_pPnlDirParams = new DirectoryParamsPanel(this, -1);
     m_pSearchPreview = new cbStyledTextCtrl(m_pPnlPreview, wxID_ANY, wxDefaultPosition, wxSize(1,1));
     m_pLogger = ThreadSearchLoggerBase::BuildThreadSearchLoggerBase(*this, m_ThreadSearchPlugin,
@@ -231,11 +237,11 @@
  pTopSizer->Show(m_pSizerSearchDirItems, show, true);
  if ( show == true )
  {
- m_pBtnShowDirItems->SetLabel(_T("Hide dir items"));
+ m_pBtnShowDirItems->SetToolTip(_T("Hide dir items"));
  }
  else
  {
- m_pBtnShowDirItems->SetLabel(_T("Show dir items"));
+ m_pBtnShowDirItems->SetToolTip(_T("Show dir items"));
  }
  pTopSizer->Layout();
 }
@@ -256,9 +262,19 @@
 
 void ThreadSearchView::set_properties()
 {
+ wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
     // begin wxGlade: ThreadSearchView::set_properties
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
     m_pCboSearchExpr->SetMinSize(wxSize(180, -1));
+    m_pBtnSearch->SetToolTip(wxT("Search in files"));
+    m_pBtnSearch->SetBitmapDisabled(wxBitmap(prefix + wxT("findfdisabled.png"), wxBITMAP_TYPE_PNG));
+    m_pBtnSearch->SetSize(m_pBtnSearch->GetBestSize());
+    m_pBtnOptions->SetToolTip(wxT("Options"));
+    m_pBtnOptions->SetBitmapDisabled(wxBitmap(prefix + wxT("optionsdisabled.png"), wxBITMAP_TYPE_PNG));
+    m_pBtnOptions->SetSize(m_pBtnOptions->GetBestSize());
+    m_pBtnShowDirItems->SetToolTip(wxT("Show dir Items"));
+    m_pBtnShowDirItems->SetBitmapDisabled(wxBitmap(prefix + wxT("showdirdisabled.png"), wxBITMAP_TYPE_PNG));
+    m_pBtnShowDirItems->SetSize(m_pBtnShowDirItems->GetBestSize());
     m_pPnlPreview->SetMinSize(wxSize(25, -1));
     // end wxGlade
 
@@ -282,6 +298,7 @@
 
 void ThreadSearchView::do_layout()
 {
+ wxString prefix = ConfigManager::GetDataFolder() + _T("/images/ThreadSearch/");
     // begin wxGlade: ThreadSearchView::do_layout
     wxBoxSizer* m_pSizerTop = new wxBoxSizer(wxVERTICAL);
     wxBoxSizer* m_pSizerSplitter = new wxBoxSizer(wxHORIZONTAL);
@@ -291,11 +308,11 @@
     m_pSizerSearchItems = new wxBoxSizer(wxHORIZONTAL);
     m_pSizerSearchItems->Add(m_pCboSearchExpr, 2, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerSearchItems->Add(m_pBtnSearch, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
-    m_pSizerSearchItems->Add(m_pBtnOptions, 0, wxALL|wxADJUST_MINSIZE, 4);
-    m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+    m_pSizerSearchItems->Add(m_pBtnOptions, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
+    m_pSizerSearchItems->Add(m_pStaticLine1, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 2);
     m_pSizerSearchItems->Add(m_pStaTxtSearchIn, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerSearchItems->Add(m_pPnlSearchIn, 0, wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 0);
-    m_pSizerSearchItems->Add(30, 20, 0, wxADJUST_MINSIZE, 0);
+    m_pSizerSearchItems->Add(m_pStaticLine2, 0, wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 2);
     m_pSizerSearchItems->Add(m_pBtnShowDirItems, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxADJUST_MINSIZE, 4);
     m_pSizerTop->Add(m_pSizerSearchItems, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 0);
     m_pSizerSearchDirItems->Add(m_pPnlDirParams, 1, wxALIGN_CENTER_VERTICAL, 0);
@@ -822,7 +839,9 @@
  // Changes label/bitmap only if requested
  if ( label != skip )
  {
- m_pBtnSearch->SetLabel(searchButtonLabels[label]);
+ m_pBtnSearch->SetToolTip(searchButtonLabels[label]);
+ m_pBtnSearch->SetBitmapLabel   (wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
+ m_pBtnSearch->SetBitmapDisabled(wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
  pToolBarSearchBtn->SetBitmapLabel   (wxBitmap(searchButtonPathsEnabled [label], wxBITMAP_TYPE_PNG));
  pToolBarSearchBtn->SetBitmapDisabled(wxBitmap(searchButtonPathsDisabled[label], wxBITMAP_TYPE_PNG));
  }
Index: ThreadSearchView.h
===================================================================
--- ThreadSearchView.h (Revision 5423)
+++ ThreadSearchView.h (Arbeitskopie)
@@ -42,6 +42,9 @@
 class wxSplitterWindow;
 class wxStaticBoxSizer;
 class wxBoxSizer;
+class wxBitmap;
+class wxBitmapButton;
+class wxStaticLine;
 
 class ThreadSearch;
 class ThreadSearchEvent;
@@ -170,11 +173,13 @@
     // begin wxGlade: ThreadSearchView::attributes
     wxStaticBox* m_pSizerSearchDirItems_staticbox;
     wxComboBox* m_pCboSearchExpr;
-    wxButton* m_pBtnSearch;
-    wxButton* m_pBtnOptions;
+    wxBitmapButton* m_pBtnSearch;
+    wxBitmapButton* m_pBtnOptions;
+ wxStaticLine* m_pStaticLine1;
     wxStaticText* m_pStaTxtSearchIn;
     SearchInPanel* m_pPnlSearchIn;
-    wxButton* m_pBtnShowDirItems;
+    wxStaticLine* m_pStaticLine2;
+    wxBitmapButton* m_pBtnShowDirItems;
     DirectoryParamsPanel* m_pPnlDirParams;
     cbStyledTextCtrl* m_pSearchPreview;
     wxPanel* m_pPnlPreview;
Index: ThreadSearch.wxg
===================================================================
--- ThreadSearch.wxg (Revision 5423)
+++ ThreadSearch.wxg (Arbeitskopie)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- generated by wxGlade 0.6.3 on Sun Dec 07 20:34:29 2008 -->
+<!-- generated by wxGlade 0.6.3 on Fri Jan 30 12:30:01 2009 -->
 
 <application path="C:\Dev\trunk\src\plugins\contrib\ThreadSearch\wxglade" name="" class="" option="1" language="C++" top_window="m_pThreadSearchConfDlg" encoding="ISO-8859-1" use_gettext="0" overwrite="1" use_new_namespace="1" for_version="2.6" is_template="0">
     <object class="ThreadSearchView" name="m_pThreadSearchLog" base="EditTopLevelPanel">
@@ -32,9 +32,12 @@
                         <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
                         <border>4</border>
                         <option>0</option>
-                        <object class="wxButton" name="m_pBtnSearch" base="EditButton">
-                            <label>Search</label>
+                        <object class="wxBitmapButton" name="m_pBtnSearch" base="EditBitmapButton">
+                            <style>wxBU_AUTODRAW</style>
+                            <disabled_bitmap>resources/images/findfdisabled.png</disabled_bitmap>
+                            <tooltip>Search in files</tooltip>
                             <id>idBtnSearch</id>
+                            <bitmap>resources/images/findf.png</bitmap>
                             <events>
                                 <handler event="EVT_BUTTON">OnBtnSearchClick</handler>
                             </events>
@@ -44,20 +47,24 @@
                         <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
                         <border>4</border>
                         <option>0</option>
-                        <object class="wxButton" name="m_pBtnOptions" base="EditButton">
-                            <label>Options</label>
+                        <object class="wxBitmapButton" name="m_pBtnOptions" base="EditBitmapButton">
+                            <style>wxBU_AUTODRAW</style>
+                            <disabled_bitmap>resources/images/optionsdisabled.png</disabled_bitmap>
+                            <tooltip>Options</tooltip>
                             <id>idBtnOptions</id>
+                            <bitmap>resources/images/options.png</bitmap>
                             <events>
                                 <handler event="EVT_BUTTON">OnBtnOptionsClick</handler>
                             </events>
                         </object>
                     </object>
                     <object class="sizeritem">
-                        <border>0</border>
+                        <flag>wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL</flag>
+                        <border>2</border>
                         <option>0</option>
-                        <object class="spacer" name="spacer" base="EditSpacer">
-                            <height>20</height>
-                            <width>30</width>
+                        <object class="wxStaticLine" name="m_pStaticLine1" base="EditStaticLine">
+                            <style>wxLI_VERTICAL</style>
+                            <attribute>1</attribute>
                         </object>
                     </object>
                     <object class="sizeritem">
@@ -66,7 +73,7 @@
                         <option>0</option>
                         <object class="wxStaticText" name="m_pStaTxtSearchIn" base="EditStaticText">
                             <attribute>1</attribute>
-                            <label>Search in </label>
+                            <label>Search in files: </label>
                         </object>
                     </object>
                     <object class="sizeritem">
@@ -81,20 +88,24 @@
                         </object>
                     </object>
                     <object class="sizeritem">
-                        <border>0</border>
+                        <flag>wxLEFT|wxRIGHT|wxEXPAND|wxALIGN_CENTER_VERTICAL</flag>
+                        <border>2</border>
                         <option>0</option>
-                        <object class="spacer" name="spacer" base="EditSpacer">
-                            <height>20</height>
-                            <width>30</width>
+                        <object class="wxStaticLine" name="m_pStaticLine2" base="EditStaticLine">
+                            <style>wxLI_VERTICAL</style>
+                            <attribute>1</attribute>
                         </object>
                     </object>
                     <object class="sizeritem">
                         <flag>wxALL|wxALIGN_CENTER_VERTICAL</flag>
                         <border>4</border>
                         <option>0</option>
-                        <object class="wxButton" name="m_pBtnShowDirItems" base="EditButton">
-                            <label>Show dir items</label>
+                        <object class="wxBitmapButton" name="m_pBtnShowDirItems" base="EditBitmapButton">
+                            <style>wxBU_AUTODRAW</style>
+                            <disabled_bitmap>resources/images/showdirdisabled.png</disabled_bitmap>
+                            <tooltip>Show dir Items</tooltip>
                             <id>idBtnShowDirItemsClick</id>
+                            <bitmap>resources/images/showdir.png</bitmap>
                             <events>
                                 <handler event="EVT_BUTTON">OnBtnShowDirItemsClick</handler>
                             </events>
@@ -143,7 +154,7 @@
                             <size>1, 1</size>
                             <object class="wxPanel" name="m_pPnlPreview" base="EditPanel">
                                 <style>wxTAB_TRAVERSAL</style>
-                                <size>1, 1</size>
+                                <size>1, 274</size>
                                 <object class="wxBoxSizer" name="m_pSizerSearchPreview" base="EditBoxSizer">
                                     <orient>wxHORIZONTAL</orient>
                                     <object class="sizeritem">
@@ -516,7 +527,7 @@
                 <option>0</option>
                 <object class="wxCheckBox" name="m_pChkSearchOpenFiles" base="EditCheckBox">
                     <checked>1</checked>
-                    <label>Open files</label>
+                    <label>Open</label>
                     <tooltip>Search in open files</tooltip>
                     <id>idChkSearchOpenFiles</id>
                     <events>
@@ -529,7 +540,7 @@
                 <border>4</border>
                 <option>0</option>
                 <object class="wxCheckBox" name="m_pChkSearchTargetFiles" base="EditCheckBox">
-                    <label>Target files</label>
+                    <label>Target</label>
                     <tooltip>Search in target files</tooltip>
                     <id>idChkSearchTargetFiles</id>
                     <events>
@@ -543,7 +554,7 @@
                 <option>0</option>
                 <object class="wxCheckBox" name="m_pChkSearchProjectFiles" base="EditCheckBox">
                     <checked>1</checked>
-                    <label>Project files</label>
+                    <label>Project</label>
                     <tooltip>Search in project files</tooltip>
                     <id>idChkSearchProjectFiles</id>
                     <events>
@@ -556,7 +567,7 @@
                 <border>4</border>
                 <option>0</option>
                 <object class="wxCheckBox" name="m_pChkSearchWorkspaceFiles" base="EditCheckBox">
-                    <label>Workspace files</label>
+                    <label>Workspace</label>
                     <tooltip>Search in workspace files</tooltip>
                     <id>idChkSearchWorkspaceFiles</id>
                     <events>

--- End code ---

I have also attached the necessary bitmaps for the 'Show dir items' button, now a wxBitmapButton, too.

With kind regards


[attachment deleted by admin]

mariocup:
Hi yesno,

yes that looks nice and well arranged.

Navigation

[0] Message Index

[#] Next page

Go to full version