I see my version of delphi, doesn't have Key Events(OnKeyDown, OnKeyUp, OnKeyPress) events for TPaintBox. I would like to process something like that. Had somebody a paintbox with these events?
I need Key Events for TPaintBox
2.6k Views Asked by user558126 At
2
There are 2 best solutions below
Related Questions in DELPHI
- How can I read the header of request to webserver
- Receiving Notifications for Individual Task Completion OmniThreadLibrary Parallel.ForEach
- Delphi - How to get result of function from QuickReport without viewing a report?
- Out of memory while adding documents to a Firebird BLOB field with Delphi
- How to MakeScreenshot fullpage on Delphi
- How to program a COM object with an IEnumerator, IEnumerable interface inside
- How to Dynamically Add Controls to Delphi Form
- How to write a string in Stringrid with DelimitedText in FMX Delphi 11
- TGrid/TStringGrid multi cell selection / multi editing in delphi firemonkey (12)
- How to localize "Today" in the Delphi TMonthCalendar?
- How can I call a SOAP webserver method in Vue.js?
- Efficiently Handling Large Number of API Calls with Delphi 10.4 and OmniThreadLibrary
- Delphi can not compile the unit create by its "XML Data Binding Wizard"
- Save Form Properties in File and then restore those Properties after reopening
- Is it possible to open a blob without saving it to file
Related Questions in EVENTS
- Stop propagation of javasript/leaflet click event that starts in one element and ends in another
- Detecting click inside and outside of the listening component in Angular
- How to use mocha unit test chokidar watch events
- writing event_management in unity
- Where to put event handler method of an inherited class in C++ Builder?
- Event_date reference in CTE
- WinForms, event unable to subscribe from a custom class
- How to intercept a request made by a form submit in JavaScript?
- Communicating from Parent to Child in Blazor
- How to Customize Sitecore Copy operation
- grand parent is handling custom event emitted instead of parent in Angular 17
- jquery not capturing all input value changes
- Is there a way to force the focus on a determined window tab?
- How to watch user browsing activity from a background service?
- Trigger Once in React native
Related Questions in KEY
- Ansible prompt "No existing session" in manual executing the playbook
- Visual Studio 2022 free certificate problem. "cannot import key file " how to fix
- Why MySQL doesn't use my primary key to join my table?
- Transform a series of JavaScript object keys into array(s) when they contain numbers
- PingID 2 MFA automation with 32 Digit pairing key
- Getting list of sub-keys for a given key
- How can i ensure that when I restart my computer or I use another computer I can access the same HashiCorp Vault that I will initially setup?
- Colab + Drive: import keys + sharing notebooks
- jq: how to extract a value without a property name
- CustomScrollView with center key and mulitple slivers: Expand widgets in different directions
- AWS CLI EMR keyname doesn't recognize my access key, same region confirmed
- Errors Installiing USB Coral
- What is the meaning of keycode '\x03'?
- TecDoc catalogue API
- New Key Event Listeners JS?
Related Questions in PAINT
- Java Swing Paint Performance
- Allow users to resize into negative height / width
- How to use CSS Paint API with React
- Paint-like a pp on Unity too slow
- Performance issues on Chrome when painting many characters at 80-130px font-size range
- How to changes the brush width
- PaintSurfaceView crash
- Color dialog causing an issue when used in a property grid
- Mac Paint Pro .paint file with layers to open in photoshop or other software
- painted a cell pressing button VBA EXCEL
- Creating an Erasor in a PaintApp between 2 Graphics
- I want to create a simple Paint in Java
- how to draw a rectangle from the center in PyQt6?
- How do I draw an Image into a panel?
- How to recognize Surface Pro Pen in flutter dektop application
Related Questions in PAINTBOX
- Dragging a TPaintBox while keeping its content static
- Delphi Paintbox Paint method is not updating image canvas[FMX]
- Best practice regarding plotting graph data
- How draw a rectangle/hole in a "Form3" using coordinates of a PaintBox present in "Form2"?
- How make the same hole in two Form's on remote screen (client side), based on area drawn on server side?
- Delphi FMX Android FillText is Slow and Resource intensive
- How to draw a line in Delphi on an FMX canvas
- paintbox doesnt paint from timer method c++ builder borland
- erase line from paintbox borland c++ builder
- Delphi XE5 - TPaintBox scrolls too slow under TListBox on machines with Android
- Delphi: Export/Draw TPaintbox straight to file with custom image size
- I need Key Events for TPaintBox
- How to eliminate the flicker on the right edge of TPaintBox (for example when resizing)
- Problem with creating tpaintbox on tpanel
- Delphi - TPaintBox - Resize
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Like TLama said, you'll need to inherit from TCustomControl. But you'll need some additional code to publish all keyboard events. You could choose the easy way and inherit from TPanel since TPanel already exposes a Canvas and a number of keyboard events.
But here's some code to show how to create and register a new control that published the properties of TCustomControl and introduces a new OnPaint event:
If you create a new Package, add this unit, and install it, you will have a new TGTPaintBox control that can have the focus (although you don't see it). It can retrieve keyboard input too.
I've added some functionality in an attempt to make the control transparent, because a PaintBox is too. One disadvantage is that you need to repaint the parent to clear the previously drawn content. In the demo application this is easy enough. I just invalidate the form instead of the control. :p
If you don't need it, you can remove
WMEraseBkGnd,CreateParamsandSetParentfrom the control.Small demo: Put a label on a form. Put a TGTPaintBox on top of it and make it a bit larger. Then add a timer, and maybe some other controls.
Make sure you set the TabStop property of the GTPaintBox to
True.Then, implement the following events;