i'm using delphi 2009 (updates 1, 2, 3, 4). i'm seeing something quite peculiar. the image on the button is not centered in the button when i have a large button with a large glyph! rather than being centered, the left part of the glyph starts at the center of the button.
a clue is that when i:
it seems as though there's an image width property i've failed to set or an imagelist not correctly configured. i've expected the glyph on a large button should be 32x32.
try the following:
you'll immediately see what i mean!
(source: xrw.bc.ca)
can anyone tell me why it looks that way?
i find it interesting that the ribbon demo app doesn't show this problem. i even tried the same image.
thank you!
object ActionManager1: TActionManager
ActionBars = <
item
Items = <
item
Action = Action1
Caption = '&Action1'
ImageIndex = 0
CommandProperties.ButtonSize = bsLarge
end>
ActionBar = RibbonGroup1
end>
LargeDisabledImages = img3232
LargeImages = img3232
Left = 376
Top = 184
StyleName = 'Ribbon - Luna'
object Action1: TAction
Caption = 'Action1'
ImageIndex = 0
end
end
object Ribbon1: TRibbon
Left = 0
Top = 0
Width = 693
Height = 147
ActionManager = ActionManager1
Caption = 'Ribbon1'
Tabs = <
item
Caption = 'RibbonPage1'
Page = RibbonPage1
end>
ExplicitLeft = 232
ExplicitTop = 80
ExplicitWidth = 0
DesignSize = (
693
147)
StyleName = 'Ribbon - Luna'
object RibbonPage1: TRibbonPage
Left = 0
Top = 54
Width = 692
Height = 93
Caption = 'RibbonPage1'
Index = 0
object RibbonGroup1: TRibbonGroup
Left = 4
Top = 3
Width = 54
Height = 86
ActionManager = ActionManager1
Caption = 'RibbonGroup1'
GroupIndex = 0
end
end
end
object img3232: TImageList
Height = 32
Width = 32
Left = 376
Top = 256
end
the problem was that the related TActionClients object (find it in the Structure view) somehow (by default?) gets SmallIcons=true...leading to incorrect positioning of the glyph. changed it in the object inspector & it works now.