LinkedButton Example

John Slaats

Hi,

 

Does someone have a Linkbutton example?

I cannot figure out how to get this to work.

 

Thanks in advance.

 

kind regards,

John

Anders Olsson

Hi John,

The key properties are LinkedObject which is the type of object you are linking to (e.g. Business Partner) and LinkTo which is the UI object (e.g. TextEdit).

This example creates a TextEdit below Customer Ref No on the Sales Quotation form and adds a LinkedButton next to it. When you type something in the TextEdit, the LinkedButton will be visible.

(This is a customize rule triggered on the FormLoad event.)



string txtUID = SwissAddonFramework.Utils.UniqueStringGenerator.Next();
TextEdit txt = TextEdit.CreateNew(txtUID);
txt.SetPosition(130, 80);
txt.Width = 50;
pVal.Form.AddItem(txt);

LinkedButton lnk = LinkedButton.CreateNew(SwissAddonFramework.Utils.UniqueStringGenerator.Next());
lnk.LinkedObject = LinkedButton.ObjectType.BusinessPartner;
lnk.LinkTo = txtUID;
lnk.SetPosition(txt);
lnk.Left -= 70;
pVal.Form.AddItem(lnk);

pVal.Form.Update();

return true;




 

Regards,

Anders
0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post