listbox

How to populate a ListBox with a ADODB.Recordset (Error 91) To Do Autocompletion in Access

拜拜、爱过 提交于 2019-12-05 05:11:10
I work on an Access DB and I have to use a Datasource connection to a SQL Server. To do that I use the ADODB object with : -ADODB.Connection -ADODB.Recordset Code Up-to-date, following an observation of Ian Kenney Dim cnn As ADODB.Connection Set cnn = New ADODB.Connection Dim rs As ADODB.Recordset cnn.ConnectionString = "driver={SQL Server};provider=SQLOLEDB;server=10.****;uid=****readonly;pwd=****readonly;database=****" cnn.Open Set rs = cnn.Execute("SELECT [MATRI], [NOMPRE] FROM SCHEME_DB.TABLE WHERE NOMPRE LIKE '*" & Me.Textbox_recherche.Text & "*'") Me.Liste_choix.RowSourceType = "Table

How to use thread Delphi [closed]

Deadly 提交于 2019-12-05 05:10:59
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I work for a few days of this application. Form freezes until the entire transaction. How do I use Tread? procedure TForm1.ListBox1Click(Sender: TObject); var I: Integer; S: String; begin I := Listbox1.ItemIndex;

Get a List of the Selected Values in a ListBox

混江龙づ霸主 提交于 2019-12-05 04:59:08
There's already a question with a ton of votes for getting the selected value from a dropdown using jQuery here . That answer almost works for a listbox, but if multiple values are selected, the result is a single string with all the values concatenated. This is not useful. I need a collection (list, array, whatever) of the text values for each selected option. At the moment I'm thinking I'll use most of the answer from that other question, but without the .text() at the end, and then iterate through the matches. Better ideas? You can take multiple selected text by iterating loop as mentioned

ListBox created with WinAPI in VBA doesn't work

狂风中的少年 提交于 2019-12-05 04:52:40
I want to create a ListBox in VBA with WinAPI. I managed to create it, but ListBox doesn't respond to actions - no scrolling, no selecting. None of this works. It looks like it's disabled. How to make it respond to actions? The following code was used to create and fill ListBox . WinAPI functions Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName As String) As Long Declare Function CreateWindow Lib "user32.dll" Alias "CreateWindowExA" ( _ ByVal dwExStyle As WindowStylesEx, _ ByVal lpClassName As String, _ ByVal lpWindowName As

ListBox Displaying Horizontal Images WPF

允我心安 提交于 2019-12-05 04:04:38
问题 I'm trying to create a control in wpf/xaml that will display a horizontal list of images. The width of the listbox to be fixed (no scrollbar). When a new item is added the existing items reduce the amount of the image diplayed to accomodate it (the actual image doesn't reduce just the amount of the image shown). The functionality would be similar to adding a new column to a grid with a relative width property ("*") and the column contains an image with a fixed width. Here's my code so far:

javascript checkbox enable/disable

无人久伴 提交于 2019-12-05 03:21:11
问题 Ok this is very anoying, and it is probably very simple. I want to start my web page with disabled checkboxes, and after particlar line in listbox is selected to enable those boxes. So I put this in onload method onload = function () { for (i = 0; i < document.frmMain.checkgroup.length; i++){ document.frmMain.checkgroup[i].disabled = true ; } } it start my page with disabled boxes, now i want do enable them function enableCheckboxes(){ if (document.frmMain.Vrste[document.frmMain.Vrste

TinyMCE render listbox items as html

纵饮孤独 提交于 2019-12-05 02:52:48
I created a TinyMCE plugin and need the listbox items to display html. This is my plugin: editor.addButton('icons', { title: 'Foo', text: 'Foo', type: 'button', onclick: function() { editor.windowManager.open({ title: 'Foo', width: 300, height: 200, body: [{ type: 'listbox', label: 'Foo', name: 'foo', values: [{ title: '<em>Foo</em>', // <-- Mark save. Render as html. value: 1 }], }], }); } }); See also the fiddle: http://jsfiddle.net/allcaps/vqctac3d/ But the output looks like: Expected: How can I mark the list option title save so the contents is rendered as html? Here is your updated

ListBox Grouping issue

一曲冷凌霜 提交于 2019-12-05 02:43:09
I am trying to Group my collection which is based on my following model: public class Person { public string FirstName { get; set; } public string LastName { get; set; } public Role PersonRole { get; set; } } public class Role { public int Id { get; set; } public string RoleName { get; set; } } My PersonCollection, public ObservableCollection<Person> PersonList; The collection is populated with three Person object, two with identical roles. I want to group all my persons as per their RoleName. I have the following XAML: <Grid.Resources> <CollectionViewSource x:Key="cvs" Source="{Binding

WPF: Binding List to ListBox

雨燕双飞 提交于 2019-12-05 00:49:27
I have a class: public class A : INotifyPropertyChanged { public List<B> bList { get; set; } public void AddB(B b) { bList.Add(b); NotifyPropertyChanged("bList"); } public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(string info) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(info)); } } } And a binding (DataContext of UserControl is an instance of A): <ListBox ItemsSource="{Binding Path=bList}" /> Elements are shown, the ListBox is not updated after new object is added to List After changing list to

WPF How to change the listbox selected item text color when the list box loses focus

∥☆過路亽.° 提交于 2019-12-05 00:09:33
问题 I've been searching for how to change the text color of a selected item in a list box that has lost focus. <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent"/> <SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="Orange"/> These three tags take care of most of the work, but my list box has a black background and when the control loses focus, the