KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Hide/Show Form

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
GOGO
KiXforms Dabbler
KiXforms Dabbler


Joined: 18 Sep 2003
Posts: 12
Location: Hannover, Germany

PostPosted: Tue Sep 23, 2003 8:29 am    Post subject: Hide/Show Form Reply with quote

And another one...

I have two forms, $Start and $Selection

First one is $Start and after some scripting I start the Selction Form, which stays on top of the $Start form.

After selecting an option (radiobuttons and button) the form is hidden; here is part of my code

...
$Start.Show
...

$Selection.Center
$Selection.Show
While $Selection.Visible
$=Execute($WSelection.DoEvents)
$Selection.Hide
RETURN
LOOP

Works fine, but now I want to hide the $Start form while $Selection is visible. I tried

...
$Start.Hide
$Selection.Center
$Selection.Show
While $Selection.Visible
$=Execute($Selection.DoEvents)
$Selection.Hide
$Start.Show
RETURN
LOOP

But is doesn't turn out like i want it to. After inserting $Start.Hide, the loop doesn't wait for an event (button press) anymore.

Please Help!

_________________
GOGO
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Sep 23, 2003 3:33 pm    Post subject: Reply with quote

Hi Go, i just tried to replicate somewhat, the app your building, here is my attempt and it seems to work as expected ... hopefully you can spot the issue by checking-out this sml scriptlet ...

Code:

break on

$form = createobject("kixtart.form")

$button = $form.controls.toolbutton()
$button.onclick = "onbuttonclick()"
$button.center()
$button.text = "options..."

$form.show
while $form.visible
 $=execute($form.doevents)
loop

exit 1

function onbuttonclick()
 dim $dialog,$button
 $dialog = createobject("kixtart.form")
 $dialog.text = "dialog"
 $button = $dialog.controls.toolbutton()
 $button.center
 $button.text = "exit"
 $button.onclick = "$$dialog.hide()"
 $dialog.center()
 $form.hide()
 $dialog.show
 while $dialog.visible
  $=execute($dialog.doevents)
 loop
 $form.show()
endfunction



-Shawn
Back to top
View user's profile Send private message
GOGO
KiXforms Dabbler
KiXforms Dabbler


Joined: 18 Sep 2003
Posts: 12
Location: Hannover, Germany

PostPosted: Wed Sep 24, 2003 7:13 am    Post subject: Reply with quote

Thanks a lot Shawn,

i got the point.

Less returns, some more logic and it works fine Wink

_________________
GOGO
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group