Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Drag 'n Drop support


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-16-2007, 04:07 PM
Newbie
 
Join Date: May 2007
Location: Vancouver, CANADA
Posts: 7
Default Drag 'n Drop support

Does basic4ppc support drag 'n drop? If so, then How?

For example, can I rearrange a bunch of objects on the screen by tapping an object with the stylus and dragging it to a new location? Preferably with some kind of "snap to grid/object" capability.

Thanks

David

__________________
Dell X50v WM2003
Wintec 100WBT GPS
Great device... Dell should not have cancelled it!!!
Reply With Quote
  #2 (permalink)  
Old 05-16-2007, 04:23 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

Yes, you can design the interface using drag and drop.
Just choose from the menu - Designer - Create new form.
Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 07:16 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 482
Awards Showcase
Beta Tester 
Total Awards: 1
Default

David,

Why not just check it out, it's free for 30 days so you've nothing to lose!

There's plenty of help here in our little forum so welcome and feel free to ask lots more questions.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #4 (permalink)  
Old 08-09-2007, 07:32 PM
Newbie
 
Join Date: May 2007
Location: Vancouver, CANADA
Posts: 7
Default

Been away for a bit... now back to this problem....

I understand that the basic4ppc IDE supports drag 'n drop for designing forms, but what I meant was how would I develop an application that used a drag 'n drop type interface. In other words, I want to develop an app where the user can click on a control/image/icon with the stylus and drag it over to a new location. Possibly getting it to snap to a grid or other "anchor".

Thanks
__________________
Dell X50v WM2003
Wintec 100WBT GPS
Great device... Dell should not have cancelled it!!!

Last edited by DavidN : 08-09-2007 at 07:35 PM. Reason: clarification
Reply With Quote
  #5 (permalink)  
Old 08-10-2007, 11:21 AM
Senior Member
 
Join Date: Apr 2007
Location: Copenhagen
Posts: 130
Default

Dear DavidN,

I think you can just use the focus property to select e.g. the image (image.focus=true when clicked) and then use the x and y of "mouse up" to get the new location on the form. Put the new x,y as e.g. the image.top and image.left.

If you want it to snap to a gridline you can construct your own using the integer values of a division (e.g. y=5*int(y/5) gives a grid line every 5th pixel).

This method does not show the intermediate steps however, so the control will be seen to jump from the present spot to where you perform the mouse up. Does this matter?

all the best, Björn
Reply With Quote
  #6 (permalink)  
Old 08-10-2007, 04:26 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

This is will not work as the Image control only supports the Click event (without the x,y position).
You should draw the image on the form and redraw it at the new position using MouseDown / MouseUp events (you could also use MouseMove event).
It will be easier to do it on the ForeLayer.
Reply With Quote
  #7 (permalink)  
Old 08-10-2007, 05:03 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Or you can put yor image control as a child of a panel, wich supports mouse events, you can set the panel width an height to the image width and height and set the panel top and left according to mouse moves...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #8 (permalink)  
Old 08-10-2007, 06:55 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

This will not work as the image click event will be raised and not the panel mouse down / move / up events.
Reply With Quote
  #9 (permalink)  
Old 08-10-2007, 06:58 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,198
Default

Quote:
Originally Posted by Erel View Post
This will not work as the image click event will be raised and not the panel mouse down / move / up events.
I satnd corrected...
But if the panel is a bit larger and the user only taps the panel, then it should work?
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD
Reply With Quote
  #10 (permalink)  
Old 08-10-2007, 07:22 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

This should work fine.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
UDP support jesb4ppc Questions & Help Needed 3 08-22-2008 12:52 PM
Click and drag during runtime J12345T Questions & Help Needed 1 06-24-2008 09:37 AM
Drag Left / Right buttons on form issue. badkarma Bug Reports 2 04-11-2008 11:50 AM
Support for GPS Support for GPS Intermediate Driver ? tnetweather Questions & Help Needed 1 03-07-2008 06:41 PM
drag sprites cpc6128 Questions & Help Needed 2 03-05-2008 02:29 PM


All times are GMT. The time now is 02:59 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0