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 » Look and Chameleon Technology » ArrayCtrl in Windows 10 (The header of ArrayCtrl in Windows 10 doesn't differ from the body of the table.)
ArrayCtrl in Windows 10 [message #49308] Mon, 22 January 2018 10:39 Go to next message
pvictor is currently offline  pvictor
Messages: 9
Registered: December 2015
Location: Russia
Promising Member
I noticed that the header of ArrayCtrl in Windows 10 doesn't differ from the body of the table.
I have found a small change in source code, that solves this problem:
CtrlLib/ChWin32.cpp:
{
	HeaderCtrl::Style& s = HeaderCtrl::StyleDefault().Write();
//	Win32Look(s.look, 4, XP_HEADER, HP_HEADERITEM); // excluding this line helps
	Image hm = Unmultiply(XpImage(XP_HEADER, HP_HEADERITEM, 1, SColorPaper, Size(20, 10)));
	RGBA textc = SColorText();
	int diff = Diff(hm[4][19], textc);
	int hdroll = 0;
	for(int i = 0; i < 4; i++) {
		int d = Diff(hm[4][i], textc);
		if(d < diff) {
			diff = d;
			hdroll = i + 1;
		}
		d = Diff(hm[4][19 - i], textc);
		if(d < diff) {
			diff = d;
			hdroll = -i;
		}
	}
	s.gridadjustment = hdroll;
}


I don't know what that line makes, but excluding it works:
index.php?t=getfile&id=5488&private=0
  • Attachment: 1.png
    (Size: 7.00KB, Downloaded 236 times)
Re: ArrayCtrl in Windows 10 [message #49309 is a reply to message #49308] Mon, 22 January 2018 21:19 Go to previous messageGo to next message
Klugier is currently online  Klugier
Messages: 590
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

The above code is fine. It only reads the style from the operating system in this case it is Window. Many Windows 10 applications that is not U++ has got similar array header. The good example is Thunderbird.

If you don't like this you can override style globally when your application starts - here is more information how to do it https://www.ultimatepp.org/srcdoc$CtrlCore$AboutChameleon_en -us.html.

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Re: ArrayCtrl in Windows 10 [message #49310 is a reply to message #49309] Wed, 24 January 2018 05:12 Go to previous messageGo to next message
pvictor is currently offline  pvictor
Messages: 9
Registered: December 2015
Location: Russia
Promising Member
Yes, there are a lot of applications with similar array headers. But all of them scroll by rows - you'll never see a picture like this:
index.php?t=getfile&id=5489&private=0
When there are many ArrayCtrls in an application, the above behavior makes it look unprofessional and "cuts the eye".
As for me, commenting that line in source code makes me happy - my applications (in which arrays are central elements) look much better than before.
  • Attachment: 2.png
    (Size: 2.51KB, Downloaded 205 times)
Re: ArrayCtrl in Windows 10 [message #49456 is a reply to message #49310] Tue, 13 February 2018 12:23 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1336
Registered: September 2007
Senior Contributor
This problem is unavoidable. The skinning API is not so powerful to perfectly fix this and the U++ solution is correct: do the best job you can do and hope for the best.

But if it bothers you, you need to take:

HeaderCtrl::StyleDefault().Write()

and overwrite that style.

Do this in your "main" method, before instantiating your window and you should be fine.

I need to look up what to write into that style to make it look exactly like your proposal.
Re: ArrayCtrl in Windows 10 [message #49580 is a reply to message #49456] Mon, 05 March 2018 22:28 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2919
Registered: August 2008
Veteran
Hi all

I have the same problem as pvictor.
It does not seem a feature and I cannot find anything similar in updated Microsoft applications.
In all of them the header is identified and is not mixed with grid cells.
Please review if this style decision is adequate.


Best regards
Iñaki

[Updated on: Mon, 05 March 2018 22:28]

Report message to a moderator

Re: ArrayCtrl in Windows 10 [message #49721 is a reply to message #49580] Fri, 13 April 2018 14:24 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
Quote:

It does not seem a feature and I cannot find anything similar in updated Microsoft applications.
In all of them the header is identified and is not mixed with grid cells.


index.php?t=getfile&id=5552&private=0[quote title=koldo wrote on Mon, 05 March 2018 22:28]
Re: ArrayCtrl in Windows 10 [message #49728 is a reply to message #49721] Sat, 14 April 2018 00:19 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2919
Registered: August 2008
Veteran
Smile

index.php?t=getfile&id=5554&private=0
  • Attachment: Captura.PNG
    (Size: 60.38KB, Downloaded 96 times)


Best regards
Iñaki

[Updated on: Sat, 14 April 2018 00:20]

Report message to a moderator

Re: ArrayCtrl in Windows 10 [message #49729 is a reply to message #49728] Sat, 14 April 2018 08:31 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11700
Registered: November 2005
Ultimate Member
koldo wrote on Sat, 14 April 2018 00:19
Smile

index.php?t=getfile&id=5554&private=0


Yes, but that is painted by application, ignoring host os rules....

Chameleon, by default, is attempting to use what host OS defines as standard look. There OS API functions that provide this and we are using them. That the standard look is not great and that M$ ignores its own rules is another matter...
Re: ArrayCtrl in Windows 10 [message #49730 is a reply to message #49729] Sat, 14 April 2018 11:11 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 2919
Registered: August 2008
Veteran
I am sorry pvictor

I did what I could. Although the rows have a line separating them, the header will visually mix with the adjacent row.


Best regards
Iñaki
Re: ArrayCtrl in Windows 10 [message #49735 is a reply to message #49730] Sat, 14 April 2018 22:56 Go to previous message
Klugier is currently online  Klugier
Messages: 590
Registered: September 2012
Location: Poland, Kraków
Contributor
Hello,

As, I said before for me it was working as design problem. If you want your own style - please you chameleon.

Sincerely,
Klugier


Ultimate++ - one framework to rule them all.
Previous Topic: Applications look blurry in Windows 10
Next Topic: how to chameleon the ScrollBar ctrl?
Goto Forum:
  


Current Time: Sat Feb 16 12:06:03 CET 2019

Total time taken to generate the page: 0.00637 seconds