Disable rectangle movement behavior in Report Designer - visual-studio

In SSRS, it is a good practice to put your report elements inside rectangles.
This makes it possible to move several items at once by moving the rectangle around. When moving the rectangle around with a mouse, this works like a charm: the Tablix position inside the Rectangle remains the same, so the Rectangle moves with all contents in-place to another position:
However, when you manually (via the Top / Left properties in the properties pane) alter the position of these rectangles in Design Mode, the rectangle moves, but the contents remain on the same place. So whenever I do the same movement via the properties pane (which is more precise IMHO), the contents are not moved along with the rectangle, and oftentimes even become invisible:
Whenever you alter the position of the Rectangle directly inside the XML of the report (in 'Code Mode'), the contents are moved along correctly - but this is a rather time-consuming way.
Is there a way to make SSRS move the contents of rectangles along in Design Mode, even when the position of the rectangles is altered via the properties pane?

Related

Is it possible to change the position of a p5 text element after it is drawn?

Can you change the position of a p5 text element after it is draw without redrawing the entire canvas? If so, how would I be able to?
I'm trying to make text appear under players set to their current position, but when they move I want it to change its position to the player's position. I have the events with that setup, I just don't know how to change the position of the element.
Unlike some libraries, such as fabric.js, graphical elements in p5.js are not persistent objects that can be moved or modified once they are drawn. Instead, everything in p5.js is drawn in immediate mode. So when you are drawing text you specify it's attributes at the time you draw it, using the Typography functions, and the text(). In order to "move" text you would clear the canvas, or re-paint the background (using clear() or background() respectively, and then re-drawing the text with different settings or parameters.

Does UI Automation ScrollPattern have a Bounding Rect or is there a reliable way to get it?

I've been messing around with UI Automation and Scrolling. I found that in notepad if you take the bounding rectangle of the scrollable window, subtract out the size of any scrollbar bounding rectangles, it scrolls perfectly. However, trying the same thing against ISpy++, which aligns the top treeview item perfectly on each scroll even when there may be one or two pixels of the next item in the view at the bottom.
The problem with that is it reports the scroll amount requested was set. Say the view was 6.384914% and you do all the math to calculate where you scroll the view to the next window, say it came out to 24.382102 (completely made up number), so you scroll there, but it really didn't because it aligned the top item which otherwise would be missing a few pixels based on height of window. You read back where scrolling decided to set it and it says it was 24.382102 (note that when the scroll actually moves a full item it does report a different final scroll position and so can be calculated out).
What would solve the above is if we knew the actual bounding rectangle of the view that represents the 6.384914% so that those extra pixels wouldn't be considered part of the view, when you move to the next page, you're now align to where the next page would actually start. In this case of the tree, the bounding rectangle would be aligned to all items that fit plus the final spacing (or that could be part of the top of the view).
I wanted to scroll and get the data perfectly without any overlaps (except on final page of course, but that could be calculated out when you have the proper aligned boundaries that matches scrolling) or extra spacing.
Is there a way to do that, that I'm missing?
TIA!!

Finding ltk window position

Is it possible to get the position of a ltk (Common Lisp basic GUI library) window (one of its corners), in pixels from the top left screen corner?
I'm trying to use mouse movement to control an applet I'm making (details here), but I can only find the mouse's position relative to the window, and I can only set it relative to the screen itself. I want to hide the cursor and return it to a fixed point after every move, noting how it has moved. I need to know the window position to correct for the different measurements.
The manual gives several options for manipulating the toplevel, such as moving the window around or finding its position and dimensions. The particular expression needed here is (geometry *tk*), which returns a list of the window's x and y position and size.

Custom shaped NSButton

I am trying to create eight custom buttons (NSButton) in Xcode 4.6.3. Those are the segments of a circle. I used a standard rectangular button for each of them, adding a custom image for each segment. However, when I put the pieces together in one circle, there is no way to click some of these buttons, as the rectangular areas around each of them overlap, and prevent from reaching the other half of the buttons.
I was wondering if there is any way to make the button shape at least triangular, such that I can click on all of these buttons?
From the documentation "View Programming Guide":
Note: For performance reasons, Cocoa does not enforce clipping among sibling views or guarantee correct invalidation and drawing behavior when sibling views overlap. If you want a view to be drawn in front of another view, you should make the front view a subview (or descendant) of the rear view.
In other words, you can't expect overlapping views to process mouse events properly. There's no way of getting around the fact that views occupy rectangular frames. You have to make a single view which performs the work of all of your circle segments (including drawing and event handling, and optionally mouse moved events). YOu will have to use trigonometry to calculate which segment a mouse click occurs in, and respond appropriately as though a button were pressed, by re-drawing the segment and invoking the desired action.

Determine if a rect is visible inside window

I would like to determine if a rect inside a window is completly visible.
I have found RectVisible, but that function determines if any part of the rect is visible, I want to know if the entire rect is visible.
Is there any function for this?
First get the system clipping region (the visible region of a window) into a region by using GetRandomRgn. Read more about the 'system region' here. Then, offset that region since it is in screen coordinates (the article I linked has an example). After that, create a region from your rectangle with CreateRectRgn and combine the parts of your 'rectangle region' with those that are not part of the 'system region': that is calling CombineRgn passing the rectangle region as the first region, and the system region as the second region, and RGN_DIFF as the fnCombineMode. If the result is NULLREGION then your rectangle is fully visible - it is not fully or partially covered by any window (top level or not), or it is not fully or partially off-screen.
All in all, there's a probability that you're approaching your problem the wrong way around. If you've told what you've been trying to achieve someone could probably suggest a simpler approach.
Use PtVisible on each corner of the rectangle.
The PtVisible function determines
whether the specified point is within
the clipping region of a device
context.
Can you do a simple comparison using the coordinates of the window and the rectangle.
Check the rectangle's left ordinate is to the right of the Window's left border; the right ordinate is to the left of the Window's right border; and similar for top and bottom?
The only wrinkle might be if you are using both logical and physical coordinates, in which case you will need to perform a transformation.
All the functions that dealt with clip rectangles and point visibility broke with Windows Vista's new desktop composition feature. The functions will work fine on Windows XP and earlier, and on Windows 7 with Aero/Desktop Composition turned off, but otherwise, they will always claim that the entire window is visible.

Resources