|
| Re: Moving a Container |
 |
Tue, 18 Mar 2008 13:20:12 -070 |
John Marshall wrote:
> I have an on-screen keyboard in a container and want to give the user the
ability to relocate it anywhere on screen. Can someone get me started on how to
let the user drag a container around?
1) Set the form's allowDrop property to true
2) Set the container object's dragEffect property to 2 (Move).
3) Set the container object's onLeftMouseDown event handler to:
this.drag(this.name,"O","")
See example below ...
Ken
// DragContainer.wfm
** END HEADER -- do not remove this line
//
// Generated on 03/18/2008
//
parameter bModal
local f
f = new DragContainerForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class DragContainerForm of FORM
with (this)
height = 16.0
left = 65.8571
top = 11.0909
width = 40.0
text = ""
allowDrop = true
endwith
this.CONTAINER1 = new CONTAINER(this)
with (this.CONTAINER1)
onLeftMouseDown = class::CONTAINER1_ONLEFTMOUSEDOWN
left = 18.2857
top = 2.8182
width = 20.0
height = 10.0
dragEffect = 2 // Move
endwith
this.CONTAINER1.TEXT1 = new TEXT(this.CONTAINER1)
with (this.CONTAINER1.TEXT1)
height = 2.2727
left = 0.8571
top = 1.0
width = 12.0
text = "Click and drag the container ... "
pageno = 0
endwith
function CONTAINER1_onLeftMouseDown(flags, col, row)
// start the drag ...
this.drag(this.name,"O","")
return
endclass
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
|
| Post Reply
|
| Re: Moving a Container |
 |
Tue, 18 Mar 2008 14:15:09 -070 |
John Marshall wrote:
>
> Thanks Ken, I almost had it except for those darn parameters.
>
> I have one follow up question ... I am using an ELO touchscreen monitor and
the mouse emulation is a little different. To drag and drop (move) with a mouse
one holds down the left button until ready to drop. With the touch screen, I
almost need to tap the container to select, and then tap the area I want it to
drop near. Either that or a touch once, and follow the "mouse"
pointer until a second "drop" touch.
>
> Any ideas?
Sorry, but no. I am not sure how to do something like that with a
touch-screen.
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
|
| Post Reply
|
| Re: Moving a Container |
 |
Tue, 18 Mar 2008 14:26:28 -070 |
John Marshall wrote:
> Is there a way to use the left down and left up events to pick up and drop
the object? If so, I could touch and hold, and on releasing drop the item?
Um, take a look at onDrop, and see if perhaps you can work with that?
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
|
| Post Reply
|
| Re: Moving a Container |
 |
Tue, 18 Mar 2008 14:40:42 -070 |
John Marshall wrote:
> Got it Ken! Went through all of the settings until I found the right
emulation. Pretty neat stuff possible with this thing for user interaction.
Cool beans. Glad you found a combination that will work. I don't use
drag and drop much for my apps, no real need. But ...
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase/dBASEBooks.htm
|
| Post Reply
|
| Moving a Container |
 |
Tue, 18 Mar 2008 14:48:40 -050 |
I have an on-screen keyboard in a container and want to give the user the
ability to relocate it anywhere on screen. Can someone get me started on how to
let the user drag a container around?
|
| Post Reply
|
|
|
|
|
|
|
|
|
|