1. check box bug?
- Posted by George Walters <gwalters at sc.rr.com> Nov 09, 2004
- 484 views
I don't know where the topica message went to but here's it directly. I'm running win32lib 59.1 and the check boxes have a "yes" or "no" to the right of them if the box has a check or not. If I setCheck(abox, True) under program control (w/o tabbing to it and toggle with the space bar) the "no" remains beside the box, eventhough it is checked. Is there something else I need to do to get it to display "yes"?? george
2. Re: check box bug?
- Posted by Ferlin Scarborough <ferlin1 at bellsouth.net> Nov 09, 2004
- 463 views
George Walters wrote: > > > I don't know where the topica message went to but here's it directly. > > I'm running win32lib 59.1 and the check boxes have a "yes" or "no" to the > right of them if the box has a check or not. If I setCheck(abox, True) > under program control (w/o tabbing to it and toggle with the space > bar) the "no" remains beside the box, eventhough it is checked. Is there > something else I need to do to get it to display "yes"?? > > george > George, If I understand what you are asking correctly, you might try returning control back to windows to allow it to process any messages, and if that don't work maybe repainting the window after clicking the box. In the onClick routine for the check box.
doEvents(0)
The doEvents uses a control ID where 0 is all controls, you can limit this to just one control by using that controls ID. If that don't work you could also try this.
repaintWindow( WindowName )
Where WindowName is the name of the window the check box control is on. Maybe that will resolve the problem. Later. Ferlin Scarborough Learn To Program Games in Free Courses At http://www.gameuniv.net My Euphoria Home Page http://mywebpage.netscape.com/shadetreesoft
3. Re: check box bug?
- Posted by Ferlin Scarborough <ferlin1 at bellsouth.net> Nov 09, 2004
- 464 views
Ferlin Scarborough wrote: > <snip> > In the onClick routine for the check box. Sorry about that, you said if you set it in the program, so it should not be in the click event, but right after you set it in the program, like this:
setCheck(abox, True) doEvents(0)
Later. Ferlin Scarborough Learn To Program Games in Free Course At http://www.gameuniv.net My Euphoria Home Page http://mywebpage.netscape.com/shadetreesoft
4. Re: check box bug?
- Posted by George Walters <gwalters at sc.rr.com> Nov 09, 2004
- 466 views
Well, you got me thinking. The doEvents(0) did not do the trick. However I found a solution setCheck(cBox, True) setText(cBox,"Yes") <<< this fixed it did the trick.... george
5. Re: check box bug?
- Posted by Ferlin Scarborough <ferlin1 at bellsouth.net> Nov 09, 2004
- 469 views
George Walters wrote: > > Well, you got me thinking. The doEvents(0) did not do the trick. However > I found a solution > > setCheck(cBox, True) > setText(cBox,"Yes") <<< this fixed it > > did the trick.... > > george > George, It was worth a try anyway, I just recently started to reaquaint myself with Euphoria and win32lib after a 2 year hiatus. Some times I tend to get my languages mixed up, where I work they program in VB6, and I know that what I was thinking is a lot of times when you set the caption of a label at run-time it does not show up on the form, you have to put a doEvents in the code right after you set the label caption so that windows will process any backed up messages and do a repaint of the form. That must of been what I was thinking about. Glad that at least I got you to thinking, so you could solve the problem. Later. Ferlin Scarborough Learn To Program Games in Free Courses At http://www.gameuniv.net My Euphoria Home Page http://mywebpage.netscape.com/shadetreesoft
6. Re: check box bug?
- Posted by Derek Parnell <ddparnell at bigpond.com> Nov 09, 2004
- 476 views
- Last edited Nov 10, 2004
George Walters wrote: > > > I don't know where the topica message went to but here's it directly. > > I'm running win32lib 59.1 and the check boxes have a "yes" or "no" to the > right of them if the box has a check or not. If I setCheck(abox, True) > under program control (w/o tabbing to it and toggle with the space > bar) the "no" remains beside the box, eventhough it is checked. Is there > something else I need to do to get it to display "yes"?? A checkbox control has two properties - checked-state and text. These are independant of each other. Setting one does not effect the other. So if the user or your program sets the check-state, you also have to set the text state appropriately. This makes some sense because the text may not always be "yes" an "no" in some applications. There is a setChecked() and a setText() routine to cater for this requirement. -- Derek Parnell Melbourne, Australia