Procedure/Function call to set/change ADM2 toolbar button image on the fly (programmatically) - Forum - OpenEdge Development - Progress Community

Procedure/Function call to set/change ADM2 toolbar button image on the fly (programmatically)

 Forum

Procedure/Function call to set/change ADM2 toolbar button image on the fly (programmatically)

This question is not answered

Hi All,

Having a senior moment.  Cannot for the life of me remember the call to set/change ADM2 toolbar button images programmatically.

Name of the proc/func and a sample snippet would be great.

Thank you.

Scott

All Replies
  • In toolbar.p – loadImage(<btnHdl>,<imagePath>).
     
    Dynamic-function(“loadImage” in <toolbarhdl>,<btnHdl>,<imagePath>).
     
     
    Thanks!
     
    Rick Terrell
    Principle Consultant
    Professional Services
    Progress
    Progress
    5000 Peachtree Industrial Blvd. | Suite 100 | Norcross, GA 30071
    phone
    (770) 449-9696 x233007
    Mobile
    (407) 463-1409
    Twitter
    Facebook
    LinkedIn
    Google+
     
     
  • Hi Rick,

    Thanks for your reply!  I'm using adm2/dyntoolbar.w.  There is no LoadImage function in it.  Not in Toolbar.p either near as I can tell.  I'm running OE 11.1 by the way.

    Thank you for any guidance you can offer!

    Scott (smt62@yahoo.com)

  • Hi Rick,

    Figured out how to do it albeit not exactly as suggested.  btnHdl:LOAD-IMAGE(<imagePath>) works just fine.  

    Thank you for the inspiration!

    Scott

  • Glad you got it sorted out.  I was going to suggest just a straight assignment like that also.
     
    Don’t know when loadImage got added to toolbar.p.  It is in OE11.7.1, which is where I was looking.
     
     
    Thanks!
     
    Rick Terrell
    Principle Consultant
    Professional Services
    Progress
    Progress
    5000 Peachtree Industrial Blvd. | Suite 100 | Norcross, GA 30071
    phone
    (770) 449-9696 x233007
    Mobile
    (407) 463-1409
    Twitter
    Facebook
    LinkedIn
    Google+
     
     
  • loadImage() in adm2/toolbar.p is marked as PRIVATE which explains why you can’t see it.
     
    You can see the code at https://github.com/consultingwerk/ADE-Sourcecode/blob/964480c051b0c09a9b75bd02d8453afe5ab35b25/src/adm2/toolbar.p#L12845 
     
    Which does LOAD-IMAGE with some extra checks etc.