dcl-Control-SetBackColor

Started by DIMIROE, December 04, 2016, 03:38:44 AM

Previous topic - Next topic

DIMIROE

need help:

(dcl-Control-SetBackColor Test/Dialog1 200) => it works !!
(dcl-Control-SetBackColor Test/Dialog1/Rechteck1 200) => it does not work !!

=>Fehler in der OpenDCL Laufzeitumgebung

Ein Argument einer OpenDCL-Funktion verursachte einen Ausnahmefehler !
Fehler: Der Wert NIL ist in diesem Fall nicht zulässig
Funktion: dcl-Control-SetBackColor
Argument:2

DCL-Version Stable Build [8.0.1.0]/German
ACAD 14/Bricscad 16.2.15 (x64) Revision 43937



Fred Tomke

Hello, please check the attached sample. It works fine on the current release.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

DIMIROE

Thanks !! Your sample works fine.

(defun c:Test(/ c:Test/Dialog1#OnInitialize)

     (defun c:Test/Dialog1#OnInitialize (/)
   (dcl-Control-SetBackColor Test/Dialog1 200)
   (dcl-Control-SetBackColor Test/Dialog1/Rechteck 200) => it works !!
      ); c:Test/Dialog1#OnInitialize

         (dcl-Control-SetBackColor Test/Dialog1/Rechteck 200) =>  it does not work !!
)

But why it does not works outside (defun c:Test/Dialog1#OnInitialize (/) ..) ??

Sorry , I am a beginner in lisp and sorry for my bad english !

Fred Tomke

Hi, please have a look at the samples of OpenDCL. You can only set control properties within the form's or control's events within modal forms.
Of course you can set control properties outside the events if you use modeless forms or palettes.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]