Author Topic: Questiont about ComboBox  (Read 22339 times)

0 Members and 1 Guest are viewing this topic.

Dream.Fei

  • Guest
Questiont about ComboBox
« on: April 27, 2007, 06:35:36 AM »
 :cry:
:cry:
My question is : how can I get the currently string of the combobox ?
use "getcursel" will return index -1. but I want to get the string not index .
use "getEditsell" will return a list ,not string yet.

My intent: get the string. if isn't in the combobox list , add it and return index . else return the index.

Another question:  the methods of "onkillfoucs".
 I have defun "DclFormName_ComboboxName_Onkillfoucs", in the defun only one process "(alert "\nJust test of KillFoucs")". when Load and Show the DclForm , this alert is show before the DclForm ,  how can i make it later DclForm?

anybody can help me?

Dream.Fei

  • Guest
Re: Questiont about ComboBox
« Reply #1 on: April 27, 2007, 07:45:25 AM »
I'm sorry. I have find the methods for get string , use "GetTBText".

but the other question about "KillFocus" I have't find answer

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #2 on: April 27, 2007, 07:48:58 AM »
Another question:  the methods of "onkillfoucs".
 I have defun "DclFormName_ComboboxName_Onkillfoucs", in the defun only one process "(alert "\nJust test of KillFoucs")". when Load and Show the DclForm , this alert is show before the DclForm ,  how can i make it later DclForm?

anybody can help me?

Please post your ODC and LSP file ... I'm not sure what you want .. can you reword the question ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #3 on: April 27, 2007, 08:04:19 AM »
How about this
Code: [Select]
;; Project-02.lsp

;; Ensure the OpenDCL.##.ARX is loaded.
(OR (VL-SYMBOL-VALUE 'ODCL_GETVERSIONEX)
    (AND (SETQ tmpfn (FINDFILE "OpenDCL_ARXLoader.LSP"))
         (LOAD tmpfn (STRCAT "Failed to load :- " tmpfn))
    )
    (ALERT (STRCAT "Failed to load OpenDCL_ARXLoader.LSP"))
    (EXIT)
)

(PROMPT (STRCAT "\n CommandLine : < test >  [Build 20070427 kwb] "
                "ODCL.Ver:"
                (ODCL_GETVERSIONEX)
                " \n"
        )
)
;;-------------------------------------------------------------
(DEFUN c:test ()
   ;;------------
   ;; main
   ;;------------
   ;; Reload flag used for testing only ..
   (OR (ODCL_PROJECT_LOAD "Project-02" T) (EXIT))
   (ODCL_FORM_SHOW Project-02_Form1)
)
;;-------------------------------------------------------------
(DEFUN c:Project-02_Form1_ComboBox2_OnKillFocus (/)
   (ALERT "\nJust test of KillFoucs")
)

;;-------------------------------------------------------------
(DEFUN c:Project-02_Form1_TextButton4_OnClicked (/)
   (ALERT "\nButton Clicked")
)

The ODC is in the ZIP file ..
« Last Edit: April 27, 2007, 08:34:10 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Dream.Fei

  • Guest
Re: Questiont about ComboBox
« Reply #4 on: April 28, 2007, 04:01:32 AM »
I can't use you Lisp file on CAD2007, when I load it , CAD will close.

My odc file is made by ObjectDcl V3.0 for CAD2007, I can't open you file in this.

I don't know how to description my question. I show it and upload the lisp and odc file.

Code: [Select]
;;_this is the KillFocus
  (defun c:DclForm1_ComboBox1_OnKillFocus ()
     (alert "\n Test for onkillfoucs")
    )

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #5 on: April 28, 2007, 04:11:20 AM »
Where did you get the ObjectDCL2007.ARX  ("ObjectDcl V3.0 for CAD2007")?

What did you build the ODC file from.

I have no problem opening your ODC in the OPENDCL Editor.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Dream.Fei

  • Guest
Re: Questiont about ComboBox
« Reply #6 on: April 28, 2007, 04:28:45 AM »
The ObjectArx2007.arx and ObjectDclV3.0 is get from XDCAD : http://www.xdcad.net/forum (cn)

Before you can use ObjectV3.0 for Autocad2007, you must instal objectDclV3.0 for Autocad2004 first.
 
If you need ,I can give you the installler file of all ObjectDclV3.0 and Arx for CAD2004 CAD2007(other version I din't have).

where I can get the OpenDcl? I can't open you odc file.
« Last Edit: April 28, 2007, 06:34:09 AM by Dream.Fei »

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #7 on: April 28, 2007, 04:30:17 AM »
I have opened your ODC in the OpenDCL editor without problem

I have executed your lisp file and ODC in ACAD2008 with the OpenDCL17.arx (not your ARX)

The OnKillFocus Event  for the ComboBox1 is correct. The Event fires when the ComboBox loses focus, that is, when you select ANY OTHER CONTROL on the dialog.

The reason it SEEMS to be showing your alert dialog when you FIRST select a control is because the control has focus when the dialog opens because it is First in your ZOrder list.

By my understanding, it is doing exactly what you have designed.

Perhaps I misunderstand what you mean ...

For My Interest, Why do you want an Event on the KillFocus .. ?
« Last Edit: April 28, 2007, 04:37:06 AM by Kerry Brown »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #8 on: April 28, 2007, 04:33:53 AM »
.................
where I can get the OpenDcl? I can't open you odc file.

https://sourceforge.net/project/showfiles.php?group_id=187950

...................
Before you can use ObjectV3.0 for Autocad2007, you muse instal objectDclV3.0 for Autocad2004.

If you need , my QQ:7686599 ,I can give you the installler file of all ObjectDclV3.0 and Arx for CAD2004 CAD2007(other version I din't have).
...............

Thanks for the offer, but I don't need to load your ARX.


kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Dream.Fei

  • Guest
Re: Questiont about ComboBox
« Reply #9 on: April 28, 2007, 04:47:17 AM »
Code: [Select]
Why do you want an Event on the KillFocus .. ?
because
Code: [Select]
get the string. if isn't in the combobox list , add it and return index . else return the index
I want this event is hapend when the combobox lost foucs.

but later, I find I can write it in the dilaog close . so , the KillFoucs is just a test .

In my computer(ObjectDclV3.0 + CAD2007), the alert is show before thd dialog . in you reply, you mean's Zorder . but how can I get the Zorder of this dialog?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #10 on: April 28, 2007, 04:49:31 AM »
Have a look at this ... see how the focus is on the first ComboBox when the DCL opens .. when the ComboBox loses focus, the Event fires and your Alert displays ...

See the Movie ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #11 on: April 28, 2007, 04:56:42 AM »
...............

In my computer(ObjectDclV3.0 + CAD2007), the alert is show before thd dialog . in you reply, you mean's Zorder . but how can I get the Zorder of this dialog?

This is the ZOrder List shown in my editor ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Dream.Fei

  • Guest
Re: Questiont about ComboBox
« Reply #12 on: April 28, 2007, 05:05:43 AM »
I know what's the KillFoucs . but I don't know why it hapend before the Dialog . Look in my computer:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #13 on: April 28, 2007, 05:11:16 AM »
This will get the value of the selection in focus ..

Code: [Select]
(Setq rValue (Odcl_ComboBox_GetTBText Dream_DclForm1_ComboBox1))
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Questiont about ComboBox
« Reply #14 on: April 28, 2007, 05:13:17 AM »
I know what's the KillFoucs . but I don't know why it hapend before the Dialog . Look in my computer:

Sorry, I can't help with your ARX .. you will need to talk to the developer of the program. The Code is incorrect.
How much did you pay for the Update ?
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.