LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pict Indicator Scrollbar Trouble

Code that works fine in LV2010, now fails in LV2013.

 

My app generates a picture, a preview of a PRINT page, and displays it in a PICT indicator.

The picture is likely larger than the indicator,

 

The user can scale the picture (via a slider) and move it around by "grabbing" it and dragging.

 

I implement the "grab and drag" behavior via the MOUSE DOWN, MOUSE UP, MOUSE MOVE, and MOUSE LEAVE events, and they change the ORIGIN property of the indicator

 

When I drag it around, the scrollbars, attached to the PICT indicator appear and move, as expected, in conjuction with your handling of the image.

I can move the scrolllbars and adjust the picture, as well.

 

That all works fine in LV2010.

 

However, the EXACT SAME CODE, in LV2013 doesn't work the same.  Specifically, I can drag the image and the scrollbars follow. But if i move the scrollbars, the image DOES NOT move.

 

Again, I have no code to handle scrollbars here, the scrollbars are simply properties of the indicator.

 

If I COPY the indicator (when it has a picture in it) and PASTE it somewhere else, the new indicator is blank.

 

If I stop the program, with a picture in the indicator, and select the indicator and hit the ARROW key, the indicator moves and ERASES the pict.

 

I have disabled, and then deleted the code that deals with grabbing. No change.

 

I can create a small test program to draw a too-big picture - it works as expected.  

 

Any ideas why it would fail to respond to scrollbars?

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(2,279 Views)

The MOUSE WHEEL now (in LV2013) moves the scrollbars, but still the pict itself does not move.

 

MOUSE WHEEN SUPPORT is set to the default HOVER + KEY FOCUS.

 

Is there some new event that I have to handle?

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 5
(2,272 Views)

It seems that moving the scrollbar really does move the picture, but the screen fails to update.

 

I say that because the next time I update for some other reason, the picture jumps to where it SHOULD be, according to how much the scrollbars moved.

 

Here is the LV2010 behavior:  http://www.screencast.com/t/GmkIJPAGfFq

 

Notice how moving the scrollbar moves the picture, just as you would expect.

 

 

 

 

Here is the LV2013 behavior:  http://www.screencast.com/t/UZQAqAkPjwV

 

Notice how nothing happens when you move the scrollbar, but if I update for some other reason, the picture moves to where it should be.

 

Any ideas?  It's not my code that makes a connection between the scrollbar and the picture position.

 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 5
(2,256 Views)

My first plan of attack when I get a control refreshing problem is to overlap it with a transparent picture control (it only takes a tiny overlap in one corner to do the job).  Usually this causes hyperactive refreshing, but in these cases it seems to raise it to a normal level.

0 Kudos
Message 4 of 5
(2,247 Views)

No joy there.  I placed another PICT indicator on top of the offending one. No change.

Made the background transparent.  No change.

Made its frame transparent.  No change.

Made its label disappear. No change.

Partially overlapped with offending PICT and pict's tab control. No change.

 

Hmmm.  TAB controls have always had bugs in them.  They STILL haven't fixed the case where if a non-AUTO GROW tab holds something that is larger than the tab, the tab loses its resize corners. I reported that two years ago, at least.

 

I wonder if that's causing something.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 5
(2,220 Views)