I am trying to create a custom slicer that supports keyboard navigation.
I have come across the supportsKeyboardFocus property in capabilities.json, and I see that this changes the visual HTML element to look like the built in slicer which does support keyboard navigation (removes aria-hidden="true" and adds keyboard-shortcuts="ctrl-ArrowRight scoped") but am still unable to get keyboard focus inside a simple custom visual. Are there any working examples of a custom visual that supports keyboard navigation?
There was a regression in custom visuals' keyboard focus support, it has been fixed a few months ago.
In order to enable keyboard focus and navigation, the visual should:
Set supportsKeyboardFocus: true in capabilities.json file.
Contain focusable elements1
Also note that in a Power BI report, visuals behave as context groups, so navigation between visuals is achieved using Tab, and navigation into a visual's context is done by ctrl+rightArrow (or cmd+rightArrow for Apple).
1: While there are many DOM elements which are focusable by default (e.g. buttons, text input etc.), many custom visuals are based purely on SVG graphics, so they can end up with no focusable elements. For the most basic tab based navigation, adding tabindex=0 to an element is enough. For good accessibility, depending on the visual, it's typically required to add keyboard support for selection and multi-selection, and better navigation (e.g. arrow based grid navigation, or some reasonable grouping of elements etc.)
Related
Just like we could make parent tab set and combine all tabs in it.
Is it possible to do the same with navigation menus?
Basically, how can we convert set of tabs to navigation menus explicitly?
or create a parent list that would contain all the other lists.
Ex: Manager list, employee list all could get combined to one parent list,
Is this possible?
In shot, how can we convert the standard tab set in navigation menu format?
Vini,
Within Lists you can develop structures as many levels deep as you like. To do so just specify the parent list entry.
One customer that comes to mind has a single Navigation Menu list with several hundred entries, numerous levels deep.
With APEX 20.1 you now have the choice of displaying the Navigation Menu on the side, on the top or as a Mega Menu.
Regards,
David
I am using win32, c++.
I have a ListView & i want to disable (grey out) only some of the items from the list.
Is that possible or only whole ListView can be greyed out?
The ListView control does not have a concept of disabled items. You can simulate that appearance using custom drawing support. This Sample demonstrates how to change the text and background color of items within the list view.
You would need to go further and provide some means of determining when a disabled item is selected within the view (as the selection will continue to work).
The Windows List View Common Control does not have a disabled state for Items. If you want to do that, you will have to implement it yourself.
This is a not-trivial exercise. It's not hard to change the visible appearance using customer draw, but handling hit-testing and selection would be quite complex.
How do you create the big, scrolling list picker, like the kind that is created for datePicker and timePicker which is used on the WP7 default alarm clock? The remaining list pickers don't have quite the same effect. I would be using the list pickers only to choose integer values.
Thanks
The DatePicker and TimePicker are controls that are provided by the Silverlight Toolkit for WP7. What they actually do is present the selection in one control in your page, then navigate to a separate page that allows you to actually select a new date/time. In these separate pages they use a collection of LoopingSelector controls (one per item) that enable the user to select the parts of the date/time.
If you want to display a similar picker but for numeric values, then you need to implement the same infrstructure but using a single LoopingSelector and you need to provide the correct data source (that implements the ILoopingSelectorDataSource interface) that specifies the values for your control.
There is a great series of 3 posts on the LoopingSelector on WindowsPhoneGeek.com
I have a CListCtrl with checkboxes. I want to be able to disable one of the items so that the user cannot click the checkbox. Is this possible? If so, how?
Edit:
Found the specifics on how to hide a checkbox in another question
Need only some rows in a CListCtrl control to have check boxes
Shortly: Not easily possible.
You'll need to sub-class the CListCtrl and implement this behavior on your own or download for example the MFC Grid Control that allows you to do that.
As for the removing check-boxes idea, yes, that might be possible, MSDN:
Version 4.70. Enables check boxes for items in a list-view control. 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.
Background:
Applications that manipulate a collection of data typically present using a grid containing a header. These same applications typically incorporate a filter to allow the user to narrow the data set (Excel is a wonderful example. There are many others).
In my MFC application, I'm attempting to do the same using the CListCtrl and CHeaderCtrl combination. This combination has already enabled my application to provide for multiple column sorting including using the Image capabilities of the individual header items to represent ascending/descending sort order.
I have used my best Google-fu to locate any examples where the CHeaderCtrl was extended/customized to include custom drawing to account for the addition of the filter button and display an associated drop menu for user input of filter criteria when clicked.
Question(s):
Are there examples I missed?
If no examples available via the internet, what approach(es) should I consider in customizing CListCtrl and CHeaderCtrl to accomplish my goal?
Additional Comments:
One of the answers referenced the built-in FilterBar functionality. Yes I've seen that but it's not what I'm looking for. I'm looking to specifically emulate the non-static, non-visually intrusive filtering capabilities of Excel and other filter-enabled applications.
My Google-fu confirms yours, no examples that add non-invasive filter interface to CListCtrl, with or without the CHeaderCtrl.
Simple approach
In your HDN_ITEMCLICK handler, check the ((NMHEADER)lParam).iButton. For iButton == 1, that's the right mouse button. Here's your chance to show a little CWnd-dervied filter UI. Problem with this approach is there's no visual indication that right-click will bring up a filter menu.
More complicated
Create three column header images - filter icon, up arrow + filter icon, down arrow + filter icon. When not sorted on a column, show the filter only image, otherwise use the appropriate arrow + filter image. Handle click on the CListCtrl at the NM_RCLICK level so you get coordinate info (example.) Do some geometry to figure out if the click was on your filter icon, if so, show a little CWnd-derived filter UI. You can get even fancier and show the current filter in header tooltips, create more images with colored filters to show when a filter is active.
Is this you are looking for?
Since it is in other language, I have given the googled address. Refer second result.