Display single item in listbox - listbox

I have a listbox in my wp7 application. Some 20 to 30 items are in the listbox. I need to show single item at a time. When sliding it show next or previous item. How can I create such a listbox

Related

Scrollbar Functionality in Typescript in angular 7

I have 10 items .I am selecting 4th item .On selection of item i am displaying confirmation popup .On click of Ok in popup it navigates to another page.In that page I am showing all those 10 items .But my concern is whatever the item i am selecting the scrollbar should comes to that particular item.

What event to call when ListView selected item changed?

I'd like to run a procedure--once--whenever the selected item in a ListView changes. The obvious choice would be OnSelectItem, but it's called twice when the user moves from one selected item to another (using mouse or arrow keys). Similarly, OnChange is called three times when moving between items.
Is there an event generated only once under these conditions? OnClick is generated once, but doesn't cover moving between items using arrow keys, etc.
You can do it like this using OnSelectItem.
Remember the last selected item.
When the OnSelectItem fires, check if the current selected item differs from the one you remembered.
If so, perform your task, and make a note of the new selected item.

Two dependent Menus in ASP.NET MVC 5 web application design

I am using the ASP.net MVC 5 to build the web application.
It's little more complicated than the simple MVC example I googled. Not so sure what I've done is the right way to do.
A user is able to select the Region or an item ID: {number} on the left hand in the Menu 1. The menu is populated as a multi-level menu which means there are two levels of this menu, Region and ID.
Each level decides which controller to call. For example, When Region 1 id clicked, RegionsController will be invoked, and render a view for the content.
There is a Menu 2 on the right hand, it's a menu according to which level clicked, so it could be different menu items depending on whether Region or ID were clicked.
Menu 2 is the functional menu, such as Map, Record, ... For example, Map is a menuitem in Menu2 correspoding to Region Level.
Record is a menuitem in Menu 2 corresponding to ID Level.
The layout is showing as below, including two menus (partial view) and a content.
Scenario:
User clicks on Region 1, call the Region controller to render the view on the right. Menu2 is populated according to the Region. A user is able to click any menu items on Menu2 to render the content
When a user clicked on Region 1, call control action to handle /Region/Index/1 to render the view. I will save the Id = 1 to both the cookie and session in order to use when the Menu 2 menuitem1 or menuitem2 had clicked. So the content is decided by Menu 1 and Menu2.
User clicks on ID:009, call the ID controller to render the view on the right. Menu2 is populated according to the Region. A user is able to click any menu items on Menu2 to render the content
Same as 1. When a user clicked on Region 1, call control action to handle /ID/Index/008 to render the view. I will save the Id = 008 to both the cookie and TempData in order to use when the Menu 2 menuitem1 or menuitem2 had clicked. So the content is decided by Menu 1 and Menu2.
Questions:
If I want to see the Region 1 and Map, I need to save which item (Menu1 item) was clicked. So I can render the content when the menuitem# clicked on the Menu2. The truth is every controller needs to get which Id in Menu 1 was clicked.
Save click item
SessionManager.SaveItem(id, this.HttpContext);
Get click item
SessionManager.GetItem(this.HttpContext);
It is too annoying to do this in every controller. Is there a better way?
Menu1 decides which Menu2 menuitems displays. So I have to keep track of which Menu 2 menuitems shall be display. In the IDController Index action, I need to render the partial view with "Record" menuitem. On the contrary, in the MapController, I need to render the partial veiw with "Map" menuitem.
How could I improve this kind of MVC architecture?

drag multiple records from dbgrid

I have a TDbGrid with some records. I want to drag an drop multiple records to a listbox on simple drag and drop. but after selecting the multiple records when i click on the selected records of grid for dragging, all selected records are become deselect except the current record. How can fix this issue?

How do I move multiple nodes at once in a TJvTreeView?

When you select multiple nodes of a JvTreeView, and then try to drag these nodes, the JvTreeView selects the node you clicked to drag, rather than initiating dragging all the selected nodes. You end up dragging only this single node.
Is it possible to drag multiple nodes in a JvTreeView? I am using Delphi 2007.
UPDATE: Oddly enough, if I hold down CTRL+SHIFT when dragging the items, I can successfully drag them all. Any ideas?
Suppose MultiSelectStyle is the default [msControlSelect], then the answer to your question is 'you don't release the control key when you're selecting the last item and beginning dragging'.
The culprit is in TJvTreeView.WMLButtonDown in JvComCtrls.pas. Code there tests if 'Ctrl' is pressed when the TreeView is MultiSelect, and clears all items and selects the clicked item if 'Ctrl' is not pressed. It should instead test if the clicked item is already selected and do nothing if it is.
You can see the broken behavior without dragging. Multi select a few items and then click a selected item with the mouse. The VCL TreeView do not select or de-select anything, while the JVTreeView, instead, de-selects all items and selects the clicked one.
Yes absolutely, I do it all the time.
Of course Multi-Select needs to be True and you may need to have a look at the TTreeView's MultiSelectStyle. That controls what type of nodes can be selected at the same time. For example if msSiblingOnly is set to true, you can only select sibblings.
Are you using dmAutomatic or dmManual. If the latter, it could be that you are doing something in the OnMouse* events that is negating the multi-selection you made earlier.

Resources