At 11:42 AM 7/29/2008, Paulo Scardine wrote:
Dear OpenLaszlo Gurus,Many toolkits have some kind of "navigator" widget, like this: [<<][ < ][ 2/15 ][ > ][>>][ * ][ X ][ V ] I want to write one for Laszlo, what is the best way to do this?
I would figure to build your own class out of the buttons, display panel, etc. It's what we do for our own framework in our ERP - although for us Next/Prev/First/Last are often too simplistic and not a fit. We do have New/Update/Delete/Exit and Reset/Cancel/Save buttons - which enable or disable themselves depending on where you are at in the process. (ie Update/New disable the first set and enable the second set, any of the second set re-enable the first set, etc)
Can I encapsulate dataset/datapath/datapointer inside this widget?
Sure. You can encapsulate any bits you want inside - however it's not what we do. Ours is tied to the *grid* and then the *grid* is tied to the dataset. The grid already does that for you, and if you really need the underlying dataset pointers, the grid has that as one of it's attributes. But in general I would suggest methods of the grid instead of methods of the dataset. We prefer it that was as a better separation of the UI from the data access. ======================================================================= Geoff Crawford Phone: (973) 361 - 4224 Innov8 Computer Solutions, LLC FAX: (973) 537 - 6946 711 Route 10 East, Suite 204 Email: [EMAIL PROTECTED] Randolph NJ 07869 Web: http://www.processwareerp.com ProcessWare ERP for the Chemical Industry
<<inline: 7c6e8d.png>>
