Active Window Background Color

Started by Jerry Fletcher, November 03, 2026, 04:55:29 PM

Previous topic - Next topic

Jerry Fletcher

I've always struggled with how to control the current window ('dialogue').  I think i've used 'move' and 'show' .  Is there any way to access the window as a ctl value and change things like it's background colour?

thanks

jerry

Jerry Fletcher

Can someone help me with something related to this.
In the off chance that no one knows the answer to this, is there a way I can contact PxPlus to get help with this. I'm not sure what the protocol is. I used to have a manager that would handle this but i'm not sure of proper procedure.  I tried searching online. AI came back with a lot of things but none of them work  :)

Devon Austen

Hi Jerry,

Most code uses mnemonics like 'MOVE' and 'SHOW' to work with windows.

You can also get the window as an object from *SYSTEM and change it through properties:

sysobj=NEW("*SYSTEM")
wdw=sysobj'Window(0)          ! 0 = current window, else window number (1-based)
PRINT wdw'*                   ! list available properties
wdw'Caption$="New title"
wdw'BackColour=4              ! palette colour number (not RGB), e.g. 4 = blue
PRINT 'CS'                    ! the new colour applies to output from here on; 'CS' repaints the whole window
wdw'Visible=0                 ! hide / 1 = show

'Left, 'Top and 'Visible work on dialogues. On the main window they act on the text area inside the frame, not the frame itself, so use the mnemonics for the main window.

https://manual.pvxplus.com?objctl2/overview.htm
https://manual.pvxplus.com?objctl2/sect2.2/a.htm
Principal Software Engineer for PVX Plus Technologies LTD.

Jerry Fletcher

Devon, this is great info. I should have asked this years ago.
Thanks I will try it out.