Sign in to follow this  
Followers 0
grham

may a toolbar clip images of any dimensions?

3 posts in this topic

#1 ·  Posted (edited)

Hello,

have you tried make a "simple" toolbar (with 3.2.10) with your proper

bmp's?

I don't find out where there might be a restriction,

but a bmp of any resolution and dimensions get cropped (right + bottom)

on a toolbar button. I have tried to set the size of the buttons, the size of the bitmaps

and set it as autosize. Setting the button size seems not having an effect on it (?).

For example:

Just make a small red bmp, (ex.: 24 x 22 pixels, res: 72 ppp) with black borders and

save it with 16 bits depth

Func _TypoPalette_Create()
    
    $Palette_GUI = GUICreate("Paleta", 200, 100, -1, -1)
    GUISetBkColor(0xa2a2a2, $Palette_GUI)
;WinSetOnTop($Palette_GUI, "", 1)
    
;$hReBar = _GUICtrlReBar_Create($Palette_GUI, BitOR($CCS_TOP, $WS_BORDER, $RBS_VARHEIGHT, $RBS_BANDBORDERS))
    $Typo_Toolbar = _GUICtrlToolbar_Create ($Palette_GUI);, $BTNS_AUTOSIZE)
     _GUICtrlToolbar_AddButtonSep($Typo_Toolbar)
    
;_GUICtrlToolbar_SetButtonWidth($Typo_Toolbar, 30, 32)
;_GUICtrlToolbar_SetButtonSize($Typo_Toolbar, 36, 38)
    _GUICtrlToolbar_SetBitmapSize($Typo_Toolbar, 48, 46)
    
    $Image1 = _GUICtrlToolbar_LoadBitmap($Typo_Toolbar, @ScriptDir & "\Res\Negrita.bmp")
    $Image2 = _GUICtrlToolbar_LoadBitmap($Typo_Toolbar, @ScriptDir & "\Res\proba.bmp")
    
    _GUICtrlToolbar_AddButton ($Typo_Toolbar, $idNegr, 0, 0, $BTNS_CHECK)
    _GUICtrlToolbar_AddButton ($Typo_Toolbar, $idCurs, 1, 0, $BTNS_CHECK)
    
    GUISetState()
EndFunc

If you need more, I will put it.

???

:)

Edited by grham

Share this post


Link to post
Share on other sites



Try using an image list with the buttons instead of directly loading the images.

Also look at the examples in the 3.2.11.1


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Thanks!

It works with an image list.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0