10-26-2016 10:52 AM
@RTSLVU wrote:
@altenbach wrote:
@stevem181 wrote:I’m going to go against the crowd here, so feel free to ignore this post.
I don't think anyone discouraged the use of an event structure, we just did not want to overload the beginner programmer with additional concepts. 😄
Actually I kind of did as I can't say I have ever found a real use for event structures. I have tried them out hear and there, but I guess they just never
clicked<Mouse-Down Evented> with me.
To me they brake the dataflow paradigm so I tend to tell new programmers to avoid them
Fixed that for you.
I generally just think of the event structure as a convenient way to avoid polling for user interaction in an idle state. Makes it easier to add new functionality and keeps overhead lower (sleeps while waiting). If you think of them as a case structure that depends on user interaction they're pretty easy to get your head around. And, of course, you'll need to understand them to easily read/modify other peoples code.
10-26-2016 10:57 AM
@NIquist wrote:
@RTSLVU wrote:
t say I have ever found a real use for event structures. I have tried them out hear and there, but I guess they just neverclicked<Mouse-Down Evented> with me.
Fixed that for you.
I generally just think of the event structure as a convenient way to avoid polling for user interaction in an idle state. Makes it easier to add new functionality and keeps overhead lower (sleeps while waiting). If you think of them as a case structure that depends on user interaction they're pretty easy to get your head around. And, of course, you'll need
to understand them to easily read/modify other peoples code.
LOL, good one.
Yeah, I know I need to figure these things out but they just never even cross my mind. But a case taht depends on user interaction is a good way to think about them.
10-26-2016 11:35 AM
The event structure is still my favorite structure and most of my programs have one. Of course my programs are more UI driven and don't really need to do anything unless the user wants something.
In classic data acquisition or instrument control, sensors need to be read at regular intervals anyway, so polling a few controls does not add anything and an event structure is no longer really needed.
It really depends on what kind of programs you are writing.
10-27-2016 11:43 AM - edited 10-27-2016 11:45 AM
Hi again,
Still no luck getting the programming the way I want, & I'm running out of time. May have to skip all of the case event structure stuff for this one.
Can anyone please tell me how I can have a photo as the background, and not have my controls slide all over the place if the window is resized, or the scroll bar is used while the VI is NOT running?
I have played around with all of the "move to back" & other options. But I can't "bake" in the position.
Thanks,
George
10-27-2016 12:47 PM
Hi Geoge,
Background Images move with the scrollbars. Not what you want.
Try just dragging the image from file explorer onto your front panel.
Then you can actually click on and select it (and use the Move-to-back
selection).
steve
10-27-2016 01:43 PM - edited 10-27-2016 01:47 PM
Hi Steve,
Thanks for the tip. Every single time I do that, the second I try to move the photo after dropping it on the front panel, Labview crashes. I tried this about 20 times. I have a fast computer so I don't know why this is happening. It drops on the front panel just fine, I can select it, but as soon as I go to move it, the program crashes.
Any ideas?
I've attached the 2 files if you wanna give it a try?
George
10-27-2016 03:58 PM - edited 10-27-2016 03:58 PM
So after playing around, I finally was able to get the background photo to move to the back. The trick was to not try & drag it around with the mouse, but use the arrow keys to get it into position. After I figured that out, everything else worked as it should. I was able to group & lock everything, so now you can't move any of the controls out of place. I also made the controls I created to select the soda transparent, so now the controls appear to be the ones in the photo.
Now if I could only get the case structures to do what I want............
Thanks again!
George