How to update or refresh the contents of a ComboBox in a WiX dialog? - combobox

I would like to implement the well-known scenario whereby the contents of a ComboBox in a WiX dialog depends upon the contents of a previous TextBox value, as input by the user. This will allow me to drive the installation of a component that needs to run SQL scripts.
First, the user specifies the name of the database server.
Second, I would like the ComboBox to display the list of available databases on said server.
This seems a simple enough request and, as far as I understand it, is not easily supported with Windows Installer / WiX. However, I would like to workaround and implement this behavior as close as is possible.
What would be the closest implementation possible ?
I have tried an explicit pushbutton that triggers a custom action. I have tried a duplicate identical dialog that gets navigated to but I can't seem to combine two behaviors - CA execution and dialog navigation.

The general approach is this:
create a custom dialog which contains the edit box control
create a different dialog which contains the combo box control
on the Next button of the first dialog execute a custom action which populates the combo box on the second dialog
This cannot be done using a single dialog.
Also, you need to write custom code to populate the combo box. You can find some sample VBScript code here: http://www.advancedinstaller.com/user-guide/tutorial-combobox-listbox.html#combolist-examples
It's an example for Advanced Installer, but the sample .VBS custom actions can be used with any setup tool.

Related

Put RadGrid in insert mode via command

I need to put the grid in insert mode when a user clicks an Add button (he doesn't want the click on the grid, but an external button)
Since I've developed all my app using MVVM pattern, I was wondering if there's a way I can put the grid in insert mode via command
Any suggestion?
Thanks
The RadGridView comes with some built in commands, one of which is begininsert.
There's sample code shows how to invoke such commands on telerik's site:
https://docs.telerik.com/devtools/wpf/controls/radgridview/commands/overview
Since this is manipulating the state of a control then you can use code behind in the view and a click event without "breaking" mvvm. You can't run automated tests on this processing using just the viewmodel anyhow - since the viewmodel isn't going to know anything about a gridview, let alone any mode it's in.

Word: Opening 2nd document doesn't trigger again the Ribbon_Load

I have implemented a ribbon that its buttons are enabled/disabled according to document file path.
The problem is that when I open a second document, the Ribbon_Load doesn't get called again and the buttons have the values of the first opened document.
Why is this happening and how can make Ribbon_Load to get called every time a new item is called?
Thank you
Ribbon_Load only is called when the add-in first loads into an Office application. When you open additional files the add-in is not loaded again, even if the document appears in a separate window. So Ribbon_Load is not called again.
You can use the DocumentOpen event to trigger the Ribbon callbacks that should execute. (Exactly how you do that depends on whether you use the Ribbon Designer or Ribbon XML.) Note that if you want each document window to reflect different settings in the Ribbon you'll probably also need to work with additional events, such as NewDocument, DocumentClose and WindowActivate.
You may find the following article on MSDN useful, even though it was written for Custom Task Panes the logic required for managing multiple Ribbons is pretty much the same: Managing Task Panes in Multiple Word and InfoPath documents.

Unable to capture table of a C++ form in silktest classic

I am trying to capture the elements on a C++ form in a Windows Desktop Application. The elements are mainly tables and contents of Dialog boxes. I am able to capture the individual cells in the table but not the entire table. I am unable to get the contents of the dialog box either. I am using SilkTest classic agent for this. Can anybody guide me with this?

Question about changing dialog box layout

Hey, I just got started designing dialog boxes and windows forms, and I had a basic question.
When you use something like a windows installer, it has a next button, and when you click it the dialog completely changes layout in moving on to the next step. My question is, is this done by loading a completely new dialog box and getting rid of the previous one. Or is there some way of making a dialog with multiple pages/states (not sure what to call them).
Thanks in advance for any help.
Wizards are usually made using the property sheet control from the Common Controls library. They do not create a new dialog, but use something similar to tab pages instead.

How do I get ToolStripMenuItem Shortcut Key to work when WinForms control is hosted in VB6 Form

We have a scenario where we are exposing a set of WinForms UserControls via COM to a Legacy VB6 application. We have 3 different controls which have a MenuStrip on it that has the Control + F shortcut key mapped to a menu item which invokes a control specific find items dialog when the shortcut is entered. When we try testing this code in our WinForms shell the appropriate dialog (the one hosted in the active MdiChild) pops up when all 3 controls exist, but in the VB6 host the wrong dialog usually appears (it seems to always be the dialog for the first control which was created).
I'm fairly certain this has something to do with message pumps and all, but I can't seem to figure out how to ensure that the proper ToolStripMenuItem is getting invoked when we enter the shortcut key.
I know the option of using a global/singleton ShortcutKey manager/service that overrides ProcessCmdKey is a possibility, but that would be the last resort we want to fall back on. I just get a feeling that a message pump needs to be started.
This may be inappropriate to your needs. And it might only apply to VB6 specifically. But have you considered having VB6 use the standard menus, and just have it hold onto the keyboard shortcuts, and trigger things appropriately? You could then simply hide the individual menus (but they should still fire their events).

Resources