Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

listbox how to select

Posted on 1998-03-05
2
Medium Priority
?
249 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
[X]
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
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
mvz121697 earned 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 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