May 29, 2024, 08:09:17 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Change coloron LV headers?

Started by Egil, October 14, 2023, 08:31:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Egil

Scratching my head here....
Change the colors in a List View control is easy, but it does not affect the header colors.
So does anyone know how to change the color in a List View header?


Best regards,
Egil
Support Amateur Radio  -  Have a ham  for dinner!

Brian

Egil,

Maybe this is a simpler one to understand than the one I sent to your email address

Brian

Egil

Thanks Brian!
Now I have something to play with during my last five days here in Trondheim.
BTW have not seen any email from you about this yet.


Regards,
Egil
Support Amateur Radio  -  Have a ham  for dinner!

Brian

I will check that email to.orrow, Evil

Brian

billhsln

Did you ever figure out how to change the color?

Bill
When all else fails, get a bigger hammer.

Egil

Hi Bill,
Have not figured it out yet. After IWB suddenly stopped to work properly on my tabletop, my laptop still worked fine. But last week IWB stopped working properly also on That  computer, so now I can use CB only.
But converting the code Brian posted to CB involves too much work for me at the moment, so I'll wait working on that code till the IWB problems have been fixed.

In addition apv2004, stopped working at the same time as IWB and some radio related decoding programs. Same file handling problems as IWB. And since converting to CB involved intensive use of that software, I just have to wait.

I'm reluctant to buy a new PC as both of them are only a few years old. And I have already decided that my next computer will be a Mac. Have not yet studied what software is available for hobby coders like me for a Mac, but I beleive c/c++ will be the only affordable option. Haven't done that kind of work since around 1990... :)


Regards,
Egil
Support Amateur Radio  -  Have a ham  for dinner!

Brian

Bill,

In this not-finished example, you need to add or remove, in the SUB MyLVHandler, the CASE 0, 1, 2 or 3 lines with as many listview column headers you have got, and change the colour RGBs accordingly

So, if you have seven column headers, you would need CASE 0 to 6 with the relevant colours

Brian

billhsln

I thought the point of the exercise was to change the header.  I have done the other type.

Bill
When all else fails, get a bigger hammer.

Egil

Bill,
Have you tried both of Brians postings?
I'm not able to try them myself, but by studying the code I think that his first post should take care of that.
(https://www.ionicwind.com/forums/index.php?action=dlattach;topic=6692.0;attach=5868)

Picture below shows a screendump from my laptop taken before IWB failed to work properly.
Seems like you have to set one coloumn at the time also for the headers.


Good Luck!
Egil

demo_brian.png
Support Amateur Radio  -  Have a ham  for dinner!

Egil

Don't ask me how I managed to upload that picture twice!

Egil
Support Amateur Radio  -  Have a ham  for dinner!

billhsln

I wonder what the conditions are where IWB isn't working.  I would really have problems, if it stopped working for me.  I do lots of things with it for work.  Specifically doing SQL thru ODBC connection to an AS400 sitting 87 miles from where I live.

Bill
When all else fails, get a bigger hammer.

billhsln

Brian has explained that it is under Windows 11 that IWB quits working.  Thankfully, my laptop won't take it so I am still using Windows 10.

Bill
When all else fails, get a bigger hammer.

Egil

Well, I have two computers. One tabletop running Windows 10 Pro: IWB and five other software packages crashes when they are trying to open files, apv2004.exe just doesn't run anymore.
Then I have a laptop running Windows 11 Home: IWB started last week to crash when trying to load files.

the laptop also had Windows 10 Pro, but a couple of years ago Microsoft offered a free upgrade to Windows 11.
I upgraded mainly to see the difference between the two systems.

But I have talked to several other radio hams here in Europe using Windows 10, none of them have IWB, but a lot of them various programs have difficulties when loading files.

When these two computers of mine stop working, I'll buy a Mac. Period. My grandson though urges med to start using Raspberry Pi for everything I use computers for today. That is very tempting, but I'm so old that I'll never bother to learn a new coding language, so a Mac  will serve me well enough.


Egil
Support Amateur Radio  -  Have a ham  for dinner!

Rock Ridge Farm (Larry)

You may as well load linux. Mac is linux based.
Larry

Egil

Quote from: Rock Ridge Farm (Larry) on October 30, 2023, 03:24:47 PMYou may as well load linux. Mac is linux based.
Larry

I have tried several Linux distros, a couple of them several times. I really liked them all, but the same thing happened every time. As soon as I tried to start any of my SDR radios, I was unable to find stable drivers for them. And SDR radios are a great part of my hobbies. Only whish I had the knowledge to make my own.
So then I'm left with Raspberry Pi and Mac. And since I always used Macs for my work, I think that will be the choice.

Egil
Support Amateur Radio  -  Have a ham  for dinner!

Egil

Hi,
Unfortunately back in Trondheim. This time by bus, as driving a car for about four hours when on a pain killer "diet" never has been a good idea. This means that I have a lot of spare time to kill....

And since I'm not quite satisfied whith this LV color project, I've been searching the web for ideas on how to do things a little more "streamlined"than the ideas posted here by other members.
 
I found this page(for C/C++ coding) very interesting:
( https://www.codeproject.com/Articles/24114/Adding-Color-to-Listview-with-Customdraw )

I beleive there should be enough information in that project to make custom made routines for IWB and/or CB. Wouldn't that be nice?
I work rather slow at the moment, so if others would like to try, I don't mind.

Regards,
Egil.

Support Amateur Radio  -  Have a ham  for dinner!