Author Topic: Unwind a Dropdown  (Read 3588 times)

krunch

  • Full Member
  • ***
  • Posts: 110
Unwind a Dropdown
« on: November 29, 2012, 07:37:57 AM »
Hi

In my memories there is a function to unwind a Dropdown, but I can't find it ..

Is it possible or do I mix with something else ??
« Last Edit: November 29, 2012, 07:48:51 AM by krunch »

krunch

  • Full Member
  • ***
  • Posts: 110
Re: Unwind a Dropdown
« Reply #1 on: December 12, 2012, 03:31:12 AM »
Hi

I have made that :

The combobox is extended when clicked, and reduced when it loses focus or modified

So is it possible to unwind (activate) the combobox when I also click on the '<4>' button ??

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 2897
    • Outside The Box
Re: Unwind a Dropdown
« Reply #2 on: December 12, 2012, 07:48:04 AM »
I don't believe there is any way to open a combo dropdown by lisp code. You can create your own dropdown as a modeless form and display that.

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1993
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #3 on: December 12, 2012, 10:25:20 AM »
Hi, maybe a sendkey could solve that. You can open a dropdown by cursor down.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

krunch

  • Full Member
  • ***
  • Posts: 110
Re: Unwind a Dropdown
« Reply #4 on: December 12, 2012, 11:07:13 AM »
Hi, thanks for this suggestion

You meant sendstring ?
I've tried this but it doesn't work .. Arrows keys are not standart characters
Code: (autolisp) [Select]
(dcl_Control_SetFocus ..combobox)
(dcl_SendString (chr 175))

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1993
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #5 on: December 12, 2012, 03:22:38 PM »
Hi, no, I meant sendkey. Here is a sample I use for ESC:

Code: (autolisp) [Select]
(defun SENDKEY (strKeys / oWScript)
  (if (setq oWScript (vlax-create-object "WScript.Shell"))
    (progn
      (vlax-invoke-method oWScript 'Sendkeys strKeys)
      (vlax-release-object oWScript)
    ); progn
  ); if
); SENDKEY

(SENDKEY "{ESC}")

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

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

krunch

  • Full Member
  • ***
  • Posts: 110
Re: Unwind a Dropdown
« Reply #6 on: December 13, 2012, 02:15:04 AM »
It works !
I didn't know this "WScript.Shell" method (found a key list here) ..

Thanks a lot for this great idea
« Last Edit: December 13, 2012, 02:29:44 AM by krunch »

velasquez

  • Sr. Member
  • ****
  • Posts: 473
Re: Unwind a Dropdown
« Reply #7 on: December 13, 2012, 12:35:33 PM »
Hi, no, I meant sendkey. Here is a sample I use for ESC:

Code: (autolisp) [Select]
(defun SENDKEY (strKeys / oWScript)
  (if (setq oWScript (vlax-create-object "WScript.Shell"))
    (progn
      (vlax-invoke-method oWScript 'Sendkeys strKeys)
      (vlax-release-object oWScript)
    ); progn
  ); if
); SENDKEY

(SENDKEY "{ESC}")

Regards, Fred


Hi Fred,
In that situation (Sendkey "{ESC}") would be efficient?

Regards, velasquez

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1993
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #8 on: December 13, 2012, 01:02:34 PM »
Hi, vela, this was only a sample thats why krunch looked for the key he needed.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1993
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #9 on: December 13, 2012, 01:04:43 PM »
Hi, krunch, thanks for the link!
Great to see that it helps.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

krunch

  • Full Member
  • ***
  • Posts: 110
Re: Unwind a Dropdown
« Reply #10 on: December 13, 2012, 02:21:13 PM »
Thanks to you
---------------
Quote
In that situation (Sendkey "{ESC}") would be efficient?
This opens a combobox :
Code: (autolisp) [Select]
(dcl_Control_SetFocus ..combobox)
(SENDKEY "{DOWN}")