listbox

Retrieve items in collection (Excel, VBA)

﹥>﹥吖頭↗ 提交于 2020-02-06 07:50:52
问题 I'm getting a Type Mismatch-error, when trying to retrieve items from my collection. What I mainly want to do, is to collect all customers within as collection, and past all results on my ListBox for visualization. The reason why I'm using a class-module is due to the fact, that UDT are pasting an error: "Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions". So I started programming all properties in classes instead,

Retrieve items in collection (Excel, VBA)

ぐ巨炮叔叔 提交于 2020-02-06 07:50:06
问题 I'm getting a Type Mismatch-error, when trying to retrieve items from my collection. What I mainly want to do, is to collect all customers within as collection, and past all results on my ListBox for visualization. The reason why I'm using a class-module is due to the fact, that UDT are pasting an error: "Only user-defined types defined in public object modules can be coerced to or from a variant or passed to late-bound functions". So I started programming all properties in classes instead,

Getting Listbox Item Index from Button Click

橙三吉。 提交于 2020-02-04 07:20:17
问题 So I'm using a button in the DataTemplate of my Listbox ItemTemplate . Any ideas how I would grab the index of the item of the Listbox from the button click? I can't see to grab the button's parent. <ListBox.ItemTemplate> <DataTemplate DataType="{x:Type local:Img}"> <Button Click="lstButton_Click">... 回答1: private void lstButton_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; int index = _myListBoxName.Items.IndexOf(button.DataContext); //or try this index =

Getting Listbox Item Index from Button Click

杀马特。学长 韩版系。学妹 提交于 2020-02-04 07:08:09
问题 So I'm using a button in the DataTemplate of my Listbox ItemTemplate . Any ideas how I would grab the index of the item of the Listbox from the button click? I can't see to grab the button's parent. <ListBox.ItemTemplate> <DataTemplate DataType="{x:Type local:Img}"> <Button Click="lstButton_Click">... 回答1: private void lstButton_Click(object sender, RoutedEventArgs e) { Button button = sender as Button; int index = _myListBoxName.Items.IndexOf(button.DataContext); //or try this index =

Cant select Items in Listbox when using Tabcontrol WPF

主宰稳场 提交于 2020-02-04 04:38:45
问题 I have a problem with the selection of items in a Listbox, when the Listbox is in a Tabcontrol. I can't select any item in the Listbox. I am filling the Listbox dynamically via code-behind, also I am using drag and drop on it, though, Drag and drop is working with the tabcontrol. Here is my XAML code: <Window x:Class="SPInstallApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit.Extended"

How would I check if a row of a Listbox is empty

南笙酒味 提交于 2020-02-04 01:53:12
问题 I'm trying to write an IF statement in VBA to determine if the first column along the row of a listbox is empty. If the row is empty I want a message box to display. if the row is not empty then the row is saved to memory. My code so far: Private Sub RiskLogReviewListBox_DblClick(ByVal Cancel As MSForms.ReturnBoolean) With RiskLogReviewListBox If IsNull(Me.RiskLogReviewListBox, 0, 0) Then MsgBox "Item is not a Valid Entry" Else str1$ = .List(.ListIndex, 0) str2$ = .List(.ListIndex, 1) str3$ =

GWT Multiselect Dropdown Listbox

我的未来我决定 提交于 2020-02-02 15:24:08
问题 I'm looking to create a multi-select dropdown listbox in GWT, but I'm not sure how to go about doing so. I'd like it to be similar to this: Any suggestions? Should I take gwt ListBox code and adapt it to accept objects? Or should I forget their Listbox and try to make my own from scratch? Or should I go in a different direction completely? I'd really prefer not to include external libraries (like SmartGWT) if possible - I'm trying to stick with straight-up GWT. Please advise. Thanks! 回答1: For

Silverlight - binding a listbox within a listbox template

痴心易碎 提交于 2020-02-02 10:32:53
问题 In silverlight, I'm trying to build a listbox of reports and I'm trying to show the parameters of the report in a listbox within the datatemplate of the outer reports listbox. Here are the data classes: public class Report { public string Title { get; set; } public string Description { get; set; } public List<ReportParameter> Parameters = new List<ReportParameter>(); } public class ReportParameter { public string Name { get; set; } public string ParameterType { get; set; } public bool

How to remove / filter data on listbox using textbox on C#

怎甘沉沦 提交于 2020-01-30 08:12:11
问题 I need to add a search box to a listbox that has data pulling from SQL - I'm not sure how as it isn't my code. I just need to add the search function. The listbox holds user names and surnames. So all I have to work with is lbUsers (the listbox name). Thus far I have it to search a user name but it's only displaying the closest search - I want the code to filter out everything containing what I have typed into the search box: private void btnSearch_Click(object sender, EventArgs e) { this

Listen to Windows messages in control, created with WinAPI, in VBA

佐手、 提交于 2020-01-29 19:42:24
问题 I had a great help with understanding how to correctly create controls (particularly, ListBox) in VBA with WinAPI. So, according to the structure, how VBA handles windows, we have three handles: hWin - UserForm's handle hClient - UserForm child's handle ( Server ) hList - ListBox's handle The question is - how to listen to Windows messages, incoming from Windows and generated by ListBox? 回答1: To listen to the messages, override the function that processes messages sent to a window, which is