It is not really related to your question, but I had a question about
popup message box from custom action and I got an answer from Bob
Arnson:
Set a property in the CA and use that property as the condition in a
SpawnDialog control event to show a message box. Never show UI from a
CA; there's no way to get the same UI level information that MSI uses to
determine whether UI should be shown.
So probably try to change not to popup message box from CA, but
SpawnDialog (new dialog?) from installer UI and maybe after closing it,
you will have a correct focus.

-----Original Message-----
From: Richard [mailto:legal...@xmission.com] 
Sent: Thursday, December 10, 2009 12:12 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Validation on UI dialogs


In article <481222.60726...@web30401.mail.mud.yahoo.com>,
    Sankaranarayanan <loony...@yahoo.com>  writes:

> For validating the fields in Custom UI for empty / null values - I am
calling
 a Custom action on "DoAction" event of the Next Button and spawing a
new dialo
g if all the input values are correctly entered.
> 
> Incase of any blank values - I popup a message box from the custom
action cod
e to notify the user but I am not able to set the focus back to the
erroring fi
eld. 
> 
> Is there a way to set the focus from the Next Button to the erroring
field fr
om the Custom action code.

You have several choices.  First, you can rearrange things with one
required field per dialog so that its always clear which field needs a
value.

Second, you can keep all the fields on the same dialog, but not enable
the Next button until all the requirements are met (control properties
are
not empty) and use a text control (initially showing no text) that holds
the error message.  An additional text control can be placed next to the
offending fields so that an asterisk or other marker can be displayed
next to fields needing attention.

Your "DoAction" on the next button will probably need to work around
the fact that Windows Installer doesn't recognize property changes
correctly inside a DoAction attached to a button.  See my blog post on
UI custom action guidelines:
<http://legalizeadulthood.wordpress.com/2009/10/23/ui-custom-action-guid
elines/>
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for
download
 
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

------------------------------------------------------------------------
------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.  
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to