OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Kelie on March 14, 2008, 04:29:08 PM

Title: Can't change background color for ListBox
Post by: Kelie on March 14, 2008, 04:29:08 PM
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.
Title: Re: Can't change background color for ListBox
Post by: owenwengerd on March 14, 2008, 04:43:35 PM
(dcl_Control_SetBackColor) works for me at runtime.
Title: Re: Can't change background color for ListBox
Post by: Kelie on March 14, 2008, 07:09:05 PM
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.
Title: Re: Can't change background color for ListBox
Post by: 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?
Title: Re: Can't change background color for ListBox
Post by: Kelie on March 14, 2008, 10:35:32 PM
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.