Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

listbox how to select

Posted on 1998-03-05
2
245 Views
Last Modified: 2010-04-06
hi,

I have a listbox which contains all the available fontnames but how do I assign the current font to be selected in the listbox

example FontlistBox.? := Richedit1.Font.Name , I tried Itemindex but that requires a number.

also I need this in a caption, Pe' but when I use Open.Caption := 'Pe'' It gives unterminated string, any ideas here.
0
Comment
Question by:hellfire052497
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
mvz121697 earned 100 total points
ID: 1360151
Try this:

var n:integer;
begin
  n:=FontListBox.Items.Indexof(RichEdit1.Font.Name);
  if n>0 then FontListBox.ItemIndex:=n;
end;


For your second question, use a double apostoph :
so it becomes  'PE'''

Greetings,
MvZ
0
 
LVL 2

Expert Comment

by:mvz121697
ID: 1360152
By the way, in the above example i ment 4  _single_ quotes !
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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