kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #00689
Re: OK and Cancel and Apply buttons (was Re: Guides for dialogs creation.)
--0-876271097-1193990443=:66863 Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
"ka8bmt" wrote (in message 659):
=20
> While my name *is* in the book, on page XXXIV in
> "Acknowledgements" section, I get no commission. I
> didn't even get a free book. I paid for my copy, but
> you can download yours for free:
>=20
> http://www.phptr.com/content/images/0131473816/downloads/0131473816_book.=
pdf
>=20
> As my first, and apparently only, posting here was
> greeted so warmly, I'll crawl back under my rock now...
=20
Even though it's been a while since you posted that message, I'm still very=
grateful for you providing that URL. Before downloading a copy of that boo=
k, I had looked at the documentation provided with wxWidgets, and thus had =
"some" understanding of its capabilities and how to use it. However the boo=
k provides distinctly more information on various matters, and even though =
I haven't yet read it from cover to cover, it is still clear that the infor=
mation which it does provide is very useful to anyone who is using wxWidget=
s to develop applications.
=20
"ka8bmt" also (previously) wrote (in message 655):
=20
> May I humbly suggest that these sections of the wxBook be read before
> changes are done to standard related items, there has been a lot of
> research done such things:
>=20
> Page 538:
>=20
> "Refer to the section on 'Platform-Adaptive Layouts' in Chapter 7,
> 'Window Layout Using Sizers,' for information about the
> wxStdDialogButton Sizer class, which can be used to position standard
> buttons appropriately on each platform."
>=20
> See pages 203 and 204 for the code.
>=20
> Page 540:
>=20
> "Further Reading
>=20
> Listed below are useful guideline documents for the main platforms
> supported by wxWidgets, and books giving general advice on UI design."
=20
Thank you very much also for the tip on this matter; this is as good an exa=
mple as any of additional (and very useful) information which is provided i=
n this book, but which has not been provided with the documentation provide=
d with wxWidgets (or at least not as far as I am currently aware).
=20
With hindsight, it is not at all surprising that wxWidgets does provide sup=
port for automatically positioning buttons within different (OS) versions o=
f an application; after all, it is supposed to be able to support being abl=
e to run the same application under different OSes.
=20
I have recently committed some files which update a dialog box used within =
Pcbnew, and another dialog box of a similar nature used within GerbView. Bo=
th of those dialogs now use a wxStdDialogButton Sizer object to contain the=
ir "OK" and "Cancel" buttons, meaning that the (layout) sequence of those =
buttons now depends upon which (OS) version of KiCad is compiled and subseq=
uently used. (And no conditional statements are required within KiCad's sou=
rce code to accomplish that outcome.)
=20
Hence given enough time, I believe that all of the dialog boxes used within=
KiCad could be updated in a similar manner. (For the time being, I have pr=
imarily been concentrating on updating dialog boxes which have not used siz=
ers previously - but there are still assorted dialog boxes (which for the m=
ost part already use sizers) which also need attention for various other re=
asons, and which I will thus also work on as time permits.) It would be one=
thing to decide to not make the sequence of buttons OS version-dependant =
if to do so would require the provision of OS version-conditional code - bu=
t as wxWidgets actually does support this, I consider that that capability =
should be utilised.
Regards,
Geoff Harland.
=20=20=20=20=20=20
National Bingo Night. Play along for the chance to win $10,000 every week. =
Download your gamecard now at Yahoo!7 TV. http://au.blogs.yahoo.com/nationa=
l-bingo-night/
--0-876271097-1193990443=:66863 Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<html><head><style type=3D"text/css"><!-- DIV {margin:0px;} --></style></he=
ad><body><div style=3D"font-family:times new roman, new york, times, serif;=
font-size:12pt"><DIV>
<DIV>"ka8bmt" wrote (in message 659):</DIV>
<DIV> </DIV>
<DIV>> While my name *is* in the book, on page XXXIV in</DIV>
<DIV>> "Acknowledgements" section, I get no commission. I</DIV>
<DIV>> didn't even get a free book. I paid for my copy, but</D=
IV>
<DIV>> you can download yours for free:</DIV>
<DIV>> </DIV>
<DIV>> <A href=3D"http://www.phptr.com/content/images/0131473816/downloa=
ds/0131473816_book.pdf">http://www.phptr.com/content/images/0131473816/down=
loads/0131473816_book.pdf</A></DIV>
<DIV>> <BR>> As my first, and apparently only, posting here was</DIV>
<DIV>> greeted so warmly, I'll crawl back under my rock now...</DIV=
>
<DIV> </DIV>
<DIV>Even though it's been a while since you posted that message, I'm still=
very grateful for you providing that URL. Before downloading a copy of tha=
t book, I had looked at the documentation provided with wxWidgets, and thus=
had "some" understanding of its capabilities and how to use it. However&nb=
sp;the book provides distinctly more information on various matters, and ev=
en though I haven't yet read it from cover to cover, it is still clear=
that the information which it does provide is very useful to anyone who is=
using wxWidgets to develop applications.</DIV>
<DIV> </DIV>
<DIV>"ka8bmt" also (previously) wrote (in message 655):</DIV></DIV>
<DIV> </DIV>
<DIV>> May I humbly suggest that these sections of the wxBook be read be=
fore<BR>> changes are done to standard related items, there has been a l=
ot of<BR>> research done such things:<BR>> <BR>> Page 538:<BR>>=
<BR>> "Refer to the section on 'Platform-Adaptive Layouts' in Chapter 7=
,<BR>> 'Window Layout Using Sizers,' for information about the<BR>> w=
xStdDialogButton Sizer class, which can be used to position standard<BR>>=
; buttons appropriately on each platform."<BR>> <BR>> See pages 203 a=
nd 204 for the code.<BR>> <BR>> Page 540:<BR>> <BR>> "Further R=
eading<BR>> <BR>> Listed below are useful guideline documents for the=
main platforms<BR>> supported by wxWidgets, and books giving general ad=
vice on UI design."</DIV>
<DIV> </DIV>
<DIV>Thank you very much also for the tip on this matter; this is as good a=
n example as any of additional (and very useful) information=
which is provided in this book, but which has not been provided with the d=
ocumentation provided with wxWidgets (or at least not as far as I am curren=
tly aware).</DIV>
<DIV> </DIV>
<DIV>With hindsight, it is not at all surprising that wxWidgets does provid=
e support for automatically positioning buttons within different (OS) versi=
ons of an application; after all, it is supposed to be able to support=
being able to run the same application under different OSes.</DIV>
<DIV> </DIV>
<DIV>I have recently committed some files which update a dialog box us=
ed within Pcbnew, and another dialog box of a similar nature used with=
in GerbView. Both of those dialogs now use a wxStdDialogButton Sizer object=
to contain their "OK" and "Cancel" buttons, meaning that the (layout=
) sequence of those buttons now depends upon which (OS) version of KiCad is=
compiled and subsequently used. (And no conditional statements are require=
d within KiCad's source code to accomplish that outcome.)</DIV>
<DIV> </DIV>
<DIV>Hence given enough time, I believe that all of the dialog boxes used w=
ithin KiCad could be updated in a similar manner. (For the time being, I ha=
ve primarily been concentrating on updating dialog boxes which have not use=
d sizers previously - but there are still assorted dialog boxes (which=
for the most part already use sizers) which also need attention for variou=
s other reasons, and which I will thus also work on as time permits.) It wo=
uld be one thing to decide to not make the sequence of buttons OS version-d=
ependant if to do so would require the provision of OS version-condit=
ional code - but as wxWidgets actually does support this, I consider t=
hat that capability should be utilised.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV>Geoff Harland.</DIV>
<DIV> </DIV></div><br>
<hr size=3D1>
National Bingo Night. Play along for the chance to win $10,000 every week. =
<a href=3D"http://au.rd.yahoo.com/mail/taglines/default_all/bingo/*http://a=
u.blogs.yahoo.com/national-bingo-night/" target=3D_blank>Download your game=
card now at Yahoo!7 TV</a>.
</body></html> --0-876271097-1193990443=:66863--
Follow ups