jason.yu Posted July 25, 2007 Report Share Posted July 25, 2007 i meet some difficulties . I drag some pictures into the picture control,how could i drag the pictures in the picture control? pls see the jpg file as follow: Reduced: 61% of original size [ 416 x 461 ] - Click to view full image Reduced: 62% of original size [ 412 x 463 ] - Click to view full image Do you have any idea? I am very appreciate Quote Link to comment
Grampa_of_Oliva_n_Eden Posted July 25, 2007 Report Share Posted July 25, 2007 QUOTE(jason.yu @ Jul 24 2007, 11:10 AM) Do you have any idea? I am very appreciate I would definately love to hear from you Picture Control Gurus on this question. I am going to be implementing something like this soon so any comments would be very helpful. Thank you, Ben PS Captain, can moving objects be done by hacking the string or will that only let me change the color of stuff already in the picture? Quote Link to comment
jason.yu Posted July 25, 2007 Author Report Share Posted July 25, 2007 QUOTE(Ben @ Jul 24 2007, 11:36 PM) I would definately love to hear from you Picture Control Gurus on this question.I am going to be implementing something like this soon so any comments would be very helpful. Thank you, Ben PS Captain, can moving objects be done by hacking the string or will that only let me change the color of stuff already in the picture? Hi Ben That is great I meet some problem with drag.... As i have noted in the picture,both are just pictures moving from one window to another but in the right window ,the picture also could be moved everywhere by mouse This example is drag the picture to the picture control but it can not be moved in the picture control It needs to again modified..... I need your help....*_8 Thank you Jason Quote Link to comment
Yair Posted July 25, 2007 Report Share Posted July 25, 2007 Cross post. Jason, cross posting without including a link to the other thread is considered impolite. Simply taking the example posted to the other thread and posting it here without any mention of its source is almost downright rude. You're causing people to think that you created something like this and that you just need "a little help" when in fact it seems that you need basic LV training. As said in the other thread, you will need some fairly good understanding of LV before you can do this yourself. It's not super complicated, but it will require a fair amount of work to work properly. Quote Link to comment
ragglefrock Posted July 26, 2007 Report Share Posted July 26, 2007 QUOTE(Ben @ Jul 24 2007, 11:12 AM) I would definately love to hear from you Picture Control Gurus on this question.I am going to be implementing something like this soon so any comments would be very helpful. Thank you, Ben PS Captain, can moving objects be done by hacking the string or will that only let me change the color of stuff already in the picture? Ben Ben, I don't consider myself a picture control guru, but the only thing that comes to mind here (and you might know this already) that would help you drag items in a picture control around is to have each item in the picture be its own picture data. Then you have an array of picture control items, one for each object. Then to render the actual picture that gets displayed, simply use the Concatenate String function to concatenate (overlay) all your pictures. You can even just wire the array of picture items into a single-slot Concatenate Strings function, and it will output one picture item with all the items overlayed. The advantage here is that moving one item doesn't force you to redraw or recalculate the rest of the items. Just index out that particular picture, convert it to a Flattened Pixmap, adjust its XY coordinates and bounds, and put it back into the array. If you look inside the Picture Control functions, a lot of them do this to overlay pictures. I did this with a calendar app I was doing as a hobby so that I didn't have to redraw the grid and everything just to update the date numbers, or items on a particular date. Hope this is what you meant.... Here's an example of what I meant in terms of overlaying images. To add dragging to this, you would have to keep track of where each item was so the user could select and "drag" it with the mouse. Quote Link to comment
Ton Plomp Posted July 26, 2007 Report Share Posted July 26, 2007 QUOTE(ragglefrock @ Jul 25 2007, 05:21 AM) Here's an example of what I meant in terms of overlaying images. To add dragging to this, you would have to keep track of where each item was so the user could select and "drag" it with the mouse. The NI 'Rectangle tools' as exposed by OpenG have a function is point in rectangle. That one could quite fast let you track which 'picture' you have selected. Ton Quote Link to comment
MikaelH Posted July 26, 2007 Report Share Posted July 26, 2007 Here is a "very" quick update of the DragAndDrop VI, to show how a scroll bar could be used untop of the picture control. http://forums.lavag.org/index.php?act=attach&type=post&id=6443 http://forums.lavag.org/index.php?act=attach&type=post&id=6444 Cheers, Mikael Quote Link to comment
Yair Posted July 26, 2007 Report Share Posted July 26, 2007 QUOTE(ragglefrock @ Jul 25 2007, 06:21 AM) Then to render the actual picture that gets displayed, simply use the Concatenate String function to concatenate (overlay) all your pictures. You can even just wire the array of picture items into a single-slot Concatenate Strings function, and it will output one picture item with all the items overlayed. That's really nice. :thumbup: I knew that the picture control was a string and I knew that you could concatenate it, but I didn't realize that it overlays the images. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.