Re: How to prevent copying data from a FXTable?
Pof <[email protected]> Thu, 2 May 2024 17:24:02 +0200
| Newsgroups | gmane.comp.lib.fox-toolkit.user |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the advice Jeroen, my table is not editable, but I was not able to identify the adequate FXTable method to modify the behaviour. I thus solved the issue by intercepting the ID_COPY_SEL and ID_CUT_SEL. Regards, Pof > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 1 May 2024 19:13:22 +0200 > From: Pof <[email protected]> > To: FOX Users <[email protected]> > Subject: [Foxgui-users] How to prevent copying data from a FXTable? > Message-ID: > <CAHb-sLtfQW+7x4ev=3FuPkV_GjJ7_V0BnoSs1eLcKQ_PTCHd-Q@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > 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 > -------------- next part -------------- > An HTML attachment was scrubbed... > > ------------------------------ > > Message: 2 > Date: Wed, 01 May 2024 15:15:38 -0500 > From: [email protected] > To: Pof <[email protected]> > Cc: FOX Users <[email protected]> > Subject: Re: [Foxgui-users] How to prevent copying data from a > FXTable? > Message-ID: <[email protected]> > Content-Type: text/plain; charset=US-ASCII; format=flowed > > 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 > > > > > ------------------------------ > > Message: 3 > Date: Wed, 1 May 2024 22:23:28 +0200 > From: Pof <[email protected]> > To: [email protected] > Cc: FOX Users <[email protected]> > Subject: Re: [Foxgui-users] How to prevent copying data from a > FXTable? > Message-ID: > <CAHb-sLsgrzEJvtKwWGg1U03LwBcfpAJF7chb+L5RJVt=v14jsw@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Dear Jeroen, > my table is not editable, and you mentioned other methods that could be > applied in that case. > Could you tell me more about this? > Regards > Pof > > Le mer. 1 mai 2024 ? 22:15, <[email protected]> a ?crit : > >> 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