xsharp.eu • Background Color
Page 1 of 1

Background Color

Posted: Fri Jun 18, 2021 4:13 pm
by Kuno Egger
This may be a dumb question: one of the things I found frustrating about VO is that there was no button background color parameter. I see that there isn't one in X# either. Can anybody explain why such an obvious attribute parameter is missing?

Background Color

Posted: Fri Jun 18, 2021 5:29 pm
by wriedmann
Hi Kuno,
for sure this is not a stupid question.
But it seems that the Windows API does not has this functionality, and you need OwnerDraw for it.
Therefore the VO GUI classes are missing this functionality.
Maybe the Windows Forms based VOGUI classes for X# will permit this as Windows Forms has this functionality.
Wolfgang

Background Color

Posted: Sat Jun 19, 2021 4:45 pm
by TerryB1
Hi Kuno

As Wolfgang says that is not a stupid question, and OwnerDraw will allow you to do it.

The reason it is not there is simply that, in the overall Windows Architecture, that is not the best place to put it, directly at any rate. It could be done in some complex way no doubt, but that would challenge architectural consistency.

If I may offer a bit of advice: I suggest once you've got things working in a .Net Environment, you forget about VO and be wary of any performance comparisons that may be made.

VO was implemented totally differently from .Net via C# or C# derived language. It was written "on top" of the O/S.

.Net is implemented as a totally integrated sub-element of the O/S - it has its own allocated memory and your program code is totally encapsulated as "YOUR program". By that I mean it makes less use of O/S functions than VO ever did.

This all means that performance has more to do with the overall structure of your program than may have been the case with VO.

Terry