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.

AddEvent for checkbox

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2010, 10:35 PM
Senior Member
 
Join Date: Apr 2008
Location: Duesseldorf, Germany
Posts: 154
Default AddEvent for checkbox

Hi @all,

i read the documentation and did a search on the forum, but no luck.

I would like to raise an event once a checkbox gets changed ( checked/unchecked).

I use this kind of statements for all my events:

AddEvent ("button2", "Click", "my sub")

AddEvent ("checkbox8", "<event>", "my sub")

This works for menus and buttons so far, but i could not find, what the name of the event is, that is being raised by checking/unchecking a checkbox.I tried several values ( "checked" etc.) but none worked.

I'm sorry, but i have to say(again), that the Basic4PPC documentation is still very poor, a lot of questions in the forum here would not be necessary with a better documentation...


So what are the valid events for a checkbox..?


regards,

TWELVE
Reply With Quote
  #2 (permalink)  
Old 07-04-2010, 01:01 AM
Knows the basics
 
Join Date: May 2008
Posts: 53
Default

Quote:
Originally Posted by TWELVE View Post

I use this kind of statements for all my events:

AddEvent ("button2", "Click", "my sub")

AddEvent ("checkbox8", "<event>", "my sub")
I have tried:

AddEvent ("checkbox8", Click, "mysub")

and it works.

Quote:
Originally Posted by TWELVE View Post
I'm sorry, but i have to say(again), that the Basic4PPC documentation is still very poor, a lot of questions in the forum here would not be necessary with a better documentation...
From the Basic4ppc help:

Syntax: AddEvent (Control Name, Event Name, Sub Name)
The following controls support AddEvent:
Button, CheckBox, ComboBox, Form, Image, MenuItems, Panel, RadioBtn, Table, TextBox and Timer.
Note: As in this example, Event Name is not quoted and can't be a variable.
Example:
AddButton ("Form1", "Button1", 20,20,60,60,"Click Me")
AddEvent ("Button1", Click, "MySub")
AddEvent ("Form1",MouseDown, "DoSomething")

Last edited by Pachuquin : 07-04-2010 at 01:06 AM.
Reply With Quote
  #3 (permalink)  
Old 07-04-2010, 11:20 AM
Senior Member
 
Join Date: Apr 2008
Location: Duesseldorf, Germany
Posts: 154
Default

Hi Pachuquin,

thanks for your reply.I got it to work now.

1.

Quote:
Note: As in this example, Event Name is not quoted and can't be a variable.
This does not seem to matter, i use this with quotes since a long time.I works with and without quotes.I took the quotes from a code example and then never thought about again.

2. The control itself is called "CheckBox8" in the Designer.As for the AddEvent, it does not matter if "CheckBox8" or "checkbox8" is used.Even something like "CHecKBox8" is gonna work.

3. I use a centralized event manager by pointing all added events to this one sub.In the sub, a select..case construction is used to select what an event is gonna do.In opposition to the AddEvent the control's name sent to the action sub is always in lower case !

==> Hence when i tried to catch it with Case "CheckBox8" : my sub it got never triggered, because the control's name that is being sent is "checkbox8".
After correcting the case to all lower case, it is working now as expected.


This is very confusing und inconsistent...

Nevertheless i thank you because you pointed me in the right direction...


regards,

TWELVE
Reply With Quote
  #4 (permalink)  
Old 07-06-2010, 08:24 PM
RacingDog's Avatar
Senior Member
 
Join Date: Apr 2009
Location: Fleet, Hants, UK
Posts: 183
Send a message via Yahoo to RacingDog
Default

What are you talking about? The documentation clearly lists the available events. For checkbox the help info says.....

CheckBox allows the user to choose from multiple options.
Unlike RadioBtn where only one can be checked, each CheckBox can be checked.
Properties and Methods:
BringToFront
Color
Checked
Dispose
Enabled
Focus
FontColor
FontSize
Height
Left
Name
Refresh
Text
Top
Visible
Width
Events:
Click

WHAT IS THAT ^. It says Events: Click. Why isn't that crystal clear?
Reply With Quote
  #5 (permalink)  
Old 07-07-2010, 07:14 AM
Senior Member
 
Join Date: Dec 2009
Posts: 139
Default Regarding fmodce.dll

Hi,

I am currently using FMODCE.dll verion 3.75 (has two types). I am using the non-arm version because my platform is non-arm version.

However, I noticed that the FMODCE.dll is giving me a lot of problems.
For example, error mentioning some kinds of clashes with the system. The other problem I find related to B4PPC - After I finished running the FMODPLAY, I notice that calling the other dll functions will return error. I replace the FMODPLAY with Sound(), and the problem no longer exists. I truly believe that this is related to FMODCE.dll.

Thanks.

Last edited by tsdt : 07-07-2010 at 07:26 AM.
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
Checkbox Status ceaser Questions (Windows Mobile) 3 12-11-2009 03:02 PM
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 04:52 AM.


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