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  |
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
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 21:32:00 CEST 2025
Total time taken to generate the page: 0.00851 seconds
|