PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Using get_file_box to drag files to pxplus.  (Read 510 times)

barsek

  • On Probation
  • New Member
  • *
  • Posts: 2
    • View Profile
Using get_file_box to drag files to pxplus.
« on: December 16, 2020, 06:48:26 AM »
Hello,

We are using pxplus 15 on Redhat Linux using windx.
We want to drag files, or emails or attachements to a directory using get_file_box
When using the windows get_file_box with [wdx] automatically windows explorer starts and i can drag everything to the desired directory. But the user can move up in the directories and come to places we do not want him to be. Normally on our windows 10 machines all directories are closed, but windows explorer does not mind.
When using the get_file_box form pxplus, we can prevent the user from going to forbidden directories. But as far as i can test, dragging files does not work.

So, how can i drag files to a directory using pvxplus and prevent users going to forbidden directories?

TIA

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 133
    • View Profile
Re: Using get_file_box to drag files to pxplus.
« Reply #1 on: December 16, 2020, 08:33:13 AM »
That should work. A "get_file_box read" supports D'n'D here.

Mike King

  • Administrator
  • Diamond Member
  • *****
  • Posts: 3457
  • Mike King
    • View Profile
    • PVX Plus Technologies
Re: Using get_file_box to drag files to pxplus.
« Reply #2 on: December 17, 2020, 10:52:14 AM »
Two options:

  • If all you want to do is drop files you can use the standard PxPlus directive DROP FILE ON <control> RETURN <CTL event>.  See https://manual.pvxplus.com/page/directives/drop_on.htm#filedrop.
  • If you want to be able to drop things other than files and have then converted into files you can create a Shell.Explorer object pointing to a dummy/empty directory.  You can scan for drop events if you need to know when a file/message is dropped into the directory or read the directory when done. 
    Something like:

    d$="dir_"+dte(0:"YYYYMMDD%hz%mz%sz")
    DIRECTORY d$
    DEF OBJECT Xplr,@(10,5,20,10)="Shell.Explorer"
    xplr'Navigate2(pth(d$))


barsek

  • On Probation
  • New Member
  • *
  • Posts: 2
    • View Profile
Re: Using get_file_box to drag files to pxplus.
« Reply #3 on: February 12, 2021, 02:53:27 AM »
Thx, this did the trick