el_coyote
(Fresh Scripter)
2005-01-18 06:11 PM
Script to show/hide step

Hello,

i try to write script looks like an installer with steps.

It's looks like that :

==================================================
| -----Step1------------------------------------ |
| | | |
| | | |
| | | |
| ---------------------------------------------- |
| Step1 -> Step2 -> Step3 -> Finish |
==================================================

So when i complete the step1, script go to step2 (hide step1 and show step2).
For some reason i need to step back step2 -> step1 but can't go to step3 if the step2 is not complete.

For that i need to show/hide $form.frame() with button or action on an image or if the step complete.
I don't find how to do that

Thanx for help.

Note : i can explain better in french if necessary


AzzerShaw
(Seasoned Scripter)
2005-01-18 09:37 PM
Re: Script to show/hide step

Hi,

So something like a progress bar?


Sealeopard
(KiX Master)
2005-01-19 01:56 AM
Re: Script to show/hide step

See the KiXforms Manual for properties/emthods associated with various objects. One can "hide" objects via the "show" and "hide" methods and the "visible" property.

JochenAdministrator
(KiX Supporter)
2005-01-19 09:10 AM
Re: Script to show/hide step

Do you have any code yet to post here ?
Is it more like a progressbar or do you like to have a form that behaves like, errr, you know, when you have installed a fresh copy of IE and OE and you log in the first time ... a list with checkmarks and such

Oh by the way, it should be .GroupBox() instead of .Frame() (depending on the age of your kixforms version)


el_coyote
(Fresh Scripter)
2005-01-19 09:54 AM
Re: Script to show/hide step

No no code yet because i'm first trying to show/hide frame before adding field, checkbox and others things to the frame.

I use the lastest version of Kixform and i have the lastest chm too. But i don't find the correct code. Or it don't work or it return a error, and i don't know what to do.


Sealeopard
(KiX Master)
2005-01-20 12:59 AM
Re: Script to show/hide step

Then you will need to debug it via DEBUG ON and/or post your code.

el_coyote
(Fresh Scripter)
2005-01-20 09:42 AM
Re: Script to show/hide step

Here is my code :

Break On
$System = CreateObject("Kixtart.System")

;************* Form **************
$Form = $System.Form()
$Form.BackColor = 235,233,237
$Form.Text = "KiXforms Designer Template"
;**************************************

;************* GroupBox1 **************
$Form.GroupBox1 = $Form.GroupBox()
$Form.GroupBox1.BackColor = 235,233,237
$Form.GroupBox1.Height = 201
$Form.GroupBox1.Left = 0
$Form.GroupBox1.Text = "GroupBox1"
$Form.GroupBox1.Top = 15
$Form.GroupBox1.Width = 291
;**************************************

;************* GroupBox2 **************
$Form.GroupBox2 = $Form.GroupBox()
$Form.GroupBox2.BackColor = 235,233,237
$Form.GroupBox2.Height = 210
$Form.GroupBox2.Left = 0
$Form.GroupBox2.Text = "GroupBox2"
$Form.GroupBox2.Top = 15
$Form.GroupBox2.Width = 291
$Form.GroupBox2.Visible = 0
;**************************************

;************* Button1 **************
$Form.Button1 = $Form.CommandButton()
$Form.Button1.Height = 23
$Form.Button1.Left = 0
$Form.Button1.Text = "Button1"
$Form.Button1.Top = 225
$Form.Button1.Width = 75
$Form.Button1.Onclick = GoNextStep()
;**************************************


$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1

Function GoNextStep()
$form.GroupBox1.Visible = 0
$form.GroupBox2.Visible = 1
EndFunction

When i try it, before clicking on the button, the GroupBox1 is hidden and GroupBox2 is visible. Normally it'll be the GroupBox1 visible and the 2 hidden, and when i click on the button the visibility change.

I really need help, because i don't understant how the kixform code works...

Thx


maciep
(Korg Regular)
2005-01-20 02:26 PM
Re: Script to show/hide step

try changing the onclick function for the button to the following (notice the quotes)

Code:

$Form.Button1.Onclick = "GoNextStep()"



That should at least fix the problem you're having now. if you have any more questions about KiXforms, i would suggest you post at the KiXforms Site (which appears to be down right now?)


el_coyote
(Fresh Scripter)
2005-01-20 04:27 PM
Re: Script to show/hide step

Hey, thx for help, that's work !!!

Why i don't think about ??? Maybe because i'm a newbie