Read only edit
-
On 11/10/2017 at 07:54, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R19
Platform: Windows ; Mac ;
Language(s) : C++ ;---------
Hello,
I have simple dialog window derived from GeModalDialog and in CreateLayout() function I'm making edit control with call AddEditText(..).It is possible to make that edit control read-only? (so user can select and copy text from it, but cannot change it).
PS: AddMultiLineEditText with style DR_MULTILINE_READONLY does exactly what I need except it doesn't match the style of other edit controls (it has scrollbar on right side and is a bit bigger).
-
On 11/10/2017 at 08:35, xxxxxxxx wrote:
Why not make a static text?
-
On 11/10/2017 at 15:12, xxxxxxxx wrote:
As gr4ph0s says.
You can also SetEnable(id, FALSE) using the id of the AddEditText() gadget and the user cannot edit it (virtually, read-only).
-
On 11/10/2017 at 22:41, xxxxxxxx wrote:
Of course I know that static text or disabled edit may look ok but in my case user needs to select the text and copy it to clipboard.
It is hardware number required for plugin activation, forcing user to manually copy digit by digit that long number is not an option.
-
On 12/10/2017 at 00:41, xxxxxxxx wrote:
User can select a static text
Or if you really want an edit, simply make an edit field and in the command message of your dialog/description simply check if id == your edit and then reset it to the value you want.
Another option is to make a button copy to clipboard.
-
On 12/10/2017 at 00:46, xxxxxxxx wrote:
Thank you, I didn't expect that from the static text. ... cinema is full of surprises