I'm creating custom anchor tabs dynamically, I have the below properties for a anchor tab.

    DocusignAPI_Util.Tab anchorTab = new DocusignAPI_Util.Tab();
    anchorTab.AnchorTabString = '_'+setting.AnchorTabString__c+ nameNum;
    anchorTab.tabType = 'Custom';
    anchorTab.tabLabel = setting.AnchorTabString__c+ nameNum;
    anchorTab.customTabType = setting.customTabType__c;
    anchorTab.CustomTabHeight = Integer.valueOf(setting.CustomTabHeight__c) ;
    anchorTab.CustomTabWidth = Integer.valueOf(setting.CustomTabWidth__c);
    anchorTab.CustomTabRequired = setting.CustomTabRequired__c;
    anchorTab.ignoreIfNotPresent = true; 
    anchorTab.valueObj = setting.value__c != null ? setting.Value__c : fieldWhiteSpaceLength;
    anchorTab.CustomTabLocked = false;
    anchorTab.CustomTabDisableAutoSize = true;
    return anchorTab;

According to the documentation (Documentation: Tab) "CustomTabWidth" should work if I say;

anchorTab.CustomTabWidth = 100;

This doesn't work as expected, any reason? am I missing something here?


As per the documentation;

It is the responsibility of the document author to provide sufficient whitespace to contain the potential width of the ultimate tab value.

Documentation link

Your code has to be changed as below.


anchorTab.valueObj = setting.value__c != null ? setting.Value__c : '         ';


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.