Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Combo with font facenames
Combo with font facenames [message #444974] Fri, 22 October 2004 20:46 Go to next message
Patrick is currently offline PatrickFriend
Messages: 55
Registered: July 2009
Member
Any ideas on how to create a font selection combo box? I'd like to
enumerate the font face names and place them into a combo, but I can't
figure out how to do this in swt. Any ideas?
Re: Combo with font facenames [message #444990 is a reply to message #444974] Mon, 25 October 2004 12:42 Go to previous messageGo to next message
Robert Bacs is currently offline Robert BacsFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

Why don't you use the FontDialog ?

Regards,
Boby

"Patrick" <psirr@earthlink.net> wrote in message
news:clbr81$26c$1@eclipse.org...
> Any ideas on how to create a font selection combo box? I'd like to
> enumerate the font face names and place them into a combo, but I can't
> figure out how to do this in swt. Any ideas?
>
>
Re: Combo with font facenames [message #445054 is a reply to message #444974] Mon, 25 October 2004 13:01 Go to previous messageGo to next message
Robert Bacs is currently offline Robert BacsFriend
Messages: 165
Registered: July 2009
Senior Member
Hi,

Or you could use the following code:

...
FontData[] fontData = display.getFontList(null, true);
for (int i = 0; i < fontData.length; i++){
// call fontData[i].getName() to get the font name
}

FontData[] fontData = display.getFontList(null, false);
for (int i = 0; i < fontData.length; i++){
// call fontData[i].getName() to get the font name
}

Regards,
Boby


"Patrick" <psirr@earthlink.net> wrote in message
news:clbr81$26c$1@eclipse.org...
> Any ideas on how to create a font selection combo box? I'd like to
> enumerate the font face names and place them into a combo, but I can't
> figure out how to do this in swt. Any ideas?
>
>
Re: Combo with font facenames [message #445134 is a reply to message #445054] Tue, 26 October 2004 14:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: patrick.sirr.embarcadero.com

Thanks! I think this will do it. I was searching for a solution under the
fontregistry. Didn't know the Display had this functionality. To answer
your previous question I'm trying to make the changing of fonts more
efficient for my users. Similar to MS Word where the font details are
directly accessible from a combo.

"Robert Bacs" <boby@zerosoft.ro> wrote in message
news:clit50$tl9$1@eclipse.org...
> Hi,
>
> Or you could use the following code:
>
> ...
> FontData[] fontData = display.getFontList(null, true);
> for (int i = 0; i < fontData.length; i++){
> // call fontData[i].getName() to get the font name
> }
>
> FontData[] fontData = display.getFontList(null, false);
> for (int i = 0; i < fontData.length; i++){
> // call fontData[i].getName() to get the font name
> }
>
> Regards,
> Boby
>
>
> "Patrick" <psirr@earthlink.net> wrote in message
> news:clbr81$26c$1@eclipse.org...
> > Any ideas on how to create a font selection combo box? I'd like to
> > enumerate the font face names and place them into a combo, but I can't
> > figure out how to do this in swt. Any ideas?
> >
> >
>
>
Re: Combo with font facenames [message #448005 is a reply to message #445134] Thu, 23 December 2004 17:32 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Did you ever get this working, Patrick? I tried to the same thing and I am
getting a lot of repetition. Same fonts with different height and/or
styles.

"Patrick Sirr" <patrick.sirr@embarcadero.com> wrote in message
news:cllnpm$aui$1@eclipse.org...
> Thanks! I think this will do it. I was searching for a solution under
the
> fontregistry. Didn't know the Display had this functionality. To answer
> your previous question I'm trying to make the changing of fonts more
> efficient for my users. Similar to MS Word where the font details are
> directly accessible from a combo.
>
> "Robert Bacs" <boby@zerosoft.ro> wrote in message
> news:clit50$tl9$1@eclipse.org...
> > Hi,
> >
> > Or you could use the following code:
> >
> > ...
> > FontData[] fontData = display.getFontList(null, true);
> > for (int i = 0; i < fontData.length; i++){
> > // call fontData[i].getName() to get the font name
> > }
> >
> > FontData[] fontData = display.getFontList(null, false);
> > for (int i = 0; i < fontData.length; i++){
> > // call fontData[i].getName() to get the font name
> > }
> >
> > Regards,
> > Boby
> >
> >
> > "Patrick" <psirr@earthlink.net> wrote in message
> > news:clbr81$26c$1@eclipse.org...
> > > Any ideas on how to create a font selection combo box? I'd like to
> > > enumerate the font face names and place them into a combo, but I can't
> > > figure out how to do this in swt. Any ideas?
> > >
> > >
> >
> >
>
>
Previous Topic:Multiple lines of text in one tablecell?
Next Topic:How to get the Cursor-Position in a TextArea?
Goto Forum:
  


Current Time: Sun Oct 25 06:27:50 GMT 2020

Powered by FUDForum. Page generated in 0.02323 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top