GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Table of Contents
  • wx.ClipboardTextEvent
  • Show Source
  • index
  • modules
  • next
  • previous
  • Home
  • Gallery
  • wx

This view

  • Original page
  • New address

GeezerVison is showing docs.wxpython.org — wx.ClipboardTextEvent — wxPython 4.3.2 Docs

phoenix_title wx.ClipboardTextEvent¶

This class represents the events generated by a control (typically a wx.TextCtrl but other windows can generate these events as well) when its content gets copied or cut to, or pasted from the clipboard.

There are three types of corresponding events wxEVT_TEXT_COPY , wxEVT_TEXT_CUT and wxEVT_TEXT_PASTE .

If any of these events is processed (without being skipped) by an event handler, the corresponding operation doesn’t take place which allows preventing the text from being copied from or pasted to a control. It is also possible to examine the clipboard contents in the PASTE event handler and transform it in some way before inserting in a control – for example, changing its case or removing invalid characters.

Finally notice that a CUT event is always preceded by the wx.COPY event which makes it possible to only process the latter if it doesn’t matter if the text was copied or cut.

events Events Emitted by this Class¶

Handlers bound for the following event types will receive a wx.ClipboardTextEvent parameter.

  • EVT_TEXT_COPY: Some or all of the controls content was copied to the clipboard.

  • EVT_TEXT_CUT: Some or all of the controls content was cut (i.e. copied and deleted).

  • EVT_TEXT_PASTE: Clipboard content was pasted into the control.

Note

These events are currently only generated by wx.TextCtrl in wxGTK and wxOSX but are also generated by wx.ComboBox without wx.CB_READONLY style in wxMSW.

See also

wx.Clipboard


class_hierarchy Class Hierarchy¶

Inheritance diagram for class ClipboardTextEvent:

Inheritance diagram of ClipboardTextEvent


method_summary Methods Summary¶

__init__

Constructor.


api Class API¶

class wx.ClipboardTextEvent(CommandEvent)¶

Possible constructors:

ClipboardTextEvent(commandType=wxEVT_NULL, id=0) -> None

This class represents the events generated by a control (typically a TextCtrl but other windows can generate these events as well) when its content gets copied or cut to, or pasted from the clipboard.


Methods¶

__init__(self, commandType=wxEVT_NULL, id=0)¶

Constructor.

Parameters:
  • commandType (wx.EventType)

  • id (int)

Return type:

None

© Copyright 2012-2026, The wxPython Team. Created using Sphinx 9.1.0 and the python-docs-theme.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.