treecontrol -> status bar drag and drop Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Oliver Bestmann
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon May 15, 2006 4:34 am
Location: hamburg germany

treecontrol -> status bar drag and drop

Post by Oliver Bestmann »

i have got a small dialogbox containing a treectrl and a status bar

the treectrl is working as filedroptarget which run without any probs


now the question.

during the drag operation i would like to show info about the currently selected item in the tree control but the drag event function is out of scope of the dialog( cant use stausbar-> setstatus

how can i get access to the dialog member function to set the status bar from within the drag function



drag function

Code: Select all

class mytarget : public wxFileDropTarget
{
public :
        mytarget(wxTreeCtrl *);
        virtual bool OnDropFiles(wxCoord , wxCoord,const wxArrayString& filenames );
};

mytarget::mytarget(wxTreeCtrl *)
    {
    }
    
// just test code !!
bool mytarget :: OnDropFiles(wxCoord x , wxCoord y ,const wxArrayString& filenames)
    {
    wxString last = filenames.Last();
    //int answer = wxMessageBox(last,"Drop");
    download  *gauge = new download((wxWindow *)this);
    gauge->ShowModal();
    //Filetransfer->m_StatusBar->SetStatusText("End Drag");
    return true;
    }

the on drop files function does not contain the dialog box handle !!


thx

oliver
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Post by ONEEYEMAN »

Oliver,
Can't you pass the dialog pointer to the class "mytarget"?

Thank you.
Oliver Bestmann
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon May 15, 2006 4:34 am
Location: hamburg germany

Post by Oliver Bestmann »

goog idea it worx


man sieht den baum vor lauter b
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

Wouldn't that be
"Man sieht den Wald vor lauter B
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Oliver Bestmann
Earned a small fee
Earned a small fee
Posts: 11
Joined: Mon May 15, 2006 4:34 am
Location: hamburg germany

Post by Oliver Bestmann »

oh shit

time to sleep a few hours :)
Post Reply