PDA

View Full Version : Custom Dialog Static Text after changes



NewsArchive
10-23-2012, 06:31 AM
Using latest SB, Developer Edition.

I need some direction on how to accomplish the following. I have an
installation script that contains several Custom Dialogs. The 2nd one
has a series of entry field and checkboxes that the user chose from.
All of that appear to be working correctly.

The 3nd Dialog box consist entirely of "Static Text" fields since all
I want to do is display information to the user as a final
confirmation before proceeding. I'm using the Static Text fields in
order to make the screen nice an neat (2 columns).

Using the partial code shown below, I am setting some run time
variables with text depending on True/False choices made by user. When
that window first displays, it shows the information correctly.
However if the back button is used, check boxes changed and then move
forward again, the text values are not updated but have the prior (1st
time) value.

As seen in the code, I initially tried just changing the runtime
variable. When they did not work, thought I would try to change
control directly but that does not help either.

Can anyone point me in the right direction on how to get this to work
if user back ups, make changes and then goes forward again?

Barton Whisler


=================== SB Script extract =========================

[ User Interface ]
! Wizard dialog definition(s)
Define Wizard Dialog "WARNINGSCREEN" (Custom Wizard Dialog)
Define Wizard Dialog "CUSTOMDIALOG" (Custom Wizard Dialog)
Define Wizard Dialog "READYINSTALL" (Custom Wizard Dialog)

! The Wizard Loop displays the dialog screens that the user sees in
the installation
Loop Wizard (Abort Dialog Active)

! Handle Custom Dialog Box
If %_SB_DIALOGID% Equals "$CUSTOMDIALOG$" Then
If %_SB_EVENTID% Equals "$EVENT:ONUPDATE$" Then
If %HIDEPOSTGRES% Equals "1" Then
Set Variable %TXTHIDEPOSTGRES% to "Hide"
Set Text "Hide" to ControlID "%TXTHIDEPOSTGRES%"
Else
Set Variable %TXTHIDEPOSTGRES% to "Show"
Set Text "Show" to ControlID "%TXTHIDEPOSTGRES%"
End
End
End

If %_SB_DIALOGID% Equals "$READYINSTALL$" Then
If %HIDEPOSTGRES% Equals "1" Then
Set Text "Hide" to ControlID "%TXTHIDEPOSTGRES%"
Else
Set Text "Show" to ControlID "%TXTHIDEPOSTGRES%"
End

End
End


Barton Whisler
Prosoft Inc.
Tampa, Florida

NewsArchive
10-23-2012, 11:20 PM
Barton,

I have developed an example for you to demonstrate this:

www.lindersoft.com/projects/CheckBoxesDemo.zip

Friedrich

NewsArchive
10-23-2012, 11:20 PM
Thanks, I take a look at it.

Barton

Barton Whisler
Prosoft Inc.
Tampa, Florida

NewsArchive
10-24-2012, 08:37 AM
Got it working perfect now (helps to have ID's on controls<g>)

Barton

Barton Whisler
Prosoft Inc.
Tampa, Florida

NewsArchive
10-24-2012, 08:37 AM
You found that out too? <g>

--

Russ Eggen
RADFusion International, LLC

NewsArchive
10-25-2012, 12:36 AM
Yea, had to kick myself once I realized it<VBG>!

Barton Whisler
Prosoft Inc.
Tampa, Florida