Hidden layers make useless scrollbars appear - layer

So I've been trying to figure that one out for a time now, and I feel like I'm out of ideas.
So, my website has layers in it that make scrollbars appear even when they are hidden. It makes it possible for the user to scroll my website even when there is no need to. I would like to know if there is a way to make the browser scrollbars appear ONLY when such layers are set on visible.
I've been trying to use div overflows, but the problem is that since those divs are placed at a set top value, it makes the upper content of the layers hidden when scrolling down.
Anyone knows how to make it work?

Use display:none style instead of visibility:hidden style. visibility:hidden only make the an element invisible, but its space/layout is still calculated.

Related

Allow user to resize window such that Gtk3 TextView component can't show all text

I'm working on a GTK program in Rust (someone can probably answer this if they don't know Rust, as I can figure out how to translate between different bindings and the native C API) via the gtk-rs bindings for which I want to have a non-editable TextView who's contents are constantly updated in my code. I want the user to be able to resize the TextView to any size, after which my code will re-calculate its contents accordingly. Unfortunately, GTK prevents any resize from taking place that would hide any contents that are current in the TextView. I can't use a ScrolledWindow because I don't want visible scrollbars, and disabling the scrollbars on a ScrolledWindow prevents the resizing behavior that I want. I also tried calling set_size_request to set the size to both 1, 1, and 0, 0 after every text change, but this does not change the behavior at all either — the user still can't properly resize the TextView (by resizing the window).
How can I enable the resizing behavior that I want?
Probably this is not possible. What would be the point of resizing the text view smaller, if the user can never see the text that is outside of the viewport because you don't want scrollbars? That seems like it would confound the user's expectation of how such a component would usually work.
Maybe an approach could be that you pick a certain number of lines to show, make that the size of the viewport, and delete the old contents of the text view that scroll outside of the viewport?

Determine Source of XAML Styling

I have a couple of ListViews on different pages in my UWP application. For some reason, one of them seems to have Padding along the bottom below the last ListViewItem, while the other does not.
Neither of them has bottom Padding specified, so I'm wondering if this could be inherited from a parent control? I searched the entire XAML of the one with Padding, and it is not set anywhere else either. It isn't a huge problem, but I would prefer my controls to be consistent throughout my application, and I think adding the bottom Padding to the ListView without it to make them match seems silly, especially when I am unsure of why the first one has Padding in the first place.
Is there somewhere to determine where properties are set in the hierarchy, similar to the way CSS works?
Here is what they look like:
No padding:
Padding:
I added a Background to the ListView control to verify that there is no Padding there..
So it would seem it would have to come from the ListViewItem itself, but it does not have the Padding property set.
The issue turned out to be that one of the parent controls of the ListView that was displaying correctly (how I wanted it to) had a VerticalAlignment="Top" set, while all the parents of the other ListView were set to VerticalAlignment="Stretch".
I was finally able to get XAML Spy working properly, and it was helpful in previewing the changes while the application was running so that I could determine which element I needed to set the VerticalAlignment on without recompiling over and over again. Thanks to #ChrisW for the recommendation.

Add a scrollbar to yfiles.canvas.Control

I have a yfiles.canvas.Control, with some nodes inside. However, the number of nodes is getting bigger, and I need to add a scrollbar in order to vertically navigate through them, despite the reduced size in height.
How can I do this? I see that a ScrollBar class exists, but I don't know how to integrate it.
yFiles for HTML comes with scrollbars built in. You can customize their visibility, but by default they will be shown as soon as the content rectangle is larger than the visible area. Maybe calling updateContentRect is all that is missing in your code?

Theme Transition Z-Index in Windows 8

I've got theme transitions (entrance and content with a set offset) on elements which overlap. The issue is as theme transitions are bought to the front of the page the elements which are animated unreliably overlap each other causing a nasty transition when it is returned to the correct z-index.
It doesn't seem to matter how the elements are structured in the visual tree or the z-index applied to the element, the issue still occurs.
Any help very much appreciated - Ideally I want to avoid writing storyboards though, I'm happy with the entrance/content transition in this scenario!
I ran into a similar problem myself. Here are some things you can try:
make sure the "correct" z-order observed at the end of the animation is indeed correct. Putting some label on your items should make that clear if the items have the z-order you intended
make sure the items are are added to the control according to their z-order. In case you use binding make sure the items you add to the collection are arranged by their z-index
in case you are using PrepareContainerForItemOverride make sure the logic around your binding is correct
Hope it helps,
Mihai
I decided simular problems with:
Position: Relative;
Transition: All... (All includes Z-Index)
I made Z-Index:4 and for "HOVERed" elements Z-Index:2000.

How to make an object invisible at a particular keyframe without moving it in Blender (2.59)?

I'm quite new to blender, and I'm doing some experiments with it.
I've been searching for a way to make an object disappear from sight at a particular key-frame, without moving it out of the camera view. E.g. at frame 1, cube is there, at (0, 0, 0) and at frame 2, it's not visible anymore, but still there at position (0,0,0), at frame 3 it gets visible again.
After searching the web, I came upon this page which suggests to move the object to another layer, but since it applies to blender 2.49, it seems the software has changed since then: I'm unable to find the 'Layer' option when inserting a key-frame.
I've found some other sites but either they suggest to use a technique similar to the one linked above, or they suggest to change the alpha of the texture, which I'm not interested in.
So, what's the preferred method to make an object invisible in blender 2.59?
Additional information (not relevant for the answer I'm expecting, IMO):
I'm using blender to make models for Unity.
I'm using 2.59 because that's the one that works with the unity version that I have.
There are lots of ways to achieve this effect.
The easiest way is to keyframe the visibility of the object.
To do this, you simply go to the outliner, and click the little eyeball next to your object name, then hover over the closed eyeball and hit "i" to keyframe. The eye will then turn yellow to indicate it's keyframed. Do the same with the camera icon (so that your render behaves the same way). Then go to the point where you want the object to appear, and click the eyball and camera again to make them reappear, then hit "i" again over each to keyframe them... Isn't blender a wonderful program? I love being able to keyframe just about everything! :D
There are also these less easy, but variously useful methods, which you may also use in case you want some sort of transition in your vanishing/appearing:
My perferred way is to just move the opbejct off the screen, keyframe position, then set the animation (in the Graph Editor) curve type to "constant" (Key -> Interpolation Mode -> Constant), and move the object into place and set the keyframe where you want it to appear. It will thus instantaneously appear.
Set the material properties of the object to Transparent, and choose "Z-Transparency" and set alpha to 0. Then simply keyframe the alpha (hover mouse over Alpha value and hit "i"), then go to where you want it to appear, change the alpha value to 1, and keyframe again. This will make it fade in over time, or you can change the curve to constant in the Graph editor, as described in method 1.
If you want to mask the object while it is still in place, you could make a cube around it, set the cube material transparency to "mask", and then move the cube off camera to unmask the object, rather than moving the object. This is handy for when you want to partially unmask something in the course of the animation. For example, if you are creating a text overlay for a video, where you want text to appear as if it's coming out of your hand, you can animate the masked object to follow the contour of your hand as it pulls away to reveal the text.
In Blender 2.65, you can animate the objects visibility toggle in your Outliner panel.
Next to your scene objects there will be three icons: an eye, a cursor, and a camera.
Follow these steps to animate viewport visibility:
Find the object you wish to animate in the Outliner Panel
Mouse over the eye icon and hit "i" on your keyboard to set a keyframe.
Go to the next frame and turn the eye off, then hit "i" moused over it again.
Do the same thing with the camera icon to animate render visibility. I will usually keyframe both the viewport and render visibility icons in tandem so as not to forget to have these toggled when its time to render.
In version 2.9 the eye icon cannot be used to set a keyframe. I've found the best way for me is to use the Object Properties tab and under Transform set the three scale values (X,Y,Z) to zero for invisibility. You can then click the diamond to the right to set the keyframe. To make the object re-appear return the scale values to their original and click on the diamond keyframe icon again.
Obviously you can make it a lot easier for yourself by applying scale to the objects first then just switch them between 0 and 1.
AFAIK there is no easy way to directly set an object invisible in your case. Although the visibility can be animated in Blender (in outline view mive your cursor on the eye and press i) Unity3D doesn't recognise it.
Possible workarounds:
Move it to (1000, 0, 0)
Scale it by a very small value
A more elaborated approach could be to use a driver like when turning FK/IK animation on and off dynamically via a variable.
I found out (today!) that, in Blender 2.8 (& presumably beyond), you can control visibility of objects in animations either in viewports and/or renders. Select the object and, in the Object Properties, open the Visibility section. You will see a dot beside the Viewports and Renders options. Click on the dot in either Viewports or Renders (or both). The relevant boxes should turn green. Either make the object visible or invisible by checking or clearing its box and then click 'i' to insert a keyframe. Repeat the process in other keyframes.
Another way to do this is to make a cube around it and add a boolean modifier to the object you want to disappear, set the operation to difference and select the cube as the modifier's object target. Then turn off the cube's visibility and animate the visibility of the modifier.