Hi,Owen,Hi All, Please Help me, About Draw Image Button Border...

Started by XDCAD, August 23, 2012, 08:45:02 AM

Previous topic - Next topic

XDCAD

I design a image button, I want to click, draw a button border, could you tell me how to do?

Thanks...


Fred Tomke

Hi, either you change the button border at the time of onclick event or you draw a picturebox behind the button which is a pixel greater than the button and you change the backcolor at onmouseover or on click event. Or you built a generic button using picture box. Then you can draw every thing.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

XDCAD

HI,Fred

  Thank patient answer.

I meet another problem, I want to be a transparent background images, but use PHOTOSHOP make PNG format documents, loading to OPENDCL elevation background is black, not transparent, to ask, how to call the background transparent PNG to OPENDCL?

velasquez

Quote from: Fred Tomke on August 23, 2012, 12:33:17 PM
Hi, either you change the button border at the time of onclick event or you draw a picturebox behind the button which is a pixel greater than the button and you change the backcolor at onmouseover or on click event. Or you built a generic button using picture box. Then you can draw every thing.

Regards, Fred

Hi Fred,

I work with dcl_Control_SetBackColor.
To return to the original state I worked with dcl_PictureBox_Clear.
But dcl_PictureBox_Clear no longer works in OpenDCL 7.0.0.6.
Can you tell me if there was any change to this method?

Thanks
velasquez

Fred Tomke

Hi, vela, BackColor should be still the same after Clear. Clear only removes the image.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

velasquez

Quote from: Fred Tomke on August 24, 2012, 07:11:33 AM
Hi, vela, BackColor should be still the same after Clear. Clear only removes the image.
Regards, Fred

Hi Fred,
I posted a function that works with dcl_Control_SetBackColor and dcl_PictureBox_Clear OpenDCL in 6.0.2.5 and 7.0.0.6 OpenDCL.
Code (autolisp) Select


(defun JoyBorderCap (JoyItemRemove / JoyLista)
;;;Lista com o nome de Todos os pictureBox de fundo
    (setq JoyLista (list "BG-JGS"
"BG-JTI-JTE"
"BG-FLANGE"
   ) ;_ fim de list
    ) ;_ fim de setq
;;;Muda a cor do BackGround da imagem selecionada = JoyItemRemove
    (dcl_Control_SetBackColor
      "DuctilCAD"
      "Caps"
      JoyItemRemove
      11239775
    ) ;_ fim de dcl_Control_SetBackColor
;;;Limpa as imagens BackGround das conexoes e traca as molduras
    (foreach JoyItem (vl-remove JoyItemRemove JoyLista)
;;;Limpa a imagem
      (dcl_PictureBox_Clear
"DuctilCAD"
"Caps"
JoyItem
      ) ;_ fim de dcl_PictureBox_Clear
;;;Traca a moldura
      (dcl_PictureBox_DrawRect
"DuctilCAD"
"Caps"
JoyItem
(list (list 0 0 80 57 11239775))
      ) ;_ fim de dcl_PictureBox_DrawRect
    ) ;_ fim de foreach
;;;Fixa a s margens desenhadas
    (foreach JoyItem JoyLista
      (dcl_PictureBox_StoreImage "DuctilCAD" "Caps" JoyItem)
    ) ;_ fim de foreach
  ) ;_ fim de defun

Fred Tomke

Hi, luckily I haven't found any similiar problems in my earlier sources although I also change the BackColor.
I recommend you to create a small sample project and code and report it as a bug.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

velasquez

Quote from: Fred Tomke on August 25, 2012, 07:55:05 AM
Hi, luckily I haven't found any similiar problems in my earlier sources although I also change the BackColor.
I recommend you to create a small sample project and code and report it as a bug.

Regards, Fred

Hi Fred,
I'll do it as soon as possible.
Have changed all my code in function AutoCAD 2013.

Regards, velasquez