change xbrowse footer menu

change xbrowse footer menu

Postby reinaldocrespo » Fri Jan 06, 2023 11:23 pm

Hello everyone;

I dropped by the forum in need to change standard footer menu (sum, count, ave ...) for my own and saw messages about openAI writing harbour code so I tried it.

I asked: "write harbour code that modifies xbrowse footer popup menu"

Here is what I got:
Code: Select all  Expand view

FUNCTION modifyXBrowseFooterPopupMenu()
  LOCAL oPopupMenu AS Object

  oPopupMenu := XBROWSE.GetFooterPopupMenu()

  oPopupMenu.AddItem("Custom Item 1", "customFunction1()")
  oPopupMenu.AddSeparator()
  oPopupMenu.AddItem("Custom Item 2", "customFunction2()")
  oPopupMenu.AddSeparator()
  oPopupMenu.AddItem("Custom Item 3", "customFunction3()")

  RETURN NIL

FUNCTION customFunction1()
  // Add custom code for Custom Item 1 here
  RETURN NIL

FUNCTION customFunction2()
  // Add custom code for Custom Item 2 here
  RETURN NIL

FUNCTION customFunction3()
  // Add custom code for Custom Item 3 here
  RETURN NIL
 


I have to admit it looks pretty legit but this is obviously not going to work.

Can someone suggest the "real" solution?

Thank you.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: change xbrowse footer menu

Postby nageswaragunupudi » Sat Jan 07, 2023 6:03 am

There is a good example in
samples\testxbr3.prg

Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10254
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: change xbrowse footer menu

Postby reinaldocrespo » Sat Jan 07, 2023 4:56 pm

Yes, Yes, Yes. Now that I look at it, it is clear.

I will probably tell Chatgpt what the real solution is. Maybe it will be able to help me later.

It is always good to hear from you, Mr. Rao.

Thank you.
User avatar
reinaldocrespo
 
Posts: 972
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], karinha and 15 guests