combobox

VBA create several textboxes/comboboxes dynamically in userform

时光总嘲笑我的痴心妄想 提交于 2019-12-19 04:15:09
问题 I create dynamically a Userform with comboboxes and textboxes. one of each per row. The user will choose how many lines he wants. So far I can adjust the size of the Userform according to the number of rows and create the first row. But an error occurred for the second row: Run-time error '-2147221005(800401f3)': Invalid Class String The result is Userform generated Here is my code. to simplify I allocated the row variable to Nb=3 Public Sub CommandButton2_Click() Dim Nb As Integer 'Nb =

WPF: Selecting all the text in and setting focus to a ComboBox's editable textbox

丶灬走出姿态 提交于 2019-12-19 04:05:55
问题 I have a WPF ComboBox which has its IsEditable property bound to a view model which can switch it on and off. When it is switched on, I want to give focus to the ComboBox and select all the text in the edit TextBox . I can't see the best to accomplish this. Should I replace the ControlTemplate , subclass the ComboBox base class, and provide the needed properties, use Attached Properties, or some other approach? 回答1: I have a solution for you. I'm using a combination of Model-View-ViewModel

VBA: How To Reference ComboBox Object

江枫思渺然 提交于 2019-12-19 04:01:41
问题 I have created a lone ComboBox on the first worksheet in Excel. However, I can't find a way to reference its object. I inserted a module, and one of my subs can successfully reference the following value: Sheets("Sheet1").Name However, the following is not available and throws an error: ComboBox1.Value Error message is: Run-time error '424': Object required Can someone explain how to reference this ComboBox in my worksheet? Thanks 回答1: That depends on the type of combo box that you created:

How to load a large array of strings in to an MFC combobox control fast as possible?

一笑奈何 提交于 2019-12-19 04:01:02
问题 I have an array of 1000 strings to load into a combo box. What is the fastest way to load the array of strings into the combo box? Is there some way other than iterating over the list of strings, putting each string into the combo box one at a time? And how to copy the combo box data once loaded to some 10 other combo boxes? 回答1: If you have 1,000 strings repeated in 10 comboboxes, you may want to consider using an owner drawn combobox, which draws the strings on the fly based on indices into

How to load a large array of strings in to an MFC combobox control fast as possible?

五迷三道 提交于 2019-12-19 04:00:03
问题 I have an array of 1000 strings to load into a combo box. What is the fastest way to load the array of strings into the combo box? Is there some way other than iterating over the list of strings, putting each string into the combo box one at a time? And how to copy the combo box data once loaded to some 10 other combo boxes? 回答1: If you have 1,000 strings repeated in 10 comboboxes, you may want to consider using an owner drawn combobox, which draws the strings on the fly based on indices into

How to put ComboBoxTableCell in a TableView?

淺唱寂寞╮ 提交于 2019-12-19 03:42:10
问题 I'm trying to put a ComboBox in a table cell, but I can't. the code is the next: private void cargaTablaDesglose() { TableColumn<Map, String> column1 = new TableColumn<>(Desglose1); TableColumn<Map, String> column2 = new TableColumn<>(Desglose2); TableColumn<Map, String> column3 = new TableColumn<>(Desglose3); column1.setCellValueFactory(new MapValueFactory(Desglose1)); column1.setMaxWidth(0); column2.setCellValueFactory(new ComboBoxTableCell.forTableColumn(null)); column2.setPrefWidth(150);

ExtJs: Search / Filter within a ComboBox

断了今生、忘了曾经 提交于 2019-12-19 03:37:18
问题 I've the following problem / question in ExtJs 2.3: I'd like to do a search within a combobox. I'll give you an example: Ext.comboData.names = [['Peter', 'Paul', 'Amanda']]; var store = new Ext.data.SimpleStore({ fields: ['name'], data: Ext.comboData.names }); var combo = new Ext.form.ComboBox({ name: '...', id: '...', store: store, displayField: 'name', typeAhead: true, mode: 'local', forceSelection: false, triggerAction: 'all', emptyText: '-', selectOnFocus: true, applyTo: '...', hiddenName

How to add option “All” to a combobox in WPF with binding from Database

十年热恋 提交于 2019-12-19 03:22:58
问题 I have the following ComboBox in WPF. I know that I can add option ALL with CompositeCollection, but I don't know how. It would be great if somebody help me out with a short tutorial. <ComboBox SelectionChanged="ComboBoxOperatingPoints_SelectionChanged" x:Name="ComboBoxOperatingPoints" DropDownOpened="ComboBoxOperatingPoints_DropDownOpened_1" FontSize="30" HorizontalAlignment="Right" Margin="40,40,0,0" VerticalAlignment="Top" Width="200" Height="50" IsSynchronizedWithCurrentItem="True"

WPF ComboBox with IsEditable=“True” - How can I indicate that no match was found?

时间秒杀一切 提交于 2019-12-19 03:07:08
问题 Using the following simple text box as an example: <ComboBox IsEditable="True" SelectedItem="{Binding}"> <ComboBoxItem>Angus/ComboBoxItem> <ComboBoxItem>Jane</ComboBoxItem> <ComboBoxItem>Steve</ComboBoxItem> </ComboBox> I would like to allow the user to find their selection by typing in a name, so I have set IsEditable equal to true. Acceptable values for the property bound to SelectedItem are any one of the options in the list, or no selection ( null ). The problem is, there is no error

WPF ComboBox with IsEditable=“True” - How can I indicate that no match was found?

拥有回忆 提交于 2019-12-19 03:07:08
问题 Using the following simple text box as an example: <ComboBox IsEditable="True" SelectedItem="{Binding}"> <ComboBoxItem>Angus/ComboBoxItem> <ComboBoxItem>Jane</ComboBoxItem> <ComboBoxItem>Steve</ComboBoxItem> </ComboBox> I would like to allow the user to find their selection by typing in a name, so I have set IsEditable equal to true. Acceptable values for the property bound to SelectedItem are any one of the options in the list, or no selection ( null ). The problem is, there is no error