Border editing dropdownlist (toolbar property of an annotation)
Posted: Tue Jul 10, 2018 1:51 pm
Hello,
Please we have a question about the border editing dropdownlist (toolbar property of an annotation), we could customize it so that it only displays the first 4 elements, but we could'nt find how to make the dropdownlist entry box read-only.
Can you help us? you find here the source code we used:
IUIX_CmdItem cmdBw = frm.cmbari.FindFirstItemByCmdName("cmd.borderWidth");
if ((cmdBw != null) && (cmdBw.Cmd != null))
{
IntPtr outPtr;
PDFXEdit.IUIX_Combo ctl = null;
cmdBw.Ctl.QueryImpl(typeof(PDFXEdit.IUIX_Combo).GUID, null, out outPtr);
ctl = (PDFXEdit.IUIX_Combo)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
ctl.CueText = "Simple";
if (ctl.Count - 1 > 4)//27/06
{
List<int> lI = new List<int>();
for (int i = ctl.Count - 1; i > 4; i--)
{
if (i == 5)
{//lI.Add(0);
//((PDFXEdit.IUIX_Combo)ctl).RemoveItem(0);
lI.Add(i);
lI.Add(0);
i--;
break;
}
lI.Add(i);
// ((PDFXEdit.IUIX_Combo)ctl).RemoveItem(i);
}
for (int j = 0; j < lI.Count; j++)
{
((PDFXEdit.IUIX_Combo)ctl).RemoveItem(lI[j]);
}
}
}
Best regards
Please we have a question about the border editing dropdownlist (toolbar property of an annotation), we could customize it so that it only displays the first 4 elements, but we could'nt find how to make the dropdownlist entry box read-only.
Can you help us? you find here the source code we used:
IUIX_CmdItem cmdBw = frm.cmbari.FindFirstItemByCmdName("cmd.borderWidth");
if ((cmdBw != null) && (cmdBw.Cmd != null))
{
IntPtr outPtr;
PDFXEdit.IUIX_Combo ctl = null;
cmdBw.Ctl.QueryImpl(typeof(PDFXEdit.IUIX_Combo).GUID, null, out outPtr);
ctl = (PDFXEdit.IUIX_Combo)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
ctl.CueText = "Simple";
if (ctl.Count - 1 > 4)//27/06
{
List<int> lI = new List<int>();
for (int i = ctl.Count - 1; i > 4; i--)
{
if (i == 5)
{//lI.Add(0);
//((PDFXEdit.IUIX_Combo)ctl).RemoveItem(0);
lI.Add(i);
lI.Add(0);
i--;
break;
}
lI.Add(i);
// ((PDFXEdit.IUIX_Combo)ctl).RemoveItem(i);
}
for (int j = 0; j < lI.Count; j++)
{
((PDFXEdit.IUIX_Combo)ctl).RemoveItem(lI[j]);
}
}
}
Best regards