[wxruby-users] copy & paste event

Alex Fenton alex at pressure.to
Fri Mar 7 03:51:35 EST 2008


Hi

Pat Kiatchaipipat wrote:
> hi. now I have problem about copy and paste text in my application I
> make copy and paste button in toolbar and I have fuction of them but I
> don't know how to make it can copy only selection text and paste into
> other textCtrl. see my picture for more info. thank you :)
>   
If you just want ToolBar buttons that do the "normal" thing for 
cut/copy/paste - i.e. do that action to the current selection in the 
current active widget - just give the Tool the relevant standard id when 
you create it. For example

toolbar.add_tool(Wx::ID_COPY, 'Cut', bitmap_1 ....)

Or Wx::ID_CUT, Wx::ID_PASTE. No additional programming effort should be 
needed

alex



More information about the wxruby-users mailing list