INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Memo in List box

Memo in List box

(OP)
Hi all,
Using Clarion 9.1

How do I place a memo in a list box that is X columns by Y rows. The intension is top place this in the second list box below the main one, which has a number of fields.

Thanks in advance for any help,
Steve

RE: Memo in List box

Hello,
I think the Browse Grid will do the job.

Sameer

RE: Memo in List box

(OP)

Hi Sameer,
Thanks for your prompt reply, but I made a mistake in my question.
It was not a Memo that I was looking at. Sorry about my error.
More information on my chalange:
The window has a header List Box, (a Browse), and a second List Box (also a Browse), which has 3 columns, (NoteNo, Date and Note). It is the Note that needs to be in a block (1000 character string). How do I do this.

Steve

RE: Memo in List box

Hello Steve,
Populate the Note on the window using a text rather than an entry control to allow multi-line display of the data. This can be done by changing the control type of the note from the dictionary.

To synchronize the display with the corresponding line from the second browse, it should be tagged as a hot-field of the second browse. Select the properties of the second browse then the browse box behaviour then hot fields then add it and chech the box to make it part of the browse queue.

Sameer

RE: Memo in List box

(OP)
Using Clarion 9.1 and Windoes 7

Hi Sameer,

Thanks for your helpful advice. Some further items you may be able to help me with.

The TEXT entry control allows character entries, but they are not copied to the Note field. I have included the Note field in the 2nd Browse list, and when a note is entered, it is displayed in the TEXT box after it is save in the Browse 2 list.

I would like to be able to enter the text in the TEXT box directly. According the User Help this is possible, after leaving the TEXT control.

Any suggestions?

Steve.

RE: Memo in List box

Hi Steve,

The second browse is a class named something like "Brw2". This class have a view which is referenced as "Brw2.View". It has also a queue which is referenced as "Brw2.Q". The Browse view "Brw2.View" is based on a primary file which is referenced from the dictionary. In code, it can be referenced as Brw2.View{prop:file,1}. i.e if you define in data say my-file as &File then in code my-file &= Brw2.View{prop:file,1} , my-file references the dictionary file.
When the browse starts, it pulls the data from the file records to the "Brw2.Q". The list Box lines come from the "Brw2.Q". The Browse Class "Brw2" synchronizes the lines with the physical file records. The note file field becomes part of the Brw2.Q either when you populate it as a column in the list box or when make it a hot field for the Brw2. If you make it hot field for the first browse, it will not be part of the second browse and it will not display the corresponding file field. It will also not display if make it hot to the second browse but check it to be not in the list. Normally, you would populate it on the window and make it skip and read-only. However if you want to use it as a method to enter notes and save them in the file field, you can do that as follows:
In the embed selected for the note, synchronize the list line with file record using " Brw2.UpdateViewRecord()" . In the embed accepted of the note use " put(Brw1.View) ; if error(); message(Error()). ". To refresh the browse use " Brw2.applyFilter() ; Brw2.ResetSort(1) ; ThisWindow.Reset(1).

Another way is to create in the local data, a variable like the file note field using "localnote like(file note field)". Populate this local variable on the window. Now you need a method to synchronize the this local variable to the corresponding field of the "Brw2.Q". This is done by assigning the file note field to this local variable on every record read. Search for Brw2.SetQueueRecord method and make the assignment before the parent call i.e localnote = File.note. Now after entering some text into the local control on the window, in the embed accepted enter " File.Note= localnote ; put(Brw2.View)"; then the code to refresh the browse as above.
Sometimes when the local note is synchronized , you may not be able to enter data because it will be automatically replaced by the file note contents. This can be fixed by turning off the auto refresh of the window. And by entering the saving code before any "Thiswindow.reset". So you can do that by inspecting the source that no window reset is done before the data assignment. Your code can be adjusted before any reset using the priority value. if you set it to 2500 , the reset window will be far down and will not affect your code.

RE: Memo in List box

(OP)
Hi Sameer,

As I am fairly new to Clarion source code created by the Templates, it took me a while to work out that the Brw7 was the code for the 2nd Browse and the Embeds were for the TEXT box. I used the 1st solution you suggested.
It is now working just right. Thank you so much.

I wonder if you might suggest what reading order of the docs I should take to learn the main ABC template codes. A lot of this code baffels me.

Thanks again for your much appreciated help.

Steve

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close