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.

Search for file and literally "list buttons"

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-23-2009, 09:26 PM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default Search for file and literally "list buttons"

I'm not exactly where to even start on this, i would like to search for a file type in a diretory (.txt) and list them, on click i need to be able to parse the text document.

I know i will need the dirSearch, file read, and a binary object (and i guess some type of array from the example i saw) (i'm not very farmiliar with arrays at all though)..... but i don't know how to even list the objects in the first place.

Can someone help point me in the right direction to get started?




Thanks in advanced,

Joel

Last edited by joel2009 : 02-24-2009 at 12:22 AM.
Reply With Quote
  #2 (permalink)  
Old 02-23-2009, 09:55 PM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

Quote:
Originally Posted by joel2009 View Post
I'm not exactly where to even start on this, i would like to search for a file type in a diretory (.txt) and list them, on click i need to be able to parse the text document.

I know i will need the dirSearch and file read and a binary object and i guess some type of array from the example i saw (i'm just not very farmiliar with arrays at all)..... but i don't know how to even list the objects in the first place.

Can someone help point me in the right direction to get started?




Thanks in advanced,

Joel
You can separate and parse the list with StrSplit (and all other String keywords). Then use For statements to repeat an action for each item in an array (using arraylength).

Look in "keywords" in the help file. You will find a lot of info for what you are trying to do.
__________________
Reply With Quote
  #3 (permalink)  
Old 02-24-2009, 12:09 AM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks Nick i'll take a look


EDIT: By the way, I'm Getting ready to send you an email you need to see pertaining to your project so make sure you check it
Reply With Quote
  #4 (permalink)  
Old 02-24-2009, 05:56 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You should use FileSearch:
Code:
FileSearch(ArrayList1, AppPath, "*.txt")
This code will fill ArrayList1 with all the paths of txt files located in the current folder.
Afterward you can add these to a listbox:
Code:
For i = 0 to ArrayList1.Count - 1
 ListBox1.Add(FileName(ArrayList1.Item(i))) 
'Use FileName to omit the complete path
Next
Then you could catch ListBox_SelectionChanged event and use ArrayList1.Item(Index) to get the full path to the selected item.
Reply With Quote
  #5 (permalink)  
Old 02-24-2009, 09:57 PM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Thanks Erel worked like a charm Is there any way to add an image to the contol... or is only text allowed? I know the freewarepocketpc client some how add a screen shot but i looked as though it may be a seperate control? (I would like to actually use the image as a background for the buttons)

Last edited by joel2009 : 02-24-2009 at 10:34 PM.
Reply With Quote
  #6 (permalink)  
Old 02-25-2009, 02:57 AM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

Quote:
Originally Posted by joel2009 View Post
Thanks Erel worked like a charm Is there any way to add an image to the contol... or is only text allowed? I know the freewarepocketpc client some how add a screen shot but i looked as though it may be a seperate control? (I would like to actually use the image as a background for the buttons)
AddImage? You can add an image control with it. You can also toggle the Visible property to hide an image while not in use.
__________________
Reply With Quote
  #7 (permalink)  
Old 02-25-2009, 03:21 AM
Knows the basics
 
Join Date: Jan 2009
Posts: 50
Awards Showcase
Beta Tester 
Total Awards: 1
Default

you can use that to add the iamge to the list box? i was going to try and go for a list style similar to the layout i was using for jak portal
Reply With Quote
  #8 (permalink)  
Old 02-25-2009, 04:50 AM
Senior Member
 
Join Date: Sep 2008
Posts: 161
Default

Oh. Uh. No.

But you can make a panel within a panel. Say inpnl and outpnl. Add all the stuff required on inpnl, set its height and move it up and down with a scrollbar.

This way you can display something similar to your PIE frame. The sad part is that you can't draw on a panel so you'll have to use less efficient methods such as addimage. Tell us more about what you want to do and I could give you a bit of code.
__________________
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
Getting "time saved" from a file on the PDA BjornF Questions (Windows Mobile) 0 10-26-2008 04:23 PM
"Error saving file" N1c0_ds Bug Reports 0 09-14-2008 12:25 AM
calling the device's "Programs" or "settings" screens HarleyM Questions (Windows Mobile) 0 12-05-2007 02:59 AM
Help file "CHM" Reader (3rd Party Freeware) hmeyer Code Samples & Tips 4 10-03-2007 11:22 AM
Format of file "SQLDesktop.dll" is invalid. Peter Bug Reports 2 05-03-2007 10:58 AM


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


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