I have a number of object (MAX) of which the current one is numbered (KUR). Typically, MAX is 3 or 4, and never more than 50. Each object has a different colour with IRED, IGRN and IBLU components. I thought it might be useful to show the colour of the current object as the list was stepped through using a %dd spin control. Here's a fragment of the code. ICOL is set in a separate statement so as to avoid continuations.
DP=1.0D0
IA=WINIO@('Object No %il%dd&',1,MAX,1)
IA=WINIO@('%3`rd%`il&',KUR)
ICOL=RGB@(IRED(KUR),IGRN(KUR),IBLU(KUR))
IA=WINIO@('%nl%cn%10br&',DP,ICOL)
I can't seem to get my head round where I call window_update@, and with which parameter, KUR, or ICOL (or DP for that matter, but as I want the bar filled, DP always needs to end up as 1.0D0, and it isn't a convenient entity to alter). I've tried most places in the code! The problem I find is that I can't get the colour of the bar to change, unless I close the window and reopen it, whereupon it is changed. I'd like it to change as I stepped through the list of objects.
I've also tried changing button colours and backgrounds etc to get the colour coding, but I'm missing something in my understanding.
Any suggestions would be gratefully received.
Eddie