Page 1 of 1

Border editing dropdownlist (toolbar property of an annotation)

Posted: Tue Jul 10, 2018 1:51 pm
by Audros
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

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Tue Jul 10, 2018 4:03 pm
by Tracker Supp-Stefan
Hello Audros,

Are you using the Editor SDK?
As you've posted in the end user section of the forums, and our devs do not monitor or reply to topics here.
So please let us know and we will move it in the correct forum so that it can be properly answered!

Regards,
Stefan

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Tue Jul 10, 2018 4:48 pm
by Audros
Hello Sir,
Yes we are using PDF Editor Sdk, thank you , and we are still waiting for your answer.

Best Regards

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Tue Jul 10, 2018 5:55 pm
by TrackerSupp-Daniel
Hello Audros,
I apologize but as you have been told before, our developers try to answer at least once each day, thus please be patient, you will receive aid in time. Ensuring you post in the correct forum will see you with a response more rapidly. As neither myself, nor Stefan are developers ourselves we are unable to assist directly.

I have moved this topic to the appropriate Editor SDK forums for you, in the future, please ensure you post any Editor SDK questions here to ensure that our support developers can assist you directly.

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Wed Jul 11, 2018 6:57 am
by Sasha - Tracker Dev Team
Hello Audros,

You will have to get the IUIX_Edit https://sdkhelp.pdf-xchange.com/vi ... Combo_Edit and then set the IUIX_Edit::ReadOnly property to true.

Cheers,
Alex

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Wed Jul 11, 2018 9:30 am
by Audros
Hello,
thanks, but i tried this and its generate exception:
the code is:

ctl = (PDFXEdit.IUIX_Combo)System.Runtime.InteropServices.Marshal.GetObjectForIUnknown(outPtr);
((IUIX_Edit)ctl.Edit).ReadOnly = true;

i placed it in OnEventMonitor function
Best Regards.

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Wed Jul 11, 2018 9:34 am
by Sasha - Tracker Dev Team
Hello Audros,

Can you please write the casts in the separate lines with creating of variables, try again and point out the line of code with the exception again

Cheers,
Alex

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Wed Jul 11, 2018 9:47 am
by Audros
Hello,
Thanks a lot, it's Ok.
Best Regards

Re: Border editing dropdownlist (toolbar property of an annotation)

Posted: Wed Jul 11, 2018 9:56 am
by Tracker Supp-Stefan
Glad to hear that Audros!

Cheers,
Stefan