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

wxTreeCtrl

(1/5) > >>

Albenejean:
Hi everyone and happy new year!!

I'm currently makink a plugin to improve the Search Result dialog (for now I make a nex one). My goal is to sort the files (header/source) and to display more text from the code around the searched words.

But I have got a little problem. I don't know if it is related to CB or to wxWidget.

When I display my wxFrame with a TreeCtrl inside, the frame stay below CB. I have to click on the frame to make it go on top.
When I click on the wxTreeCtrl, nothing happens. I have to click on the wxFrame.
But when I do not create a wxTreeCtrl, everything is OK.

Any idea?

Here is the code:

--- Code: ---SearchResults::SearchResults(wxWindow* parent,wxWindowID id,const wxPoint& pos,const wxSize& size):
m_pTreeCtrl(NULL)
{
//(*Initialize(SearchResults)
Create(parent, wxID_ANY, _("Search Results"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE, _T("wxID_ANY"));
SetFocus();
Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("ID_PANEL1"));
m_pTreeCtrl = new wxTreeCtrl(Panel1, ID_TREECTRL1, wxPoint(0,0), wxSize(400,448), wxTR_DEFAULT_STYLE, wxDefaultValidator, _T("ID_TREECTRL1"));  // <----- When I comment this line, everything is OK
Center();
Show(true);
//*)
}

//AND

SearchResults* SearchResults::Get()
{
    if(!m_pInstance)
    {
        m_pInstance = new SearchResults(Manager::Get()->GetAppWindow());
    }
    return m_pInstance;
}

--- End code ---

By the way, I didn't find the EVT_SIZE of my wxFrame. I have to implement this myself (very easy, but..)

[EDIT]: Windows XP SP2
svn 4760

killerbot:
search the forum for the THreadSearch plug-in, this might already contain what you want to try ;-)

Most likely that plug-in will become part of the contrib plug-ins and as such part of the nightly builds ...

Albenejean:
I'll have a look at it.
Thanks!

dje:
Hi !

Version 1.0 of ThreadSearch plugin is broken since cbeditor/cbstyledtextctrl split. Basically, it is just necessary to add some
--- Code: ---#include "cbstyledtextctrl.h"
--- End code ---
to make it work.
I updated it on Linux but I can't use my XP laptop to test it. It will be released as soon as tested.

Dje

Albenejean:
I have built it......... That's great!!

I've got some suggestion if you want.
  _ sort these items by the file (and not the directory) so that the header and the source code are together
  _ make it inside a tree (so that we can fold/unfold the results sorted by files)
  _ make it inside a detachable window (or a completly detached window) because seeing the results in a so small window (depending on the resolution) is disappointing

Navigation

[0] Message Index

[#] Next page

Go to full version