hi, I try to create at runtime UnimBitBtn with 64x64 icons.
A ) I defined in customSS that :
.custom64Glyph .x-icon-el {
width: 64px !important;
height: 64px !important;
}
B ) UnimBitBtn created at design time with Layout.cls=custom64glyph work perfectly
C) Same created at run time do not work.... you can see all my tests in code. see comented line // 'test here' in code.
UniSession.AddJS('Ext.suspendLayouts()'); // on suspend la mise en place de layout
for i := 0 to UniMainModule.SbModuleInfoList.Count-1 do
begin
AModuleInfo:=UniMainModule.SbModuleInfoList.GetModuleInfoByIndex(i) ;
if (AModuleInfo.GroupName=GroupId)or(GroupId='*') then
begin
AmBitBtn:=TUniMBitBtn.Create(Self) ;
AmBitBtn.Name:='UnimBitBtn'+AModuleInfo.FModuleId ;
// here I try to apply the cls .....
// test here : AmBitBtn.JSInterface.JSConfig('cls', ['custom64Glyh']);
// test here : AmBitBtn.JSInterface.JSCall('addCls', ['custom64Glyh']);
// test here : UniSession.AddJS(AmBitBtn.JSName + '.addCls(''custom64Glyh'');');
// test here : AmBitBtn.JSInterface.JSCall('addCls', ['custom64Glyh']);
// test here : Access_LayoutConfig(AmBitBtn.LayoutConfig).Cls:= 'custom64Glyh';
AmBitBtn.width:=120 ;
AmBitBtn.Height:=120 ;
AmBitBtn.Images:=UniImageListModule ;
AmBitBtn.Imageindex:=AModuleInfo.FIconIdx ;
AmBitBtn.iconAlign:=iaTop ;
AmBitBtn.HelpKeyword:=AModuleInfo.FModuleId ;
AmBitBtn.Tag:=AModuleInfo.FModuleTag ;
AmBitBtn.font.Size:=12 ;
AmBitBtn.Caption:=AModuleInfo.FContextName ;
AmBitBtn.Onclick:=UnimBitBtnModuleClick ;
AmBitBtn.Parent:=AParent ;
end;
end;
UniSession.AddJS('Ext.resumeLayouts(true)');
// test here aParent.JSInterface.JSCall('updateLayout', []);
please Help
Regards