Get a Jumpstart with our Sample Apps
Page 1 of 2 12 LastLast
Results 1 to 30 of 52

Thread: Row color properties w. xbasic?

  1. #1
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,486

    Default Row color properties w. xbasic?

    Can you control said - using xbasic?

    See image...

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    24,696

    Default Re: Row color properties w. xbasic?

    Haven't tried. If you can it will be with

    Row Color Properties
    The number of rows to assign to each "band". N may be 1, 2, 3, or 4.

    :BrowseName.cell.[N].Count as N

    The fill style and color of each "band". N may be 1, 2, 3, or 4.

    :BrowseName.cell.[N].backcolor as C

    :BrowseName.cell.[N].forecolor as C

    :BrowseName.cell.[N].fill_style as C
    Browse properties.

  3. #3
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,486

    Default Re: Row color properties w. xbasic?

    Ooh. That looks promising. I'll try it. Thanks Stan.

  4. #4
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,486

    Default Re: Row color properties w. xbasic?

    FYI: The help file has some syntax errors and command errors - valid entries include:
    Code:
    Browse1.cell[1].Count = vNoRows
    Browse1.cell[2].Count = vNoRows
    
    Browse1.cell[1].color = "Aqua White"
    Browse1.cell[2].color = "White"
    
    'Browse1.cell[1].fill_style =
    'browse1.cell[1].accent_color =
    "backcolor" and forecolor" appear to be bogus values.

    In addition, you must have the cell # manually enabled on the browse or she don't work. Don't know if there is an xbasic command, but I don't see one.

  5. #5
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,182

    Default Re: Row color properties w. xbasic?


  6. #6
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,207

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Peter.Greulich View Post
    FYI: The help file has some syntax errors and command errors - valid entries include:
    Code:
    Browse1.cell[1].Count = vNoRows
    Browse1.cell[2].Count = vNoRows
     
    Browse1.cell[1].color = "Aqua White"
    Browse1.cell[2].color = "White"
     
    'Browse1.cell[1].fill_style =
    'browse1.cell[1].accent_color =
    "backcolor" and forecolor" appear to be bogus values.

    In addition, you must have the cell # manually enabled on the browse or she don't work. Don't know if there is an xbasic command, but I don't see one.
    Peter did you ever get this worked out? I only have the desktop version which won't let you access the advanced browse properties thru the genie but will thru the object explorer. I wanted to add those alternating row colors to my v7 forms w/ embedded browses but could not find where to add another cell to the browse. So I created a stylesheet for the form and there you can edit the default browse and set the *size to get 1 to 4 cell rows. Then you can address them in the script.

    So now I am curious how this would work in a script... care to share?
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  7. #7
    Member
    Real Name
    Geoff Meredith
    Join Date
    Aug 2006
    Posts
    637

    Default Re: Row color properties w. xbasic?

    Robin,

    I have attached a small example that shows how to change the colours of 4 browse rows using xbasic.

    Hope it helps.

    Geoff

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

    Default Re: Row color properties w. xbasic?

    Nice Geoff,

    It are these little bits that I store in my help file for future use and to use for others when helping.

    Thanks.
    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
    __________________________________________




  9. #9
    Member
    Real Name
    Geoff Meredith
    Join Date
    Aug 2006
    Posts
    637

    Default Re: Row color properties w. xbasic?

    Thanks Mike. Its nice to offer some help instead of always receiving.

    I have been trying to see if there is a fill style picker that can be called from xbasic in the same way as you can for the colour.

    Do you know if there is one?

    Geoff

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

    Default Re: Row color properties w. xbasic?

    Geoff,
    What object do you want to change the "fill" for?? I can do it for say an entire browse column or a single field in exactly the same way you used.

    Must be missing something...

    A little off topic maybe to Peter's/Robin's original questions but related I think.
    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
    __________________________________________




  11. #11
    Member
    Real Name
    Geoff Meredith
    Join Date
    Aug 2006
    Posts
    637

    Default Re: Row color properties w. xbasic?

    Mike,

    I think its still relevant as it relates to setting the browse banding properties using xbasic. I have no problem hard coding the gradient or transparency settings but it would be nice if you could call up the same fill style picker that can be found in the browse banding properties dialog. See attached pictures.

    I could try and create my own list but when you know one already exists it seems a waste to have to dedicate time to repeating it.

    Maybe one for the wish list.

  12. #12
    "Certified" Alphaholic MoGrace's Avatar
    Real Name
    Robin
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    3,207

    Default Re: Row color properties w. xbasic?

    Thanks Geoff,
    That gives me a place to begin.
    Robin

    Discernment is not needed in things that differ, but in those things that appear to be the same. - Miles Sanford

  13. #13
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Row color properties w. xbasic?

    Hi Geoff,

    I know this was done last year but this is just to prove I did a search first.

    Please can you help. I would like the user to be able to select the colour of the Text in each row of the browse, from a simple lookup in the row. Choices would only be Black, Red or Blue.

    The colour selected would also be used to colour the text conditionally on the report.

    Your help is appreciated.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

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

    Default Re: Row color properties w. xbasic?

    Interested also as I can only do this say from multiple combo boxes (like Geoff did for changing the background of the row) based on a variable and it will change the entire row of font color in whichever Cell I refer to. I do not understand how a lookup can change the color when it will just enter in the value selected from the lookup for each column--not perform xbasic (must be misunderstanding something!).
    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
    __________________________________________




  15. #15
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,784

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Keith Hubert View Post
    I would like the user to be able to select the colour of the Text in each row of the browse, from a simple lookup in the row. Choices would only be Black, Red or Blue.

    The colour selected would also be used to colour the text conditionally on the report.

    Your help is appreciated.
    One way would be to add a field to the table to hold the colour value and then use that value in the appropriate color equations. You could then make a simple lookup in field rules to provide the list of colours or get fancy and pop up a dialog and then write the value to the record using xbasic.
    Tim Kiebert
    Geelong Citrus Packers
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  16. #16
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Row color properties w. xbasic?

    Hi Tim,

    I will be using your suggestion for the report, that is not my problem at the moment.

    What I would like to achieve is to see the colour of the text change conditionally from the value of the field in the browse which holds the colour name.

    This will give comfort to the user that is the colour of the text that will get printed.
    Last edited by Keith Hubert; 09-03-2009 at 12:03 PM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  17. #17
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,486

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Tim Kiebert View Post
    One way would be to add a field to the table to hold the colour value and then use that value in the appropriate color equations. You could then make a simple lookup in field rules to provide the list of colours or get fancy and pop up a dialog and then write the value to the record using xbasic.
    Tim,

    You're right on, as usual. But instead of a "lookup", use ui_select_color() or ui_select_color2() to fill the field. Works great.

  18. #18
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,486

    Default Re: Row color properties w. xbasic?

    Keith,

    That's what I do. Apply it to a browse as I describe. I don't use field rules, though. Just a simple button calling the function and writing to the record.

  19. #19
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,784

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Peter.Greulich View Post
    But instead of a "lookup", use ui_select_color() or ui_select_color2() to fill the field. Works great.
    Yes, good point.

    I guess I overlooked that because Keith wanted to limit the choices to red, blue, and black.
    My preference would also be to not use field rules in this case. A simple dialog with the three choices and as you say write directly to the record.
    Tim Kiebert
    Geelong Citrus Packers
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  20. #20
    Moderator Peter.Greulich's Avatar
    Real Name
    Peter Greulich
    Join Date
    Apr 2000
    Location
    Boston, MA
    Posts
    11,486

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Tim Kiebert View Post
    I guess I overlooked that because Keith wanted to limit the choices to red, blue, and black
    Tim, if I knew what I was doing, I'd be dangerous.

  21. #21
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,784

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Peter.Greulich View Post
    Tim, if I knew what I was doing, I'd be dangerous.
    :D Join the club. I am just making it up as I go along.
    Tim Kiebert
    Geelong Citrus Packers
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  22. #22
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Row color properties w. xbasic?

    Hi Guys,

    A simple dialog with the three choices and as you say write directly to the record.
    OK, I can live with that, just as long as I can select which row I want to change the text on.

    I will still need a colour reference for when I come to print.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  23. #23
    "Certified" Alphaholic Tim Kiebert's Avatar
    Real Name
    Tim Kiebert
    Join Date
    Jul 2004
    Location
    Geelong, Victoria, Australia
    Posts
    2,784

    Default Re: Row color properties w. xbasic?

    Quote Originally Posted by Keith Hubert View Post
    Hi Guys,

    OK, I can live with that, just as long as I can select which row I want to change the text on.

    I will still need a colour reference for when I come to print.
    Something like this?
    Tim Kiebert
    Geelong Citrus Packers
    A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

  24. #24
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,182

    Default Re: Row color properties w. xbasic?

    How does the user decide which color to use?

  25. #25
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Row color properties w. xbasic?

    Hi Tim,

    That seems to be another of your master strokes. Thank you.

    I shall now have delve in and see how it all works.

    OK. You got me beat, how have you split the last column into the three colours?


    Hi Gabe,

    By the content of the text, the user will decide how important it is. If it is very important then the text will be Red.
    Last edited by Keith Hubert; 09-03-2009 at 03:05 PM.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

  26. #26
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,182

    Default Re: Row color properties w. xbasic?

    And how does the user decide what's important?

    Keith:
    Disregard the above..I was trying to buy some time as I was on the phone while responding, so here is scoop:
    If you wish to see the colors in the browse, then yes you could use an xdlg or any variable for that matter. In this case, I would add the color choice to the right-click menu of the browse row.

    But if you want to be able to print with the same colors, that's a different matter. You have to create a separate field in the table and use it to determine the color of the text. IOW say you add a one character field, then in the report you put an expression for the font color based on the value in that field.

    I am still on the phone and hope this make some sense..
    Last edited by G Gabriel; 09-03-2009 at 03:10 PM.

  27. #27
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Row color properties w. xbasic?

    Hi Gabe,

    I suggest you have a look at what Tim has done.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

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

    Default Re: Row color properties w. xbasic?

    Nice Tim. Being able to add one or more buttons to a browse (in both titles and rows) sure expands the possibilities in how a browse looks and functions.
    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
    __________________________________________




  29. #29
    "Certified" Alphaholic G Gabriel's Avatar
    Real Name
    G. Gabriel
    Join Date
    Oct 2004
    Posts
    7,182

    Default Re: Row color properties w. xbasic?

    Maybe I am misunderstanding the question. Certainly you could do something like this, but I don't think that answers the whole question.

  30. #30
    "Certified" Alphaholic Keith Hubert's Avatar
    Real Name
    Keith Hubert
    Join Date
    Jul 2000
    Location
    London, UK
    Posts
    6,930

    Default Re: Row color properties w. xbasic?

    Hi Gabe,

    That is a very interesting video.

    Would you please be kind enough to show us all the code as to how you made that work.

    Also, apart from changing the colour of the text on the browse, did your code set a field value to enable conditional colour printing?
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

Similar Threads

  1. Row markers-Can you set the properties?
    By richardurban in forum Web Application Server v7
    Replies: 1
    Last Post: 06-15-2008, 02:41 AM
  2. Browse row color
    By Bill Parker in forum Archived Wishlist
    Replies: 3
    Last Post: 09-16-2006, 08:26 AM
  3. Browse Row color
    By trackmanpete in forum Archived Wishlist
    Replies: 1
    Last Post: 03-10-2006, 07:40 AM
  4. How do I set Row Properties->Row Label?
    By Wanda Tucker in forum Web Application Server v6
    Replies: 1
    Last Post: 08-10-2005, 05:42 AM
  5. Browse Row color
    By John Burke in forum Alpha Five Version 5
    Replies: 7
    Last Post: 02-09-2005, 11:52 AM

Posting Permissions

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