forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

set_control_colour@

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Tue Jul 31, 2007 8:57 pm    Post subject: set_control_colour@ Reply with quote

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
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Wed Aug 01, 2007 9:55 am    Post subject: Reply with quote

Thank you. I will change the help file accordingly.
Back to top
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Thu Oct 02, 2008 10:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Thu Oct 02, 2008 12:52 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Fri Oct 03, 2008 12:26 pm    Post subject: Reply with quote

Paul,

Your proposal would be much appreciated

Regards

Ian
Back to top
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Fri Nov 21, 2008 9:53 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
IanLambley



Joined: 17 Dec 2006
Posts: 490
Location: Sunderland

PostPosted: Fri Nov 21, 2008 1:16 pm    Post subject: Reply with quote

Thanks Paul

Regards

Ian
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group