Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Calendar event


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-23-2007, 11:36 AM
Senior Member
 
Join Date: May 2007
Posts: 130
Awards Showcase
Beta Tester 
Total Awards: 1
Default Calendar event

Hi,
I have attached a code using calendar function.
Once the date value was selected for the first time it will assign to textbox, delete value of textbox then pick again same date, obviously nothing will happen because value was not changed on 'valuechanged' event. If I use the 'close' event the textbox get automatically the value from calendar even without selecting it, which I don't want to do.
The calendar don't have 'click' event for the value then how can I re-initialized it same as when it first use?

thanks & regards,
rioven
Attached Files
File Type: sbp calendar1.sbp (762 Bytes, 19 views)
__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard
Reply With Quote
  #2 (permalink)  
Old 08-23-2007, 02:41 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Can you further explain what are you trying to achieve?
Reply With Quote
  #3 (permalink)  
Old 08-23-2007, 03:56 PM
Senior Member
 
Join Date: May 2007
Posts: 130
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Erel,
I have a program that a textbox is on top of calendar control in which user can type-in or select date from calendar.

Once the user use the calendar it will be written on textbox, then if user accidentally erased the date from the textbox he has to take again the same date, therefore the value of calendar remains then the valuechanged event will not work anymore.

__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard

Last edited by Rioven : 08-23-2007 at 04:05 PM.
Reply With Quote
  #4 (permalink)  
Old 08-23-2007, 04:05 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 636
Default

Hi Rioven,

replace
Code:
Sub Calendar1_ValueChanged
with
Code:
Sub Calendar1_Close
The second event is fired even the user hasn't changed the date.


specci48
Reply With Quote
  #5 (permalink)  
Old 08-23-2007, 04:36 PM
Senior Member
 
Join Date: May 2007
Posts: 130
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi specci48,
My concern on using 'close' event is once the user have already an input on textbox and accidentally pressed the calendar then the date he has already inputed will be overwritten.
__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard
Reply With Quote
  #6 (permalink)  
Old 08-27-2007, 07:12 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

Maybe you could use the Calendar DropDown event to update the date:
Sub Calendar1_DropDown
calendar1.Value = DateParse(textBox1.Text)
End Sub
Reply With Quote
  #7 (permalink)  
Old 08-28-2007, 07:23 AM
Senior Member
 
Join Date: May 2007
Posts: 130
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Hi Erel,
DateParse works on "mm/dd/yyyy" date format only.
I'll try some workaround..
thanks again!
__________________
Rioven

Sony Ericsson XPERIA X1i WM6.1
480x800 Display Resolution
with QWERTY keyboard
Reply With Quote
  #8 (permalink)  
Old 08-28-2007, 08:00 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,132
Default

You can choose which format to use:
Code:
Sub App_Start
 DateFormat("dd/mm/yyyy")
End Sub

Sub Calendar1_DropDown
 calendar1.Value = DateParse(textBox1.Text)
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calendar Problem! superbabicka Questions & Help Needed 3 04-05-2008 10:15 AM
Calendar Control alfcen Questions & Help Needed 9 02-12-2008 03:28 AM
Calendar Recorder Rioven Share Your Creations 5 10-21-2007 07:55 AM
Calendar control BjornF Questions & Help Needed 7 07-05-2007 08:52 AM
calendar week (European) stbi Code Samples & Tips 5 07-03-2007 10:16 PM


All times are GMT. The time now is 03:04 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0