PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Adjusting color of form or buttons

Hi to you all,

Is there any way to change the color of the form (now: white) and buttons (now: grey) made in the Visual form builder? I cannot find this anywhere.

Thanks.

Best regards,
Marcel
Since nobody else has replied, I'll take a quick stab at this one.

Right now, these things are not handled by the Visual Form Builder. That's not to say that it can't be done. These things can be done with the Win32 API.

Since this forum is pretty much dedicated to PPL, I don't think you will get to much response to Win32 questons here, but PocketMatrix does have some other forums that you'd probably get more response from.

So really, the question here is how can I change colors on a PPL form? If I get some time, maybe I can put together a quick demo and post it here. If you are knowledgable with the Win32 API, you should be able to put something together yourself easily.

BManske

EDIT:

Kornalius,

I looked in the PPL.CHM file and found your RegisterClass function. I was hoping that there was some way to change the background member of the WinClass. Is there an easy way to change anything in the class definition before the form is created? Could you document the RegisterClass function in the next version?

Bmanske
Bmanske,

Thanks for the help. I will look into this Win32 API.

Marcel
Hi Brad,

You can look at the components.ppl demo, I use the RegisterClass to create my own window class with my own painting too.

I wish to have time to document this function in the help file before the next release. I will do my best!
Kornalius,

I took a look at the components.ppl demo before I wrote that last message. (by the way, when running on the desktop it doesn't seem to work properly, I haven't tried to figure out why yet. It does work on the PPC). It is a good demo for owner drawn components.

I was just wondering if there was a way to change some of the other properties of the WinClass before registering the class.
wndclass.cbClsExtra
wndclass.cbWndExtra
wndclass.hIcon
wndclass.hCursor
wndclass.hbrBackground (used to change background color)

I could see the ability to change these things in the class as useful. Things like styles and setting the winProc are already handled nicely.

This is more just a question than a request as there are other (more complex) ways to set the background color. This may make a good addition for version 1.1 :)

bmanske
Hi Brad,

I'd rather not go there yet. Maybe in a future version like you said! :)