listview

ListView with horizontal items

只愿长相守 提交于 2021-02-20 06:53:09
问题 I come from WPF and I don't know if it's possible to make a ListView to distribute items horizontally, with all the extras like mouse-wheel scrolling (mouse devices) and swiping (touch devices). I've tried this, but it doesn't behave like the vertical one. Example: I cannot scroll with the mouse-wheel. <ListView ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Auto" ItemsSource="{Binding Collection}" > <ListView.ItemsPanel> <ItemsPanelTemplate>

Select only one item in two ListViews

亡梦爱人 提交于 2021-02-19 06:02:58
问题 I have two ListView , each bound to a specific collection in my ViewModel and I want to be able to select only one item globally. Each ListView has its SelectedItem property bound to the same property in the ViewModel. My probleme is as follow: when I select an item in a ListView , and then select another item in the other ListView, the first item stays selected. I could achieve this with some code-behind, but I want to know if a pure XAML solution exists. XAML: <ListView SelectionMode=

Using more than one choicebox to filter listview in JavaFX

白昼怎懂夜的黑 提交于 2021-02-19 05:35:20
问题 I am trying to create a filter function for my listview using multiple choiceboxes and I have no idea how to do it since i'm quite new to JavaFX. I did some research and I hear using a filteredList is required but most of the examples online revolve around only using a textfield. So this is my controller class @FXML private ChoiceBox<String> genre; @FXML private ChoiceBox<String> branch; @FXML private ChoiceBox<String> status; @FXML private ChoiceBox<String> company; @FXML private ListView

How to get a current Item's info from QtGui.QListWidget?

大城市里の小女人 提交于 2021-02-18 21:57:52
问题 Created a QtGui.QListWidget list widget: myListWidget = QtGui.QListWidget() Populated this ListWidget with QListWidgetItem list items: for word in ['cat', 'dog', 'bird']: list_item = QtGui.QListWidgetItem(word, myListWidget) Now connect a function on list_item's left click: def print_info(): print myListWidget.currentItem().text() myListWidget.currentItemChanged.connect(print_info) As you see from my code all I am getting on a left click is a list_item's label name. But aside from a label

How to get a current Item's info from QtGui.QListWidget?

妖精的绣舞 提交于 2021-02-18 21:57:36
问题 Created a QtGui.QListWidget list widget: myListWidget = QtGui.QListWidget() Populated this ListWidget with QListWidgetItem list items: for word in ['cat', 'dog', 'bird']: list_item = QtGui.QListWidgetItem(word, myListWidget) Now connect a function on list_item's left click: def print_info(): print myListWidget.currentItem().text() myListWidget.currentItemChanged.connect(print_info) As you see from my code all I am getting on a left click is a list_item's label name. But aside from a label

Saving Data from ListView using SharedPreferences

点点圈 提交于 2021-02-18 13:51:37
问题 i tried searching for an answer but could not find what i was looking for: this was my first try at saving data/using SharedPreferences so i wasnt quite sure of what i was doing. The main point was so that after a user inputs something in the EditText, it populates the ListView. But i also want it so that when this is carried out, the app also saves the string so that I can use LoadPreferences to have it when a user re-enters the app. This does not happen though the code: public class

How to highlight selected row in WPF Listview control with alternating background

风流意气都作罢 提交于 2021-02-18 08:32:36
问题 I am using VS 2008 with 3.5 of the .NET framework. I have set up my code to alternate the background lines in a WPF ListView control. One color used is white. The other color used is a light shade of green. When a white line is clicked on, it highlights the line in light blue. When a green line is clicked on, there is no highlighting and the background color remains light green. I have tried specifying the HighlightBrushKey and the ControlBrushKey in XAML, but they had no effect. What do I

How to retrieve data from Firebase into a ListView (with custom Array Adapter)

做~自己de王妃 提交于 2021-02-17 05:45:17
问题 I have currently designed a place explorer app with 3 items displayed in a list view. When a user logs in he will find a list of categories. On clicking a category the list of places under that category will appear. I have linked the app with Firebase. Now, I want to display 2 items ( placeTitle and placeDesc ) from the data stored in the firebase into the list view. I am unable to load the data into the ListView . Shopping Activity: public class ShoppingActivity extends AppCompatActivity {

Xamarin listview of List<List>

浪子不回头ぞ 提交于 2021-02-16 21:11:21
问题 I'm making a mobile app and I'm trying to load a list in a listview. The list has multiple elements and a list: public static List<Proposition> PropositionList = new List<Proposition> { new Proposition{ PropositionId = Guid.Parse("00000000-0000-0000-0000-000000000001"), Place= "Barge", Date= new DateTime(2020, 7, 11), Users= new List<User>(){ new User { UserId = Guid.Parse("00000000-0000-0000-0000-000000000001"), Name= "Jan Aerts", Sterren = 3 }, new User { UserId = Guid.Parse("00000000-0000

Xamarin listview of List<List>

风流意气都作罢 提交于 2021-02-16 21:10:10
问题 I'm making a mobile app and I'm trying to load a list in a listview. The list has multiple elements and a list: public static List<Proposition> PropositionList = new List<Proposition> { new Proposition{ PropositionId = Guid.Parse("00000000-0000-0000-0000-000000000001"), Place= "Barge", Date= new DateTime(2020, 7, 11), Users= new List<User>(){ new User { UserId = Guid.Parse("00000000-0000-0000-0000-000000000001"), Name= "Jan Aerts", Sterren = 3 }, new User { UserId = Guid.Parse("00000000-0000