Basic4ppc - Windows Mobile Development  

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

Code Samples & Tips Share your recent discoveries and ideas with other users.


Editable Table


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-29-2007, 10:13 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 485
Awards Showcase
Beta Tester 
Total Awards: 1
Default Editable Table

Here's a little work in progress that might help someone?
No special libraries are required, it just uses a Table and a TextBox.

When a Table Cell is selected the TextBox is made to appear in place of the Cell showing the same data that was in the Cell and the soft input panel (SIP)automatically displays so that data can be entered. Unfortunately though you need to tap the TextBox to be able to start and type. I attempted to enable the TextBox cursor to allow typing straight away but failed miserably
The data can be changed to whatever new data is required and when the Enter key is pressed the Table Cell is up-dated, the TextBox disappears and the SIP closes.

This was designed on the Device and works perfectly (so long as the first Cell selected isn't Row 0 Column 0 - because the selection changed event doesn't fire).
However it is a work in progress because it doesn't save the table to a file and none of the columns are set to be unique. But its easy enough to save the data to whichever format and file you want and the TextBox value could be checked before entering into the table if a column needed to be unique.

As I said though, this was designed on the device and so on the desktop it looks a little less polished as the TextBox doesn't align neatly over the selected Cell and for some reason the desktop always shows the first Cell as selected which on the Device doesn't happen.

Anyway, hope this gives you some inspiration to use and adapt it to your own ends

Regards,
RandomCoder
Attached Files
File Type: sbp Editable Table.sbp (1.7 KB, 143 views)
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #2 (permalink)  
Old 06-29-2007, 10:32 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 638
Default

Hi RandomCoder,



... grrrr ... only 4 smilies allowed ...


What a great effort! Nice and small code.

I have added a version 1.1 which includes an additional timer to set the textbox focus out of the selection_changed sub.


specci48
Reply With Quote
  #3 (permalink)  
Old 06-29-2007, 10:34 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 638
Default

... and now the file ...
Attached Files
File Type: sbp EditableTable-V1.1.sbp (1.9 KB, 125 views)
Reply With Quote
  #4 (permalink)  
Old 06-29-2007, 11:17 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 485
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Cheers Specci48, after reading one of the other threads I thought this might interest some people.

Sorry that on the desktop it looks a bit rough round the edges but I just thought that its a novel way of getting around the problem.
It blends in perfectly on the Device (I hate how the TextBoxes appear with a shadow on the desktop!) - why does the Desktop always turn out different for me

I'm sure that it can probably be improved and the code possibly streamlined.

Regards,
RandomCoder.
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
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
Editable Table - Device & Desktop Erel Code Samples & Tips 11 Today 09:01 AM
Retrieve table filter from the filtered table? LineCutter Questions & Help Needed 1 09-08-2008 07:20 AM
Editable table davelew1s Questions & Help Needed 6 06-18-2008 04:06 PM
XYCalc -graphs an equation or editable table of figures in regular, bar or pie chart HarleyM Code Samples & Tips 2 11-24-2007 08:21 AM
editable table ? giannimaione Questions & Help Needed 2 05-13-2007 11:34 AM


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


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