Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

bring Special Characters Such as "landa" and "delta in my labels

Posted on 2006-04-07
10
Medium Priority
?
589 Views
Last Modified: 2013-12-03
Hi Experts,
How can I bring Special Characters Such as "landa" and "delta" in my
Labels?

Delphi Version : 7
Os : Win2K

Regards

0
Comment
Question by:123456
9 Comments
 
LVL 9

Expert Comment

by:sun4sunday
ID: 16399461
No idea what is landa
To put special character

Open MSword>Insert>Symbol> select the symbol u need and press insert.

Copy from MSword to the Label Caption Property.

Is this is what u are looking for?

sun4sunday
0
 
LVL 15

Expert Comment

by:mikelittlewood
ID: 16399539
To do this via code, you would first have to load the correct font set to use and then choose the correct # value for the item.
0
 
LVL 2

Author Comment

by:123456
ID: 16399568
No, it don’t work for me.
When I copy from MSWord To delphi I see only "?" character.
I should initiate labels from my coding too(Not only Need From object Inspector).
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 2

Author Comment

by:123456
ID: 16399579
>>To do this via code, you would first have to load the correct font set to use and then choose the correct # value for the item. <<
can you Explain it bit more?
0
 
LVL 2

Author Comment

by:123456
ID: 16400411
Any Feed back?

0
 
LVL 12

Expert Comment

by:AmigoJack
ID: 16402352
either you have to select another font in that labels.. maybe WINGDINGS orso which only contains symbols.

the standard ascii set is limited to 256 characters and doesnt contain advanced mathematical signs like lamda or delta. instead unicode (in delphi known as widestring instead of string) can display 65536 different characters. go here http://www.tntware.com/delphicontrols/unicode/downloads.htm and download a set of all standard components which give you unicode support. install it and then create a new project, add a TTntLabel and set the caption to the text youve copied from ms word. done :)
0
 
LVL 2

Author Comment

by:123456
ID: 16404575
With this component, can I give value to labels from my coding?
0
 
LVL 12

Accepted Solution

by:
AmigoJack earned 500 total points
ID: 16404969
of course. but it might be not as trivial as you could think, since delphi coding language itself is purely ascii, which cant be changed. this means you cannot paste your characters from word into your pascal code - that will NEVER work. but it surely works by building widechars out of their ordinals. here is a small example:

// this is needed because WIDECHAR is pointerious... we simply need this ok? :)
function strpasw(w: pwidechar): widestring;
begin
  result:= w;
end;

// just create a new project, add a TTntLabel and some button - then define this for example
procedure TForm1.TntButton1Click(Sender: TObject);
var
  s1: widestring;
begin
  s1:= 'delta '+ strpasw(widechar(#$2206))+ '  lambda '+ strpasw(widechar(#$2041));
  tntlabel1.caption:= s1;
end;

0
 
LVL 9

Expert Comment

by:bernani
ID: 16413390
With tntCompo  - see the link given by AmigoJack above (tested and working with D5):

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,StdCtrls, TntStdCtrls;

type
  TForm1 = class(TForm)
    TntLabel1: TTntLabel;
    TntLabel2: TTntLabel;
    TntButton1: TTntButton;
    TntLabel3: TTntLabel;
    TntLabel4: TTntLabel;
    procedure TntButton1Click(Sender: TObject);
  private
    { Déclarations privées }
  public
    { Déclarations publiques }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.TntButton1Click(Sender: TObject);
begin
//greek letter delta
tntlabel1.caption := #$03B4; //greek delta lowercase
tntlabel3.caption := #$0394 ; // greek delta uppercase
//greek letter lambda
tntlabel2.caption := #$03BB; //greek lambda lowercase
tntlabel4.caption := #$039B; //greek lambda uppercase
end;

end.

__________________________________________
object Form1: TForm1
  Left = 192
  Top = 114
  Width = 198
  Height = 157
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object TntLabel1: TTntLabel
    Left = 16
    Top = 16
    Width = 48
    Height = 13
    Caption = 'TntLabel1'
  end
  object TntLabel2: TTntLabel
    Left = 104
    Top = 16
    Width = 48
    Height = 13
    Caption = 'TntLabel2'
  end
  object TntLabel3: TTntLabel
    Left = 16
    Top = 40
    Width = 48
    Height = 13
    Caption = 'TntLabel3'
  end
  object TntLabel4: TTntLabel
    Left = 104
    Top = 40
    Width = 48
    Height = 13
    Caption = 'TntLabel4'
  end
  object TntButton1: TTntButton
    Left = 48
    Top = 88
    Width = 75
    Height = 25
    Caption = 'Apply'
    TabOrder = 0
    OnClick = TntButton1Click
  end
end


Hope this help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question