Alpha Video Training
Results 1 to 4 of 4

Thread: Listview formatting

  1. #1
    "Certified" Alphaholic Clunes's Avatar
    Real Name
    Mark Pearson
    Join Date
    Jan 2010
    Location
    Brisbane, Queensland, Australia
    Posts
    1,001

    Default Listview formatting

    The ability to format a field in the xdialog list view. Currently restricted to justification. It would be great to be able to format date, time, $$$ etc
    -----------------------------------------------
    Regards
    Mark Pearson
    mark.pearson@onestopsolutions.com.au
    Youtube channel
    Website

  2. #2
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: Listview formatting

    Hi Mark,
    I agree....it would be a nice addition to not have to code this in and let the genie do it for us.

    I just tried a simple mod for a list box for money and it could be expanded upon for other types as a way until Alpha gives this to us...could have used isnumber() with the decimal parameter .t. I guess which would be the way to test for many variations, but does show that the functions are there to do what is needed.

    Code:
    DIM SHARED lst as C
    DIM SHARED varC_result as C
    auto_list_lst = <<%a%
    one
    two
    12/04/2010
    12.80
    %a%
    
    auto_list_lst=*for_each(qi,if(isalpha(qi).OR.isdate(qi),qi,format_data(val(qi),"$(")),auto_list_lst)
    
    temp_count = w_count(auto_list_lst,crlf())
    DELETE a_lst
    DIM a_lst[temp_count] as c
    a_lst.initialize(auto_list_lst)
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("Alpha Five",<<%dlg%
    {region}
    Type prompt here:| [.40,5lst^#a_lst];
    {endregion};
    {line=1,0};
    {region}
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%)
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  3. #3
    "Certified" Alphaholic Clunes's Avatar
    Real Name
    Mark Pearson
    Join Date
    Jan 2010
    Location
    Brisbane, Queensland, Australia
    Posts
    1,001

    Default Re: Listview formatting

    I do have a work around for the list view in that I use the simplified listview (see Learn xdialog what new in V10) process and add my field data myself. When I add I put the dollar field using STR() . The problem with this was alignment. The only way to right align the fields was to use use str() and you cannot center etc, You certainly cannot change the header alignment. So gain in one area and a loss in the other. I really like using the listview so it would be good to square it away as a part of the genie
    -----------------------------------------------
    Regards
    Mark Pearson
    mark.pearson@onestopsolutions.com.au
    Youtube channel
    Website

  4. #4
    "Certified" Alphaholic Clunes's Avatar
    Real Name
    Mark Pearson
    Join Date
    Jan 2010
    Location
    Brisbane, Queensland, Australia
    Posts
    1,001

    Default Re: Listview formatting

    I actually played with another work around to this problem. Using te wizard I created a listview with all the fields I wanted including the filter. I then converted to xbasic. In the function getcontents() I then manipulated the 'cresult' list to format the field each row to the look that I wanted. This produced a formatted field in the final list. My initial testing worked well.
    -----------------------------------------------
    Regards
    Mark Pearson
    mark.pearson@onestopsolutions.com.au
    Youtube channel
    Website

Similar Threads

  1. listview format
    By Clunes in forum Alpha Five Version 10 - Desktop Applications
    Replies: 5
    Last Post: 06-06-2010, 03:31 AM
  2. Help with Xdialog/ListView
    By gaby_h in forum Alpha Five Version 9 - Desktop Applications
    Replies: 7
    Last Post: 01-18-2010, 03:59 PM
  3. Listview in xdialog
    By Mark Pearson in forum Alpha Five Version 9 - Desktop Applications
    Replies: 1
    Last Post: 08-01-2009, 06:53 AM
  4. Listview filter
    By Garry Flanigan in forum Alpha Five Version 9 - Desktop Applications
    Replies: 6
    Last Post: 05-16-2008, 10:48 AM
  5. xDualog listview
    By Chris_Wood in forum Alpha Five Version 8
    Replies: 7
    Last Post: 04-18-2008, 06:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •