Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Checkbox Status

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-11-2009, 02:32 PM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 312
Default Checkbox Status

Hi All

I wonder if somebody can help me

In my "Field" module I have at the bottom of the screen 3 check boxes. The first checkbox is for a Level, the 2nd checkbox is for a Total Station and the 3rd checkbox is for a GPS. This way the surveyor can tap on the checkbox corresponding to the instrument that he or she is using.

Now when one taps on a checkbox, the serial port gets closed (if it was open) and then opened again with the settings for the particular selected intrument.

Now when the program loads another form in the same module (say when one wants to set out batterboards, do a tachy survey, set out profile pegs, etc) and the form closes (when you tap on the "Exit" button), the "Checkbox_click" event occurs. Then the program closes the port and opens it again. This is nogood!!

This does not happen on the PC, but on on the handheld.

Any suggestions or is this a bug?

Thanks
ceaser
Reply With Quote
  #2 (permalink)  
Old 12-11-2009, 02:47 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Purely guessing, it sounds like the focus is being directed to the checkbox - which forces the sub to re-run. You may have to alter the tab order of the cotrols so the focus does not get left on the checkbox.

It also sounds as though you should be using a radio button - rather than a checkbox; as you should only be able to select one instrument at a time I presume that by using a checkbox you have to uncheck an instrument first then select another. Or do you uncheck in code? Or can you have more than one instrument (GPS, Total etc.) connected at the same time?

See also Unwanted Click Event
Reply With Quote
  #3 (permalink)  
Old 12-11-2009, 02:50 PM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 312
Default

Oops!

I meant Radiobtns and not checkboxes!

Thanks
ceaser
Reply With Quote
  #4 (permalink)  
Old 12-11-2009, 03:02 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 271
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by ceaser View Post
I meant Radiobtns and not checkboxes!
In that case it is very much the same as the 'Unwanted Click Event' I directed you to above (which just so happens to be my first ever post on the forum!!)

Quoting Erel:
Quote:
I'm not sure if it is a bug in the .Net Framework or an intended behavior, but when a RadioBtn is focused it also gets selected (or clicked).
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
GPS.Status alfcen Questions (Windows Mobile) 6 11-10-2007 12:42 AM
ListView and checkbox magi6162 Questions (Windows Mobile) 2 09-19-2007 07:30 AM
ListView and Checkbox event magi6162 Questions (Windows Mobile) 0 09-06-2007 09:07 AM
checkbox not reacting when on a panel Put Claude Questions (Windows Mobile) 3 05-08-2007 09:45 AM
Problem mit SQLite und CheckBox Fontanus German Forum 6 05-06-2007 03:03 PM


All times are GMT. The time now is 10:37 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0