Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Merge not working
Look at this code:
a = '1':@vm:'2':@vm:'3':@vm:'4':@vm:'5':@vm:'6':@vm:'7':@fm:"q":@fm:"a"
Set_Property(ctrl_notes$, "OLE.LIST", a)
set_Property(ctrl_notes$, "OLE.CellMerge[1;2]", "7":@fm:"2")
I expect the q and the a to be contained in one merged cell. But what i get is this:
As you can. the a is now showing .
What I want is for q and a to show in the same cell.
a = '1':@vm:'2':@vm:'3':@vm:'4':@vm:'5':@vm:'6':@vm:'7':@fm:"q":@fm:"a"
Set_Property(ctrl_notes$, "OLE.LIST", a)
set_Property(ctrl_notes$, "OLE.CellMerge[1;2]", "7":@fm:"2")
I expect the q and the a to be contained in one merged cell. But what i get is this:
As you can. the a is now showing .
What I want is for q and a to show in the same cell.
Comments
I want q and a to appear in the same cell, but I want a to be on the line below q. Is this possible?
Is it possible to display multi-line text in one cell? I know it's possible for the user to manually expand the cell to get multiple lines to show. Is it possible to make this expanding happen automatically? Basically, I want to mimic this in your edit table:
I would like all of that text to appear in one cell.
you have no idea how much you have helped me
I have now got the edit table working so that a cell contains and shows multiple lines. But I have run into another problem.
When I scroll, the scrolling is very jittery. It seems like the scroll jumps from row to row, whereas I want the scroll to slowly move down or up a few pixels, not a row.
Is this possible?
Instead of putting each line of text in the same row, I will put each line of text in its own row. This will make the scrolling smooth. However, the user won't be able to select multiple lines of text at the same time:
All I want is for the user to be able to select multiple rows at the same time so that they can copy and paste part of the text.
Advanced UIs like these take a lot of manual effort.
Do you think I could use the tree control to display this info?
So each node of the tree would be the equivalent of a multilined cell in the edit table.
When it comes to free-form text, the best control is an EditBox. I'd use your table above, but when the user selects a row, the edit box is update with that row's notes/comments. It creates a nice separation of functionality that allows each control to do what it does best.
I might be able to just use a really big scrollable edit box to display all of the notes. But this will only work if it's possible to apply formatting to parts of the text within the edit box. Does the edit box have a markup language that I can use to format parts of the text?
So, it's possible to embed a web browser inside an OI form.
I will display my multiline data in the web browser inside the oi form.
The only problem is, how does OI know about clicks and such in the web browser? Well, when the user presses a button in the web browser, I will paste data into the windows clipboard in javascript. And since the click happened in the OI form, the click will trigger a click even in the OI form. In the OI form, I will check the clipboard's contents to notify myself about what action I need to take in response to what occurred in the browser.
I am going to try this now and see if it works.
Regarding my suggestion. When you said it would be weird to see the text is two places, I think you misunderstood me. I was suggesting you do not show the notes in their entirety (or possibly at all) in the table. The table would just display the other information. The edit box would be used to edit notes for the currently selected row in the table.
Anyhow, I have figured it out I think. Look at this:
Basically, I will have one big multiline cell that contains the note. Now, next to that cell will be multiple one line rows. When I scroll, the edit table will scroll smoothly because it will scroll from one small little row to the next, instead of to the next big row. See the screenshot above for what I mean.
I have tested it in a test program and it works. Now I just need to get it working with the real code.
Do you think this will work? It is working so far.
I think what he was suggesting was to not show the multiline text in the edittable at all but rather display it in an editbox for the selected row only.
That way you can have many rows in your table, (by keeping the big column hidden) and then the verbose stuff is viewable only if really required.
hi, the notes are not verbose stuff. They're the main pieces of data that the users care about.
I'll see myself out
Regardless of your answer, I understand that you want to be able to scroll through the SRP EditTable to see multiple notes and their associated header data. Is scrolling to navigate to other notes a firm requirement? Why not have a way to navigate through the notes using VCR buttons? I think this would save you a lot of design hassle and might open up better features.
If you were to scroll further down, you would see the next note.
I have talked to the users and they said that they want to scroll. I asked them about pressing a button to see the next note, and they said that that's too slow.
Anyhow, I have got it working the way I want (see my screenshot above), but I think there is a bug in the edit table that is stopping me from continuing.
Here is a screenshot of everything working correctly:
And here is the code that creates the table
Set_Property(ctrl_notes$, "OLE.Redraw", 0) column_titles = "" column_titles <1,-1> = "Date" column_titles <1,-1> = "Order No" column_titles <1,-1> = "Note No" column_titles <1,-1> = "Keyword" column_titles <1,-1> = "Type" column_titles<1,-1> = "Agent" column_titles<1,-1> = "" ncolumns = fieldcount(column_titles<1>, @vm) set_property(ctrl_notes$, 'OLE.Dimension', ncolumns:@fm:1) set_property(ctrl_notes$, "OLE.AllowInserts", 0) set_property(ctrl_notes$, "OLE.AllowDeletions", 0) set_property(ctrl_notes$, 'OLE.HeaderColumn[All]', 0:@fm:false$) set_property(ctrl_notes$, 'OLE.TitleList', column_titles) //set_property(ctrl_notes$, "OLE.ScrollBarsVisible", "Always":@FM:"Never") set_property(ctrl_notes$, "OLE.DataColumn[1]", 80) set_property(ctrl_notes$, "OLE.DataColumn[2]", 70) set_property(ctrl_notes$, "OLE.DataColumn[3]", 55) set_property(ctrl_notes$, "OLE.DataColumn[4]", 120) set_property(ctrl_notes$, "OLE.DataColumn[5]", 120) set_property(ctrl_notes$, "OLE.DataColumn[7]", 20) set_property(ctrl_notes$, "OLE.CellProtection[ALL;ALL]", "NONE") //set_property(ctrl_notes$, "OLE.CellType[7; 1]", 'PUB') /* data = "" for i = 1 to 3 a = '1':@vm:'2':@vm:'3':@vm:'4':@vm:'5':@vm:'6':@vm:'7':@fm:"qaaa":crlf$:@fm:"poo":@vm:" ":@fm:"poo":@fm:@fm:"poo":@fm:@fm:"poo":@fm:@fm:"poo":@fm:@fm:"poo":@fm data := a Next i Set_Property(ctrl_notes$, "OLE.LIST", data) set_Property(ctrl_notes$, "OLE.CellMerge[1;2]", "6":@fm:"10") Set_Property(ctrl_notes$, "OLE.CellMultilined[1; ":2:"]", 1) //Set_Property(ctrl_notes$, "OLE.DataRow[2]", "10") Set_Property(ctrl_notes$, "OLE.CellText[1; 2]", "aaaa":crlf$:"poo":crlf$:"aaaa":crlf$:"poo":crlf$:"aaaa":crlf$:"poo":crlf$:"aaaa":crlf$:"poo") Set_Property(ctrl_notes$, "OLE.CellAlignment[1; 2]", "T") set_property(ctrl_notes$, "OLE.CellProtection[ALL;ALL]", "RO") */ le = "" for i = 1 to 16 le<-1> = "1":@vm:"2":@vm"3":@vm:"4":@vm:"5":@vm:"6" le<-1> = "" le<-1> = "" le<-1> = "" le<-1> = "" le<-1> = "" le<-1> = "" le<-1> = "" Next i Set_Property(ctrl_notes$, "OLE.LIST", le) //set_Property(ctrl_notes$, "OLE.CellMerge[1; 2]", "6":@fm:"7") for j = 2 to 16*8 step 8 set_Property(ctrl_notes$, "OLE.CellMerge[1; ":j:"]", "6":@fm:"7") Next j //set_property(ctrl_notes$, "OLE.CellProtection[1;2]", "RO") Set_Property(ctrl_notes$, "OLE.Redraw", 1)
However, when I change the 16 to a 17 in the above code, I get this:
For all values bigger than 16, I get a variation of the above error.
Thanks all for your help.