Grid does not animate from collapsed to visible - height

I'm currently trying to make a grid that animates from collapsed -> visible to notify the user that the save has been completed. In Blend 4 I opened the project and created a usercontrol for the SaveNotifier so I can use it in other areas of this project and others. I created the default to be collapsed and also created another state called "Complete" which has visibility set to Visible and has a timetrigger of 3 seconds which sends it back to the default state. The transitions are set to transition over 1 second and use fluidlayout to show the animation between the states, but it does not show the animation between states. Instead it just shows it as if there was no fluidlayout or transition time.
If someone would be so kind as to let me know if there is a problem with trying to do this or even show me how to do this it would be gre

Not sure why, but when I put the grid inside of a new grid it started working. Seems as if you need to have a grid to be the full size for the animation to display.

Related

How can I use an Action to move down to the next path in the layers window?

I did a gray scale image trace and came back with 250 colors. I created an action that selects the same fill color and then groups them together. Every time I want to run the action I have to select the next target in the layers window. Is there anyway to tell the action to move to the next target or path in the layers window until there is no more to do? I Tried select next object, but it doesn't work on paths or targets.
Thank you,
Amber
OK I figured out my problem. I was trying to use the select next object below inside a group. I guess you can't do that, it has to be inside a layer.

How to make a UI for a checkers game with gtkmm?

I made a checkers game in C++ with a console UI and I'd like to make it more user-friendly.
I've started looking into Gtkmm to make a UI.
In my model, the board is represented as a 10*10 array of Pieces.
A move is represented as a starting coordinate and an ending coordinate.
First of all, I'd like to be able to draw the board that I have in my model with Gtkmm.
In order to make a move, I want the user to first click on the piece he wants to move, and then on the spot he wants the piece to arrive.
If that move is correct, the board will have to be drawn again (the piece will be moved, and some of the opponent pieces might be destroyed).
Thanks to this tutorial : https://developer.gnome.org/gtkmm-tutorial/stable/ , I'm now able to make a grid and fill it with widgets (e.g. buttons).
I've already made a grid and filled it with buttons.
When a button is clicked, I can get the coordinate.
Here's my question : In order to make the UI that I described, what should I fill my grid with ? Should I stick with buttons ?
Should I use drag & drop ?
How should I proceed in order to make this UI ? I'm kind of lost… (this is my first time making an event-oriented UI…).

Grey out items in disabled ListView

I am writing an application in C++ using WinAPI.
I have a ListView of items with checkboxes and a scrollbar. Sometimes I need to disable the whole thing. When I call EnableWindow() to do that, the behavior of ListView is ok. It gets disabled, none of the contents are accessible any more. However checkboxes and scrollbar still look normal (not grayed out as the rest of the element).
Is it possible to grey out all parts within the ListView?
Enabled
Disabled
Normal disabled checkbox looks liks this: <- this is how I would expect to see checkboxes in the ListView, same applies to the scrollbar.
Regarding the checkboxes, the documentation for LVS_EX_CHECKBOXES says:
When set to this style, the control creates and sets a state image list with two images using DrawFrameControl. State image 1 is the unchecked box, and state image 2 is the checked box. Setting the state image to zero removes the check box.
You can therefore just change those images at indices 1 and 2 in the image list to their properly disabled variants when you are disabling the whole control.
The process itself of course varies depending on the framework you are using (if any), but generally will be along the lines of creating an Image List of SM_CXSMICON×SM_CYSMICON icons, creating a bitmap (2*SM_CXSMICON × SM_CYSMICON) pixels big, selecting it into a Memory DC for drawing, calling DrawFrameControl(..., DFC_BUTTON, DFCS_BUTTONCHECK | DFCS_FLAT | ..., ...) twice as appropriate, then using that bitmap in the Image List (and saving the previous IL to restore when the window is enabled again).
Regarding the scroll bar, you cannot get access to the implicit scrollbar as a separate window, so I don't think you can easily make it look more disabled without resorting to more custom drawing hacks for the non-client area of the List View.
Or creating an explicit scroll bar control yourself, but then you need to make sure it behaves the same as the original one, changes when the list view items change, respects right-to-left locale and so on.
It might be a bit of a challenge to get all the offsets and possibly transparency right even for the custom checkbox images described above. Even though this is how the List View control itself does it, it might not be worth the effort in the end.

How to determine the content step value of scrollarea

I'm making my own UI from scratch using OpenGL that is why I'm asking this and please don't make any discouragement as this is just a hobby project.
Currently, I'm stuck implementing how this scrollbars really work. In my current implementation, the content scrolls at the wrong step value as well as the thumb, meaning, I set the value manually like 1px step for each of them.
The structure of my scrollbar implementation is describe as follows:
I draw scrollbars i.e the main rectangle where the 3 button lies.
Those 3 buttons are, thumb, buttonBack and buttonNext.
All of them do the basic logic of scrollbars i.e when I click each one of them, they moved. But the whole part(scrollbar) don't know how to scroll contents
So what I did is: I make another object and I call it scrollarea
It has two scrollbars, vertical and horizontal scrollbar.
I made a function called scrollToX and scrollToY which
does what I named to them.
But the step values I set to them are
manually set up.
I try to google some scrollbar, scrollarea, scrollview or whatever you call to that scrollable rectangle thing, but all I see are implementation and I cannot find any guides how to build your own. I have no choice but to look at their implementation. I try my best to comprehend what they did but their implementation of how their whole UI structure is very different to mine, and I cannot find anything useful there.
So I ask again here if anybody can explain me well how to make a properly functional scrollbar.
Most specific things I'm really concerned of are:
How do I determine the thumb step value?
How do I determine the content step value?
All of these depend on your content -
Is it just an image ? If so, you only need to change the offset depending on the size of the image.
Is it a list of values like in Windows explorer ? Then you need to create a data structure first that contains all of it, and shows the content that fits within the window as it scrolls.
OpenGL does not fit into this discussion.

Blinking issue when using QListWidget in batched mode

When using a QListWidget in batched layout mode, whenever more items are added than the batch size, the list widget blinks for a short time when switching from the old list to the new list. This means, the list widget shows no items, and the scroll bar handle is set to a seemingly random size.
Have you ever encountered this, can this be resolved somehow? I'm using Qt 4.7.4. I should probably add that I'm not using any hidden items.
I had this issue also and spent hours combing through the sea that is Qt widget rendering. Ultimately, like you, I traced the problem back to the batch processing of the QListView. It appears, that when batch processing is enabled, Qt fires off an internal timer to perform incremental layout adjustments of the underlying scroll view. During these incremental layouts, when the scroll bar is visible, the update region is not computed correctly (it's too big and does not account for the regions occupied by the scroll widget(s) themselves). The result is a bad update region that subsequently finds its way into the viewport update which has the unfortunate side-effect of clearing the entire client area without rendering any of the ListViewItems.
Once the batch processing is complete, the final viewport update correctly computes the layout geometry (with the scroll bar) and produces a valid update region; the visible elements in the list are then redrawn.
The behavior worsens as the number of items in the list grows (relative to the batch size). For example, if your list grows from 500 to 50000 items and a batch size of 50, there is a proportionate increase in the number of "bad repaint" events which are triggered causing the view to visibly flicker even more. :(
These incremental (and failed) viewport updates also appear to be cause the apparent spazmodic behavior in the scrollbar handle position that you describe.
The root of this issue appears related to this "hack" that was added to
QListView::doItemsLayout() as commented here:
// showing the scroll bars will trigger a resize event,
// so we set the state to expanding to avoid
// triggering another layout
QAbstractItemView::State oldState = state();
setState(ExpandingState);
I suppose you could override QListView::doItemsLayout() and provide your own batch processing which handles scroll bars properly, but personally I'm too old and lazy to be cleaning up someone else's poo. Switching to SinglePass eliminated the problem entirely. Seamless flicker-free rendering and the scroll bar behavior you've come to expect and love. Yay.