Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Combo with font facenames
Combo with font facenames [message #444974] Fri, 22 October 2004 16:46 Go to next message
Eclipse UserFriend
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 08:42 Go to previous messageGo to next message
Eclipse UserFriend
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 09:01 Go to previous messageGo to next message
Eclipse UserFriend
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 10: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 12:32 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 14:21:43 EDT 2025

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

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

Back to the top