I need a control that can display a large number (thousands) of image
thumbnails.
What should I use ?
The obvious solution would be a wx.ListCtrl. However, this control will
require an image list. Can I create a virtual image list ? An image list
that doesn't store the images but draws them as requested and that can be
associated with the List control ?
Not currently, but it's a good idea...
Also, the docs state that the virtual list control doesn't support the icon
view, but only the report view. On Win$$ this is not entirely correct, as I
was able to get an almost functional virtual icon list (the items are not
always correct after a resize of the list control, however, after redrawing
the list control everything is fine). Is the virtual icon list control
working only on windows ?
If it works on Windows then it is by accident and only because wxListCtrl handles enough of the native messages for it to work. It is definitly not meant to work on other platforms (although it could probably be expanded to do so...)
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Can I use a virtual grid for this ? I've seen that there is a function for
hiding the grid lines, but I haven't seen (after a short peek at the
methods) a method to hide the headers and the first column (with the line
number) of the grid. Are there any methods to hide the header and the first
column ?
Resizing works almost fine: the only problem I've got so far is the
horizontal scrollbar.
I compute the number of columns based on the width of the thumbnails and the
width of the grid window. The problem is that I don't know how wide is the
vertical scroll bar and I don't take it into account; therefore, in some
situations, the number of columns is 1 column too much and I get a
horizontal scoll bar (the scroll bar appears to let me see what's under the
vertical scroll bar ...)
How can I determine the width of the scroll bar in a platform/theme
independent way ?
TIA,
Ionutz
···
----- Original Message -----
From: <borco@go.ro>
To: <wxPython-users@lists.wxwindows.org>
Sent: Wednesday, August 27, 2003 10:14
Subject: Re: [wxPython-users] Thumbnail control
All I have to do now is to implement the resize event handlers so that the
number of columns and rows changes when the window containing the grid is
resized: I want only a vertical scrolling, but no horizontal scrolling.
Resizing works almost fine: the only problem I've got so far is the
horizontal scrollbar.
I compute the number of columns based on the width of the thumbnails and the
width of the grid window. The problem is that I don't know how wide is the
vertical scroll bar and I don't take it into account; therefore, in some
situations, the number of columns is 1 column too much and I get a
horizontal scoll bar (the scroll bar appears to let me see what's under the
vertical scroll bar ...)
How can I determine the width of the scroll bar in a platform/theme
independent way ?
wxSystemSettings_GetMetric(wxSYS_VSCROLL_X)
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Thanx. Now it works as expected. Any idea if the value returned by
wxSystemSettings_GetMetric (wxSYS_VSCROLL_X)
changes when the user changes the theme under X/GTK ? In Win$$ it appears it
is working OK.
TIA,
Ionutz
···
----- Original Message -----
From: "Robin Dunn" <robin@alldunn.com>
To: <wxPython-users@lists.wxwindows.org>
Sent: Thursday, August 28, 2003 23:18
Subject: Re: [wxPython-users] Thumbnail control
borco@go.ro wrote:
> Resizing works almost fine: the only problem I've got so far is the
> horizontal scrollbar.
>
> I compute the number of columns based on the width of the thumbnails and
the
> width of the grid window. The problem is that I don't know how wide is
the
> vertical scroll bar and I don't take it into account; therefore, in some
> situations, the number of columns is 1 column too much and I get a
> horizontal scoll bar (the scroll bar appears to let me see what's under
the
> vertical scroll bar ...)
>
> How can I determine the width of the scroll bar in a platform/theme
> independent way ?
wxSystemSettings_GetMetric(wxSYS_VSCROLL_X)
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
I have a grid working for my program, I want to add something to it and
am not sure.
I want to capture "enter","tab", and "del" and am not sure what to do
event handler wise in order to do that.
There is an example in the demo in GridEnterHandler.py of capturing Enter in the grid. You will probably also need to capture some events from the editor controls when they popup, you can add event hander bindings to the editors as they are created by catching EVT_GRID_EDITOR_CREATED and doing it from that handler.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!