Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 07 FEB 2000 03:14:37PM b.cameron wrote:

How do you set the scroll bars to stay on the

screen during update in an edittable.

The same with the row numbers.

If I set the size in the form designer to show

ten rows, when I read data into the table it

will trim the row numbers and also eliminate the

scroll bar down the side if the number is less than.

My apologies if this is a mundane question but I could

not locate an answer.

Thanks


At 07 FEB 2000 03:32PM Stephen S. Revelation wrote:

B.,

I believe that the AUTOSIZECOL property, for edit tables, may help you.

-Stephen


At 08 FEB 2000 03:49AM Oystein Reigem wrote:

Stephen,

Are you sure? I know that the help article for AUTOSIZECOL says that "The AUTOSIZECOL property is most useful for edit tables which may or may not have a vertical scroll bar depending on the number of rows" (my emphasis). But shouldn't that be horizontal and columns? As it stands it makes no sense to me.

- Oystein -


At 08 FEB 2000 04:56AM Oystein Reigem wrote:

Bruce,

How do you fill your edit table with data? If the edit table is databound, and you just do a normal read, none of the visible row number buttons will disappear, even if the number of values in your mv data is less than the number of visible lines in the edit table.

At least that is what I experience.

Let's say I design my databound edit table with 3 visible lines and a vertical scroll bar. When I run the form - before the edit table is filled with data - the edit table will have 4 lines, with the top 3 visible. It will also have a visible scroll bar.

If I then read in data with 3 values or less, all 3 visible lines stay visible, with row number buttons and all. Even if the number of values is less than 3, the lines at the bottom of the edit table will still be there, but empty. But the 4th line is gone, and so is the scroll bar.

This doesn't agree with your observations. You say the lines at the bottom - the ones without data - disappear too. So I believe you stuff your edit table in a different way. Do you do it programmatically? In case you can just program some more and append extra empty values to your data before you stuff your edit table. And remove them again later if you need to store the data, or use the data for some other processing.

- Oystein -


At 08 FEB 2000 07:52PM B. Cameron wrote:

So after reading your responses (thanks) I would be

inclined to ask how do I set the same values to the

edittable that the system does if the table is data

bound?


At 09 FEB 2000 04:11AM Oystein Reigem wrote:

Bruce,

You can set and get the entire content of an edit table using the DEFPROP, ARRAY or LIST properties. DEFPROP and ARRAY does it column by column. LIST is row by row. For databound controls DEFPROP is the recommended choice.

Let's say you have an edit table with NumColsInET columns and NumRowsInET visible rows.

Let's say you have a 2-dimensional delimited array Data containing rows delimited by @FM, each row with fields delimited by @VM, i.e, with the layout LIST expects. Let's say you want to set the content of the edit table so that empty rows at the end show, and also the scroll bar. Then - before you stuff the edit table with the content of Data - you must append empty rows at the end until there are NumRowsInET+1 rows in Data. I assume here the edit table is unbound so you can use LIST with impunity. (Else you might want to reorganize your Data to column by column and use DEFPROP):

/* calculate the number of rows in Data */

NumRowsInData=count(Data, @FM) + (Data "")

/* need empty rows? */

if NumRowsInData =str(@VM, NumColsInET-1)

. next R

end

/* set the content of the edit table */

UnUsed=Set_Property( @Window:".YOUREDITTABLE", "LIST", Data )

On second thought I believe the rows don't have to made as perfect as that. I mean all the @VM's aren't really necessary. Data=" should do.

And then you can even get away with setting just the last row, i.e just Data=" and no loop.

Similarly if your Data array is organized column by column:

/* calculate the number of rows in Data */

NumColsInData=count(Data, @FM) + (Data "")

NumRowsInData=0

for C=1 to NumColsInData

. NumCellsInCol=count(Data, @VM) + (Data "")

. if NumCellsInCol ] NumRowsInData then NumRowsInData=NumCellsInCol

next C

/* need empty rows? */

if NumRowsInData ="

end

/* set the content of the edit table. ARRAY or DEFPROP */

UnUsed=Set_Property( @Window:".YOUREDITTABLE", "DEFPROP", Data )

Finally - I wrote in my earlier posting that if you have a databound edit table you have to strip the empty values again before writing the table row. I don't think that's necessary.

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/847111f691f2441a8525687e006f33a6.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1