Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » StdDisplayClass - a very useful class. Expand for all fonts ( Do StdDisplayClass affordable and more convenient!)
StdDisplayClass - a very useful class. Expand for all fonts [message #46620] Tue, 14 June 2016 15:48 Go to next message
Navadvipa Chandra das is currently offline  Navadvipa Chandra das
Messages: 34
Registered: January 2016
Location: DPR, Donetsk region, Chay...
Member

Hello, all!


I was faced with the problem of displaying external data using ArrayCtrl. An example of a standard reference/VirtualArray sets the right direction for action, but unfortunately only one standard font. You can use the Display in example StdDisplayClass city (copy the code) for its class MyFontDisplay. Because StdDisplayClass hidden in Display.cpp file and therefore not available to users, and besides has no way of working with fonts. And work StdDisplayClass doing a lot and this work is very useful. Just look at the functions code StdDisplayClass::Paint0, StdDisplayClass::Paint, StdDisplayClass::GetStdSize - as everything becomes clear. Why keep such a treasure under lock and key. you need to give away! I fixed a little StdDisplayClass. You can now create a class descendant with the standard font! I need it. For example:

class MyFontDisplay : public StdDisplayClass
{
public:
	MyFontDisplay(int align = ALIGN_LEFT);
};

MyFontDisplay::MyFontDisplay(int align)
 : StdDisplayClass(align)
{
  Std_Font.FaceName( "My font" );
  Std_Font.Height( 18 );
}

	ArrayCtrl::Column &cl = MyArrayCtrl.AddRowNumColumn( "My column name", 50 ).SetConvert( MyConvert ).SetDisplay( Single<MyFontDisplay>() );



Thank!

With best regards Navadvipa Chandra das.

[Updated on: Tue, 14 June 2016 17:37]

Report message to a moderator

Re: StdDisplayClass - a very useful class. Expand for all fonts [message #46626 is a reply to message #46620] Thu, 16 June 2016 07:59 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Have you noticed AttrText?

Mirek
Re: StdDisplayClass - a very useful class. Expand for all fonts [message #46629 is a reply to message #46626] Thu, 16 June 2016 11:21 Go to previous message
Navadvipa Chandra das is currently offline  Navadvipa Chandra das
Messages: 34
Registered: January 2016
Location: DPR, Donetsk region, Chay...
Member

Hello Mirek and all!

And the small chest simply opened.

Thank you.

With best regards Navadvipa Chandra das.
Previous Topic: far pascal function pointer
Next Topic: MSC15 and 2014 sources - problem with Stream
Goto Forum:
  


Current Time: Fri Apr 19 18:04:24 CEST 2024

Total time taken to generate the page: 0.02952 seconds