You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(116) |
Sep
(146) |
Oct
(78) |
Nov
(69) |
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(188) |
Feb
(142) |
Mar
(143) |
Apr
(131) |
May
(97) |
Jun
(221) |
Jul
(127) |
Aug
(89) |
Sep
(83) |
Oct
(66) |
Nov
(47) |
Dec
(70) |
2003 |
Jan
(77) |
Feb
(91) |
Mar
(103) |
Apr
(98) |
May
(134) |
Jun
(47) |
Jul
(74) |
Aug
(71) |
Sep
(48) |
Oct
(23) |
Nov
(37) |
Dec
(13) |
2004 |
Jan
(24) |
Feb
(15) |
Mar
(52) |
Apr
(119) |
May
(49) |
Jun
(41) |
Jul
(34) |
Aug
(91) |
Sep
(169) |
Oct
(38) |
Nov
(32) |
Dec
(47) |
2005 |
Jan
(61) |
Feb
(47) |
Mar
(101) |
Apr
(130) |
May
(51) |
Jun
(65) |
Jul
(71) |
Aug
(96) |
Sep
(28) |
Oct
(20) |
Nov
(39) |
Dec
(62) |
2006 |
Jan
(13) |
Feb
(19) |
Mar
(18) |
Apr
(34) |
May
(39) |
Jun
(50) |
Jul
(63) |
Aug
(18) |
Sep
(37) |
Oct
(14) |
Nov
(56) |
Dec
(32) |
2007 |
Jan
(30) |
Feb
(13) |
Mar
(25) |
Apr
(3) |
May
(15) |
Jun
(42) |
Jul
(5) |
Aug
(17) |
Sep
(6) |
Oct
(25) |
Nov
(49) |
Dec
(10) |
2008 |
Jan
(12) |
Feb
|
Mar
(17) |
Apr
(18) |
May
(12) |
Jun
(2) |
Jul
(2) |
Aug
(6) |
Sep
(4) |
Oct
(15) |
Nov
(45) |
Dec
(9) |
2009 |
Jan
(1) |
Feb
(3) |
Mar
(18) |
Apr
(8) |
May
(3) |
Jun
|
Jul
(13) |
Aug
(2) |
Sep
(1) |
Oct
(9) |
Nov
(13) |
Dec
|
2010 |
Jan
(2) |
Feb
(3) |
Mar
(9) |
Apr
(10) |
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(4) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(44) |
May
(9) |
Jun
(22) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(2) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(3) |
Aug
(8) |
Sep
(3) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Tiberiu I. <ti...@li...> - 2005-07-20 16:53:15
|
Hi! I've upgraded one of my apps from pythoncard 0.7 to the latest 0.8 Unfortunately, the calendar widget has been modified (it no longer has drop-down boxes for month and year), and for my application it would be better to have those back. I've tried fiddling with the window style flags from wx, but I couldn't get it to work the way it used to. Besides creating separate widgets and linking them to the calendar with code, is there a possibility to get the old style back? Thanks for your help, Tiberiu Ichim |
From: Alex T. <al...@tw...> - 2005-07-20 02:10:15
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Alex T. <al...@tw...> - 2005-07-19 23:46:31
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Alex T. <al...@tw...> - 2005-07-19 22:43:46
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Alex T. <al...@tw...> - 2005-07-19 22:41:48
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Kooshesh, S. A <KOO...@do...> - 2005-07-19 18:02:02
|
I'm just coming in on the middle of this. If you want to focus on an item in a list use .selection =3D index If this isn't what you were looking for, sorry, I just joined this list. =20 ******************************************=20 Sayed Arian Sterling Kooshesh=20 Computer Applications Technician=20 District 2/IDOT=20 819 Depot Ave=20 Dixon, IL 61021=20 koo...@do...=20 (815) 284-5494=20 =20 ________________________________ From: pyt...@li... [mailto:pyt...@li...] On Behalf Of Schollnick, Benjamin Sent: Tuesday, July 19, 2005 11:56 AM To: Alex Tweedly Cc: pyt...@li... Subject: RE: [Pythoncard-users] Multicolumn List Questions... | Even if you do it in a loop after the data is loaded (equivalent to my second timed-test) it will still be faster than going through =20 | the self.components.MultiColumnList.items[x][0] loop.=20 =20 Why is there a speed penalty in looping through the Items loop?=20 =20 | It did get kind of lost - I assumed that you did the SetFocus to overcome it ....=20 =20 I tried it, but I couldn't find heads or tails on the SetFocus documentation from wxPython.... And it appears to be for setting the focus on a group/item, not on a element in a list. | The wxPython doc for ListCtrl say you can use EnsureVisible - and I verified it by adding to my version of the sample | self.components.theList.EnsureVisible(itemidx)=20 =20 I searched, but must of missed that....=20 [Remember - PythonCard is just a layer over wxPython, you can generally look in the wxPython docs and call those functions listed there for the underlying control. You'll get faster turn-around on questions by looking up the docs yourself than waiting for me to happen to read email - 'cause all I do then is look at the docs, or at the source for the sample and/or the components/multicolumn.py :-) =20 =20 Except for the fact that I couldn't find EnsureVisible.... I'm not very happy with wxPython documentation... It's usable, but I prefer the layout of the Python docs... =20 =20 Either way, it's working now... Is the WIKI open to everyone? I'm considering trying my hands at adding some of these to the Pythoncard wiki... =20 - Benjamin =20 |
From: Schollnick, B. <Ben...@xe...> - 2005-07-19 16:57:13
|
| Even if you do it in a loop after the data is loaded (equivalent to my second timed-test) it will still be faster than going through =20 | the self.components.MultiColumnList.items[x][0] loop.=20 =20 Why is there a speed penalty in looping through the Items loop?=20 =20 | It did get kind of lost - I assumed that you did the SetFocus to overcome it ....=20 =20 I tried it, but I couldn't find heads or tails on the SetFocus documentation from wxPython.... And it appears to be for setting the focus on a group/item, not on a element in a list. | The wxPython doc for ListCtrl say you can use EnsureVisible - and I verified it by adding to my version of the sample | self.components.theList.EnsureVisible(itemidx)=20 =20 I searched, but must of missed that....=20 [Remember - PythonCard is just a layer over wxPython, you can generally look in the wxPython docs and call those functions listed there for the underlying control. You'll get faster turn-around on questions by looking up the docs yourself than waiting for me to happen to read email - 'cause all I do then is look at the docs, or at the source for the sample and/or the components/multicolumn.py :-) =20 =20 Except for the fact that I couldn't find EnsureVisible.... I'm not very happy with wxPython documentation... It's usable, but I prefer the layout of the Python docs... =20 =20 Either way, it's working now... Is the WIKI open to everyone? I'm considering trying my hands at adding some of these to the Pythoncard wiki... =20 - Benjamin =20 |
From: Alex T. <al...@tw...> - 2005-07-19 15:45:38
|
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Steve C. <stn...@xm...> - 2005-07-19 15:31:37
|
Alex Tweedly wrote: > Mark Carter wrote: > > >Hello. > > > >I've written an app using PythonCard in Windows. However, when I take > >the code and run it on Ubuntu Linux (Ubuntu 5.04, Gnome) using my > >laptop, it has some issues. > > > >Specifically: > >- The drop-down choice box, because Gnome renders it with both an up > >and down arrow, is much bigger. > >- Fonts. I left them at default in Windows, which is Microsoft Sans > >Serif size 8. However, in Gnome, it defaults to Sans size 10. The > >size change resizes buttons on me, screws up my form layout, and just > >looks terrible. > > I should start off by saying I've never run Pythoncard on Linux (and > don't have any access to Linux to try it), so these answers should be > treated cautiously. > > For text and control sizing, there is no good *native PythonCard* > solution right now. The best way I know is to use wxPython's sizers to > make your layout fully self-sizing. That will typically make it nicer to > use anyway, and should handle issues like different system font sizes, > drop-down arrow sizes, etc. along the way. > > There's a good example of using sizers in the findfiles utility > (PythonCard/tools/findfiles), and there's some half-decent documentation > on sizers in the wxPython documentation/demo download. I'd chime in with Alex, I just added sizers to my app, and it was much easier than I thought it'd be. One thing to keep in mind, the size you make the components in the resource editor is the default size of the object when the sizer places them... So you might want to make them the minimal size. Also, in my app I have 3 multicolumn lists that take up the majority of the space on the window. Adding sizers that sized them proportionally to each other was doing very strange stuff until I made the initial size of each multi-column list the same 'unit' size (100x100). > > >- I have a text field (like a VB label) beside my choice drop-down. > >On Linux, it's got a border around it for some reason. > > No idea. Is it a TextField, or a StaticText ? Do all such fields get a > border on Linux ? I'm also on Ubuntu, using wxPython 2.6.1.0. I don't see it on my StaticText fields... Mark, which version of wxPython are you using? And, which version of PythonCard? If you want to see what the widgets look like on my system, you can look at the presentation I gave the other day: http://www.utahpython.org/meetings.spy (a screenshot of the widgets sample is on page 6 of the .pdf) > > >Everything else works fine, which is very good. But I need to clean > >up the user interface, which goes from looking great in Windows to > >crap in Linux. > > > >Anybody have any tips regarding cross-platform development? Am I > >going to have to maintain two versions of any software with a GUI? > > > Shouldn't need to if you can wrestle the layout into sizers - it's not > always easy to find the right combination of sizers to get the layout > you want. You could also do two resource files, run your app with '-l' on the command-line to see the set of resource files it tries to load at startup. But, I think you'd end up much happier using sizers. It does take work to get them right, but in the end it'll be less tweaking busy work. > > >On another note, I use NSIS to package a nice installer for Windows. > >What's the best way to package it up for Linux users? > > I definitely can't answer that one ... > What do you want to do w/ regard to packaging it up? Does it have dependencies on other applications/shared libraries? If so, you might need to look into .deb or .rpm packaging. If not, I'd just bundle it all up in a .tgz file and include adequate documentation in a README file. -Steve |
From: Schollnick, B. <Ben...@xe...> - 2005-07-19 15:29:13
|
> Do you need to re-retrieve the whole table ? Technically at this time, no. But in theory, this database could be accessed by multiple systems at the same time... And thus it is safer to refresh the entire table then it is to reread just a single row. > I'm surprised that the time to load the whole table from the DB, then=20 > load that whole thing into the multicolumnlist is small=20 > enough for the=20 > extra 1-2 seconds to matter. Reading the table from the database is very fast... The majority of the time involved in the gather_data routine is the Dialog window redrawing the data.... > But .... it looks to me as though what you're doing in the loop > is getting the row number where the current_item was *before*=20 > any edit to the db. Quite possible. I just did a simple check to see how it woruld work. > I'd have thought that once you'd edited (or deleted or=20 > added), it could be in a different row number - no ? Yes... It could... But even if the data is indifferent position, I don't mind the cursor being where it was previously. =20 These are software titles, etc... (It's a auditing system...) So if your editting "Norton Utilities v2.0", probably you'll want to edit something nearby... > Can't you remove that loop entirely, and get the line number=20 > while loading the table from the DB : It is possible. For some reason (I forget), I did not want to do that...... I'll make a quick model... Possibly lost in the email was a small issue... 1) SetSelected does not reposition the list to be in the visible area. Is there some other way to force the selectedvalue to be in the visible area of the dialog? - Benjamin |
From: Alex T. <al...@tw...> - 2005-07-19 15:09:28
|
Schollnick, Benjamin wrote: > Now regarding the reset of the selected item on a multicolumn list... > > def gather_data ( self ): > current_item = self.last_picked[0] > highlited = -1 > for x in xrange(0, len(self.components.MultiColumnList1.items)): > if current_item == >self.components.MultiColumnList1.items[x][0]: > highlited = x > break > > vsoftware = None > self.components.MultiColumnList1.items = [] > self.components.MultiColumnList1.columnHeadings = [] > headings = [] > > vsoftware, structure = self.odbc_database.select_statement ( >fetch="*", > table=self.database_name, >orderby=self.orderbys) > for x in structure: > headings.append ( x[0].replace("_", " ") ) > self.components.MultiColumnList1.columnHeadings = headings > > data = [] > line = [] > for x in vsoftware: > for y in x: > line.append ( str(y) ) > data.append ( line ) > line = [] > > self.components.MultiColumnList1.items = data > print dir(self.components.MultiColumnList1) > self.components.MultiColumnList1.SetFocus ( highlited ) > >The penalty is too high..... > >Here's some background. The multicolumn list is a representation of >what data is in a database (accessed via ODBC)... The gather_data >function is used to refresh the data in the database view... > >After any changes (Editting, Adding, Removing) I need to refresh, but >the table could be 400+ entries. > > > Do you need to re-retrieve the whole table ? Can you not remember which row you were editing and deal only with that ? (I'm naive about DBs - can you tell ? :-) >It would be rather annoying for a user to make a change at the end of >the table, and then have the table refreshed, and have to scroll all the >way down to the end (again)..... > > >SetSelection works to highlight the text. But it doesn't change the >visible portion of the table to be in the viewing area.... > >The verified Software table is only roughly 100+ items, but if I use the >for loop... > > for x in xrange(0, len(self.components.MultiColumnList1.items)): > if current_item == >self.components.MultiColumnList1.items[x][0]: > highlited = x > break > >It adds roughly a 1-2 seconds to the load process.... > >Any suggestions? > > I'm surprised that the time to load the whole table from the DB, then load that whole thing into the multicolumnlist is small enough for the extra 1-2 seconds to matter. But .... it looks to me as though what you're doing in the loop for x in xrange(0, len(self.components.MultiColumnList1.items)): if current_item == self.components.MultiColumnList1.items[x][0]: highlited = x break is getting the row number where the current_item was *before* any edit to the db. I'd have thought that once you'd edited (or deleted or added), it could be in a different row number - no ? Can't you remove that loop entirely, and get the line number while loading the table from the DB : data = [] line = [] highlited = -1 count = 0 for x in vsoftware: for y in x: line.append ( str(y) ) data.append ( line ) if line[0] == current_item: highlighted = count count += 1 line = [] self.components.MultiColumnList1.items = data print dir(self.components.MultiColumnList1) self.components.MultiColumnList1.SetFocus ( highlited ) If you can't use that, then the other possibility is to retrieve the entire table, and scan that. This saves a significant overhead for accessing each item within the multicolumnlist - but obviously can't be done if your table is too large - i.e. 400 x ?? columns (if it is too large, you may still be able to retrieve the datamap dictionary, and access that - but if you can do this it is easier) What I tried in my copy of the sample/multicolumnlist was > def on_which_mouseClick(self, event): > # current_item = "Yes" > current_item = "Not to be found" > tstart = time.time() > highlited = -1 > for j in range(20): # 20 time just to make it measurable > for x in xrange(0, len(self.components.theList.items)): > if current_item == self.components.theList.items[x][0]: > highlited = x > break > print highlited, time.time()-tstart > > tstart = time.time() > them = self.components.theList.items > highlited = -1 > for j in range(20): # 20 time just to make it measurable > for x in xrange(0, len(them)): > if current_item == them[x][0]: > highlited = x > break > print highlited, time.time()-tstart and this gave times of ~ 6 seconds for the first loop, versus no measurable time for the second. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Schollnick, B. <Ben...@xe...> - 2005-07-19 14:08:16
|
> Should be something like on_myList_itemActivated() Ah... I see.. Obvious.... =20 That's now working... Now regarding the reset of the selected item on a multicolumn list... def gather_data ( self ): current_item =3D self.last_picked[0] highlited =3D -1 for x in xrange(0, len(self.components.MultiColumnList1.items)): if current_item =3D=3D self.components.MultiColumnList1.items[x][0]: highlited =3D x break =20 vsoftware =3D None self.components.MultiColumnList1.items =3D [] self.components.MultiColumnList1.columnHeadings =3D [] headings =3D [] vsoftware, structure =3D self.odbc_database.select_statement ( fetch=3D"*", table=3Dself.database_name, orderby=3Dself.orderbys) for x in structure: headings.append ( x[0].replace("_", " ") ) self.components.MultiColumnList1.columnHeadings =3D headings data =3D [] line =3D [] for x in vsoftware: for y in x: line.append ( str(y) ) data.append ( line ) line =3D [] self.components.MultiColumnList1.items =3D data print dir(self.components.MultiColumnList1) self.components.MultiColumnList1.SetFocus ( highlited ) The penalty is too high..... Here's some background. The multicolumn list is a representation of what data is in a database (accessed via ODBC)... The gather_data function is used to refresh the data in the database view... After any changes (Editting, Adding, Removing) I need to refresh, but the table could be 400+ entries. It would be rather annoying for a user to make a change at the end of the table, and then have the table refreshed, and have to scroll all the way down to the end (again)..... SetSelection works to highlight the text. But it doesn't change the visible portion of the table to be in the viewing area....=20 The verified Software table is only roughly 100+ items, but if I use the for loop... for x in xrange(0, len(self.components.MultiColumnList1.items)): if current_item =3D=3D self.components.MultiColumnList1.items[x][0]: highlited =3D x break It adds roughly a 1-2 seconds to the load process.... Any suggestions? - Benjamin >=20 > --=20 > Alex Tweedly http://www.tweedly.net >=20 >=20 >=20 > --=20 > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date:=20 > 16/07/2005 >=20 >=20 |
From: Alex T. <al...@tw...> - 2005-07-19 00:17:17
|
Schollnick, Benjamin wrote: > | What did the MessageWatcher say the event was ? > >| It's itemActivated :-) > >Yes, I tried (from memory, I'm at home)... > >def on_itemActivated ( self, event): > print "yes, it's me..." > >And got nowhere.... I was assuming that I was doing something >incorrect... I also tried... > >on_itemActivated_Command (...) > >on_itemActivated_Selected (...) > >I assume that I'm using the wrong event syntax...? > > > Should be something like on_myList_itemActivated() -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Schollnick, B. <Ben...@xe...> - 2005-07-18 23:46:04
|
>2) I have buttons on the custom dialog / MultiColumnList... But I = would >like to activate the edit function if they double click on a row. I >thought it would be either on_Activate or on_ActivatedEvent but neither >of those seemed to work when I created a event handler. =20 | What did the MessageWatcher say the event was ? | It's itemActivated :-) Yes, I tried (from memory, I'm at home)... def on_itemActivated ( self, event): print "yes, it's me..." And got nowhere.... I was assuming that I was doing something=20 incorrect... I also tried... on_itemActivated_Command (...) on_itemActivated_Selected (...) I assume that I'm using the wrong event syntax...? - Benjamin |
From: Alex T. <al...@tw...> - 2005-07-18 21:49:09
|
Schollnick, Benjamin wrote: >1) How do I find out what Row the user has highlighted? I know >GetSelectedString will return the text, but I'm interested in finding >out row #666 is selected. > > There's no PythonCard method to do this directly. You can use the wxPython methods (I stole / adopted this code from the components/multicolumn.py). I took the multicolumnexample in the samples directory, added a button called "which" and added the code below. It prints out the list of selected item row numbers - and then makes the row following the first selected one be (also) selected. > def on_which_mouseClick(self, event): > print self.components.theList.getStringSelection() > numitems = self.components.theList.GetSelectedItemCount() > itemidx = -1 > items = [] > for i in xrange(numitems) : > itemidx = self.components.theList.GetNextItem(itemidx, > wx.LIST_NEXT_ALL, wx.LIST_STATE_SELECTED) > if itemidx == -1: > #Odd, selection changed? > break > items.append(itemidx) > print items > > itemidx = items[0] + 1 > self.components.theList.SetSelection(itemidx) > a) How do I set the active row back to 667 or after I reload the >list? > > > You'd need to (assuming you want to) first de-select the current selection, then select 667 as you want - something like for i in items: self.components.theList.SetSelection(i, 0) # second param 0 to deselect self.components.theList.SetSelection(667) >2) I have buttons on the custom dialog / MultiColumnList... But I would >like to activate the edit function if they double click on a row. I >thought it would be either on_Activate or on_ActivatedEvent but neither >of those seemed to work when I created a event handler. > > > What did the MessageWatcher say the event was ? It's itemActivated :-) >3) > > > Yes. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Steve C. <stn...@xm...> - 2005-07-18 21:26:10
|
John Henry wrote: > Schollnick, Benjamin wrote: > > 1) How do I find out what Row the user has > highlighted? I know > > GetSelectedString will return the text, but I'm > interested in finding > > out row #666 is selected. > > > > If nothing else, you can do a match of the list to get > the number. > > if > self.components.myMulList.GetSelectedString==self.components.myMulList.items[665]: > > May be there is an easier way that others can point > you to. > You could cheat. Make the row index either the first column or last column of the row (first if you don't mind it showing, last if you want to 'hide' it), then look at that column in the return value of getStringSelection() for example, if it's in the last column : rows = self.componenets.myMlist.getStringSelection() rowIndex = rows[0][-1:][0] -Steve |
From: Alex T. <al...@tw...> - 2005-07-18 21:06:48
|
Mark Carter wrote: > Hello. > > I've written an app using PythonCard in Windows. However, when I take > the code and run it on Ubuntu Linux (Ubuntu 5.04, Gnome) using my > laptop, it has some issues. > > Specifically: > - The drop-down choice box, because Gnome renders it with both an up > and down arrow, is much bigger. > - Fonts. I left them at default in Windows, which is Microsoft Sans > Serif size 8. However, in Gnome, it defaults to Sans size 10. The > size change resizes buttons on me, screws up my form layout, and just > looks terrible. I should start off by saying I've never run Pythoncard on Linux (and don't have any access to Linux to try it), so these answers should be treated cautiously. For text and control sizing, there is no good *native PythonCard* solution right now. The best way I know is to use wxPython's sizers to make your layout fully self-sizing. That will typically make it nicer to use anyway, and should handle issues like different system font sizes, drop-down arrow sizes, etc. along the way. There's a good example of using sizers in the findfiles utility (PythonCard/tools/findfiles), and there's some half-decent documentation on sizers in the wxPython documentation/demo download. > - I have a text field (like a VB label) beside my choice drop-down. > On Linux, it's got a border around it for some reason. No idea. Is it a TextField, or a StaticText ? Do all such fields get a border on Linux ? > - Undo/Redo. I copied the undo/redo code from one of the Pythoncard > sample apps, and it works fine in Windows, but doesn't work at all in > Linux. Undo/Redo code for what kind of component or control ? Could you expand a bit more on this item ? > Everything else works fine, which is very good. But I need to clean > up the user interface, which goes from looking great in Windows to > crap in Linux. > > Anybody have any tips regarding cross-platform development? Am I > going to have to maintain two versions of any software with a GUI? > Shouldn't need to if you can wrestle the layout into sizers - it's not always easy to find the right combination of sizers to get the layout you want. > On another note, I use NSIS to package a nice installer for Windows. > What's the best way to package it up for Linux users? I definitely can't answer that one ... -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005 |
From: Mark C. <ma...@ma...> - 2005-07-18 20:39:32
|
Hello. I've written an app using PythonCard in Windows. However, when I take the code and run it on Ubuntu Linux (Ubuntu 5.04, Gnome) using my laptop, it has some issues. Specifically: - The drop-down choice box, because Gnome renders it with both an up and down arrow, is much bigger. - Fonts. I left them at default in Windows, which is Microsoft Sans Serif size 8. However, in Gnome, it defaults to Sans size 10. The size change resizes buttons on me, screws up my form layout, and just looks terrible. - I have a text field (like a VB label) beside my choice drop-down. On Linux, it's got a border around it for some reason. - Undo/Redo. I copied the undo/redo code from one of the Pythoncard sample apps, and it works fine in Windows, but doesn't work at all in Linux. Everything else works fine, which is very good. But I need to clean up the user interface, which goes from looking great in Windows to crap in Linux. Anybody have any tips regarding cross-platform development? Am I going to have to maintain two versions of any software with a GUI? On another note, I use NSIS to package a nice installer for Windows. What's the best way to package it up for Linux users? Mark |
From: <kim...@ya...> - 2005-07-18 19:49:32
|
Schollnick, Benjamin wrote: > 1) How do I find out what Row the user has highlighted? I know > GetSelectedString will return the text, but I'm interested in finding > out row #666 is selected. > If nothing else, you can do a match of the list to get the number. if self.components.myMulList.GetSelectedString==self.components.myMulList.items[665]: May be there is an easier way that others can point you to. > a) How do I set the active row back to 667 or after I reload the > list? > Don't know how to set to a specific number but in my case, I've been using the SetStringSelection method. x=self.components.myMulList.items[666] self.components.myMulList.SetStringSelection(x,select=1) > 2) I have buttons on the custom dialog / MultiColumnList... But I would > like to activate the edit function if they double click on a row. I > thought it would be either on_Activate or on_ActivatedEvent but neither > of those seemed to work when I created a event handler. > I don't know the answer to that. > 3) > I don't know the answer to that neither. :=) -- John Henry |
From: Schollnick, B. <Ben...@xe...> - 2005-07-18 19:27:48
|
1) How do I find out what Row the user has highlighted? I know GetSelectedString will return the text, but I'm interested in finding out row #666 is selected. a) How do I set the active row back to 667 or after I reload the list? 2) I have buttons on the custom dialog / MultiColumnList... But I would like to activate the edit function if they double click on a row. I thought it would be either on_Activate or on_ActivatedEvent but neither of those seemed to work when I created a event handler. =20 3)=20 > -----Original Message----- > From: pyt...@li...=20 > [mailto:pyt...@li...] On=20 > Behalf Of kim...@ya... > Sent: Monday, July 18, 2005 2:04 PM > To: pyt...@li... > Subject: Re: [Pythoncard-users] Calendar Widget, setting the=20 > date shown to a specific date. >=20 >=20 > It's obvious (***NOT***): >=20 > import datetime date >=20 > ... >=20 > def on_initialize(self, event): > =09 > self.components.caCalendar.date=3Ddatetime.date(2005,8,1) > ... >=20 > -- > John >=20 >=20 > Schollnick, Benjamin wrote: > > Folks, > >=20 > > I'm using a calendar widget.... But I have run > into a issue > > that I can't seem > > to resolve... > >=20 > > Is there a way to set the Calendar widget to a > specific date? I > > see the > > SetDate function, but I am unable to find the > syntax/format for > > that function... > >=20 > > I need to set the calendar to match the data it is=20 > representing.... > >=20 > > I briefly checked the samples, but I did not see > any that used > > the calendar, and > > set the date to anything but the default of Now... > (The calendar > > widget appears > > to default to NOW().) > >=20 > > Any hints? > >=20 > > - Benjamin > >=20 > >=20 > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux > Migration Strategies > > from IBM. Find simple to follow Roadmaps, > straightforward articles, > > informative Webcasts and more! Get everything you > need to get up to > > speed, fast. > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dclick > > _______________________________________________ > > Pythoncard-users mailing list Pyt...@li... > > > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > >=20 > >=20 >=20 >=20 > --=20 >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dclick > _______________________________________________ > Pythoncard-users mailing list Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 |
From: <kim...@ya...> - 2005-07-18 18:04:14
|
It's obvious (***NOT***): import datetime date ... def on_initialize(self, event): self.components.caCalendar.date=datetime.date(2005,8,1) ... -- John Schollnick, Benjamin wrote: > Folks, > > I'm using a calendar widget.... But I have run into a issue > that I can't seem > to resolve... > > Is there a way to set the Calendar widget to a specific date? I > see the > SetDate function, but I am unable to find the syntax/format for > that function... > > I need to set the calendar to match the data it is > representing.... > > I briefly checked the samples, but I did not see any that used > the calendar, and > set the date to anything but the default of Now... (The calendar > widget appears > to default to NOW().) > > Any hints? > > - Benjamin > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > -- |
From: Schollnick, B. <Ben...@xe...> - 2005-07-18 17:30:11
|
Okay, I found a different way to handle changing the date in the calendar control. date =3D time.strptime ( data[0][3], "%a %b %d %H:%M:%S %Y") import datetime datevalue =3D datetime.datetime ( date[0], date[1], date[2] ) dlg.components.TimeDateStampfield.date =3D datevalue While this obvious... I initially did not get this to work. I forget exactly what was previously tried... But I believe I initially tried to pass the date string... SetDate is a red heering.... It's wxPython.... And I have not found any way to use it.... ( wxDateTime isn't anywhere to be found on my wxPython installation...) - Benjamin > -----Original Message----- > From: pyt...@li...=20 > [mailto:pyt...@li...] On=20 > Behalf Of Schollnick, Benjamin > Sent: Monday, July 18, 2005 12:08 PM > To: pyt...@li... > Subject: [Pythoncard-users] Calendar Widget, setting the date=20 > shown to a specific date. >=20 >=20 > Folks, >=20 > I'm using a calendar widget.... But I have run into a=20 > issue that I can't seem > to resolve... >=20 > Is there a way to set the Calendar widget to a specific=20 > date? I see the > SetDate function, but I am unable to find the=20 > syntax/format for that function... >=20 > I need to set the calendar to match the data it is=20 > representing.... >=20 > I briefly checked the samples, but I did not see any=20 > that used the calendar, and > set the date to anything but the default of Now... (The=20 > calendar widget appears > to default to NOW().)=20 >=20 > Any hints? >=20 > - Benjamin >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > _______________________________________________ > Pythoncard-users mailing list Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 |
From: Schollnick, B. <Ben...@xe...> - 2005-07-18 16:09:04
|
Folks, I'm using a calendar widget.... But I have run into a issue that I can't seem to resolve... Is there a way to set the Calendar widget to a specific date? I see the SetDate function, but I am unable to find the syntax/format for that function... I need to set the calendar to match the data it is representing.... I briefly checked the samples, but I did not see any that used the calendar, and set the date to anything but the default of Now... (The calendar widget appears to default to NOW().)=20 Any hints? - Benjamin |
From: Don S. <saw...@st...> - 2005-07-16 20:42:02
|
Rohit, You might set up your code to run each iteration of your animation separately and asynchronously, such as when a timer event executes. The "flock.py" sample shows an example of this method. I also am new to PythonCard, so if any reader of this message can = correct my advice, please do! Don > -----Original Message----- > From: pyt...@li...=20 > [mailto:pyt...@li...] On=20 > Behalf Of Rohit > Sent: Saturday, July 16, 2005 4:01 AM > To: pyt...@li... > Subject: [Pythoncard-users] Stopping an animation sequence. >=20 > Hi, > I have started using Pythoncard recently, so this may seem=20 > trivial. I was going through the samples which come with it=20 > and I found the "gravity" sample, which animates a number of balls. > I also tried to do something similar to that, but just only=20 > for one ball with one color. For this I used one button to=20 > start the animation, another button to stop it and a canvas=20 > to draw the whole sequence. In the animation sequence the=20 > program keeps on checking whether a flag variable has been=20 > altered to stop the animation or not. > This flag variable was supposed to be altered by the stop=20 > animation button, when a mouse click occured. But when I=20 > click the stop button the animation keeps on running. I am=20 > including the code of my program. >=20 > [code] >=20 > import time,random > from PythonCard import model >=20 > class MyBackground(model.Background): >=20 > def on_initialize(self, event): > self.stopAnimation=3DFalse > pass >=20 > def on_startBtn_mouseClick(self,event): > event.target.enabled=3DFalse > self.stopAnimation=3DFalse > xco=3D50. > yco=3D0. > =20 > xspeed=3Drandom.random()*60-30 > yspeed=3Drandom.random()*60-30 > leftedge=3D0 > rightedge,bottomedge=3Dself.components.canvas.size > topedge=3D0 > gravity=3D2 > drag=3D0.98 > bounce=3D0.5 > radius=3D10 > self.components.canvas.fillColor=3D'red' > prev=3D() > while(not self.stopAnimation): > =20 > self.components.canvas.drawCircle((xco,yco),radius) > time.sleep(0.02) > self.components.canvas.clear(); > self.components.canvas.refresh(); > =20 > xco=3Dxco+xspeed > if(xco+radius>rightedge): > xco=3Drightedge-radius > xspeed=3D-xspeed*bounce > if(xco-radius<leftedge): > xco=3Dleftedge+radius > xspeed=3D-xspeed*bounce > yco=3Dyco+yspeed > if(yco+radius>bottomedge): > yco=3Dbottomedge-radius > yspeed=3D-yspeed*bounce > if(yco-radius<topedge): > yco=3Dtopedge+radius > yspeed=3Dyspeed*bounce > if((int(xco),int(yco))=3D=3Dprev): > break =20 > yspeed=3Dyspeed*drag+gravity > xspeed=3Dxspeed*drag > prev=3D(int(xco),int(yco)) > =20 > def on_stopBtn_mouseClick(self,event): > self.stopAnimation=3DTrue > self.components.startBtn.enabled=3DTrue =20 > =20 > if __name__ =3D=3D '__main__': > app =3D model.Application(MyBackground) > app.MainLoop() >=20 >=20 > [/code] >=20 > Thanks for any help. >=20 > Rohit >=20 >=20 > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration=20 > Strategies from IBM. Find simple to follow Roadmaps,=20 > straightforward articles, informative Webcasts and more! Get=20 > everything you need to get up to speed, fast.=20 > http://ads.osdn.com/?ad_idt77&alloc_id=16492&op=3Dick > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users >=20 >=20 |
From: Alex T. <al...@tw...> - 2005-07-16 13:39:06
|
Rohit wrote: >Hi, >I have started using Pythoncard recently, so this may seem trivial. I >was going through the samples which come with it and I found the >"gravity" sample, which animates a number of balls. >I also tried to do something similar to that, but just only for one >ball with one color. For this I used one button to start the >animation, another button to stop it and a canvas to draw the whole >sequence. In the animation sequence the program keeps on checking >whether a flag variable has been altered to stop the animation or not. >This flag variable was supposed to be altered by the stop animation >button, when a mouse click occured. But when I click the stop button >the animation keeps on running. I am including the code of my program. > > The problem is that your code runs continuously, so there is no opportunity for the click on the "stop" button to be processed, and so self.stopAnimation can't be set. This also means that you can't, for instance, move your window while the animation is running. Easiest fix is to add # give the user a chance to click Stop wx.SafeYield(self, True) inside your loop. This gives an opportunity for other things to happen. A better fix, IMO, is to use timers instead of a loop. You create a time in your initialization code, then when the start button is pressed, you start the timer. Each iteration of drawing is done within the timer handler, and the stop button simply stops the timer. See the 'flock' sample for an example of doing this. There are two reasons I say that this is better is: 1. You can more easily extend it to do more animations, perhaps at different time scales, by having multiple independent timers; the loop-with-yield mechanism is more restrictive. 2. You can do other things in the program while the timers continue to operate - if you do something else within the app during a loop+yield, the animation stops. For instance - I tested this out by creating a simple app with File/Help menus, and adding the buttons and canvas to it. I checked that, indeed, the stop button didn't work; then added the SafeYield() line, and now the stop button works immediately. Now, if I hit start and then the select File menu, the ball moves briefly then disappears while I keep the menu selected; once I release the menu, the ball continues its movement. But in the flock sample, the animation continues while the menu items are selected. -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.323 / Virus Database: 267.8.16/50 - Release Date: 15/07/2005 |