Can cmd buttons be resized with an autofit?
you can use one of the wizhook functions
Code:
dim s() as string
dim i as integer
dim Lft as long
Dim lh As Long
Dim lw As Long
'reset controls
for i=0 to 19
me("btn" & i).left=0
me("btn" & i).width=0
next i
WizHook.key = 51488399
s=split(myPath,"\")
Lft=0
for i =0 to ubound (s)-1
with me("btn" & i)
.caption=s(i)
.left=Lft
WizHook.TwipsFromFont .FontName, .FontSize, .FontWeight, .FontItalic, .FontUnderline, 0, s(i), 0, lh, lw
.width=lw 'may want adjust further for images and margins if used
lft=lft+.width
end with
next i