Can't change background color for ListBox

Started by Kelie, March 14, 2008, 04:29:08 PM

Previous topic - Next topic

Kelie

Hello,

Using 5.0.0.8.

Am I supposed to be able to change the background color of a listbox at runtime?

I tried something like (dcl_Control_SetBackColor XD2STR_frmMain_lbxGrp -1) but it didn't work. I could change the background color in the OpenDCL Studio.

Thanks.

owenwengerd

(dcl_Control_SetBackColor) works for me at runtime.
Owen Wengerd (Outside The Box) / ManuSoft

Kelie

thanks Owen.

hmm, for some reason, it isn't working here.

i wanted to use this line to set the listbox background color to 252
(dcl_control_setbackcolor XD2STR_frmMain_lbxGrp 252)

but it seems not working. so for debugging purpose, i added this line in my lisp file
(prompt (itoa (dcl_control_getbackcolor XD2STR_frmMain_lbxGrp)))

and the return value is 252. so the problem is the display/appearance of listbox isn't getting updated.

btw, the dcl_control_setforecolor method works at expected on my computer.

owenwengerd

Which version of Windows? Does it repaint correctly if you move the listbox offscreen and back on?
Owen Wengerd (Outside The Box) / ManuSoft

Kelie

Quote from: owenwengerd on March 14, 2008, 08:21:44 PM
Which version of Windows? Does it repaint correctly if you move the listbox offscreen and back on?

Windows XP Professional with SP2.

Move listbox offscreen? Can I do that during runtime? As I mentioned earlier, the change of background color works properly inside the Studio.