Skip to main content

Hi Again,

I am trying to change the background color of an ITEM , it has FORGROUND and BACKGROUND options in its PROPERTIES when looked at in ACCUTERM.

So I am assuming that they can be changed on the "fly" durring use of the form.

Here is what I have tried so far 

         CALL ATGUISETPROP(GUIAPP,GUIFRM,'COMBCUST',GPITEMS,0,0,CUST.LIST,GUIERRORS,GUISTATE)
*         RGBCOLOR = 102 + 255*256 + 102*65536
*         RGBCOLOR = "Green"
*         RGBCOLOR = 102:@SVM:255:@SVM:102
         RGBCOLOR = "102,255,102"
         CALL ATGUISETITEMPROP(GUIAPP,GUIFRM,'COMBCUST',GPBACKCOLOR,0,0,RGBCOLOR,GUIERRORS,GUISTATE)
         IF GUIERRORS<1> >=2 THEN GOTO GUI.ERROR
         CALL ATGUISHOW(GUIAPP,GUIFRM,"COMBCUST","",GUIERRORS,GUISTATE)
         CALL ATGUIACTIVATE(GUIAPP,GUIFRM,'COMBCUST',GUIERRORS,GUISTATE)
         IF GUIERRORS<1> >=2 THEN GOTO GUI.ERROR        

It always aborts , as you can see I have tried the RGB raw number, a generic name as used in the Properties drop down, the numbers with sub values and with comers.  

All of these ways are hinted at in the documentation, in various areas but cant find any examples 

I know I will be kicking my self, when I see the answer but needs must :¬)

Can anyone help please

Blessings

Chris



------------------------------
Chris BAXTER
MD
CB Soft
IPSWICH GB
------------------------------

Hi Again,

I am trying to change the background color of an ITEM , it has FORGROUND and BACKGROUND options in its PROPERTIES when looked at in ACCUTERM.

So I am assuming that they can be changed on the "fly" durring use of the form.

Here is what I have tried so far 

         CALL ATGUISETPROP(GUIAPP,GUIFRM,'COMBCUST',GPITEMS,0,0,CUST.LIST,GUIERRORS,GUISTATE)
*         RGBCOLOR = 102 + 255*256 + 102*65536
*         RGBCOLOR = "Green"
*         RGBCOLOR = 102:@SVM:255:@SVM:102
         RGBCOLOR = "102,255,102"
         CALL ATGUISETITEMPROP(GUIAPP,GUIFRM,'COMBCUST',GPBACKCOLOR,0,0,RGBCOLOR,GUIERRORS,GUISTATE)
         IF GUIERRORS<1> >=2 THEN GOTO GUI.ERROR
         CALL ATGUISHOW(GUIAPP,GUIFRM,"COMBCUST","",GUIERRORS,GUISTATE)
         CALL ATGUIACTIVATE(GUIAPP,GUIFRM,'COMBCUST',GUIERRORS,GUISTATE)
         IF GUIERRORS<1> >=2 THEN GOTO GUI.ERROR        

It always aborts , as you can see I have tried the RGB raw number, a generic name as used in the Properties drop down, the numbers with sub values and with comers.  

All of these ways are hinted at in the documentation, in various areas but cant find any examples 

I know I will be kicking my self, when I see the answer but needs must :¬)

Can anyone help please

Blessings

Chris



------------------------------
Chris BAXTER
MD
CB Soft
IPSWICH GB
------------------------------

Sorry Guys - my bad, I missed out the items parameter, should have been 

CALL ATGUISETITEMPROP(GUIAPP,GUIFRM,'COMBCUST',"",GPBACKCOLOR,0,0,RGBCOLOR,GUIERRORS,GUISTATE)

haha  

still getting the hang of the actual color codes though



------------------------------
Chris BAXTER
MD
CB Soft
IPSWICH GB
------------------------------

Sorry Guys - my bad, I missed out the items parameter, should have been 

CALL ATGUISETITEMPROP(GUIAPP,GUIFRM,'COMBCUST',"",GPBACKCOLOR,0,0,RGBCOLOR,GUIERRORS,GUISTATE)

haha  

still getting the hang of the actual color codes though



------------------------------
Chris BAXTER
MD
CB Soft
IPSWICH GB
------------------------------

Hi Chris,

Look in the AccuTerm GUI manual - section 1.2.6 Standard Properties. This outlines the colour number to pass to the ATGUI subroutines.

There are some colour constants defined in ATGUIEQUATES. I have taken all the named colours from this page: https://cloford.com/resources/colours/500col.htm and converted the RGB values into Windows colour numbers for use with the ATGUI components.

Cheers,

Brian



------------------------------
Brian Speirs
Senior Analyst - Information Systems
Rush Flat Ltd
Wellington NZ
------------------------------

Hi Chris,

Look in the AccuTerm GUI manual - section 1.2.6 Standard Properties. This outlines the colour number to pass to the ATGUI subroutines.

There are some colour constants defined in ATGUIEQUATES. I have taken all the named colours from this page: https://cloford.com/resources/colours/500col.htm and converted the RGB values into Windows colour numbers for use with the ATGUI components.

Cheers,

Brian



------------------------------
Brian Speirs
Senior Analyst - Information Systems
Rush Flat Ltd
Wellington NZ
------------------------------
Thank you. A real help. 👍

Kind regards
Chris Baxter
CB Soft.