Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-09

LCL Tab Order Implementation

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Andrew Johnson

I was wondering if, given the differences in GTK and Win32 if it wouldn't make sense too implement tabbing ourselves in the LCL. AKA always intercept a VK_Tab on Keydown, and loop through the TabOrder to find the next control to tab to, and then call to set focus on it. By doing things this way it would make it relatively easy to finish tabbing and TabOrder for any interface. We would just have to make sure that tabbing(if any) was turned off by the Interface internally, so that GTK/Win32 didn't try to tab as well.. etc. I imagine that for GTK this would be simple enough. And for keeping track of the Order internally we could create a list of taborders etc. I do not know for certain, but we could write a GetTabOrderList, which returns an array or list of all the components in the taborder, including sub-wincontrols taborders so that all components were in order properly etc.. I have no idea how it was done in Delphi/Kylix, but this is sort of how I have done it my own internal stuff, so I do not see why se couldn't do the same thing in the LCL. Any comments or suggestions or better ideas welcome.

Andrew

_________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com

Reply by email

Michael A. Hess
to Andrew Johnson
Andrew Johnson wrote
I was wondering if, given the differences in GTK and Win32 if it wouldn't make sense too implement tabbing ourselves in the LCL.

The more we can do in the LCL the better. By using only the simple primatives from the API it makes it much easier to port to other widget sets. So from my point of view I would welcome it.

Now some will say that that defeats the purpose of the widget set and the idea of unix where one just uses modules and libraries of other products. This is true and what I would recommend if we were only a Unix product. But since we need to be able to work with things like Windows the more we can handle internally the better.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Tony Maro
to Andrew Johnson: I was wondering if, given the differences in GTK and Win32 if it wouldn't make sense too…
Andrew Johnson wrote 9 lines
well.. etc. I imagine that for GTK this would be simple enough. And for keeping track of the Order internally we could create a list of taborders etc. I do not know for certain, but we could write a GetTabOrderList, which returns an array or list of all the components in the taborder, including sub-wincontrols taborders so that all components were in order properly etc.. I have no idea how it was done in Delphi/Kylix, but this is sort of how I have done it my own internal stuff, so I do not see why se couldn't do the same thing in the LCL. Any comments or suggestions or better ideas welcome.

I think this is a good idea as long as it would be far enough down the object to not interfere with 100% Delphi code and still give the same result. I've been agonizing over how to work the tab order myself for the CheckBook Tracker app...

-Tony

Reply by email

Andrew Johnson
I think this is a good idea as long as it would be far enough down the object to not interfere with 100% Delphi code and still give the same result. I've been agonizing over how to work the tab order myself for the CheckBook Tracker app...

hmmm. just what I was thinking.. I think that if I implement this in TWinControl.WMKeyDown, it won't interfere with toplevel code, because child components which need to take over tab, like a TCustomGrid, can simply override WMKeyDown with their own, and simply call to inherited for other Key strokes.

Andrew

_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx

Reply by email