New topic: 

checkbox problems in windows   Solved

<http://forums.realsoftware.com/viewtopic.php?t=40185>

         Page 1 of 1
   [ 2 posts ]                 Previous topic | Next topic          Author  
Message        frankvanolffen          Post subject: checkbox problems in 
windows SolvedPosted: Sun Aug 07, 2011 9:19 pm                         
Joined: Wed Mar 26, 2008 6:48 pm
Posts: 50                Code in checkbox.action
Code:  If me.Value=True then
  Dim qq As new WieHeeftIncheckGedaan
  app.TmpInChecknaam=me.Caption
  app.TmpInChecknr=me.Index-1
  qq.Show
  self.Close
  Return
  End if
  If me.Value=False then
  for a=0 to app.AlleInCheck.Ubound
  if me.Caption=app.AlleInCheck(a).Wat then
    app.AlleInCheck_Update(app.AlleInCheck(a).Wat,False,a,"",0.0)
  end if
  a=app.AlleInCheck.Ubound
  Next
  end if
  Return


Code:  Dim boven,zijkant,i As Integer
  boven=75
  zijkant=0
  For i=0 to app.AlleIncheck.Ubound
  Check.append new uitCheck
  Check(Check.Ubound).Caption=app.AlleIncheck(i).Wat
  Check(Check.Ubound).Value=app.AlleIncheck(i).Gedaan
  Check(Check.Ubound).Enabled=True
  Check(Check.Ubound).Visible=True
  Check(Check.Ubound).top=boven
  Check(Check.Ubound).Left=zijkant
  zijkant=zijkant+255
  if zijkant >=1000 then
  boven=boven+30
  zijkant=0
  end if
  if boven>571 then Return
  Next


I solved it.

I added a boolean in the window.open event

app.pleasewait=true

code 
code
code

app.pleasewait=False

and in the checkbox.action i added

 If me.Value=True and app.pleasewait=false then.
code
code
code


Now when I make the checkboxes and chance the values and the boolean=true 
nothing happens.     

    Last edited by frankvanolffen on Sun Aug 07, 2011 10:42 pm, edited 2 times 
in total.   
                             Top                 swort          Post subject: 
Re: checkbox problems in windowsPosted: Sun Aug 07, 2011 9:36 pm                
         
Joined: Mon May 31, 2010 5:35 am
Posts: 1359
Location: Netherlands                frankvanolffen wrote:Hi everybody,

When I create checkbox on the fly in Window1.open  and the checkbox will get it 
value also in Windows.open( from a database) and checkbox.action I want to call 
a other window to get more info when the checkbox.value=true and when 
checkbox.value=false then the database item wil be cleared.

When I run this program it wil halt because when I change the value in then 
windows.open to True the checkbox.action wil also open and everything wil go 
wit and when i click the program I can shutdown the program.

How do I get what I want. Checkboxes on the fly and when clicked true to open a 
other window and self.close?

Code in checkbox.action



Code:  If me.Value=True then
  Dim qq As new WieHeeftIncheckGedaan
  app.TmpInChecknaam=me.Caption
  app.TmpInChecknr=(me.Index-1) '<- i have cleaned this a bit.
  qq.Show
  self.Close
  Return
  End if
  If me.Value=False then
  for a=0 to app.AlleInCheck.Ubound
  if me.Caption=app.AlleInCheck(a).Wat then
    app.AlleInCheck_Update(app.AlleInCheck(a).Wat,False,a,"",0.0)
  end if
  a=app.AlleInCheck.Ubound
  Next
  end if
  Return

NOTE: i have cleaned the code above a little bit...

Code:  Dim boven,zijkant,i As Integer
  boven=75
  zijkant=0
  For i=0 to app.AlleIncheck.Ubound
  
  Check.append new uitCheck
  
  Check(Check.Ubound).Caption=app.AlleIncheck(i).Wat 
  Check(Check.Ubound).Value=app.AlleIncheck(i).Gedaan '<- is this where you set 
the checkbox?
  Check(Check.Ubound).Enabled=True
  Check(Check.Ubound).Visible=True
  Check(Check.Ubound).top=boven
  Check(Check.Ubound).Left=zijkant

  zijkant=zijkant+255
  if zijkant >=1000 then
  boven=boven+30
  zijkant=0
  end if
  if boven>571 then Return
  Next

It seems you checking in and out. But where do you store and get the checkbox 
value?
i'm not exactly sure if this solves your problem but it seems that Check( i 
).Value is the checkbox value we 
are talking about or is it another?

if you want to join the Dutch usergroup (your code has dutch in it) then you 
can send me a PM with your email address i will get you into the mailinglist 
(it's not so busy, just once in a while i get an email from the mailinglist so 
don't worry about spam). Also i can be a personal contact, at no costs. You can 
ask anything by email and i will try to help and even solve some problems in 
your apps if i can.

Let me know.      
_________________
SWORT™
- Windows Vista, Windows XP, Linux Ubuntu 10.04 LTS and iMac OSX 27"
- REAL Studio Enterprise(latest) and WEB Edition(latest)
- Plugins (almost all)
For Dutch User Groups ask me to enter!
Completely free functions by the community: 
http://forums.realsoftware.com/viewtopic.php?f=1&t=36396&hilit=dutchtools+free  
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 2 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to