Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Official Updates
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Official Updates Updates to official libraries could be found here.
This forum is only available to licensed users.

bList v0.9 (beta) released

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 09-23-2009, 06:12 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
You can take the data from a table sqlite?
Yes. You can issue a query with Command.ExecuteReader and then go over the results and and the items to the list.
__________________
Basic4android documentation
Reply With Quote
  #12 (permalink)  
Old 09-28-2009, 03:41 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default Text alignment in blist

Erel and Ariel
Is it possible to add text alignment to the item properties ?

I am using text padding to do it but alignment would be much nicer :

Code:
item.TextPadding = (2*form4.Width/3 - StrLength(item.Text) * 7) / 2
Thanks
Attached Images
File Type: jpg blist.jpg (51.5 KB, 105 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #13 (permalink)  
Old 09-28-2009, 04:14 PM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

We thought about it, but then, what would the exact preferences be? Suppose I align left (right in your case...), than should the list attach the text to pixel x=0? Same goes with top - I guess nobody wants to attach the text right to the very top of the item. So you must allow some padding. It got too coplicated at a certain point, so I preferred letting the programmer the absolute freedom. What do you think? I may be wrong. What I can do, anyhow, is to add TextCeneredPadding method that will return the x position for centring the text on a given default. You will have to recalc when you change the font/text, but that's usually rare. I would be glad to have suggestions.
Reply With Quote
  #14 (permalink)  
Old 09-29-2009, 12:14 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

I think it should work in the same way as in textbox (in which I don't know how it is implemented ), so you shouls allow for 2-3 pixels on each side , or half the font width, something like that.

I didn't think about vertical alignment - I believe ther the padding is enough.

Another problem:

The clicking on the device for activating an item requires a very hard tick. is it possible to play with the sensitivity of it ? I guess you control the difference between a click and a touch for moving the list.
Edit: I checked again and found that the click on the device just needs to stay a little bit longer on the item in order to activate it smoothly. No need to change anything.
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 09-29-2009 at 04:31 PM.
Reply With Quote
  #15 (permalink)  
Old 09-29-2009, 08:05 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
I think it should work in the same way as in textbox
In many cases the text will be displayed together with an image. A simple alignment such as the textbox alignment will not be powerful enough.

You can use ImageLib.StringWidth to find the exact width of the text.
__________________
Basic4android documentation
Reply With Quote
  #16 (permalink)  
Old 09-30-2009, 12:57 PM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

As for the Click event you mentioned: I agree there is a fine tuning required there. There is actually a threshold for the minimal amount of time without movement that differentiates between a tick and the initial touch of a movement. If it's too short every touch raises the tick. I agree it's a bit too long now.
Reply With Quote
  #17 (permalink)  
Old 10-01-2009, 08:01 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 918
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

Erel & Ariel
Thank you both for the info and advice.

I was not aware of the stringwidth function, but I don't think I need to be so exact.

Here is how I use the list with images in my family tree program. I like this library
Attached Images
File Type: jpg blist.jpg (44.2 KB, 124 views)
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #18 (permalink)  
Old 10-01-2009, 08:13 PM
Junior Member
 
Join Date: Jul 2008
Posts: 46
Default

Congratulations!!
Reply With Quote
  #19 (permalink)  
Old 10-02-2009, 08:09 AM
Ariel_Z's Avatar
Basic4ppc Veteran
 
Join Date: May 2009
Posts: 246
Default

derez - it's looking good!
Reply With Quote
  #20 (permalink)  
Old 10-14-2009, 02:18 AM
Basic4ppc Veteran
 
Join Date: Jan 2008
Posts: 215
Default

Quote:
Originally Posted by Erel View Post
Forgot to mention that this library requires Basic4ppc v6.80 or newer, and it supports both the desktop and the device.
I have been waiting for a control like this - can't wait to try it!
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
V6.80 released to beta testers Erel Beta Versions 3 06-07-2009 08:55 PM
Basic4ppc V6.80 - first beta is released Erel Announcements 0 04-24-2009 06:58 AM
Version 6.50 BETA is released Erel Announcements 7 09-01-2008 09:08 AM
Basic4ppc V6.30 Beta (6.25) released Erel Announcements 0 05-05-2008 04:14 PM
Basic4ppc V6.00 - Beta is released Erel Announcements 0 12-16-2007 06:55 PM


All times are GMT. The time now is 02:32 AM.


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