listview

How to add Section footer, Section summary and Grand Total in ListView

五迷三道 提交于 2020-08-10 20:31:30
问题 Here's my ListView with section : ListView{ id: listView width: parent.width height: parent.height model: testContext.List interactive: false delegate: ItemDelegate { width: parent.width padding: 3 leftPadding: 15 rightPadding: scroll.width contentItem: RowLayout{ Text{ id: nameText text: modelData.name Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.isActive Layout.preferredWidth: (parent.width - scroll.width) / 3 } Text{ text: modelData.age Layout

Win32 Want marquee-able empty space in a listview (Iconview)

ぐ巨炮叔叔 提交于 2020-08-10 19:18:14
问题 In a Listview I am looking to have a marquee-able empty space of about 20 pixels above the first row of items and below the last row of items. Also to the left of the left-most items and the right of the right-most items. I am setting the item positions manually by using LVM_SETITEMPOSITION. Trying to place them at an offset of 20 pixels doesn't seem to work. I have supplied a simple code sample below. For some reason intially there actually is a marquee-able empty space to the top but once

ListView SubItem OwnerDraw Bold Part of the Text

主宰稳场 提交于 2020-08-10 19:16:12
问题 To finish off my adventure of owner drawing C# controls, my last problem is in a ListView . I have a ListView that will always be in the Detail view mode with two columns - Name and Value. For the Name column, I'll always use DefaultDraw , and for the Value column, I want to bold every match of a search term. My TreeView question and my ComboBox question about owner drawing helped shape the code so far. I don't need any background or border drawing so it is simpler than some of the other

ListView SubItem OwnerDraw Bold Part of the Text

生来就可爱ヽ(ⅴ<●) 提交于 2020-08-10 19:15:53
问题 To finish off my adventure of owner drawing C# controls, my last problem is in a ListView . I have a ListView that will always be in the Detail view mode with two columns - Name and Value. For the Name column, I'll always use DefaultDraw , and for the Value column, I want to bold every match of a search term. My TreeView question and my ComboBox question about owner drawing helped shape the code so far. I don't need any background or border drawing so it is simpler than some of the other

Why the Items of a Virtual ListView that are not visible don't have index?

二次信任 提交于 2020-08-09 09:53:06
问题 I'm working with a ListView in Virtual Mode (.NET 4.6). I tried to find the index of Items in the virtual ListView: when I enter a letter, the first item with text that start with that letter should be selected. Here is the FindItemWithText in listView1_KeyDown : if (char.IsLetterOrDigit(e.KeyChar)) { var str = e.KeyChar.ToString(); if (tempStr != str) { Index = 0; tempStr = str; } var item = listView1.FindItemWithText(str, false, Index, true); if (item != null) { item.Selected = true; item

ListView's first entry always incorrect for RTL

混江龙づ霸主 提交于 2020-08-06 21:38:04
问题 For some reason, the first entry in my ListView is always flipped the wrong way around when I use RTL. For example: Additional information: The ListView is in a DialogFragment. I HAVE updated my manifest to support RTL (the rest of the app works fine) The ListView has an Adapter, the layout per item looks like: <ImageView android:id="@+id/dropdown_icon" android:layout_width="wrap_content" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="fitCenter"

ListView's first entry always incorrect for RTL

不想你离开。 提交于 2020-08-06 21:33:43
问题 For some reason, the first entry in my ListView is always flipped the wrong way around when I use RTL. For example: Additional information: The ListView is in a DialogFragment. I HAVE updated my manifest to support RTL (the rest of the app works fine) The ListView has an Adapter, the layout per item looks like: <ImageView android:id="@+id/dropdown_icon" android:layout_width="wrap_content" android:layout_height="match_parent" android:adjustViewBounds="true" android:scaleType="fitCenter"

Kotlin setOnClickListener for a ListView

和自甴很熟 提交于 2020-07-31 05:36:38
问题 I have the following code: class BookListActivity : AppCompatActivity() { var array = arrayOf("Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10", "Item 11") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.book_list) val adapter = ArrayAdapter(this, R.layout.book_list_item, R.id.book_title, array) val listView : ListView = findViewById(R.id.book_list) listView.adapter = adapter } }

Kotlin setOnClickListener for a ListView

a 夏天 提交于 2020-07-31 05:35:08
问题 I have the following code: class BookListActivity : AppCompatActivity() { var array = arrayOf("Item 1", "Item 2", "Item 3", "Item 4", "Item 5", "Item 6", "Item 7", "Item 8", "Item 9", "Item 10", "Item 11") override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.book_list) val adapter = ArrayAdapter(this, R.layout.book_list_item, R.id.book_title, array) val listView : ListView = findViewById(R.id.book_list) listView.adapter = adapter } }

ListView cloning removes the default font functionality

孤街醉人 提交于 2020-07-31 03:47:18
问题 I have a basic ListView with a few columns. I create a ListViewItem using: ListViewItem item = new ListViewItem(); item.Text = "First"; item.SubItems[1].Text = "Second"; Then I add the ListViewItem to my ListView ListView1.Items.Add(item); So, I have a method where I change the Font of the ListView1 , and if the ListView changes the font, all ListViewItem-s do as well. But if I use the .Clone() function ListView1.Items.Add((ListViewItem)item.Clone()); It clones the ListViewItem and it hard