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 » LineEdit font bug
LineEdit font bug [message #40843] Mon, 23 September 2013 09:23 Go to next message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
View state:
http://s020.radikal.ru/i718/1309/96/cf4c4e03e1b8.png
EditString cell:
http://s020.radikal.ru/i720/1309/a4/81cbe46a0814.png

LineEdit cell (error):
http://s019.radikal.ru/i629/1309/43/fde6358d73a2.png

GUI_APP_MAIN
{	
	LineEdit editCell;//uncomment for image3
        EditString editCell;//uncomment for image2

	editCell.SetFont(GetStdFont());
	
	TopWindow wnd;
	AppGrid grid;
	grid.Editing();
	wnd.Add(grid.SizePos());
	grid.AddColumn("Col").Edit(editCell);
	grid.Add();
	grid.Set(0, 0, "Hello World!");
	wnd.Sizeable();
	wnd.Run();
}

[Updated on: Mon, 23 September 2013 09:23]

Report message to a moderator

Re: LineEdit font bug [message #40847 is a reply to message #40843] Mon, 23 September 2013 10:14 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Hi iST1,

The problem is that you change the font. LineEdit is probably (I'm not sure) designed to work with monospace fonts only (anyone else knows more about this?). But GetStdFont returns non-monospace, e.g.
	DUMP(editCell.GetFont());
	editCell.SetFont(GetStdFont());
	DUMP(editCell.GetFont());
on my system logs
Quote:

editCell.GetFont() = <monospace:16>
editCell.GetFont() = <FreeSans:12>


If you skip the SetFont line, it works as expected. If you really want to change the font, try using some monospaced one...

Best regards,
Honza
icon14.gif  Re: LineEdit font bug [message #40859 is a reply to message #40847] Tue, 24 September 2013 16:43 Go to previous message
iST1 is currently offline  iST1
Messages: 107
Registered: August 2013
Experienced Member
No Message Body
Previous Topic: Two "basic" operations on GridCtrl
Next Topic: GridCtrl, Editing and DoubleClick
Goto Forum:
  


Current Time: Sun Nov 17 16:54:30 CET 2019

Total time taken to generate the page: 0.02636 seconds