` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Templates: Template to save column widths in a browse
2001-07-13 -- Casey Rippon
 
Newsgroups: softvelocity.products.c55ee Editors note: Please note that some lines may wrap in the template code. I have a application that needs to allow the user to save column width changes but not the whole FORMAT of a list box between sessions. Somewhat unusual, but others probably face it too sometimes. I wrote this template to do the job for ABC procedures. Feel free to use, change it as you wish. It uses PUTINI and GETINI rather than the INI manager class. I have never undersood the purpose of the INI manager when the direct functions are so simple. #!---------------------------------- #EXTENSION(ColumnWidthSave,'Save and Restore List Column Widths - cjr'),WINDOW,MULTI #DISPLAY('Saves and restores the user chosen column widths') #DISPLAY('for a specified list box') #PROMPT('List Box',CONTROL),%ListControl #DISPLAY('Enter these with quotes') #PROMPT('Ini File',@s20),%IniFile #PROMPT('Ini Section',@s20),%IniSection #LOCALDATA ListColumn SHORT #ENDLOCALDATA #AT(%WindowManagerMethodCodeSection, 'Open', '()'),PRIORITY(5001) !Retrieve colum widths for list box LOOP ListColumn = 1 to 255 IF %ListControl{PROPLIST:Exists,ListColumn} = 1 %ListControl{PROPLIST:Width,ListColumn} =| GETINI(%IniSection,%ListControl&ListColumn,%ListControl{PROPLIST:Width,ListColumn},%IniFile) ELSE BREAK END END #ENDAT #AT(%WindowManagerMethodCodeSection, 'Kill', '(),BYTE'),PRIORITY(8500) !Save column widths of list box LOOP ListColumn = 1 to 255 IF %ListControl{PROPLIST:Exists,ListColumn} = 1 PUTINI(%IniSection,%ListControl&ListColumn,%ListControl{PROPLIST:Width,ListColumn},%IniFile) ELSE BREAK END END #ENDAT #!-----------------------------------------------


Today is November 21, 2024, 6:29 am
This article has been viewed 35207 times.
Google search has resulted in 20 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: