On Jun 25, 2007, at 8:03 PM, Kelie wrote:
> Ed, i tested the colOrder argument and it works. Thanks.
Great!
> Can this browse function display cells with multi-line text
> strings? in my database, there are
> cells like that, and now only the first line is displayed. i tried
> something
> like this and didn't make a difference.
>
> frm, grd = dabo.ui.browse(cur, colOrder = dict(zip(caps, range(len
> (caps)))))
> import wx
> grd.GridCellTextEditor = wx.grid.GridCellAutoWrapStringEditor
A simpler approach might be to set the WordWrap property for the
columns in the grid. This will set the renderer (not just the editor,
which is what you tried) to wrap the text. Try something like this:
for col in grd.Columns:
col.WordWrap = True
> how to i get all the records for a DaboCursor. apparently this
> doesn't work:
>
> conn = dabo.db.dConnection(ci)
> cur = conn.getDaboCursor()
> cur.execute(options.sql)
> for row in cur.fetchall():
> print row
>
> but this does work:
> conn = dabo.db.dConnection(ci)
> cur = conn.getConnection().cursor()
> cur .execute(options.sql)
> for row in cur.fetchall():
> print row
>
> i guess this shows DaboCursor is different from cursor.
It's very different, as you've noticed. The 'fetchall()' is done for
you, and the results converted so that each row is a dictionary. To
get the records from a Dabo cursor, just use:
ds = cur.getDataSet()
The actual method has a variety of options available for customizing
the data set. See the docs for dCursorMixin.getDataSet() for more
information.
-- Ed Leafe
-- http://leafe.com
-- http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/dabo-users/[EMAIL PROTECTED]