FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour change xbrowse footer menu
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
change xbrowse footer menu
Posted: 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 (fw): Select all Collapse
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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: change xbrowse footer menu
Posted: Sat Jan 07, 2023 06:03 AM
There is a good example in
samples\testxbr3.prg

Regards



G. N. Rao.

Hyderabad, India
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: change xbrowse footer menu
Posted: Sat Jan 07, 2023 04: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.

Continue the discussion