Jump to content

may a toolbar clip images of any dimensions?


grham
 Share

Recommended Posts

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...