Author Topic: Unwind a Dropdown  (Read 2018 times)

krunch

  • Full Member
  • ***
  • Posts: 110
Unwind a Dropdown
« on: November 29, 2012, 08: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, 08:48:51 AM by krunch »

krunch

  • Full Member
  • ***
  • Posts: 110
Re: Unwind a Dropdown
« Reply #1 on: December 12, 2012, 04: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: 2591
    • Outside The Box
Re: Unwind a Dropdown
« Reply #2 on: December 12, 2012, 08: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: 1810
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #3 on: December 12, 2012, 11: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, 12:07:13 PM »
Hi, thanks for this suggestion

You meant sendstring ?
I've tried this but it doesn't work .. Arrows keys are not standart characters
  1. (dcl_Control_SetFocus ..combobox)
  2. (dcl_SendString (chr 175))

Fred Tomke

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

  1. (defun SENDKEY (strKeys / oWScript)
  2.   (if (setq oWScript (vlax-create-object "WScript.Shell"))
  3.     (progn
  4.       (vlax-invoke-method oWScript 'Sendkeys strKeys)
  5.       (vlax-release-object oWScript)
  6.     ); progn
  7.   ); if
  8. ); SENDKEY
  9.  
  10. (SENDKEY "{ESC}")
  11.  

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, 03: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, 03:29:44 AM by krunch »

velasquez

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

  1. (defun SENDKEY (strKeys / oWScript)
  2.   (if (setq oWScript (vlax-create-object "WScript.Shell"))
  3.     (progn
  4.       (vlax-invoke-method oWScript 'Sendkeys strKeys)
  5.       (vlax-release-object oWScript)
  6.     ); progn
  7.   ); if
  8. ); SENDKEY
  9.  
  10. (SENDKEY "{ESC}")
  11.  

Regards, Fred


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

Regards, velasquez

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1810
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #8 on: December 13, 2012, 02: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: 1810
  • [ Mr. Bad Guy ]
    • Kommunale Entwicklungsplanung auf digitaler Basis - digital landscape and urban design
Re: Unwind a Dropdown
« Reply #9 on: December 13, 2012, 02: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, 03:21:13 PM »
Thanks to you
---------------
Quote
In that situation (Sendkey "{ESC}") would be efficient?
This opens a combobox :
  1. (dcl_Control_SetFocus ..combobox)
  2. (SENDKEY "{DOWN}")