Procedure/Function call to set/change ADM2 toolbar button im

Posted by scott1962 on 14-Nov-2017 11:33

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

Posted by Rick Terrell on 14-Nov-2017 11:54

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+
 
 

Posted by scott1962 on 15-Nov-2017 13:12

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)

Posted by scott1962 on 15-Nov-2017 14:32

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

Posted by Rick Terrell on 16-Nov-2017 08:36

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+
 
 

Posted by Peter Judge on 21-Nov-2017 06:48

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.
 

This thread is closed