Community of VE/MapPoint Users and Developers
This is a discussion on Fixing a TextBox Size within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi, i'm using textboxes to mark some places on the map customizing the text. I use: Code: tbox = Shapes.AddTextbox(Location, ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| i'm using textboxes to mark some places on the map customizing the text. I use: Code: tbox = Shapes.AddTextbox(Location, 1, 1); Code: tBox.Width = getWidthByString(textToDisplay); Code: private int getWidthByString(string name)
{
int w = 0;
foreach (char c in name)
{
if (Char.IsLower(c)) { w += 11; }
if (Char.IsUpper(c)) { w += 12; }
}
return w;
}
Any Idea? Gianmaria Last edited by Gianmaria; 10-12-2007 at 05:34 AM. Reason: fix |
| |||
| Re: Fixing a TextBox Size
Hi, The text is proportional font. A lot of characters are the same size, but for the smaller and larger ones you have to put a case statement in your width calculation routine. I think the most easy is to make a textbox with all characters in it. Then copy the map with textbox to clipboard, then paste it in your favourite picture editor and zoom it in and count the pixels for each character.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| MapPoint Download - MP2K Magazine | This thread | Refback | 10-14-2007 02:16 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Arrow size | Anonymous | MapPoint 2006/2009 Discussion | 0 | 10-14-2004 02:43 PM |
| Polyline Size | Anonymous | MapPoint 2006/2009 Discussion | 4 | 09-29-2004 06:08 AM |
| Different image size | webjagger | MapPoint 2006/2009 Discussion | 0 | 06-24-2004 07:14 AM |
| Fixing Printing Problems in MP | Anonymous | MapPoint 2006/2009 Discussion | 2 | 03-17-2004 09:56 AM |
| size of a territory | Anonymous | MapPoint 2006/2009 Discussion | 0 | 11-04-2003 05:23 PM |
Ski Package
Book a ski package for an ice cold price. Competition between travel operators is hot, so the prices reflect the temperatures, nice and low. Compare online at Holiday Hypermarket.
Travelcounselors
TravelCounsellors are a Queens award winning Travel Agent. Have a personal Travel Counselor help with your travel plans.
Holidays to Cuba
Situated between Jamaica and the Bahamas, Cuba has a delightful tropical climate and warm, clear waters with beaches of white sand. Check for cheap holidays to Cuba.
Sri Lanka Holidays
There are some outstanding deals on Sri Lanka holidays at theholidayplace.co.uk. Sri Lanka is renowned for it's exceptional beauty! Book a holiday today!
Cyprus
Before visiting Cyprus, make sure you are well informed to make the most of your holiday. Online at ulookubook.com you check out our useful travel guides. Find out all about the Cyprus nightlife, shopping, eating and customs.
Air Travel
Interested in air travel? Search and compare millions of holidays, flights and hotels with our help at Travel.co.uk
Holidays in Portugal
Find the perfect Algarve holiday. Book holidays in Portugal now at On The Beach.