View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2815 Location: South Pole, Antarctica
|
Posted: Thu May 11, 2017 4:33 pm Post subject: Paint for %tt ? |
|
|
If there is a lot of buttons on the page (38 on one of my pages) the narrow buttons like %tt are more preferable then %bt. Can they be painted some way similarly to %bc for %bt? |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu May 11, 2017 5:18 pm Post subject: |
|
|
Dan,
You may like %bb. Or you can use %ib or %tb with help bubbles to convey textual info (you get it with %ib if you choose to). %tt tend to all be the same width if I remember, %bb enlarge in steps that are bigger than for %bt.
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2815 Location: South Pole, Antarctica
|
Posted: Thu May 11, 2017 7:22 pm Post subject: |
|
|
Eddie,
Can you post an image or demo code? I used %ib ones but it is even thicker/taller then %bt because it prints the text under required graphics button image |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2815 Location: South Pole, Antarctica
|
Posted: Thu May 11, 2017 7:42 pm Post subject: |
|
|
Ahh, ok, that looks good. Thanks, Eddie |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Fri May 12, 2017 12:14 am Post subject: |
|
|
Sorry Dan, I was rushing out to a meeting - the second link is/was wrong (now corrected). In the first link, using %bb, the option to keep the icons coloured even when the buttons are greyed out (as they are in the clip) has been used, otherwise they go into a grey blob. They do this with %ib too unless you know the tricks.
The second link is properly here: https://dl.dropboxusercontent.com/u/76596632/TB.png
This uses %tb icons. The text comes up when you mouse over the buttons. There's a lot of big tricks in the two toolbars, mainly to make them work with non-100% dpi settings. I haven't got round to windows 10 style buttons yet, and as shown, a lot of the icons/buttons are greyed out at the start (as shown).
Eddie |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2815 Location: South Pole, Antarctica
|
Posted: Fri May 12, 2017 8:58 pm Post subject: |
|
|
You have made very nice toolbar of buttons, Eddie. Mine made almost two decades ago now look shamefully ugly |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Thu May 18, 2017 7:03 am Post subject: |
|
|
Eddie,
I'll add my congratulations too on obtaining such a professional result.
Without the 'big tricks' what actually happens to the buttons then when a non-100% dpi setting is used ? |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Thu May 18, 2017 11:11 pm Post subject: |
|
|
John,
That particular toolbar has a Windows 7 look and was developed as more grey than the silver (sorry!) Windows XP look. The buttons are drawn in Paint including the background and use %tb. With %tb you have to draw all the states.
When drawing the toolbar (developed under XP initially), non-100%dpi settings 'large fonts' caused an irregular spacing of the buttons sometimes with no gap sometimes with several pixels. I resolved this by having a bitmap that represents the whole toolbar set like this:
Code: | i=WINIO@('%ap%bm[TB'//Bar//']%bm[TBBLANK'//Bar//']&',0,0) |
so I can splice in the option for the two toolbar styles with //BAR//. The bitmap, despite being specified AFTER the buttons is drawn under them! The irregular gaps are still there, but you can't see them. Paul changed the text positioning while I was developing this and I had originally got the text in a 'cartouche'. Eventually, he reinstated 'no extra space' but by then I had developed a background bitmap for 100 125 and 150 dpi with the shape that accommodated it and I preferred it.
The toolbars are fixed. I developed moveable toolbars by drawing the icons and handling everything toolbars included in a big %gr area, but it makes the %gr callback incredibly complicated, and the application was no easier to use with movable toolbars than with fixed ones. However, I was able to get the icons to respond as the mouse pointer moved over them which has never been implemented for %tb.
Mouse over sensitivity has been implemented for %ib in CW+, and this app has optional selection of toolbars with all four %ib options, but that makes it look appallingly dated. You need %tb to have the Windows 8/10 flat style so %tb is not obsolete - sadly, %ib is. Not only that, but it is fantastically difficult to use %ib icons that are greyed out but still look good.
I'm in the throes of drawing flat icons for a Win 10 style toolbar, but the visual tricks to get the icons small don't work in flat mode!
Incidentally the %th delays need to be different for different versions of Windows, and the system font changes so I standardised on Segoe UI which is installed in early Windows versions if required and this is simpler than working out the sizes version by version.
Eddie |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Fri May 19, 2017 6:57 pm Post subject: |
|
|
thanks for the run-down Eddie, sounds like youhad oodles of fun ! |
|
Back to top |
|
|
|