Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Read only edit

 Post Reply Post Reply
Author
Message
Miro View Drop Down
Member
Member
Avatar

Joined: 2015 Feb 11
Online Status: Offline
Posts: 33
Post Options Post Options   Quote Miro Quote  Post ReplyReply Direct Link To This Post Topic: Read only edit
    Posted: 2017 Oct 11 at 7:54am

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).
Back to Top
gr4ph0s View Drop Down
Member
Member


Joined: 2015 Jul 07
Location: France
Online Status: Online
Posts: 366
Post Options Post Options   Quote gr4ph0s Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 11 at 8:35am
Why not make a static text?
Technical lover.
Back to Top
kuroyume0161 View Drop Down
Member
Member
Avatar

Joined: 2002 Oct 29
Location: United States
Online Status: Offline
Posts: 3664
Post Options Post Options   Quote kuroyume0161 Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 11 at 3:12pm
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).
Back to Top
Miro View Drop Down
Member
Member
Avatar

Joined: 2015 Feb 11
Online Status: Offline
Posts: 33
Post Options Post Options   Quote Miro Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 11 at 10:41pm
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.
Back to Top
gr4ph0s View Drop Down
Member
Member


Joined: 2015 Jul 07
Location: France
Online Status: Online
Posts: 366
Post Options Post Options   Quote gr4ph0s Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 12 at 12:41am
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.
Technical lover.
Back to Top
Miro View Drop Down
Member
Member
Avatar

Joined: 2015 Feb 11
Online Status: Offline
Posts: 33
Post Options Post Options   Quote Miro Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Oct 12 at 12:46am
Thank you, I didn't expect that from the static text.  ... cinema is full of surprises :-)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.