Results 1 to 9 of 9

Thread: Can I hide the add ("+") icon of the Action bar or put some code behind it?

  1. #1
    Member
    Join Date
    Nov 2014
    Location
    Kailua, Hawaii
    Posts
    50

    Can I hide the add ("+") icon of the Action bar or put some code behind it?

    I have a grid that contains common filter commands my clients need. They can add their own to it and here lies the problem.

    I want to have code validation run when they add a filter command since most of them don't have much of an idea of what they're doing. I'd like to either add the validation code (Try...Catch) to the add icon of the grid's action bar or hide it and create a command button on a canvas section for this purpose.

    Can I do either one of these? Hide the "+" icon or add code behind it?

    I guess last resort would be to hide the action bar and make command buttons for everything I need.
    Thanks,
    Steve

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,150
    Hi Steve,

    take a look at at the Custom Footer Menu to add options to a section. Footer section (Custom Menu) with the code going in the Custom Footer Menu delegate, under Advanced.

    hth,

    Hank

  3. #3
    Member
    Join Date
    Nov 2014
    Location
    Kailua, Hawaii
    Posts
    50
    Thanks Hank,

    I'll check it out.

    Thanks,
    Steve

  4. #4
    Member
    Join Date
    Nov 2014
    Location
    Kailua, Hawaii
    Posts
    50
    Hi Hank,

    Okay, I see that in the footer section I can add a custom menu which falls under the cog/gear icon.

    If that was what you meant I think I prefer a custom menu on the section header since the options are more obvious to the user than the cog icon. If there is something else you were thinking of please let me know.

    Thanks,
    Steve

  5. #5
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,150
    Quote Originally Posted by StevenH View Post
    Hi Hank,

    Okay, I see that in the footer section I can add a custom menu which falls under the cog/gear icon.

    If that was what you meant I think I prefer a custom menu on the section header since the options are more obvious to the user than the cog icon. If there is something else you were thinking of please let me know.

    Thanks,
    Steve
    Hi Steven,

    to have the menu show as hyperlinks, prefix with ! as in !a,b,c

    to have the menu show as buttons, prefix with # as in #a,b,c

    hth,

    Hank

  6. #6
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,715
    Hi Steven,

    Have you tried just calling your validation routine from the 'Validation' of the Grid column (double-click column header to access Attributes) where the users input the filter commands?

    Use "{}" to pass the character value entered in the Grid column to your routine, e.g. valudf function in loaded script library or valudf.prg:

    Validation: valudf("{}")

    If the routine returns .F., the 'Validation error message' will be displayed and the column value will be blanked out (Add) or set to its previous value (Edit).

    Regards,

    Yvonne Milne

  7. #7
    Member
    Join Date
    Nov 2014
    Location
    Kailua, Hawaii
    Posts
    50
    Hi Yvonne,

    Hmmm, I hadn't thought of using the validation of the column. That's a good idea, I'll have to give it some serious thought.

    Thanks!
    Steve

  8. #8
    Member
    Join Date
    Nov 2014
    Location
    Kailua, Hawaii
    Posts
    50
    Hi Hank,

    Dang it, now that you mention the "!" and "#", I vaguely remember reading it somewhere in the documentation. I'll give it a try, that is a nice UI feature.

    Thanks!
    Steve

  9. #9
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,150
    Hi Steven,

    that's why we (all of us) need the forum. There's no way most of us, me especially, can remember what we need in every situation on a new development platform. I do a lot of searching (hint: Google Search does a better job of searching the forum than the forum search, plus it includes other documents on the site). There are people who can encounter information once and then have it there when needed: most are not like that. In fact, I've always been terrible at that.

    Eventually, though, it all gets integrated into the synapses. We had a saying in the early (90's) Fox days: "become One with The Fox." The same applies here. It takes time, takes doing, takes teaching others ("the best way to learn is to teach"), takes being reminded.

    So, you're welcome, and thank you.

    Hank

Tags for this Thread

Bookmarks

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
  •  
Journey into the Cloud
Join us