OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Aleksandr Tkachenko on July 15, 2008, 08:28:59 AM

Title: Grid Style Combo
Post by: Aleksandr Tkachenko on July 15, 2008, 08:28:59 AM
Can I to use Event in "Grid Style Combo" (as Control ComboBox OnSelChanged)?
Title: Re: Grid Style Combo
Post by: owenwengerd on July 15, 2008, 09:07:52 AM
No, but you can use the EndLabelEdit event on the grid control to handle this.
Title: Re: Grid Style Combo
Post by: Aleksandr Tkachenko on July 17, 2008, 03:38:00 AM
Quote from: owenwengerd on July 15, 2008, 09:07:52 AM
No, but you can use the EndLabelEdit event on the grid control to handle this.

It hasn't helped me.
Title: Re: Grid Style Combo
Post by: owenwengerd on July 28, 2008, 12:37:26 PM
What do you want to do when the selection changes?
Title: Re: Grid Style Combo
Post by: Aleksandr Tkachenko on July 29, 2008, 05:01:57 AM
Quote from: owenwengerd on July 28, 2008, 12:37:26 PM
What do you want to do when the selection changes?

When the selection changes by push any strings in opening Grids ComboBox (DropDawn) I want call my lisp function.
Title: Re: Grid Style Combo
Post by: Fred Tomke on July 30, 2008, 03:46:21 AM
Hello, maybe it will help:

The EndLabelEdit event will be called after selecting another item of the dropdown list

Fred
Title: Re: Grid Style Combo
Post by: Aleksandr Tkachenko on July 30, 2008, 08:18:05 AM
Quote from: Fred Tomke on July 30, 2008, 03:46:21 AM
Hello, maybe it will help:

The EndLabelEdit event will be called after selecting another item of the dropdown list

Fred

I need event that will be called on push (not after, I don't need crossing to anather row) selecting another item of the dropdown list.
Title: Re: Grid Style Combo
Post by: owenwengerd on July 30, 2008, 08:59:23 AM
The OnBeginLabelEdit and OnEndLabelEdit events were designed for what you describe.  If they don't work, perhaps it would help to post a picture showing the problem.
Title: Re: Grid Style Combo
Post by: Fred Tomke on July 30, 2008, 10:52:15 PM
Hello,

as Owen said, OnBeginLabelEdit is called whenever a cell starts to edit:

- editboxes: when clicking into the cell so the cursor is shown
- combobox: when clicking into the cell that the arrow of the dropdown will be shown
- ellipsesbutton: when clicking to the cell that the button is shown
- toggle / radio: when activating/deactivating the toggle. Note: using this cell item style OnEndLabelEdit is only called after another cell was selected. Thats why I call CancelItemEdit within BeginLabelEdit at this cell item style.

Fred
Title: Re: Grid Style Combo
Post by: Aleksandr Tkachenko on July 31, 2008, 02:29:35 AM
I want have event on "Grid's DropDown" when I click on "3" (red arrow on picture) as analog "Control->ComboBox->OnSelChanged"
Title: Re: Grid Style Combo
Post by: Fred Tomke on July 31, 2008, 02:38:06 AM
Ok, now it's more clear  ;)

At this time no event is called yet. I don't know if it is even possible. The OnEndLabelEdit is only called when another cell will be selected.
Please try if OnMouseUp or OnMouseMove will be called if you select another item. Make sure that these events only work if OnBeginLabelEdit was called from a dropdown/combo list cell.

Fred
Title: Re: Grid Style Combo
Post by: Aleksandr Tkachenko on July 31, 2008, 02:50:59 AM
Quote from: Sun_tk on July 31, 2008, 02:29:35 AM
I want have event on "Grid's DropDown" when I click on "3" (red arrow on picture) as analog "Control->ComboBox->OnSelChanged"

Ok, thanks that you understand me. ;D
I need this event.
Title: Re: Grid Style Combo
Post by: Fred Tomke on July 31, 2008, 09:55:01 AM
Hello,

I attached an example which is not nice, but it works a little bit  :-\ .
After selecting an item OnMouseMove will be called - but only if the selected item lies in the area of the grid. If you select the item 5 in the last row, the event will only be fired, when you move the mouse over the grid again (and that's not very comfortable).

Note: this may not work in dockable forms or palettes when EventInvoke is set to AllowCommand or the property KeepFocus is set to False.

Fred
Title: Re: Grid Style Combo
Post by: Aleksandr Tkachenko on August 01, 2008, 04:09:28 AM
Thank you Fred, it's worked.

Please look at this
http://www.opendcl.com/forum/index.php?topic=376.0
and help me.