listbox

How to Scroll to the Bottom of a ListBox when Items are Added

早过忘川 提交于 2019-12-25 10:25:14
问题 I'd like to be able to create some sort of auto scrolling feature in a ListBox I have, where new data is added periodically to the ListBox. Items populating the ListBox are held in an ObservableCollection, and are always added to the end of the collection. Is there a way to make the ListBox auto scroll to the bottom every time a new item is added to the ObservableCollection and the View is updated? 回答1: listBox1.SelectedIndex = listBox1.Items.Count - 1; listBox1.SelectedIndex = -1; 来源: https:

How to get all the list box options on Hidden field using Jquery?

纵然是瞬间 提交于 2019-12-25 09:28:32
问题 I Have a two listbox, left listbox contains values and right listbox doesn't have anything while compiling. <div class="row" style="padding-top:10px;"> <div class="col-lg-3"> <asp:ListBox ID="lstLeft" class="form-control" runat="server" SelectionMode="Multiple" Height="220px"> <asp:ListItem Value="transactions.storeid as StoreID">StoreID</asp:ListItem> <asp:ListItem Value="YEAR(transactions.Time) Year">Year</asp:ListItem> <asp:ListItem Value="MONTH(transactions.Time) Month">Month</asp

Get the values of a SelectedItem in wpf

 ̄綄美尐妖づ 提交于 2019-12-25 08:19:30
问题 I have a ListBox in a WPF Page each Item of which consists of two Labels. I have assigned them the names FirstName, LastName: <ListBox.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Name="FirstName" Text="{Binding FirstName}" Margin="0,0,10,0"/> <TextBlock Grid.Column="1" Name="LastName" Text="{Binding LastName}" HorizontalAlignment="Left"/> </Grid> <

How do I drag n drop files into a ListBox with it showing the file path?

淺唱寂寞╮ 提交于 2019-12-25 08:08:52
问题 Currently when I drag n drop files into my ListBox using the Window_Drop event I have this code. string[] files = (string[]) e.Data.GetData(DataFormats.FileDrop, true); listBox.Items.Add(files); Which works fine in WinForm it prints out the path of the file I just dragged and dropped into it as a item to the ListBox. However when I do the same thing in WPF I get this String[] Array as an output instead of the path. Now I know that code from WinForm doesn't exactly transfer over to WPF but I

How to remove an item from a paper-listbox?

白昼怎懂夜的黑 提交于 2019-12-25 07:59:37
问题 I can add an item to a paper-listbox with Polymer.dom($['mylistbox']).append(paperItem); However I'm having trouble deleting it from the list afterwards. I tried: paperItem.remove(); That initially makes it dissapear, but it appears again after selecting another item in the list. How do I remove a paper-item from a listbox? 回答1: Polymer.dom($['mylistbox']).removeChild(paperItem); 来源: https://stackoverflow.com/questions/39053131/how-to-remove-an-item-from-a-paper-listbox

How to change properties of a TlistBoxItem in a android app in runtime?

帅比萌擦擦* 提交于 2019-12-25 06:55:04
问题 In my program, i made a function which reads a xml of a blog and put the Titles in a TListBox . But i need to change some properties in TListBoxItem , like font, height and color, but it doesn't change. How to set it in runtime ? repeat Title := ANode.ChildNodes['title'].Text; Link := ANode.ChildNodes['link'].Text; Desc := ANode.ChildNodes['description'].Text; DataPub := ANode.ChildNodes['pubDate'].Text; SetLength(Vet_News, Pos + 1); Vet_Nesw[Pos] := '<h2>'+Title+'</h2>'+Desc; Itemx :=

vertical scrollbar is not working in WPF

只谈情不闲聊 提交于 2019-12-25 06:35:18
问题 I have a listbox under stackpanel and vertical scrollbar is visible but the scroller is not coming. The horizontal works fine. I can scroll across the listbox but not vertically. <ListBox Width="700" Height="205" x:Name="log_Enteries" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"> </ListBox> I know setting height and width is not wise but it was desperate try I guess. 回答1: It's in a StackPanel . A vertically-oriented StackPanel will

vertical scrollbar is not working in WPF

末鹿安然 提交于 2019-12-25 06:35:03
问题 I have a listbox under stackpanel and vertical scrollbar is visible but the scroller is not coming. The horizontal works fine. I can scroll across the listbox but not vertically. <ListBox Width="700" Height="205" x:Name="log_Enteries" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible"> </ListBox> I know setting height and width is not wise but it was desperate try I guess. 回答1: It's in a StackPanel . A vertically-oriented StackPanel will

Excel Filter in sheet and populate filtered range in Userform listbox

对着背影说爱祢 提交于 2019-12-25 06:33:53
问题 I'm new to StackOverflow AND Excel/VBA. First i did some Google research to help me with my problem but there was not a good explanation available, i hope you guys can help. My problem: I have a worksheet range from A3:V100 that populates my listbox. Now, i use recorded macros with autofilters in my worksheet and i'm adding those macros to buttons in my userform but because the results can be row 5, row 35, row 40, my range isn't correct anymore. How can i set a listbox range only for the

How to get a listbox to return it's results into the next empty row in excel vba

∥☆過路亽.° 提交于 2019-12-25 06:31:23
问题 I have a listbox with 40 items. What I would like to achieve is to get each one that is chosen to be returned each on its separate line, with a line missing between, hence the .Row + 2 . Example code is: Dim LastRow As Long Dim lItem As Long LastRow = Worksheets(3).Range("B" & Rows.Count).End(xlUp).Row + 2 For lItem = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(lItem) And lItem = 0 Then Worksheets(3).Range("B" & LastRow).Value = "Example1abc" ElseIf ListBox1.Selected(lItem) And lItem = 1