Author Topic: dcl-Control-SetBackColor  (Read 3990 times)

DIMIROE

  • Member
  • *
  • Posts: 2
dcl-Control-SetBackColor
« 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



Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2070
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: dcl-Control-SetBackColor
« Reply #1 on: December 04, 2016, 04:18:45 AM »
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

  • Member
  • *
  • Posts: 2
Re: dcl-Control-SetBackColor
« Reply #2 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 !

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2070
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: dcl-Control-SetBackColor
« Reply #3 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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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