Author Topic: image and image_button  (Read 5945 times)

0 Members and 1 Guest are viewing this topic.

XXL66

  • Newt
  • Posts: 99
image and image_button
« on: December 02, 2015, 12:04:47 PM »
hi,

i want to create a custom DCL color selector and use an image_button, is there a way to avoid the display of the dotted lines around the button when selected ?
When just using an image the instead of image_button the dotted lines do not appear but it seems no action is possible ? I want to retrieve selected x and y.

ty !

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: image and image_button
« Reply #1 on: December 02, 2015, 03:49:59 PM »
The dotted line indicates that the image_button has the focus. The only way to remove it is to move the focus to another tile. In BricsCAD you can move the focus to an invisible image tile (which is actually rather strange). Note that the dotted line will still appear if the Tab key is used to move the focus. The solution only works if the image_button is selected.
Code - Auto/Visual Lisp: [Select]
  1.   "myImageButton"
  2.   "(princ (strcat \"\n\" (itoa $x) \",\" (itoa $y))) (mode_tile \"invisibleImage\" 2)"
  3. )

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: image and image_button
« Reply #2 on: December 03, 2015, 02:39:53 AM »
My idea that an invisible image can receive the focus in BricsCAD DCL is wrong.

In BC V14 the focus will move to the next selectable tile after the invisible image.

In BC V16 the focus does not move to the invisible image either, but the image_button does lose the focus and you have to use the Tab key for the dotted line to appear again. The order of the two tiles seems irrelevant. And you can also use a spacer instead of an invisible image for this 'trick'.

XXL66

  • Newt
  • Posts: 99
Re: image and image_button
« Reply #3 on: December 03, 2015, 03:19:19 AM »
Thanks again Roy, I will try this trick.

XXL66

  • Newt
  • Posts: 99
Re: image and image_button
« Reply #4 on: December 03, 2015, 03:32:37 AM »
works great but it seems that when you select the edge of the image the dotted lines still show. but this is no big deal. thanks Roy.