|
|
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » up & down within ColumnList moves focus out
up & down within ColumnList moves focus out [message #23607] |
Wed, 04 November 2009 09:51  |
 |
bonami
Messages: 186 Registered: June 2007 Location: Beijing
|
Experienced Member |
|
|
1. i built the attached program on chinese winXP, using GCC. and it runs well on chi.XP. but the exe file on english winXP (a nLite version) shows the ColumnList only with a couple of pixels (as shown in attachment).
2. suggestion,
within a ColumnList, pressing direction keys should move among its items, instead of changing focus to other controls.
-
Attachment: ez.zip
(Size: 7.59KB, Downloaded 382 times)
[Updated on: Tue, 10 November 2009 07:05] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: up & down within ColumnList moves focus out [message #23818 is a reply to message #23813] |
Tue, 24 November 2009 14:52   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
bonami wrote on Mon, 23 November 2009 21:43 | NoRoundSize() works.
but adding items shows nothing. i changed my constructor to
ezcommwin() { Add(cl.LeftPos(10, 100).TopPos(30, 80)); cl.Add("item", true); cl.Add("itemmm", false); cl.NoRoundSize(); } the log you requested (no adding items or NoRoundSize() as above, only cl.LeftPos.TopPos) is,
cy = 0
r.Height() = 0
rr.Height() = 0
cy = 0
r.Height() = 0
rr.Height() = 0
cy = 0
r.Height() = 0
rr.Height() = 0
cy = 0
r.Height() = 76
rr.Height() = 80
cy = 0
r.Height() = 76
rr.Height() = 80
cy = 0
r.Height() = 76
rr.Height() = 80
cy = 0
r.Height() = 76
rr.Height() = 80
cy = 0
r.Height() = 76
rr.Height() = 80
|
INTERESTING.
Try
DDUMP(Draw::GetStdFontCy());
(it is enough to put it to GUI_APP_MAIN once).
Something is very strange, cy is only assigned in ColumnList contructor to GetStdFontCy value, which is standard font height...
Mirek
|
|
|
|
Re: up & down within ColumnList moves focus out [message #23832 is a reply to message #23824] |
Wed, 25 November 2009 11:39   |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
bonami wrote on Tue, 24 November 2009 20:46 |
Mirek, if this is my own system's fault, maybe there is no need to further investigate on it. It's a stripped system, thus not so trustable.
|
That might be a reason, but not excuse 
U++ should work even on stripped system.
The query for system font is in Draw/FontWin32:
void GetStdFontSys(String& name, int& height)
{
#ifdef PLATFORM_WINCE
name = "Arial";
height = 10;
#else
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof(ncm);
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
name = FromSystemCharset(ncm.lfMenuFont.lfFaceName);
height = abs((int)ncm.lfMenuFont.lfHeight);
#endif
}
put logs there:
void GetStdFontSys(String& name, int& height)
{
#ifdef PLATFORM_WINCE
name = "Arial";
height = 10;
#else
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof(ncm);
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
name = FromSystemCharset(ncm.lfMenuFont.lfFaceName);
height = abs((int)ncm.lfMenuFont.lfHeight);
DDUMP(name);
DDUMP(height);
#endif
}
and/or perhaps try
void GetStdFontSys(String& name, int& height)
{
#ifdef PLATFORM_WINCE
name = "Arial";
height = 10;
#else
NONCLIENTMETRICS ncm;
ncm.cbSize = sizeof(ncm);
::SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(ncm), &ncm, 0);
name = FromSystemCharset(ncm.lfMenuFont.lfFaceName);
height = abs((int)ncm.lfMenuFont.lfHeight);
if(height == 0) {
name = "Arial";
height = 10;
}
#endif
}
Mirek
|
|
|
|
|
|
Re: up & down within ColumnList moves focus out [message #23884 is a reply to message #23875] |
Mon, 30 November 2009 21:32  |
 |
mirek
Messages: 14257 Registered: November 2005
|
Ultimate Member |
|
|
bonami wrote on Mon, 30 November 2009 00:43 | what's more strange is, it's not happening today.
i added your code and both is 20. i suspected there is something right, so i restored all files but the problem is gone, that's to say, the size shown on screen is right. i'll try this later to see if the problem happens again.
as i can see, according to my former GetFaceName() output in Font::FindFaceNameIndex(), q is 0 in Font::InitStdFont(), so SyncStdFont() is never evoked. isn't this sth. wrong?
|
Well, now the problem is obvious. The system is set to use Segoe UI font, but it is not in the list of available fonts!
Mirek
|
|
|
Goto Forum:
Current Time: Fri May 09 15:52:29 CEST 2025
Total time taken to generate the page: 0.01171 seconds
|
|
|