Jump to content

picture control


Recommended Posts

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:

img-resized.png Reduced: 61% of original size [ 416 x 461 ] - Click to view full imageImage000011.jpg

img-resized.png Reduced: 62% of original size [ 412 x 463 ] - Click to view full imageImage00002.jpg

Do you have any idea? I am very appreciate

Link to comment

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?

Link to comment

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

Link to comment

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.

Link to comment

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.

Link to comment

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

Link to comment

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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.