Re: Simple button bars with a xTab
"Dimitris Keletsekis [email protected] [gui4cli]" <[email protected]> Mon, 1 Sep 2014 20:01:44 +0300
| Newsgroups | gmane.comp.windows.gui4cli |
|---|---|
| Message-ID | <CAHiKg1U46y_CpWKQGiQ1p9C4XCQoHSNit+1g7-oNVZjABfyLOg@mail.gmail.com> |
--001a11c1c5602af767050203f522 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Chris, You can hide the whole xtab with attr show hide. To hide a single tab from an xtab, I don't think is possible because the control is handled by windows. I just call the functions provided. See http://msdn.microsoft.com/en-us/library/ms749171(v=3Dvs.85).aspx It could probably be done using an "owner drawn" tab and ignoring the call to draw the given tab, but (a) that would leave an undrawn space and (b) its far too much work :) Dimitris On Sat, Aug 30, 2014 at 11:15 AM, [email protected] [gui4cli] < [email protected]> wrote: > > > Hi Dimitris, > > I use often use button bars with only text create by a large numer xButto= n > or xTextbox events. > These has to be all positioned individually which generates a lot of code= . > > I lately started to experiment with a single xTab for button bars with th= e > following code ... > > XTAB 40 505 1015 25 "dummy/Clear Script/Open Script/Save Script/Load > template/Tools/Help" buttons1 > use tab #this buttons1 > if $$tab.tab =3D 1; gosub #this clearScript; endif > if $$tab.tab =3D 2; gosub #this openScript; endif > tab goto 0 > tab show 0 > > With this, any clicked button triggers $$tab.tab but is immediately > released again and the dummy > button stays selected. Normally a tab is not triggered when it is already > selected but with this all > tabs (buttons) except the dummy triggers over and over again every time i= t > is pressed. > > Now my suggestion is to add the posibility to the xTab event for a hidden > tab if possible. > So lets say that the tab named "dummy" will not show up. > > One of the benefits of using a xTab is also that it can be easily > positioned as a whole bar of buttons > and resized with the resize attribute. When used with icons, I see it as > much more versatile option > than the xToolbar because you can use as many as you want and it can be > placed anywhere. > Even on other "real" tabs. > > Thanks in advance (if it's possible), > > Chris >=20=20 > --001a11c1c5602af767050203f522 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <head> <style type=3D"text/css"> <!-- /* start of attachment style */ .ygrp-photo-title{ clear: both; font-size: smaller; height: 15px; overflow: hidden; text-align: center; width: 75px; } div.ygrp-photo{ background-position: center; background-repeat: no-repeat; background-color: white; border: 1px solid black; height: 62px; width: 62px; } div.photo-title=20 a, div.photo-title a:active, div.photo-title a:hover, div.photo-title a:visited { text-decoration: none;=20 } div.attach-table div.attach-row { clear: both; } div.attach-table div.attach-row div { float: left; /* margin: 2px;*/ } p { clear: both; padding: 15px 0 3px 0; overflow: hidden; } div.ygrp-file { width: 30px; valign: middle; } div.attach-table div.attach-row div div a { text-decoration: none; } div.attach-table div.attach-row div div span { font-weight: normal; } div.ygrp-file-title { font-weight: bold; } /* end of attachment style */ --> </style> </head> <html> <head> <style type=3D"text/css"> <!-- #ygrp-mkp { border: 1px solid #d8d8d8; font-family: Arial; margin: 10px 0; padding: 0 10px; } #ygrp-mkp hr { border: 1px solid #d8d8d8; } #ygrp-mkp #hd { color: #628c2a; font-size: 85%; font-weight: 700; line-height: 122%; margin: 10px 0; } #ygrp-mkp #ads { margin-bottom: 10px; } #ygrp-mkp .ad { padding: 0 0; } #ygrp-mkp .ad p { margin: 0; } #ygrp-mkp .ad a { color: #0000ff; text-decoration: none; } --> </style> </head> <body> <!-- |**|begin egp html banner|**| --> <br><br> <!-- |**|end egp html banner|**| --> <div dir=3D"ltr">Hi Chris,<div><br></div><div>You can hide the whole xtab w= ith attr show hide.</div><div><br></div><div>To hide a single tab from an x= tab, I don't think is possible because the control is handled by window= s. I just call the functions provided. See=C2=A0<a href=3D"http://msdn.micr= osoft.com/en-us/library/ms749171(v=3Dvs.85).aspx">http://msdn.microsoft.com= /en-us/library/ms749171(v=3Dvs.85).aspx</a></div> <div><br></div><div>It could probably be done using an "owner drawn&qu= ot; tab and ignoring the call to draw the given tab, but (a) that would lea= ve an undrawn space and (b) its far too much work :)</div><div><br></div> <div>Dimitris</div><div><br></div><div><br></div></div><div class=3D"gmail_= extra"><br><br><div class=3D"gmail_quote">On Sat, Aug 30, 2014 at 11:15 AM,= <a href=3D"mailto:[email protected]">[email protected]</a> [gui4= cli] <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" targe= t=3D"_blank">[email protected]</a>></span> wrote:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex"> <u></u> =20 <div style=3D"background-color:#fff"> <span>=C2=A0</span> <div> <div> <div> =20=20=20=20=20=20 =20=20=20=20=20=20 <p>Hi Dimitris,<br><br>I use often use button bars with only text cre= ate by a large numer xButton or xTextbox events.<br>These has to be all pos= itioned individually which generates a lot of code.<br><br>I lately started= to experiment with a single xTab for button bars with the following code .= ..<br> <br>XTAB 40 505 1015 25 "dummy/Clear Script/Open Script/Save Script/Lo= ad template/Tools/Help" buttons1<br>=C2=A0 =C2=A0 use tab #this button= s1<br>=C2=A0=C2=A0=C2=A0 if $$tab.tab =3D 1; gosub #this clearScript; endi= f<br>=C2=A0 =C2=A0 if $$tab.tab =3D 2; gosub #this openScript; endif<br> =C2=A0=C2=A0=C2=A0 tab goto 0<br>=C2=A0=C2=A0=C2=A0 tab show 0<br><br>With = this, any clicked button triggers $$tab.tab but is immediately released aga= in and the dummy<br>button stays selected. Normally a tab is not triggered = when it is already selected but with this all<br> tabs (buttons) except the dummy triggers over and over again every time it = is pressed.<br><br>Now my suggestion is to add the posibility to the xTab e= vent for a hidden tab if possible.<br>So lets say that the tab named "= dummy" will not show up.<br> <br>One of the benefits of using a xTab is also that it can be easily posit= ioned as a whole bar of buttons<br>and resized with the resize attribute. W= hen used with icons, I see it as much more versatile option<br>=C2=A0than t= he xToolbar because you can use as many as you want and it can be placed an= ywhere.<br> Even on other "real" tabs.<br><br>Thanks in advance (if it's = possible),<br><br>Chris</p> </div> =20=20=20=20=20 =20=20=20=20 <div style=3D"color:#fff;min-height:0"></div> </div> =20=20 </blockquote></div><br></div> <!-- |**|begin egp html banner|**| --> <br> <br> <!-- |**|end egp html banner|**| --> <div width=3D"1" style=3D"color: white; clear: both;"/>__._,_.___</div> =20=20=20=20=20=20 =20=20 =20=20=20=20 <div id=3D"fromDMARC" style=3D"clear:both; margin-top: 10px;"> <hr style=3D"height:2px ; border-width:0; color:#E3E3E3; backgroun= d-color:#E3E3E3;"> Posted by: Dimitris Keletsekis <[email protected]> <= hr style=3D"height:2px ; border-width:0; color:#E3E3E3; background-color:#E= 3E3E3;"> </div> <!-- Start Recommendations --> <!-- End Recommendations --> <!-- |**|begin egp html banner|**| --> <img src=3D"http://geo.yahoo.com/serv?s=3D97476590/grpId=3D4299/grpspId= =3D1705007207/msgId=3D5973/stime=3D1409590905" width=3D"1" height=3D"1"> <b= r> <!-- |**|end egp html banner|**| --> =20=20 <!-- |**|begin egp html banner|**| --> <br> =20=20=20 =20=20=20=20=20 =20 <!-- |**|begin egp html banner|**| --> <div id=3D"ygrp-vital" style=3D"background-color: #f2f2f2; font-fam= ily: Verdana; font-size: 10px; margin-bottom: 10px; padding: 10px;"> <span id=3D"vithd" style=3D"font-weight: bold; color: #333; text-tr= ansform: uppercase; "><a href=3D"https://groups.yahoo.com/neo/groups/gui4cl= i/info;_ylc=3DX3oDMTJiOHRqcHBiBF9TAzk3MzU5NzE0BGdycElkAzQyOTkEZ3Jwc3BJZAMxN= zA1MDA3MjA3BHNlYwN2dGwEc2xrA3ZnaHAEc3RpbWUDMTQwOTU5MDkwNQ--" style=3D"text-= decoration: none;">Visit Your Group</a></span> <ul style=3D"list-style-type: none; margin: 0; padding: 0; display: in= line;"> </ul> </div> <div id=3D"ft" style=3D"font-family: Arial; font-size: 11px; margin-top: 5p= x; padding: 0 2px 0 0; clear: both;"> <a href=3D"https://groups.yahoo.com/neo;_ylc=3DX3oDMTJhNW1yNW5pBF9TAzk3ND= c2NTkwBGdycElkAzQyOTkEZ3Jwc3BJZAMxNzA1MDA3MjA3BHNlYwNmdHIEc2xrA2dmcARzdGltZ= QMxNDA5NTkwOTA1" style=3D"float: left;"><img src=3D"http://l.yimg.com/ru/st= atic/images/yg/img/email/new_logo/logo-groups-137x15.png" height=3D"15" wid= th=3D"137" alt=3D"Yahoo! Groups" style=3D"border: 0;"/></a> <div style=3D"color: #747575; float: right;"> • <a href=3D"https://i= nfo.yahoo.com/privacy/us/yahoo/groups/details.html" style=3D"text-decoratio= n: none;">Privacy</a> • <a href=3D"mailto:gui4cli-unsubscribe@yahoogro= ups.com?subject=3DUnsubscribe" style=3D"text-decoration: none;">Unsubscribe= </a> • <a href=3D"https://info.yahoo.com/legal/us/yahoo/utos/terms/" s= tyle=3D"text-decoration: none;">Terms of Use</a> </div> </div> <!-- |**|end egp html banner|**| --> </div> <!-- ygrp-msg --> =20=20=20 <br> <!-- |**|end egp html banner|**| --> <div style=3D"color: white; clear: both;"/>__,_._,___</div> </body> </html> --001a11c1c5602af767050203f522--