replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - %lv width
forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%lv width

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Sat Feb 08, 2025 4:26 am    Post subject: %lv width Reply with quote

Lately, I have been developing a financial data presentation and reporting program.

I have found the %lv table display very useful, using view = 1. (not sure how to use onter view values)

I know it is early days in my understanding of %lv, but I am finding the use of width and height a bit unfriendly as inputs.

I now include the pixel width in all column headings for a more predictable layout.
For width, I am adjusting �width� to be sum( column_pixel_width) + 50 (fudge), which is working ok.

I do think there should be a fit_width option available, as this width value is a bit cumbersome. Fudge is also an unknown !

For height, I use "height = min ( max_height, n_row*16+20 )", but an automatic option to fit the height could also help ?

Early days, but any other views ?

John

PS:
%lv appears to be a good table display option for variable length fonts.

With a "fit_width" option available, perhaps width and height could be interpreted as max_width and max_height, as the seamless transfer to horizontal and vertical scrolling works very well for larger data displays.

Could the actual width and height be returned ? although I am not yet experienced with changing table sizes (does this happen?) or editing data.

I also find the use of "%lv[grid_lines,full_row_select]&" works well when returning selected row(s) in array "SEL".

I hope to advance to edit cells at a later stage, which may change my suggestions !
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8177
Location: Salford, UK

PostPosted: Sat Feb 08, 2025 8:22 am    Post subject: Reply with quote

John

I would be willing to do some more work on %lv, as time permits, but I would need some sample code to work on. If you could isolate one issue at a time with sample code then I will aim to take a look at it soon.

It is many years since %lv first appeared and the Microsoft control has had more features added to it in the mean time.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Sun Feb 09, 2025 4:57 am    Post subject: Reply with quote

Paul,

I am unsure as to what are "Microsoft control features" (MCF) and what are Clearwin+ Options (C+O). I am wondering if MCF covers this already.

If the header format includes a column width for all columns, then the width could be the minimum of sum(column_widths) or "width" argument. Is there a MCF that enasbles this ?

For the C+O I select, the final column width is expanded to meet the "width" argument, which I would "option"ly want to stop.

There is also a minimum "width" value, below which a horizontal slider is included, which can be greater than sum(column_widths) ( a bit of a catch 22 )

There are also the other case when column widths are not explicitly defined in the header. I am not sure of the rules for estimating this, probably based on the column header pixel width. In this case there is still a width value = sum(column_widths).

Does Clearwin+ determine the column width values ?
I am unsure if this "sum_width" value is only available in the Microsoft control, or available to Clearwin+, but an option to fit to the min ( sum(column_widths), width_arg ) could altrady be in the MCF.

The case for height fit controls is possibly less important as there is only the height of a row and the height of the header. Do we know these pixel values ?

I must qualify my comments, as it is early in my use of %LV and I do not know of edit uses that could change the size of the LV control. Is this a possibility ?

Is it a possibility to use a MCF feature to add a C+O option to adjust the control width to = min ( sum(column_widths), width_arg )

At present I am echoing all the list rows to a text file, so I could read this text file to generate the %lv inputs, as a sample program.

( I am already doing this to export the tables to Excel for printing, especially where there are too many rows to display. I haven't asked questions about printing LV controls yet ! )

Thanks again for your advice on this,

John
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8177
Location: Salford, UK

PostPosted: Sun Feb 09, 2025 11:05 am    Post subject: Reply with quote

John

When I wrote of new Microsoft control features, I was thinking of features that might now be added to the ClearWin+ library in order to improve %lv in some way. I was not thinking of features that the user of %lv might access directly.

If you can provide me with a sample program that illustrates the problem then I will see what can be done.

As I recall, in the standard approach, the user provides the pixel width and height of the control but it is a long time since I have looked at this though I do confess that I was the original author of %lv and it does have some short falls.
Back to top
View user's profile Send private message AIM Address
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Sun Feb 09, 2025 11:34 am    Post subject: Reply with quote

Hi Paul,

Thanks for the offer to review %lv. I will look to develop a sample program that may demonstrate the problem.

I have also developed a utility routine to estimate the actual pixel width of each column header for the table width:

integer function get_lv_header_pixel_width ( header_row )

This reads each "|column header_pixels|" else uses
call get_text_size@ ( header_row(s:e), npix, depth )

I can use this to set the width (once I have understood the extra fudge pixels to stop the horizontal scroll)

Again it is early days in my use of %lv, which does offer a good presentation of tables of data.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2615
Location: Sydney

PostPosted: Wed Feb 12, 2025 1:51 pm    Post subject: Reply with quote

I have now expanded:
integer function get_lv_header_pixel_width ( lv_data, nrows )
to also read all the data rows and use get_text_size@ to determine the max pixel width required of the header row plus the data rows.

This is helpful to understand the width required for each column and the table, so this should keep me quiet for a while.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group