Home > BaaN, How to, Infor > How To #4 – Open a text editor in read only mode #baanhowto

How To #4 – Open a text editor in read only mode #baanhowto


How to open a text editor in read only mode?

Lot many times, we forget minor things which may be of real importance in a customization , specially when you are at the client location. Lets consider a simple example of not allowing the user to edit text conditionally.

How will you achieve this ? Not really a big thing,  you just need to inform the text manager to open the editor in read only mode, so that even if the user opens the editor he/she can’t edit the text.

The  code snippet below will make the explanation more clear.


choice.text.manager:
before.choice:
if (attr.textfield$ = "tcxxx001.txta" ) then
attr.textmode = 1
else
attr.textmode = 3
endif

The if statement checks, if the Text Manager is using the text field assigned to the variable  “attr.textfield$“. Now if the condition is true, a value “1” is assigned to the variable “attr.textmode & “3” otherwise.

The variable “attr.textmode” informs the text manager how to react on, when a user tries to open the text editor (whether it should be opened in Read Only mode or Read/Write mode). The value “1”, makes the mode Read Only & “3” makes it Read/Write.

Both the variables can only be used in 4GL scritping.

Quick Submit

Advertisements
Categories: BaaN, How to, Infor Tags: , ,
  1. September 12, 2013 at 7:19 am

    Nice post. I used to be checking continuously this weblog and I am impressed!

    Extremely helpful information particularly the closing section 🙂
    I maintain such information much. I was seeking this ceretain info for a long time.
    Thanks and good luck.

  2. September 28, 2013 at 12:12 am

    I read this paragraph fully regarding the comparison of most recent and preceding technologies, it’s
    awesome article.

  3. September 28, 2013 at 7:20 pm

    Hello, just wanted to say, I liked this post. It was helpful.
    Keep on posting!

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: