Opened 5 years ago

Closed 4 years ago

#14945 closed enhancement (fixed)

Read only wxLongStringProperty

Reported by: arunmozhi_v Owned by: VZ
Priority: low Milestone:
Component: wxPropertyGrid Version: dev-latest
Keywords: wxLongStringProperty editor Cc:
Blocked By: Blocking:
Patch: yes


If the wxLongStringProperty is set to readonly, the property button is disabled. This makes it impossible to view the very long string. It is better if the editor dialog is still displayable and the text control in the dialog is set read only. Tested on windows.

Attachments (1)

Enable-pop-up-editor-in-read-only-mode.patch download (2.9 KB) - added by awi 4 years ago.
Enable dialog editor in read-only mode.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by vadz

  • Priority changed from normal to low

Can this be already reproduced in the propgrid sample or could you please make a small patch making it possible to see the problem there?

In any case, I guess showing an editor for a readonly property is going to require quite a few changes to the code so probably won't be easy to do. Maybe we could show the full string in some other way, e.g. in a tooltip?

comment:2 Changed 5 years ago by arunmozhi_v

propgrid sample can be used to reproduce the problem. In the 'Examples' page, there is a property labelled 'MultiChoiceProperty' which can be made read only by clicking the menu Basic->'Set as Read-Only'. Note: It is not becoming readonly immediately, but just click on some other property and then back to this property (another issue?). Now the editor dialog button is disabled.

Tooltip is not a good option because it does not allow one to copy the data.

comment:3 Changed 5 years ago by arunmozhi_v

A correction. I meant 'LongStringProperty' in 'Examples' page.

comment:4 Changed 4 years ago by awi

  • Keywords wxLongStringProperty editor added
  • Patch set
  • Version changed from 2.9.4 to dev-latest

Patch enabling dialog editor and property button for wxLongStringProperty also in read-only mode is attached (attachment:ticket:14945:Enable-pop-up-editor-in-read-only-mode.patch).
Dialog editor is opened in the same mode as mode assigned to the property - if property is read-only then dialog editor is launched in the read-only mode.
Property button is always enabled for wxLongStringProperty (special flag is used for this purpose).

It is also mentioned in the note (comment:2) that when the property mode is changed (e.g. to read-only) then this change is not reflected immediatelly in the selected property. I can confim this issue but it seems to be more general (not related to wxLongStringProperty only) and serious problem worth creating separate ticket.

Changed 4 years ago by awi

Enable dialog editor in read-only mode.

comment:5 Changed 4 years ago by vadz

Thanks for the patch! I'll apply it (to the trunk only or do you think it should be applied to 3.0 as well?), but I wonder if the UI could be somehow improved to show that the dialog is read-only, as right now there is no indication that the cell can't be edited in it...

Also, I still like the idea of showing the long string values in a tooltip, this is IMHO quite useful to see their values quickly.

comment:6 Changed 4 years ago by VZ

  • Owner set to VZ
  • Resolution set to fixed
  • Status changed from new to closed

In 76631:

Allow viewing read-only long string wxPropertyGrid properties values.

When wxLongStringProperty is read-only, it should still be possible to view
its value by opening the dialog normally used for editing it, otherwise this
value cannot be seen (nor copied, which is also useful sometimes) at all.

Closes #14945.

Note: See TracTickets for help on using tickets.