Discussion:
[Foxgui-users] excel look in fox
Akiva Patinkin
2016-09-29 15:35:56 UTC
Permalink
Does anyone know how I can create with fox a list which has rows and columns with char strings in each segment? Likewise, if the user clicks on a specific row and column (segment) - he can edit that particular string. This is like excel. Is there sample code for such a thing?

Thanks
akiva

This mail was sent via Mail-SeCure system.
JVZ
2016-09-29 16:11:08 UTC
Permalink
On Thu, 29 Sep 2016 15:35:56 +0000
Post by Akiva Patinkin
Does anyone know how I can create with fox a list which has rows and columns with char strings in each segment? Likewise, if the user clicks on a specific row and column (segment) - he can edit that particular string. This is like excel. Is there sample code for such a thing?
Thanks
akiva
Currently, when you double-click on a cell to edit it, a single-line text control
is overlaid to edit it.

However, the item type can actually draw multiple lines, if you set them programmatically.

The good news is, for more sophisticated use cases like yours, the FXTableItem can be
subclassed.

If you're happy with the multi-line text capability already implemented, you can
override getControlFor() and setFromControl(), make them return configured
FXText control [or your own custom control, for that matter].

If you want custom drawings, you can override FXTableItem's drawContent as well, of
course.

The idea is, FXTable realizes it can't be all things to all people, but it tries to
keep the door open for customization so that custom cells items can be used

You can subclass FXTable and override createItem() to return your custom item
type, so all items are automatically created according to your custom item types.


Hope this helps,

-- JVZ


P.S.

If you're indeed MobileEye, I love what you guys are doing! Watched a presentation
about your company's plans recently and though it was very impressive!




+----------------------------------------------------------------------------+
| Copyright (C) 11:00 09/29/2016 Jeroen van der Zijp. All Rights Reserved. |
+----------------------------------------------------------------------------+

------------------------------------------------------------------------------
Loading...