Author Topic: Action tile for Help and Info buttons  (Read 2404 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Action tile for Help and Info buttons
« on: February 20, 2013, 12:10:53 AM »
Hello everyone .  :-)

I searched for the action tiles that I can use to control the buttons HELP and INFO in a DCL file , but I did not find anything helpful .

Can somebody help me with it please ?

Thanks in advance .

Coder

  • Swamp Rat
  • Posts: 827
Re: Action tile for Help and Info buttons
« Reply #1 on: February 20, 2013, 01:48:59 AM »
With errtile we can use the set_tile to prompt a message to user in the the same DCL file ,
like this

Code: [Select]
(set_tile "error" "You can only select one option")

Then how to set the tile for HELP and INFO buttons ?
like this .

Code: [Select]
ok_cancel_help_info;

Stefan

  • Bull Frog
  • Posts: 319
  • The most I miss IRL is the Undo button
Re: Action tile for Help and Info buttons
« Reply #2 on: February 20, 2013, 03:30:48 AM »
Hello everyone .  :-)

I searched for the action tiles that I can use to control the buttons HELP and INFO in a DCL file , but I did not find anything helpful .

Can somebody help me with it please ?

Thanks in advance .

You can define actions for HELP and INFO.
Code: [Select]
...
(action_tile "help" "(get_help)")
(action_tile "info" "(alert \"Press OK to exit\")")
...

(defun get_help ( / f)
 (if
   (setq f (findfile "C:\\Program Files\\Common Files\\Autodesk Shared\\acadauto.chm"))
   (startapp "hh.exe" f)
   )
  )

kruuger

  • Swamp Rat
  • Posts: 637
Re: Action tile for Help and Info buttons
« Reply #3 on: February 20, 2013, 04:26:14 AM »
With errtile we can use the set_tile to prompt a message to user in the the same DCL file ,
like this

Code: [Select]
(set_tile "error" "You can only select one option")

Then how to set the tile for HELP and INFO buttons ?
like this .

Code: [Select]
ok_cancel_help_info;
Code: [Select]
ok_cancel_help_info;
buttins are defined in base.dcl file under autocad support path.
you can't change the label but you can create your own set of buttons.
Code: [Select]
BUTTONS : button { width = 13; fixed_width = true; fixed_height = true; }

BUTTONS_INSERT_CANCEL_HELP
  : row { alignment = centered; fixed_width = true;
    : BUTTONS { key = "INSERT"; label = "&Insert"; is_default = true; }
    : BUTTONS { key = "CANCEL"; label = "&Cancel"; is_cancel = true; }
    : BUTTONS { key = "HELP"; label = "&Help"; }
}

i think that you need to start here:
http://www.jefferypsanders.com/autolisp_DCL.html
http://www.afralisp.net/dialog-control-language/
k.

GP

  • Newt
  • Posts: 83
  • Vercelli, Italy
Re: Action tile for Help and Info buttons
« Reply #4 on: February 20, 2013, 04:54:49 AM »
Or directly in the .DCL

Code: [Select]
       : button {
       fixed_width=true;
       width=13;
       height=2.2;       
       key="help";
       label= "Help";
       action = "(help \"C:/Program Files/Common Files/Autodesk Shared/acadauto.chm\"\)";       
       }

Coder

  • Swamp Rat
  • Posts: 827
Re: Action tile for Help and Info buttons
« Reply #5 on: February 20, 2013, 05:53:44 AM »
Thank you all for this nice solutions . all works greatly  :-)

GP Your way to add an action in the DCL file is new to me , than you . 8-)

Very helpful guys .

GP

  • Newt
  • Posts: 83
  • Vercelli, Italy
Re: Action tile for Help and Info buttons
« Reply #6 on: February 20, 2013, 12:57:04 PM »
You're welcome Coder  :-)