View previous topic :: View next topic |
Author |
Message |
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Tue Jul 31, 2007 8:57 pm Post subject: set_control_colour@ |
|
|
This does not seem to work for setting the control background colour; undefined at link time.
set_control_text_colour@ does.
Regards
Ian |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Wed Aug 01, 2007 9:55 am Post subject: |
|
|
Thank you. I will change the help file accordingly. |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Thu Oct 02, 2008 10:44 am Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Thu Oct 02, 2008 12:52 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Fri Oct 03, 2008 12:26 pm Post subject: |
|
|
Paul,
Your proposal would be much appreciated
Regards
Ian |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7938 Location: Salford, UK
|
Posted: Fri Nov 21, 2008 9:53 am Post subject: |
|
|
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.
Code: | 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 |
|
|
Back to top |
|
|
IanLambley
Joined: 17 Dec 2006 Posts: 490 Location: Sunderland
|
Posted: Fri Nov 21, 2008 1:16 pm Post subject: |
|
|
Thanks Paul
Regards
Ian |
|
Back to top |
|
|
|