Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Trying to get thumbnail view to work within the grid for an image
Hi team
I just created an image-selector using your grid and it's working fine except for images larger than the table cell. It looks like the thumbnail setting is not being applied in this case? I tried others e.g. stretch and they were applied ok.
Am I missing something?
set_property(window:'.OLE_IMAGES', 'OLE.CellImageLayout[All; All]', 'TH')
Regards,
James
User: james Birnie
I just created an image-selector using your grid and it's working fine except for images larger than the table cell. It looks like the thumbnail setting is not being applied in this case? I tried others e.g. stretch and they were applied ok.
Am I missing something?
set_property(window:'.OLE_IMAGES', 'OLE.CellImageLayout[All; All]', 'TH')
Regards,
James
User: james Birnie
Comments
I will look into this but I might need to ask you for more information. We have other customers who have done exactly what you are doing and I am almost 100% certain they are using the Thumbnail layout.
Are you using RowsToRecords? If not, then I wonder if the layout is not getting set when you add new rows to the SRP EditTable.
Please confirm the version of the SRP EditTable control.
Thanks for the quick response. I'm using OLE.CellImage. This is the first time I've used your grid so I'm probably not doing something right...
Here's the code...
// done on create setup_srp_table: * hide header and row selection buttons Set_Property(ctrl_grid_images$, 'OLE.HeaderRow[All]', 0:@fm:false$) Set_Property(ctrl_grid_images$, 'OLE.HeaderColumn[All]', 0:@fm:false$) * disable editting Set_Property(ctrl_grid_images$, 'OLE.CellProtection[All; All]', 'Sel') * hide tooltips Set_Property(ctrl_grid_images$, 'OLE.ShowToolTips', false$) return // setting images + image name to each cell refresh_images: * gather + display images oryxlib_msg_up('One moment, Gathering Images...', 'Gathering Images') * reset grid Set_Property(ctrl_grid_images$, 'OLE.List', ) Set_Property(ctrl_grid_images$, 'OLE.CellImage[All; All;]', ) * image + sizing details current_directory = oryxctl_get('EDT_DIRECTORY') images = oryxlib_get_filenames(current_directory, 'I') no_of_images = fieldcount(images, @fm) image_grid_width = get_property(window:'.OLE_IMAGES','SIZE')<3> image_width = get_property(window, var_image_width$) image_height = get_property(window, var_image_height$) * determine the number of rows and columns, allow for padding + vertical scrollbar no_of_cols = int((image_grid_width - 13) / (image_width + 1)) if no_of_cols > no_of_images then no_of_cols = no_of_images end no_of_rows = int(no_of_images / no_of_cols) if mod(no_of_images, no_of_cols) != 0 then no_of_rows += 1 end * set number of cells (rows and columns) Set_Property(ctrl_grid_images$, 'OLE.Dimension', no_of_cols:@fm:no_of_rows) * set cell width and height Set_Property(ctrl_grid_images$, 'OLE.DataColumn[All]', image_width) Set_Property(ctrl_grid_images$, 'OLE.DataRow[All]', image_height) * set the image style (doesn't seem to work for type "thumb") // set_property(ctrl_grid_images$, 'OLE.CellImageLayout[All; All]', 'TH') image_list = col_counter = 1; row_counter = 1; for i = 1 to no_of_images image = images if image then this_image = current_directory:images<i> image_list<row_counter, col_counter> = this_image Set_Property(ctrl_grid_images$, 'OLE.CellImage[':col_counter:'; ':row_counter:']', this_image) end col_counter += 1 if (col_counter > no_of_cols) then row_counter += 1 col_counter = 1 end next i * set data component Set_Property(ctrl_grid_images$, 'OLE.List', image_list) oryxlib_msg_down() return
User: James BirnieUser: James Birnie
I cannot seem to get the Thumbnail layout to work so I believe this is a bug, or improperly documented property. I have entered this into our issue tracking system. For future reference it has been assigned an ID of OLE-67.
User: James Birnie
Is there some way I can track this issue (OLE-67), by any chance?
Thanks,
James
User: James Birnie
There is no easy way to allow you to track this issue. Our bug/project management systems, JIRA, does not provide the ability to add emails that our outside of our licensed user accounts. There are plug-ins that are supposed to provide that but they have not worked.
I can tell you that nothing has been done yet with this issue but it is on our radar. We will update the status in this thread for your convenience.
User: James Birnie