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.

D-Pad Navigation Sample (?)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2008, 11:56 PM
Dave Mitchell's Avatar
Newbie
 
Join Date: Mar 2008
Posts: 8
Default D-Pad Navigation Sample (?)

I have been trying to include D-Pad navigation in one of my projects and thanks to help from this group have made some progress. I thought I would post the finished example, but ran into a snag. I can use the D-Pad to cycle through several controls on a form, but am unable to use the center button (enter) to select the control. Ideally, when the center button was pressed, it would release control to the current control so further manipulation was possible. Is there a way to pass the center button so it isn't captured? Here is the sample.
Attached Files
File Type: sbp DPad HW Test.sbp (2.0 KB, 21 views)
Reply With Quote
  #2 (permalink)  
Old 05-14-2008, 05:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You shouldn't use HardKey here.
First set the form's KeyPreview property to true (with the Door library).
This is an example of navigating between two textboxes:
oFrm is an Object.
Code:
Sub Globals
    current = 
1
End Sub

Sub App_Start
    Form1.Show
    ofrm.New1(
false)
    ofrm.FromControl(
"Form1")
    ofrm.SetProperty(
"KeyPreview",true)
End Sub


Sub Form1_KeyPress (specialKey)
    
If specialKey = cUpKey OR specialKey = cDownKey Then
        current = 
1 + (current Mod 2)
        Control(
"TextBox" & current).Focus
    
End If
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
D-Pad Navigation Dave Mitchell Questions (Windows Mobile) 4 05-02-2008 10:46 PM
Forum Navigation dennishea Questions (Windows Mobile) 1 02-15-2008 06:52 PM
Desktop IDE: Sub tree navigation minimal bug Woinowski Bug Reports 0 01-16-2008 07:20 AM
GPS map navigation and routing zen Questions (Windows Mobile) 11 10-08-2007 06:44 AM


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


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