[ wxwindows-Patches-1723700 ] support for creating progress dlg
without showing
SourceForge.net
noreply at sourceforge.net
Sat Jun 2 15:24:03 PDT 2007
Patches item #1723700, was opened at 2007-05-22 20:38
Message generated for change (Comment added) made by vadz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1723700&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Pending
Resolution: None
>Priority: 4
Private: No
Submitted By: Guru Kathiresan (gururamnath)
Assigned to: Nobody/Anonymous (nobody)
Summary: support for creating progress dlg without showing
Initial Comment:
The Init code of the ProgressDialog shows the window when it is constructed. This is hard to use in component based designer. I have created a patch that can hide the window on start up.
----------------------------------------------------------------------
>Comment By: Vadim Zeitlin (vadz)
Date: 2007-06-03 00:24
Message:
Logged In: YES
user_id=71618
Originator: NO
I think we should have a ctor (and a matching Create) like this:
wxProgressDialog(wxWindow *parent, wxWindowID id, const wxString& title,
const wxString& message, int maximum = 100, int style = ...);
TIA!
----------------------------------------------------------------------
Comment By: Guru Kathiresan (gururamnath)
Date: 2007-05-24 22:12
Message:
Logged In: YES
user_id=677339
Originator: YES
If I have to create a new ctor, do u want me to add a extra parameter.
Please let me know, I'll prepare a patch accordingly.
Thanks,
Guru Kathiresan
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2007-05-24 20:30
Message:
Logged In: YES
user_id=71618
Originator: NO
Sorry for not making it clear, I did look at the patch. As I said in my
first reply, I didn't like this special flag because it's inconsistent with
the rest of the API. The fact that changing the existing ctor to not show
the dialog by default is unacceptable doesn't mean that adding a flag is a
good idea (even if it's "acceptable").
Adding new ctors + Create() isn't perfect neither (we're going to have 2
ctors with different behaviours) but it's the best solution I can see. Any
better ideas are [still] welcome.
----------------------------------------------------------------------
Comment By: Guru Kathiresan (gururamnath)
Date: 2007-05-24 20:22
Message:
Logged In: YES
user_id=677339
Originator: YES
Hi Vadim,
In the patch I have sent you, I have added a new flag that can used with
the existing flag. Please have a look at the patch.
Thanks,
Guru Kathiresan
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2007-05-24 20:15
Message:
Logged In: YES
user_id=71618
Originator: NO
No, this would silently (i.e. without any compiler errors or warnings)
break the existing code so it's not acceptable. If we want to have the
dialog initially hidden we must have another ctor (or add a flag or another
ctor parameter but both of these solutions would be inconsistent with the
rest of wx API).
----------------------------------------------------------------------
Comment By: Guru Kathiresan (gururamnath)
Date: 2007-05-24 19:50
Message:
Logged In: YES
user_id=677339
Originator: YES
Hi Vadim,
I know the proposed patch is not a good solution. I created that only to
make sure the code remains backward compatible. Instead of creating a new
ctor/create function we can simply remove the Show call in the constructor
and make the users call the Show function at their will. Do you think this
can be a potential solution ?
Please do let me know.
Thanks,
Guru Kathiresan
----------------------------------------------------------------------
Comment By: Vadim Zeitlin (vadz)
Date: 2007-05-24 01:53
Message:
Logged In: YES
user_id=71618
Originator: NO
I agree we have a problem here but I don't think it's a good way to solve
it. We don't have special styles for initially showing/hiding the windows
for the other classes, so why do it for this one?
I also notice that we don't have the usual default ctor/ctor/Create() for
wxProgressDialog but just the non default ctor which shows it
unconditionally. Maybe it would be better to add the default ctor + another
ctor/Create taking the parameter in more usual order (parent, id, title,
...) and not showing the dialog by default? If you disagree or have any
other ideas, please let's discuss them on wx-dev. Thanks!
----------------------------------------------------------------------
Comment By: Guru Kathiresan (gururamnath)
Date: 2007-05-22 20:39
Message:
Logged In: YES
user_id=677339
Originator: YES
File Added: progdlg_h.patch
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1723700&group_id=9863
More information about the wx-dev
mailing list