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 

background colour for next control

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



Joined: 16 Oct 2009
Posts: 58
Location: München

PostPosted: Mon Jul 11, 2011 2:18 pm    Post subject: background colour for next control Reply with quote

Hello,
I want to change the background colour in boxes 'Line 2' and 'Line 3',
but the code "winio@('%`bg&', RGB@(120,120,0))" does'nt work,
what is wrong?
Bartl

Code:

winapp
 program colouring
 include <windows.ins>
 
 integer*4 i
 character zeile(3)*6
 integer*4 ifocus1, ncontrol1, icontrol1(5)
 common/focus_control1/ifocus1,ncontrol1,icontrol1
 data zeile(1) /'Line 1'/
 data zeile(2) /'Line 2'/
 data zeile(3) /'Line 3'/
 external ienter_monitor1
 
 i=ifw1()
 call add_focus_monitor@(ifw1)
 ncontrol1 = 3
 i=winio@('%ca[Eingabe der Grundparameter]&')
 i=winio@('%bg[grey]%fn[ARIAL]&')
 i=winio@('%co[data_border]&')     
 i=winio@('%ac[Esc]&','EXIT')                               
 i=winio@('%ac[Enter]&',ienter_monitor1)
 i=winio@('%rs%lc&',zeile(1),icontrol1(1))

 i=winio@('%`bg&', RGB@(120,120,0))              ! does'nt work
 i=winio@('%nl%rs%lc&',zeile(2),icontrol1(2))

 i=winio@('%`bg&', RGB@(120,120,0))              ! does'nt work
 i=winio@('%nl%rs%lc&',zeile(2),icontrol1(3))
 i=winio@('%2nl Ende mit ESC Taste!')
 call remove_focus_monitor@(ifw1)
 end
 
 integer*4 function ienter_monitor1()
 include <windows.ins>
 integer*4 ifocus1, ncontrol1, icontrol1(5)
 common/focus_control1/ifocus1,ncontrol1,icontrol1
 ienter_monitor1=1
 if(ifocus1 .eq. icontrol1(ncontrol1))call set_highlighted@(icontrol1(ncontrol1))
 if(ifocus1 .ne. icontrol1(ncontrol1))then
 do k=1,ncontrol1
 if(ifocus1 .eq. icontrol1(k))call set_highlighted@(icontrol1(k+1))
 enddo
 endif
 continue
 end
 
 integer*4 function ifw1()
 include <windows.ins>
 integer*4 ifocus1, ncontrol1, icontrol1(5)
 common/focus_control1/ifocus1,ncontrol1,icontrol1
 ifw1=2
 ifocus1=clearwin_info@('FOCUSSED_WINDOW')
 end
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Jul 11, 2011 9:05 pm    Post subject: Reply with quote

Looks like you have to put %nl before %`bg.
Back to top
View user's profile Send private message AIM Address
Bartl



Joined: 16 Oct 2009
Posts: 58
Location: München

PostPosted: Tue Jul 12, 2011 6:52 am    Post subject: Reply with quote

Paul,
that's the simple solution, thank you very much for the prompt reply.

The next time I will ask you earlier befor spend a lot of time to find a solution.

Bartl
Back to top
View user's profile Send private message
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