How do you get a list picker like the kind shown in the alarm clock? - list

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

Related

Can I dynamically disable a drilldown in Siebel 7.8?

I have a list applet with a drilldown in one of the columns, and I want to enable or disable it based on another field's value. Something like a dynamic drilldown, but instead of choosing a different view, I want to disable the navigation for some of the records.
Can this be done in Siebel 7.8?
Ideally without server scripting... and definitely without ugly browser scripting hacks, please.
I have tried creating a dynamic drilldown, but it doesn't work because I have to specify a target view in my parent default drilldown. If I use an inactive view for that, then the whole dynamic drilldown is ignored and Siebel simply uses the one with the next sequence number.
I can think of a couple of ways to implement it, but both are far from ideal:
Writing some server script to detect the drilldown event before it happens, and abort it if needed with a RaiseErrorText message. It should be doable... but I'd rather disable the drilldown than throw an ugly error to my users.
Placing the drilldown in a calculated field, and make it have no text when there should be no navigation. If there is no text, there is nothing the users can click to drilldown, right? But I would have to add a new column just for the drilldown, which would be confusing for the users.
If you don't want any scripting. There are 2 ways.
First way is using toggle applet.
1.Main Applet will have the drill down down object. And Toggle applet will not have the drill down objects.
2.Create a field in the BC to use it in the Toggle Applet condition .Toggle Applet will be displayed when the drilldown is not required.
Second way you can achieve it is through visibility Type attribute in the drilldown object as well as visibility Applet Type attribue at the view level.

Specify order of slides in carousel?

Is there a way to control the order of slides displayed to users in a carousel from the Experience Editor perspective? (or even the Content Editor)
Basically, based on the user that has been identified or not identified, I would like to display a different slide as the first slide of the carousel. All the other slides would still be present, just in a different, specified order.
Is there a way to accomplish this via rules or should I look at having to create separate datasources that have the different slide orders already specified?
TL;DR
Personalization can do three things:
vary a datasource for a rendering
vary a rendering (use another rendering basically)
hide a rendering.
I guess the question you need to answer is whether what you need can be accomplished by doing either one of these actions.
If you've used nested structures to represent your carousel (like we do in SCORE, you can see how it looks like here or here) it's not hard to show/hide certain panels based on personalization conditions and thus reorder the carousel. Depending on how exactly it looks on the published site you may only need to repoint datasources. Either way, it's personalization out of the box and your content structures working nicely together.
If you've used a (variation of a) MultiList field to represent a list of your panels with panels themselves being items somewhere in the shared content area it's not something personalization engine can change based on a condition. Changing a field value is, unfortunately, not on the menu. I am sure you can code around it thanks to Sitecore being so open and flexible but I am not sure you can make it seamless (e.g. variations preview in Page Editor).
Rendering parameters is also not something you can change but if yours are static and defined on the rendering definition item (as opposed to being supplied when component is bound to the placeholder and thus recorded inside the presentation details) you can get away with having two definition items for your carousel component (same code behind it) and picking the right one based on the personalization condition.
Hope it helps.

Disable only specific list items in a win32 ListView

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.

Does MFC have a built in grid control?

First what I want: The ability to display a grid with multiple columns, each cell having a custom render callback. So you might use such a control to display your inventory in a game, or something like the behaviour in Google Chrome where it shows a grid of popular pages you visit.
I've been playing with CListCtrl and while I can get custom rendering ability on each item, I can't get it work with columns - having say 3 items per row. The control has column-related methods but I think these are specifically for the built-in functionality where different attributes of an item are shown automatically in each column... not for providing a generic grid control.
So, does such functionality exist in MFC? If not then I wonder if the easiest approach is for me to actually insert each of the rows as an Item... and then the custom rendering draws the multiple cells in the row, I could also do custom UI to support clicking on the cells.
But what I really want is to be able to create a custom control, and add this as an item to a list - like in Flex for instance - so I/O etc is automatically handled.
Any advice/information welcome...
Dundas has thrown some of its (excellent) components in the public domain. Their Ultimate Grid is available on CodeProject.
I'm not aware of a built-in control, but I think you should take a look at this.
The article is describing in detail the functionality of a fully featured MFC grid control, derived from CWnd, for displaying tabular data.
YOUR_LIST_CONTROL.SetExtendedStyle(LVS_EX_FULLROWSELECT|LVS_EX_INFOTIP|LVS_EX_GRIDLINES);
I think it will help you (SetExtendedStyle).
I suggest this one:
https://code.google.com/p/cgridlistctrlex/
very complete

How to add data Filtering using CListCtrl and CHeaderCtrl

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.