Page 1 of 1 1
Topic Options
#132612 - 2005-01-18 06:11 PM Script to show/hide step
el_coyote Offline
Fresh Scripter

Registered: 2002-05-16
Posts: 14
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

Top
#132613 - 2005-01-18 09:37 PM Re: Script to show/hide step
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Hi,

So something like a progress bar?
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#132614 - 2005-01-19 01:56 AM Re: Script to show/hide step
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
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.
_________________________
There are two types of vessels, submarines and targets.

Top
#132615 - 2005-01-19 09:10 AM Re: Script to show/hide step
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
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)
_________________________



Top
#132616 - 2005-01-19 09:54 AM Re: Script to show/hide step
el_coyote Offline
Fresh Scripter

Registered: 2002-05-16
Posts: 14
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.

Top
#132617 - 2005-01-20 12:59 AM Re: Script to show/hide step
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Then you will need to debug it via DEBUG ON and/or post your code.
_________________________
There are two types of vessels, submarines and targets.

Top
#132618 - 2005-01-20 09:42 AM Re: Script to show/hide step
el_coyote Offline
Fresh Scripter

Registered: 2002-05-16
Posts: 14
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

Top
#132619 - 2005-01-20 02:26 PM Re: Script to show/hide step
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
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?)
_________________________
Eric

Top
#132620 - 2005-01-20 04:27 PM Re: Script to show/hide step
el_coyote Offline
Fresh Scripter

Registered: 2002-05-16
Posts: 14
Hey, thx for help, that's work !!!

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

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 507 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.05 seconds in which 0.021 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org