This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Edit control not refreshed if user type something in the edit control before browse
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 20, 2011
01:55 AM
Edit control not refreshed if user type something in the edit control before browse
Hello,
i created an Edit control and a button in a Dialog who will open a browse dialog box with Custom Actions. The Edit control will recieve the path of the selected file from the browse dialog box.
Here is the code of my function who call the browse dialog box to select the file path :
#define LICENSEPROPERTIES "LC_LICENSEFILEPATH"
STRING szFile[512], svDir, svFileList, svTemp;
NUMBER nResult, nReturn;
BOOL bMultiSel, bDerefLinks;
LIST listFiles;
STRING svValue;
NUMBER nvSize;
HWND hDlg;
STRING svPath;
begin
nvSize = 256;
MsiGetProperty(hInstall, LICENSEPROPERTIES, svPath, nvSize);
bMultiSel = FALSE;
bDerefLinks = FALSE;
listFiles = ListCreate(STRINGLIST);
// Open the file browse dialog.
nResult = FileBrowseDlg( szFile, 512, "LIC files (*.lic)\0*.lic\0\0", "Select File", svPath, bMultiSel, listFiles, bDerefLinks );
if nResult = 0 then
MsiSetProperty( hInstall , LICENSEPROPERTIES , szFile );
endif;
ListDestroy(listFiles);
end;
As you can see, I call a function named FileBrowseDlg. This function display the browse dialogbox and returns in "szFile" the path selected by the user. After that, I do a MsiSetProperty to change the text value of the edit control "LICENSEPROPERTIES"
When I debug this code everything is OK. I can see the new path in "szFile" and I can deduce that the MsiSetProperty set the edit control text value.
But ! My problem is that the edit control text value isn't directly refresh with the new file path value if the user typed something into the edit control before clicking Browse.
I read many things on the internet before asking you like changing the ordering values in the direct editor or else... But nothing resolve my problem.
We search to have the best pratice to do that.
Your Help will be very very appreciated !
i created an Edit control and a button in a Dialog who will open a browse dialog box with Custom Actions. The Edit control will recieve the path of the selected file from the browse dialog box.
Here is the code of my function who call the browse dialog box to select the file path :
#define LICENSEPROPERTIES "LC_LICENSEFILEPATH"
STRING szFile[512], svDir, svFileList, svTemp;
NUMBER nResult, nReturn;
BOOL bMultiSel, bDerefLinks;
LIST listFiles;
STRING svValue;
NUMBER nvSize;
HWND hDlg;
STRING svPath;
begin
nvSize = 256;
MsiGetProperty(hInstall, LICENSEPROPERTIES, svPath, nvSize);
bMultiSel = FALSE;
bDerefLinks = FALSE;
listFiles = ListCreate(STRINGLIST);
// Open the file browse dialog.
nResult = FileBrowseDlg( szFile, 512, "LIC files (*.lic)\0*.lic\0\0", "Select File", svPath, bMultiSel, listFiles, bDerefLinks );
if nResult = 0 then
MsiSetProperty( hInstall , LICENSEPROPERTIES , szFile );
endif;
ListDestroy(listFiles);
end;
As you can see, I call a function named FileBrowseDlg. This function display the browse dialogbox and returns in "szFile" the path selected by the user. After that, I do a MsiSetProperty to change the text value of the edit control "LICENSEPROPERTIES"
When I debug this code everything is OK. I can see the new path in "szFile" and I can deduce that the MsiSetProperty set the edit control text value.
But ! My problem is that the edit control text value isn't directly refresh with the new file path value if the user typed something into the edit control before clicking Browse.
I read many things on the internet before asking you like changing the ordering values in the direct editor or else... But nothing resolve my problem.
We search to have the best pratice to do that.
Your Help will be very very appreciated !
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 27, 2011
06:35 AM
Any idea ? 😞 😞 😞
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 28, 2011
09:19 AM
My problem is not resolved yet... 😞
And I don't understand why noboby answers... Can I get some help ?
And I don't understand why noboby answers... Can I get some help ?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 01, 2011
05:56 PM
If you are using a Basic MSI project, the internal Windows Installer user interface support will generally not refresh controls backed by a property until the dialog is closed and reopened. Edit controls will also not refresh if any value was entered by a user into the control. Unfortunately, these are limitations of the MSI user interface functionality.
You can either implement a custom user interface for MSI installations using Windows Installer's external UI support or you can use a different project type such as InstallScript, which provides a script/resource driven UI. It would also be possible to use an InstallScript project to obtain user input, then launch your existing MSI package silently and pass any properties on the command line to the MSI package.
You can either implement a custom user interface for MSI installations using Windows Installer's external UI support or you can use a different project type such as InstallScript, which provides a script/resource driven UI. It would also be possible to use an InstallScript project to obtain user input, then launch your existing MSI package silently and pass any properties on the command line to the MSI package.