← Back to team overview

kicad-developers team mailing list archive

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>&nbsp;</DIV>
<DIV>&gt; While my name *is* in the book, on page XXXIV in</DIV>
<DIV>&gt;&nbsp;"Acknowledgements" section, I get no commission. I</DIV>
<DIV>&gt;&nbsp;didn't&nbsp;even get a free book. I paid for my copy, but</D=
IV>
<DIV>&gt;&nbsp;you can download&nbsp;yours for free:</DIV>
<DIV>&gt; </DIV>
<DIV>&gt; <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>&gt; <BR>&gt; As my first, and apparently only, posting here was</DIV>
<DIV>&gt;&nbsp;greeted so warmly, I'll crawl back under my rock now...</DIV=
>
<DIV>&nbsp;</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&nbsp;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>&nbsp;</DIV>
<DIV>"ka8bmt" also (previously)&nbsp;wrote (in message 655):</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt; May I humbly suggest that these sections of the wxBook be read be=
fore<BR>&gt; changes are done to standard related items, there has been a l=
ot of<BR>&gt; research done such things:<BR>&gt; <BR>&gt; Page 538:<BR>&gt;=
<BR>&gt; "Refer to the section on 'Platform-Adaptive Layouts' in Chapter 7=
,<BR>&gt; 'Window Layout Using Sizers,' for information about the<BR>&gt; w=
xStdDialogButton Sizer class, which can be used to position standard<BR>&gt=
; buttons appropriately on each platform."<BR>&gt; <BR>&gt; See pages 203 a=
nd 204 for the code.<BR>&gt; <BR>&gt; Page 540:<BR>&gt; <BR>&gt; "Further R=
eading<BR>&gt; <BR>&gt; Listed below are useful guideline documents for the=
main platforms<BR>&gt; supported by wxWidgets, and books giving general ad=
vice on UI design."</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you very much also for the tip on this matter; this is as good a=
n&nbsp;example as any of&nbsp;additional (and very useful)&nbsp;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>&nbsp;</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&nbsp;support=
being able to run the same application under different OSes.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I have recently committed some&nbsp;files which update a dialog box us=
ed within Pcbnew, and another dialog box of a&nbsp;similar nature used with=
in GerbView. Both of those dialogs now use a wxStdDialogButton Sizer object=
to contain their &nbsp;"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>&nbsp;</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 -&nbsp;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&nbsp; if to do so would require the provision of OS version-condit=
ional code -&nbsp;but as wxWidgets actually does support this, I consider t=
hat that capability should be utilised.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Regards,</DIV>
<DIV>Geoff Harland.</DIV>
<DIV>&nbsp;</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