OpenDCL Forums

OpenDCL => Source Code => Topic started by: DIMIROE on December 04, 2016, 03:38:44 AM

Title: dcl-Control-SetBackColor
Post by: DIMIROE on December 04, 2016, 03:38:44 AM
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


Title: Re: dcl-Control-SetBackColor
Post by: Fred Tomke on December 04, 2016, 04:18:45 AM
Hello, please check the attached sample. It works fine on the current release.
Regards, Fred
Title: Re: dcl-Control-SetBackColor
Post by: DIMIROE on December 04, 2016, 05:18:50 AM
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 !
Title: Re: dcl-Control-SetBackColor
Post by: Fred Tomke on December 04, 2016, 05:40:11 AM
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