AutoHotkey Community

It is currently May 27th, 2012, 12:29 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: August 25th, 2009, 11:18 am 
Offline

Joined: February 11th, 2007, 4:10 pm
Posts: 185
I copy this word nodivder from your doc. So it's your fault :lol:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 27th, 2009, 7:15 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
I just got a chance to download and do a preliminary test of v2.2. It seems to do the trick. Thanks. 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 12:45 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Minor bug (I think). The values for the width and height parameters of the Toolbar_SetButtonSize function appear to be transposed when used as values for the TB_SETBUTTONSIZE message. Toolbar_SetButtonSize(hToolbar,100,30) will give you very tall buttons instead of the expected very wide buttons. Toolbar_SetButtonSize(hToolbar,30,100) will give you very wide buttons.

Thank you for your consideration.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 10:22 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
** v 2.21 **

! SetButtonSize bug fixed
+ SetDrawTextFlags added.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 29th, 2009, 12:20 pm 
Offline
User avatar

Joined: May 5th, 2007, 7:24 pm
Posts: 1240
Location: Seville, Spain
Thanks, maybe this new release fixes my Win98 problem :)

_________________
fincs
Highly recommended: AutoHotkey_L (see why) (all my code snippets require it)
Formal request to polyethene - I support the unity of the AutoHotkey community
Get SciTE4AutoHotkey v3.0.00 (Release Candidate)
[My project list]


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 11:25 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Fat toolbar phenomenon.

Using the DropDown button style on any of the active toolbar buttons adds an additional 8 pixels of height to the entire toolbar. I've tried every trick in the book but there doesn't appear to be any way to get rid of the additional height until all buttons with the DropDown button style are removed from the list of active buttons. To see an example of this idiosyncrasy, just add the DropDown button style to one or more buttons on any of the examples that come with the Toolbar library. Depending on the script, you might need to add the Border style to the toolbar to see that height has increased.

8 pixels is not a huge deal but it makes the entire toolbar look fat. I looked a few utilities that I have that use a toolbar with dropdown buttons and none of them have this fat toolbar problem.

Thank you for your consideration. Any help would be appreciated.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 1:09 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
deleted

_________________
Image


Last edited by majkinetor on December 11th, 2009, 1:34 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 1:26 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
majkinetor wrote:
Using SetButtonSize will remove the additional height but that function doesn't work with toolbars that have LIST style.

Tried it. No good. My toolbar uses the LIST style.

majkinetor wrote:
You could also try to remove it by specifying position and size of the toolbar manually by using last parameter of Add function.

This might work initially buy my toolbar is using multiple ILs with different icon sizes so the problem would show up any time changes to toolbar were made. I'll give a try/see anyway to see what happens.

majkinetor wrote:
TBH, I don't know why it happens, the same as I don't know why additional height is side effect of adding splitters.

I guess we're in the same boat. Thanks for taking a look at it. If you think of anything, make a noise.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 1:34 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Found the problem.

Code:
Toolbar_Insert(hCtrl, Btns, Pos=""){
   static TB_INSERTA = 0x414, TB_INSERTBUTTONA=0x415

   cnt := Toolbar_compileButtons(hCtrl, Btns, cBTN)
   if Pos =
      SendMessage, TB_INSERTA, cnt, cBTN ,, ahk_id %hCtrl%
   else loop, %cnt%
      SendMessage, TB_INSERTBUTTONA, Pos+A_Index-2, cBTN + 20*(A_Index-1) ,, ahk_id %hCtrl%

   Toolbar_mfree(cBTN)

   ;for some reason, you need to call this 2 times for proper results in some scenarios .... !?
   SendMessage,0x421,,,,ahk_id %hCtrl%   ;autosize
    SendMessage,0x421,,,,ahk_id %hCtrl%   ;autosize

}


Comment autosize messages and it might be OK.
But, I don't know what scenarios I am refering here.... *** makes mental note to describe things more in the code ***

This doesn't solve the issue of invalid toolbar size with separators tho.

I actually used autosize messages on different places . Perhaps all should be removed with this problem in light. Search for 0x421 messages and remove them all except from AutoSize function.


EDIT:
Actually, after I removed AS messages, many samples didn't render correctly even _Simple.ahk. Will see more about it but this must be the problem ....

EDIT2
Actually, removing AS messages seems to do nothing about button size :D

In _Test.ahk something strange happens. Initially everything looks OK but GetButtonSize returns that height is 75 instead 67. Then when I add another button, it starts to show how it rly looks like and function still returns 75.

_________________
Image


Last edited by majkinetor on December 11th, 2009, 2:26 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2009, 2:23 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
*** Version 2.31 ***

+ Added GetButtonSize
* Removed AutoSize messages in SetButtonWidth, SetButtonSize, SetMaxTextRows
+ Added AutoSize & GetButtonSize in _Test.ahk
+ Added CheckButton
+ Small docs and structure fixes


2jballi
I made some small changes and added new buttons in _Test.ahk that are needed to troubleshoot fat toolbar problem. I also removed AS messages from some places that might undo the changes. This might show some stuff that are unusual. For instance, if you do GetButtonSize and then SetButtonSize asap, nothing changes. However if you change only height part in what GBS returned, and use SBS to set it, both width & height will change.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2009, 1:51 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Thanks for the update. :) This will keep me busy for a while.

majkinetor wrote:
EDIT2
Actually, removing AS messages seems to do nothing about button size :D

Right. Adding the DropDown button style appears to increase the minimum height of the (all?) button(s) on the toolbar. You can make the toolbar buttons bigger but you can't make them smaller than the minimum size.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2009, 1:33 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Did you try TB_SETMETRICS maybe to fix the visuals ?

Anyway, I kinda successfully restore what apperas to be normal if I use SetButtonSize after I add dropdown button and AutoSize afterwards.

1. Open _Test.ahk and press GBS. I get 59,75
2. Enter 60 and press SBS, then Autosize.
3. GBS now returns 66,68. Its little wider but not that fat :)

Interestingly, if you now use SetButtonWidth and use 60, it will restore height to 75....

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2009, 3:33 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
majkinetor wrote:
Did you try TB_SETMETRICS maybe to fix the visuals ?

My initial tests indicate that the TB_SETMETRICS message might provide some value but it might require some extra code because you can only remove button padding when at least one dropdown button is showing on the toolbar. If no dropdown buttons are showing, removing extra padding makes the buttons look very odd. I also discovered that you can't use the message any time. It can only be used after the toolbar has been created but before the image list has been assigned and/or before the buttons have been added. I'm not exactly what the sequence is yet.

Thanks for the tip. I'll see if it pans out.

Edit 20091213_2334: So far, so good. I'm doing it before I set/reset an IL to toolbar. I don't know where else it will work.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 2nd, 2010, 11:38 pm 
Offline
User avatar

Joined: July 17th, 2008, 12:58 am
Posts: 270
many thanks for this...its great! :D

_________________
QuickSubs | Popcorn Movie Db
All my scripts are just in AutoHotkey v1.0.48.05


Report this post
Top
 Profile  
Reply with quote  
 Post subject: unicode
PostPosted: June 7th, 2010, 12:29 am 
Offline

Joined: December 17th, 2007, 6:39 pm
Posts: 235
Location: Galati, Romania
Don't know if someone saw that, but in AutohotkeyU, only the first letter of the toolbar caption is shown. How to fix this?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 70 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Cristi®, Google Feedfetcher, tidbit and 54 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group