Hi everybody:
I want to modify a imagebrowser propierties, defalts values of image browser can't showme an readeble image preview (are scanned documents).
In documentation found a method to set a window size (
dialog.SetSizeWH(800,600)), but can’t find a method to resize a imageview, always put “miniimage” not readeble and i need, a set imageview in readeble size, like 400x300 or something like that.
···
import wx.lib.imagebrowser
code
dialog = wx.lib.imagebrowser.ImageDialog(self,carpeta_para_explorar)
dialog.SetSizeWH(800,600) # <- modify the windows size.
dialog.SetLabel("Previsualizar libro %s" %carpeta_para_explorar) # <- modifiy label
if (wx.ID_OK == dialog.ShowModal()):
print 'You selected File: ' + dialog.GetFile
()
print 'In directory: ’ +dialog.GetDirectory()
dialog.Destroy()
code
somebody can help me ?
thanks in advance…
david.
Sunday, May 27, 2007, 9:57:56 AM, David Pantoja wrote:
Hi everybody:
I want to modify a imagebrowser propierties, defalts values of image
browser can't showme an readeble image preview (are scanned documents).
In documentation found a method to set a window size
(dialog.SetSizeWH(800,600)),
but can't find a method to resize a imageview, always put "miniimage" not
readeble and i need, a set imageview in readeble size, like 400x300 or
something like that.
I've made a small implementantion of a imagebrowser dialog that allows
resizing. The code is available at:
http://j.domaindlx.com/elements28/wxpython/genimagebrowser.html
It should be pretty easy to tweak it to your needs. For example, the
thumbnail size is added to the dialog's sizer with a wx.SHAPED flag,
and its proportion is defined on line #205:
self.image_view = ImageView(self, size=(4, 3))
So that if you need a width/ratio different that 1.333, change the
(4, 3) values there.
You might also comment the line #226 if you don't want the dirctrl to
expand:
top_sizer.AddGrowableCol(0)
HTH
-- tacao
No bits were harmed during the making of this e-mail.
Sunday, May 27, 2007, 12:38:34 PM, E. A. Tacao wrote:
(...) if you need a width/ratio different that 1.333 (...)
Correction:
"(...) if you need a width/height ratio different than 1,333 (...)"
-- tacao
No bits were harmed during the making of this e-mail.