forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Paint for %tt ?

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu May 11, 2017 4:33 pm    Post subject: Paint for %tt ? Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu May 11, 2017 5:18 pm    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu May 11, 2017 7:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu May 11, 2017 7:37 pm    Post subject: Reply with quote

Dan,

I'm about to shut down for the evening, but here is an example using %bb https://dl.dropboxusercontent.com/u/76596632/BB.png and here is one using %tb https://dl.dropboxusercontent.com/u/76596632/TB.png

Code is rather long.

Eddie

(2nd link corrected. E)


Last edited by LitusSaxonicum on Fri May 12, 2017 9:47 am; edited 3 times in total
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Thu May 11, 2017 7:42 pm    Post subject: Reply with quote

Ahh, ok, that looks good. Thanks, Eddie
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Fri May 12, 2017 12:14 am    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2813
Location: South Pole, Antarctica

PostPosted: Fri May 12, 2017 8:58 pm    Post subject: Reply with quote

You have made very nice toolbar of buttons, Eddie. Mine made almost two decades ago now look shamefully ugly Sad
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Thu May 18, 2017 7:03 am    Post subject: Reply with quote

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
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2388
Location: Yateley, Hants, UK

PostPosted: Thu May 18, 2017 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 1520
Location: Aerospace Valley

PostPosted: Fri May 19, 2017 6:57 pm    Post subject: Reply with quote

thanks for the run-down Eddie, sounds like youhad oodles of fun ! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group