DCL-Form-Resize

Started by amc.dicsac, May 12, 2016, 03:44:37 PM

Previous topic - Next topic

amc.dicsac

Hello such'm using this "DCL-Form-Resize" function in the following code, but I can not do that again take the initial size was.

Code (autolisp) Select
(defun c:PALETA1DEU/Prototipo1/btsize#OnAccionado ()
(if  (= 295 (dcl-Control-SetMinHeight PALETA1DEU/Prototipo1) )
   (progn (dcl-Form-Resize PALETA1DEU/Prototipo1  162 640)
               (dcl-Form-Resize PALETA1DEU/Prototipo1  162 295)
)
)
)

roy_043

Where are you 'taking the original size' in the code? And why are you using dcl-Form-Resize twice?

amc.dicsac

Hello such what I try to do is create a button that allows me to resize the high, similar to what is done with the properties palette AutoCAD that allows us to expand and extend the items

amc.dicsac

where it can be the error  :-\

Code (autolisp) Select
(defun c:PALETA1DEU/Prototipo1/btsize#OnAccionado ( / )
(if (= (Car (dcl-Form-GetControlArea PALETA1DEU/Prototipo1)) 295)
(progn
(dcl-Form-Resize PALETA1DEU/Prototipo1 162 640)
(dcl-Control-SetPicture PALETA1DEU/Prototipo1/btsize 242)
);_ progn
(progn
(dcl-Form-Resize PALETA1DEU/Prototipo1 162 295)
(dcl-Control-SetPicture PALETA1DEU/Prototipo1/btsize 241)
);_ progn
);_ if
(princ))

roy_043

You may have to undock the palette for the resizing to work.

amc.dicsac

Hello thanks, but already I found the error

Code (autolisp) Select
(defun c:PALETA1DEU/Prototipo1/btsize#OnAccionado ( / )
(if (= (cadr (dcl-Form-GetControlArea PALETA1DEU/Prototipo1)) 295)
(progn
(dcl-Form-Resize PALETA1DEU/Prototipo1 162 640)
(dcl-Control-SetPicture PALETA1DEU/Prototipo1/btsize 242)
);_ progn
(progn
(dcl-Form-Resize PALETA1DEU/Prototipo1 162 295)
(dcl-Control-SetPicture PALETA1DEU/Prototipo1/btsize 241)
);_ progn
);_ if
)