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.


Table trouble


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-08-2007, 07:29 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
Awards Showcase
Beta Tester 
Total Awards: 1
Default Table trouble

I'm currently in the process of developing a Hi-Score table for my game. In doing this I've come across a couple of problems -

1) Is it possible to highlight a particular row of the table, either by making the font bold or changing the font colour?

2) Can the background colour of the table be changed? My table is called "ScoresTable", and I've tried ScoresTable.Color=cWhite but this only appears to change the background colour of the cells, the rest of the table is still dark grey.

3) Below is a section of my code that I use to set the headers
ScoresTable.AddCol(cString,"Pos",ScoresTable.Width *.15,True)
ScoresTable.AddCol(cString,"Level",ScoresTable.Wid th*.2,False)
ScoresTable.AddCol(cString,"Accuracy",ScoresTable. Width*.3,False)
ScoresTable.AddCol(cString,"Date",ScoresTable.Widt h*.35,False)
I set the width of each header/column as a percentage of the table width (shown in bold) but this causes the scroll bar to be displayed - WHY
To prevent the scroll bar from showing I have too make one of the columns slightly smaller.

Thanks in advance,
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
  #2 (permalink)  
Old 05-08-2007, 07:59 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

The Table control is based on the .Net DataGrid control.
Unfortunately it doesn't allow changing the style of a specific row or cell and it doesn't allow (on the device) to change the background color (behind the rows).

You should leave enough space for the borders.
Reply With Quote
  #3 (permalink)  
Old 05-08-2007, 08:10 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks Erel.

Do you have any better ways of creating a Hi-Score table, I did consider arranging labels on a form that were linked to a hidden table. What do you think??

Thanks,
RandomCoder.

PS. If I can make it work well then I thought it would make quite a nice code sample for others to use.
__________________
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
  #4 (permalink)  
Old 05-08-2007, 09:19 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 3,199
Default

I think that it will be better.
Reply With Quote
  #5 (permalink)  
Old 05-08-2007, 10:05 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 1,343
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi, randomCoder...

I was going to suggest a txt file to store/read the data, but it ends up a similar way as yours...
To "format" the results i would defenetly go with labels and the formlib formating capabilities...
__________________
Paulo Gomes
Porto, Portugal

PC: Dual-Core 1,8Ghz, 2GB RAM, 80GB HD
PPC: Qtek9000, 1GB SD

DLL Version Listing
Reply With Quote
  #6 (permalink)  
Old 05-09-2007, 07:31 AM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 486
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Cheers for your input, I'll give it a go. My only reservation is whether it will be slow at loading, but I'll soon find out.

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
Retrieve table filter from the filtered table? LineCutter Questions & Help Needed 1 09-08-2008 07:20 AM
Newbie having trouble with brush1.New1() mjcoon Questions & Help Needed 6 05-28-2008 08:11 PM
Table trouble Lasse Questions & Help Needed 1 01-15-2008 10:37 PM
Table Trouble RandomCoder Questions & Help Needed 2 07-15-2007 10:07 AM
addimage trouble Cableguy Questions & Help Needed 5 05-08-2007 09:29 PM


All times are GMT. The time now is 06:17 AM.


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