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 » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » problems with ArrayCtrl and SetFont
problems with ArrayCtrl and SetFont [message #24065] Wed, 23 December 2009 21:49 Go to previous message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
Hi,

U++ 1713.

If I add values in an ArrayCtrl, using AttrText() for change the default font, I get the followings problems:

1) The value in the cell will be Null when edit it;
2) After end edit the cell, the font of this cell will be again the default font.

If I add values without AttrText() the editors working as well.

Following an short demo code:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

GUI_APP_MAIN
{
ArrayCtrl a;

Array<EditString> es;

a.AddColumn("Text1").Edit(es.Add().SetFont(Courier(11)));
a.AddColumn("Text2").Edit(es.Add().SetFont(Courier(11)));

for(int i = 0; i < 10; i++)
//a.Add(AttrText(AsString(i)).SetFont(Courier(11)),
// AttrText(AsString(i*-1)).SetFont(Courier(11))
//);
a.Add(AsString(i),
AsString(i*-1)
);

a.SetLineCy(Draw::GetStdFontCy() + 4);

TopWindow app;
app.Add(a.SizePos());
app.Sizeable();
app.Run();

}

bye
Mauro Bottizzo.
 
Read Message
Read Message
Previous Topic: DropGrid jump to row
Next Topic: Embed editfields in ArrayCtrl
Goto Forum:
  


Current Time: Fri Apr 26 08:07:48 CEST 2024

Total time taken to generate the page: 0.04441 seconds