Silverfrost Forums

Welcome to our forums

set_control_colour@

31 Jul 2007 7:57 #2132

This does not seem to work for setting the control background colour; undefined at link time. set_control_text_colour@ does.

Regards

Ian

1 Aug 2007 8:55 #2133

Thank you. I will change the help file accordingly.

2 Oct 2008 9:44 #3864

Paul,

How do I change the background colour of a control dynamically, rather than with %`bg?

Was that the intention of set_control_colour@ because it does not seem to exist.

Regards

Ian

2 Oct 2008 11:52 #3865

I cannot find a simple way to change the background colour dynamically.

set_control_colour@ does not exist.

It looks like I could add a new routine set_control_background_colour@ which would work for at least some if not all controls.

3 Oct 2008 11:26 #3869

Paul,

Your proposal would be much appreciated

Regards

Ian

21 Nov 2008 8:53 #4024

I have added a new subroutine for the next release. In the following sample the edit box will change to a green background when you click on the button.

WINAPP
program backcolour
integer iw,winio@,cb,hwnd
common hwnd
external cb
n = 0
iw=winio@('%rd&',n)
iw=winio@('%lc&', hwnd)
iw=winio@('%nl%cn&')
iw=winio@('%^bt[Green]',cb)
end

integer function cb()
integer hwnd
common hwnd
include <windows.ins>
call set_control_back_colour@(hwnd, RGB@(0,255,0))
cb = 1 
end
21 Nov 2008 12:16 #4025

Thanks Paul

Regards

Ian

Please login to reply.