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" and "buttonUp/buttonDown"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-10-2008, 11:34 AM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Question "AddEvent" and "buttonUp/buttonDown"

if i'm use
Code:
addevent("button1",click,"b_click")
it work fine.but if i'm use
Code:
addevent("imagebutton1",buttonup,"b_click")
it's not work.why?
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #2 (permalink)  
Old 09-10-2008, 11:44 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

The b4p imagebutton does NOT support buttonup or buttondown, only the click event..
To Trap those events, you must use the door lib, and add the event from it...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #3 (permalink)  
Old 09-10-2008, 11:51 AM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

stop!you not right!imagebutton support buttonup and buttondown!when i creat this event from IDE it's work fine.
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #4 (permalink)  
Old 09-10-2008, 11:58 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Open the IDE in the form designer, add an image button, select it and choose EVENTS... only the click event is visible FROM WITHIN basic4ppc...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #5 (permalink)  
Old 09-10-2008, 12:20 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

and what about it?
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #6 (permalink)  
Old 09-10-2008, 12:23 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Ok, Sorry!!!
I'm at work and I only have the 5.5 version of the IDE, in my work PC, but remeber that the events name are case sensitive...
So you should try "ButtonUp" and "ButtonDown"....
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #7 (permalink)  
Old 09-10-2008, 12:32 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

nothing to sorry,all ok =)

i'm try some variants and what i'm see:
when i'm use
Code:
sub app_start
form1.show
addevent(
"imagebutton1",ButtonDown,"b1")
end sub

sub b1
msgbox(1)
end sub
it's not work BUT when i'm use
Code:
sub app_start
form1.show
addevent(
"imagebutton1",ButtonDown,"b1")
end sub

sub b1
msgbox(1)
end sub

sub imagebutton1_ButtonDown

end sub
it's work!!!
but it's not good,my programm contain ~30 buttons
how can i add event without creating it with IDE
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #8 (permalink)  
Old 09-10-2008, 12:57 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Actually the event names are not case-sensitive in B4ppc. It is only when using the Door library that things become case-sensitive. This seems to be an IDE bug. Both legacy and compiled apps add the event OK (in version 6.42 at least), the IDE doesn't.
Reply With Quote
  #9 (permalink)  
Old 09-10-2008, 02:11 PM
Byak@'s Avatar
Basic4ppc Veteran
 
Join Date: Jul 2008
Posts: 416
Send a message via ICQ to Byak@
Awards Showcase
Beta Tester 
Total Awards: 1
Default

agraham please help me!how add 1 event for many imagebuttons?
event "buttondown".i'm use b4p 6.30
__________________
I'll Kill you, I'll Crash you, I'll never be yours!
--------------------------------------------------
Qtek s110; o2 XDA Flame; Nokia E63 red;
ASUS Eee PC 901 (Windows XP sp3) + TouchScreen;
Reply With Quote
  #10 (permalink)  
Old 09-10-2008, 02:20 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Various ways. If they are labelled sequentially then something like this.
Code:
Sub App_Start
  Form1.Show
  
For i = 1 To 30
    AddEvent(
"ImageButton" & i, click, "Down")
  
Next        
End Sub

Sub Down
  
Msgbox(Sender)
End Sub
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
Neuling bei Basic4ppc - wollte mal "Hallo" sagen ... JOTHA German Forum 49 08-28-2008 11:59 PM
Is there any thing like Visual Basic "Tabbed dialog control" in Basic4ppc? mozaharul Questions (Windows Mobile) 6 03-23-2008 11:07 AM
Image Button kommt nicht wieder "hoch" troll German Forum 3 02-22-2008 09:03 AM
calling the device's "Programs" or "settings" screens HarleyM Questions (Windows Mobile) 0 12-05-2007 02:59 AM
Avoid the "optional resource assembly cannot be found" Erel Code Samples & Tips 1 07-12-2007 10:24 AM


All times are GMT. The time now is 07:41 AM.


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