Font Handling in TSimpleGraph

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

Font Handling in TSimpleGraph

Postby kokkoras » August 18th, 2006, 8:02 am

I have two nodes (node1, node2), the font of which is set to a common TFont selected from a FontDialog. So far so good. Why comparing the font of these nodes for using different fonts returns false? That is:
Code: Select all
node1.font<>node2.font

evaluates to true. Any idea?

When a node is created the typical way, does it have it's font set to some value or it is undefined and the hostSimpleGraph.font is used? Could this be the problem?

edit: after some investigation, it seems that the font property points to some address. Comparing the way I described earlier is like comparing two different addresses. Silly me.... :oops:

Now the question is:
Do I have to compare every single property of TFont to deside if two TFont instances have the same content?
Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby Kambiz » August 18th, 2006, 1:03 pm

Initial font of each object is the SimpleGraph's font.

Yes, you have to compare every single property of the font object.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby kokkoras » August 18th, 2006, 1:05 pm

Kambiz wrote:Yes, you have to compare every single property of the font object.


sad but true! thanks.
Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby kokkoras » August 19th, 2006, 11:48 am

a bit off-topic question:

Is there any way to fill a combo-box with the available typefaces of a given font, like in the script combo box of the TFontDialog?

Thanks.
Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece

Postby Johnny_Bit » August 19th, 2006, 4:38 pm

every tt font has regular, bold, italic and bold italic, what more d'you want? Simply use Freetype thingie and have some fun!
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby kokkoras » August 19th, 2006, 8:26 pm

Johnny_Bit wrote:every tt font has regular, bold, italic and bold italic, what more d'you want? Simply use Freetype thingie and have some fun!


Sorry, my intention was to ask about charsets, not typefaces. I am asking about DEFAULT_CHARSET, GREEK_CHARSET, ANSI_CHARSET, etc. Is there any way to get those for the selected TT Font?
Fotis
User avatar
kokkoras
Moderator
Moderator
 
Posts: 317
Joined: March 12th, 2005, 11:19 pm
Location: Thessaloniki, Greece


Return to DELPHI AREA Products

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron