🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by Daryl Sun, 06 Aug 2006 09:56
Using GetTabbedTextExtent
#3225
Author: Daryl
Date: Sun, 06 Aug 2006 09:56
17 lines
1275 bytes
Hi
Could someone please provide an example of using GetTabbedTextExtent.

I would like to get the length of a number of strings I want to add to a 
MessageDlg.  The strings are of differing length and I am using tabs "\t" to 
pad out their length.

eg
Employee\t\t\tAlphaNumeric
Age\t\t\t\t\tNumeric

would give
Employee        AlphaNumeric
Age                  Numeric

thanks
daryl
Re: Using GetTabbedTextExtent
#3251
Author: Kent
Date: Tue, 08 Aug 2006 02:28
25 lines
1560 bytes
"Daryl" <devaccount@hotmail.com> wrote in message
news:44d5bcb9@newsgroups.borland.com...
> Hi
> Could someone please provide an example of using
GetTabbedTextExtent.
>

String str="Employee\t\t\tAlphaNumeric";
  int tabs[]={100,200,300};


  DWORD
values=GetTabbedTextExtent(Canvas->Handle,str.c_str(),str.Length(),3,t
abs);
  ShowMessage(String("Height=")+String(HIWORD(values)));
  ShowMessage(String("Width=")+String(LOWORD(values)));

values=GetTabbedTextExtent(Canvas->Handle,str.c_str(),str.Length(),0,N
ULL);
  ShowMessage(String("Height=")+String(HIWORD(values)));
  ShowMessage(String("Width=")+String(LOWORD(values)));


Kent
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads