wxGrid is an eye sore.

Ugh... I thought wxWidgets was supposed to look native. Look at this screenshot:

http://daniel.carrera.bz/_2010/img/screenshot-01.png

On the centre you see a native Gtk application. On the left you see a cross-platform application which appears to use Gtk natively. On the right you see a wxGrid. Look at the table header, look at the colours. It's totally different. It looks almost like a Qt application. Ugh.

:frowning:

Daniel.

It looks like your comparing a grid widget with list control widgets to me.

ยทยทยท

On Fri, Jan 15, 2010 at 6:42 AM, Daniel Carrera dcarrera@gmail.com wrote:

Ughโ€ฆ I thought wxWidgets was supposed to look native. Look at this screenshot:

http://daniel.carrera.bz/_2010/img/screenshot-01.png

On the centre you see a native Gtk application. On the left you see a cross-platform application which appears to use Gtk natively. On the right you see a wxGrid. Look at the table header, look at the colours. Itโ€™s totally different. It looks almost like a Qt application. Ugh.

:frowning:

Daniel.

โ€“

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

โ€“

Mike Driscoll

Blog: http://blog.pythonlibrary.org

Mike Driscoll wrote:

It looks like your comparing a grid widget with list control widgets to me.

What's the difference? How do I get the better looking one? If the Grid widget is supposed to look like a spreadsheet, I still think it fails. It doesn't look like Gnumeric or OpenOffice.org onmy computer. For example, the headers look like buttons, and the colour is too white (doesn't match my Gtk theme).

Daniel.

Hi,

Mike Driscoll wrote:

It looks like your comparing a grid widget with list control widgets to
me.

Agreed, those are not the same type of control. As you can see the two
on the left are clearly ListCtrls as they do not have row headings.

What's the difference? How do I get the better looking one? If the Grid
widget is supposed to look like a spreadsheet, I still think it fails. It
doesn't look like Gnumeric or OpenOffice.org onmy computer. For example, the
headers look like buttons, and the colour is too white (doesn't match my Gtk
theme).

See wx.ListCtrl in report mode. Runnable samples available in the
wxPython demo application. I believe this has already been mentioned
but, always always look in the demo application first when you
wondering about controls you can see nearly all of them in action
there

Cody

ยทยทยท

On Fri, Jan 15, 2010 at 6:55 AM, Daniel Carrera <dcarrera@gmail.com> wrote:

Hmmm...I don't have a direct example of a list control online right
now, but you can see a screenshot of the ObjectListView widget (which
looks the same) here:

ยทยทยท

On Jan 15, 6:55 am, Daniel Carrera <dcarr...@gmail.com> wrote:

Mike Driscoll wrote:
> It looks like your comparing a grid widget with list control widgets to me.

What's the difference? How do I get the better looking one? If the Grid
widget is supposed to look like a spreadsheet, I still think it fails.
It doesn't look like Gnumeric or OpenOffice.org onmy computer. For
example, the headers look like buttons, and the colour is too white
(doesn't match my Gtk theme).

Daniel.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

PyCon 2010 Atlanta Feb 19-21 http://us.pycon.org/

Mike Driscoll wrote:

It looks like your comparing a grid widget with list control widgets to
me.

What's the difference?

They are two different controls entirely. Grid is a spreadsheet; List has a few
different display modes. Best to check this out in the demo.

How do I get the better looking one? If the Grid
widget is supposed to look like a spreadsheet, I still think it fails. It
doesn't look like Gnumeric or OpenOffice.org onmy computer.

I just tried Gnumeric and OpenOffice.org on my Ubuntu computer and
they don't match each other, either; in fact neither matches to the wxGrid.
If I had to guess I would think OO.org has the most native look (the theme
of "reflected light" on the col header).

Does someone know: is wx.grid.Grid using native rendering for everything,
like the col and row headers? I'm not sure it is.

Che

ยทยทยท

On Fri, Jan 15, 2010 at 7:55 AM, Daniel Carrera <dcarrera@gmail.com> wrote:

The wxGrid class is a generic implementation instead of using native widgets (mostly due to there not being an adequate native widget on each of the platforms.) However it is possible to override the drawing of the labels and use wx.RendererNative to do the drawing yourself to make it look more native,

In 2.9 we'll have the DataViewCtrl, which you could think of as a cross between the ListCtrl, Grid and TreeListCtrl classes, and on Mac and GTK it uses a native widget.

ยทยทยท

On 1/15/10 4:42 AM, Daniel Carrera wrote:

Ugh... I thought wxWidgets was supposed to look native. Look at this
screenshot:

http://daniel.carrera.bz/_2010/img/screenshot-01.png

On the centre you see a native Gtk application. On the left you see a
cross-platform application which appears to use Gtk natively. On the
right you see a wxGrid. Look at the table header, look at the colours.
It's totally different. It looks almost like a Qt application. Ugh.

--
Robin Dunn
Software Craftsman

In past versions, the default text and background colors of the grid
labels changed according to the theme.

In wxGTK 2.8.10.1, the text color always stays black.
Therefore, the text is invisible in dark themes.

How do I access the current theme's color scheme?
Cross-platform solution would be best :slight_smile:

Martin

ยทยทยท

On Fri, 15 Jan 2010 10:43:16 -0800 Robin Dunn <robin@alldunn.com> wrote:

The wxGrid class is a generic implementation instead of using native
widgets (mostly due to there not being an adequate native widget on
each of the platforms.) However it is possible to override the
drawing of the labels and use wx.RendererNative to do the drawing
yourself to make it look more native,

Hi Mike,

Hmmm...I don't have a direct example of a list control online right
now, but you can see a screenshot of the ObjectListView widget (which
looks the same) here:

wxPython: Using ObjectListView instead of a ListCtrl - Mouse Vs Python

From your blog, it sounds like ObjectListView is easier than ListCtrl, so I want to try it. I've downloaded it and I have it now in a directory called "ObjectListView-1.2". But what do I do now? I don't know how to "import" a module that is not already in the Python installation.

My first guess was:

from "ObjectListView-1.2/ObjectListView" import ObjectListView, ColumnDefn

But that didn't work.

Cheers,
Daniel.

From the shell (assuming Bash here):

export PYTHONPATH=$PYTHONPATH:path_to_module

(PYTHONPATH wonโ€™t normally be set by default unless youโ€™re already doing this somewhere, so the first $PYTHONPATH may be unnecessary.)

From Python:

import sys

sys.path.append(path_to_module)

For modules I donโ€™t want to install globally, I have a directory called ~/lib/python and set PYTHONPATH to point there in my .bashrc.

-Nat

ยทยทยท

On Fri, Jan 15, 2010 at 2:38 PM, Daniel Carrera dcarrera@gmail.com wrote:

From your blog, it sounds like ObjectListView is easier than ListCtrl, so I want to try it. Iโ€™ve downloaded it and I have it now in a directory called โ€œObjectListView-1.2โ€. But what do I do now? I donโ€™t know how to โ€œimportโ€ a module that is not already in the Python installation.

Look at wx.SystemSettings.GetColour, but if the Grid is not using the system colours then I'd call it a bug and you should create a ticket for it.

ยทยทยท

On 1/15/10 12:10 PM, Martin Manns wrote:

On Fri, 15 Jan 2010 10:43:16 -0800 > Robin Dunn<robin@alldunn.com> wrote:

The wxGrid class is a generic implementation instead of using native
widgets (mostly due to there not being an adequate native widget on
each of the platforms.) However it is possible to override the
drawing of the labels and use wx.RendererNative to do the drawing
yourself to make it look more native,

In past versions, the default text and background colors of the grid
labels changed according to the theme.

In wxGTK 2.8.10.1, the text color always stays black.
Therefore, the text is invisible in dark themes.

How do I access the current theme's color scheme?
Cross-platform solution would be best :slight_smile:

--
Robin Dunn
Software Craftsman

Read about the Python distutils utility and then use OLV's setup.py to install the package for you.

ยทยทยท

On 1/15/10 2:38 PM, Daniel Carrera wrote:

Hi Mike,

Hmmm...I don't have a direct example of a list control online right
now, but you can see a screenshot of the ObjectListView widget (which
looks the same) here:

wxPython: Using ObjectListView instead of a ListCtrl - Mouse Vs Python

From your blog, it sounds like ObjectListView is easier than ListCtrl,
so I want to try it. I've downloaded it and I have it now in a directory
called "ObjectListView-1.2". But what do I do now? I don't know how to
"import" a module that is not already in the Python installation.

My first guess was:

from "ObjectListView-1.2/ObjectListView" import ObjectListView, ColumnDefn

But that didn't work.

--
Robin Dunn
Software Craftsman

The colors that

wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT) and
wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENUTEXT)

return do not change when the GTK theme is changed from dark to light.

Do I have to call an update function?

Martin

ยทยทยท

On Fri, 15 Jan 2010 14:54:00 -0800 Robin Dunn <robin@alldunn.com> wrote:

On 1/15/10 12:10 PM, Martin Manns wrote:

> How do I access the current theme's color scheme?
> Cross-platform solution would be best :slight_smile:

Look at wx.SystemSettings.GetColour, but if the Grid is not using the
system colours then I'd call it a bug and you should create a ticket
for it.

Do you mean that the GTK theme is changed while the wx app is running? If so then it may be that the values are being cached instead of fetching them again from the system.

ยทยทยท

On 1/16/10 3:01 PM, Martin Manns wrote:

On Fri, 15 Jan 2010 14:54:00 -0800 > Robin Dunn<robin@alldunn.com> wrote:

On 1/15/10 12:10 PM, Martin Manns wrote:

How do I access the current theme's color scheme?
Cross-platform solution would be best :slight_smile:

Look at wx.SystemSettings.GetColour, but if the Grid is not using the
system colours then I'd call it a bug and you should create a ticket
for it.

The colors that

wx.SystemSettings.GetColour(wx.SYS_COLOUR_WINDOWTEXT) and
wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENUTEXT)

return do not change when the GTK theme is changed from dark to light.

--
Robin Dunn
Software Craftsman