Re: How to prevent copying data from a FXTable?
[email protected] Wed, 01 May 2024 15:15:38 -0500
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Message-ID | <[email protected]> |
On 2024-05-01 12:13, Pof wrote: > Dear all, > I would like to prevent (i.e. not allow) copying the data displayed in > a > FXTable. > I could not find any method to invoke in order to do that. > Any idea? > Regards > Pof > The FXTable, like most widgets, dispatch the SEL_CLIPBOARD_REQUEST message to their target first, then, if not handled, handle it themselves by putting up the clipped data to the requestor. Thus, handling the request, you can opt to return nothing. This will basically disable "pasting out" of the widget. This may not be the best method: you're still telling the other application that you have a selection, and what types they can be supplied. It may be better to intercept the ID_COPY_SEL and ID_CUT_SEL to prevent FXTable from even trying to own the clipboard. If the table is not supposed to be editable, there are methods to do that. I assume this is not what you're asking for. -- JVZ