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.

Automatic Adjustable Label Width

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-29-2008, 07:13 AM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 312
Default Automatic Adjustable Label Width

Hi

I have a little routine that puts a border around my Panels. On my panels I then display all the input text boxes.

My problem is that I am displaying the Title of the Panel - ie. Coordinate Input, Tachy Survey, Horizontal Alignment, etc. in a Label that sits in the top right corner of the screen. In Visual Studio they call it a frame.

What must I do so that the width of the Label ajust automatically to the length of the text that is displayed there?

Thanks
Michael
Reply With Quote
  #2 (permalink)  
Old 07-29-2008, 10:46 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Hi Michael,

In the ImageLib you have the Keywords
StringWidth and StringHeight
They return the number of pixels of a given text in width and height and with this you can adjust your Label.

Best Regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #3 (permalink)  
Old 07-29-2008, 02:54 PM
ceaser's Avatar
Basic4ppc Veteran
 
Join Date: May 2008
Location: Paarl, South Africa
Posts: 312
Default Label Widths

Thanks Klaus!

Regards
Michael
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
Is it possible to set a width of the scrollbar? aeror Questions (Windows Mobile) 2 06-19-2008 10:22 AM
automatic typecasting of variables? Stellaferox Questions (Windows Mobile) 4 02-04-2008 12:17 PM
sqlite col width dennishea Questions (Windows Mobile) 1 01-20-2008 07:00 PM
B4PPC automatic loads net2 ? Put Claude Questions (Windows Mobile) 4 11-28-2007 04:44 PM
table col width tvrman Questions (Windows Mobile) 8 06-16-2007 08:41 PM


All times are GMT. The time now is 10:10 AM.


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