Started by Kerry Brown ·
2009-03-13 04:07 UTC ·
10 replies · SMF topic #651
Kerry Brown
2009-03-13 04:07 UTC
I need some help here ... going round in circles :)
In a Tree View Control, If the user Presses Enter on any Child, how do I stop the dialog closing.
... I'm sure I've been down this path before but can't find the breadcrumbs .. ???
Regards
Kerry
Kerry Brown
2009-03-13 04:10 UTC
... If the user presses Enter, He expects the action to be the same as if he selected (clicked on) the child with the mouse.
owenwengerd
2009-03-13 04:54 UTC
In the current build, I don't think the ReturnPressed event gets called under any circumstances, because the control never processed the enter key. In the next build, there will be a change in that the ReturnPressed event handler will be called if the user presses enter either while editing a cell or if any one of the ReturnPressed, KeyDown, or KeyUp event handlers are defined.
Kerry Brown
2009-03-13 05:09 UTC
Brilliant !!
I'll probably need some help when it comes to it (cause I'm technologically challenged, and also basically lazy) :)
In the mean time, I'll just be carefull with the Enter key
This Tree control is very nice Owen .. a lot better behaved than it used to be.
This is what I'n working on ..
Kerry Brown
2009-03-13 05:29 UTC
How about OnReturnPressed with the ListBox ?
Can the Enter be trapped and handled as if it were a mouse press .. ??
owenwengerd
2009-03-13 18:51 UTC
It looks like there was an attempt to fire the OnDblClicked event when Enter was pressed, but it wasn't working. I've fixed the code now so the List Box fires OnDblClicked when Return is pressed and there is an event handler for OnDblClicked; otherwise it behaves like before, closing the dialog.
bazzacad
2009-03-13 20:22 UTC
Looks like a really cool app Kerry, but I'm not too sure about the forms title.
BOM = "Bill of Materials", right?
So you form is titled:
"Bill of Materials Material Lister"
Is that what you where going for? ;D
Kerry Brown
2009-03-13 22:23 UTC
Semantics !
It's a Material Lister used for PRODUCING a BOM.
Thats my story, and I'm sticking to it. ;D
Kerry Brown
2009-03-13 22:27 UTC
You May like this one too Barry,
I'll offer a prize for a suitable Name .. :)
bazzacad
2009-03-13 22:39 UTC
How about Iconless Folder Viewer... :)
Kerry Brown
2009-03-13 22:42 UTC
Build A0.3 has the Icons' but I don't have it here at home ..
... and there are a few other changes ...
See, I have excuses for everything ::)