cancel
Showing results for 
Search instead for 
Did you mean: 

UI: Extended Text Box

Former Member
0 Kudos

Hi everyone, I have an issue trying to recreate a standard functionality of SAP Business One.

When using the <b>Query Generator</b> in SAP Business One there's a functionality which allows the user to change the position of the cursor to any place on the <b>extended text box</b> and double click any field from any table.

SAP Business One automatically detects the position of the cursor and inserts the field double clicked, concatenating the string between the text.

So, basically how can we use that functionality in an extended text box generated by UI API?

We're developing some dinamic formulas and we want to deploy an extended text box which allows our user to double click some formulas and concatenate it to the rest of the extended text box where the whole formula exsists.

Thank you for any kind of support or suggestion

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello

If I understand you currectly, you are interested to have the same fuctionality SAP Business One has in the query generator. You want to catch the double click event on a field and concatenate it's content into an extended edit text.

This functionality isn't supplied with the UI API but you can implement it with the UI API.

You have to do the following:

1) Add an extended edit text to your form.

2) Catch the et_DOUBLE_CLICK event on the items you are interested to copy their content.

3) Inside the event you caugt concatenate the string into the extended edit text.

The following code shows how to approach to the extended edit text string:

Dim ExtEdit As SAPbouiCOM.EditText

Set ExtEditFrm = m_App.Forms.Item(FormUID)

Set oItem = ExtEditFrm.Items.Item("ExtEdit")

Set ExtEdit = oItem.Specific

ExtEdit.String = "Your string"

Please inform me if I missed your question.

Best Regards

Miki.

Former Member
0 Kudos

One more thinkg...

The following code is used for adding extended edit text to your form:

Set oItem = oForm.Items.Add("ExtEdit", it_EXTEDIT)

Former Member
0 Kudos

Thanks Miki

Actually that's part of the solution we're seeking but how do i get the positon of the cursor?

Because we want to concatenate between strings, i mean we also want to insert a string depending on the position of the cursor.

In the Query Generator, when you move the cursor and double click an item, SBO inserts the string at the position of the cursor.

How can i get that position of the cursor so i could know the exact position where i should insert the string?

Thanks again for the help

Former Member
0 Kudos

Hello Luis Ivan.

I have the same problem, in my Addon i did a solution using the clipboard but the clipboard form .NET threw many exceptions an now i have the same issue.

i wanted to know if you solved the problem and can tell me how to do that.

thanks for your help.

Former Member
0 Kudos

Hello Miki.

i want to know if there is a posibility of capture the cursor position in a edittext of SBO.

Answers (0)