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.

NumUpdDown buttons

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-22-2009, 11:19 AM
Knows the basics
 
Join Date: Dec 2007
Posts: 76
Default NumUpdDown buttons

Hello all

is there any way to distinguish between Up and Down buttons in a NumUpDown control? I would like to intercept the DOWN button at value=0 to set value=Maximum and count backward (or UP button at Value=Maximum to set Value=0 and count forward.

In case eg. Maximum is 10 and the value to be set is 8, it would be faster to count backward 0,10,9,8 than count forward 0,1,2,3,4,5,6,7,8....


Many thanks

Mimmo
Reply With Quote
  #2 (permalink)  
Old 01-22-2009, 04:37 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Try this code:
Code:
Sub Globals
    ignoreEvent = 
False
End Sub

Sub App_Start
    Form1.Show
    Num1.Minimum = -
1
    num1.Maximum = 
11
End Sub

Sub Num1_ValueChanged
    
If ignoreEvent Then Return
    
If num1.Value = num1.Minimum Then
        ignoreEvent = 
True
        num1.Value = num1.Maximum-
1
    
Else If num1.Value = num1.Maximum
        ignoreEvent = 
True
        num1.Value = num1.Minimum+
1
    
End If
    ignoreEvent = 
False
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
Image Buttons & FormEXDesktop RandomCoder Questions (Windows Mobile) 5 10-10-2008 11:50 AM
Flashing text in buttons cdeane Questions (Windows Mobile) 6 04-14-2008 07:26 PM
Image Buttons on menu bar JamesC Questions (Windows Mobile) 4 03-27-2008 09:37 AM
Where are the buttons?? joedoe77 Questions (Windows Mobile) 2 12-24-2007 02:20 PM


All times are GMT. The time now is 03:44 AM.


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