Guidance Forums / wxWidgets (wxWindows) in C++ / Cut/Copy/Paste Controls

Search 搜索
Home Home

Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Cut/Copy/Paste Controls
Posted by: 2004-09-29 18:38:00
Excuse for my bad english.

I have to make a cut/copy/paste controls for an aplication with wxwindows libraries. the aplication is based in a principal frame with a various small dialogs with numerical inputs (wxTextCtrl). I only want cut/copy/paste the data's of these wxtextctrl of the custom dialogs that I have made.

I have thought searching in the documentation in three options.

a) Using the wxclipboard class, but. How the program knows what text is selected?
b) Using some functions of the wxtextctrl. (virtual void cut() for example).
c) When the cut/copy/paste tool is pushed launch an event like like Ctrl+v Ctrl+x (external events).

If anyone knows, where are some code or an example.

Thanks for all
Message2. Re: Cut/Copy/Paste Controls
Posted by: Hovrino 2004-10-15 20:42:32
 Use standard Cut/Copy/Paste functions. May be this will be solution. I wrote this functions to organize my Edit menu. And TextCtrl itself supports cut&paste without any additional code.
// text editor control
    vTextCtrl *m_pTextCtrl;
// Basic edit functions
void MyFrame::OnCopy(wxCommandEvent& event)

void MyFrame::OnCut(wxCommandEvent& event)

void MyFrame::OnPaste(wxCommandEvent& event)
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
© Thu 2024-6-20  Guidance Laboratory Inc. Hits:0