解决com加载项wps左侧栏打开显示宽度不足异常
在左侧栏打开时,会发现excel打开后左侧栏宽度显示正常,但是在wps下却宽度较窄。问题在于调用左侧栏设置宽度与现实的顺序有差异:
兼容核心代码如下:
if (PublicExcelCommon::IsExcel())
{
panel->put_Width(ctpWidth);
panel->put_Visible(VARIANT_TRUE);
leftCustomPanel->AdjustLeftPanel();
}
else
{
panel->put_Visible(VARIANT_TRUE);
panel->put_Width(ctpWidth);
leftCustomPanel->AdjustLeftPanel();
}