cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to select and copy the text of a static text control with the mouse pointer?

Former Member
0 Kudos

Hi,

Is it possible to select and copy the text of a static text control with the mouse pointer?

I have power builder 8.0.

The static text control is visible, enabled and with a tab order, but I can't select the text to make a copy and paste in other document.

Thank you in advance.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thank you very much to everybody.

I will try with your suggestions.

Thanks!

Former Member
0 Kudos

Put a tiny little button right next to it (use a clipboard icon).  In the clicked event of that button, get the statictext.text value and copy it to the clipboard...

-P-

Former Member
0 Kudos

No it is not possible. One workaround is to use single line edit control to mimick the look of the static text control and set it as display only. One problem though if you want it in the datawindow as you cannot insert SLE in datawindows. So it's not possible there.

Former Member
0 Kudos

Hi Josep;

  A standard SLE should be able to allow text selection & copying via its normal behaviour. The only things preventing that could be:

1) Disabled

2) Tab Order = 0

3) Code in the "Other" event preventing this.

4) Code in the MouseMove event preventing this.

5) A menu with short cuts enabled that prevent the mouse's RHMB to work.

6) The control has been placed into "Drag" mode either by code or the DragAuto setting = true.

7) There is a transparent control floating over top of the SLE.

😎 There is code somewhere that  disables the SLE.

9) your not looking at the same control in the Window Painter vs was is instantiated at runtime.

10) The SLE is somehow running in the background.

HTH

Regards ... Chris

nayf
Participant
0 Kudos

Except Josep is talking about a static text control, not a single line edit.


As far as I know, you cannot select the text of a static text control. The SelectText powerscript function doesn't exist for static text controls so I don't even think you could 'roll your own' easily. Sorry ... I know that doesn't help much


If you want to display uneditable text that can be selected, you could use a datawindow with a single column for the text to display and set that as display only. Maybe not ideal but could work