Q:
in a standard section, I've iserted a simple VFP Gadget, with 2 label and 2 textbox.
When I load the page, the gadget is correctly populated.
When I skip records of section, how I can refresh the gadget object?
A:
A custom gadget should have a refresh method which is called when required.
It's a method in the gadget object.
Declare public variables and assign the objects. These public variables should be in a namespace if you edited the custom gadget through the UI.
a page with 2 section:
in the seconds section I've inserted a VFP Gadget:
on the "Custom filename": gadget2.prg
Code:
//
// Lianja custom recital gadget "gadget2"
//
namespace martinelli_articoli
public des_web, testo_web
define class gadget2 as gadget
proc init()
// place your section "init" code here
endproc
proc add()
// place your section "add" code here
endproc
proc delete()
// place your "delete" code here
endproc
proc first()
// place your goto "top" here
endproc
proc previous()
// place your move "previous" code here
endproc
proc next()
// place your move "next" code here
endproc
proc last()
// place your goto "bottom" code here
endproc
proc watch()
// place your "watch" code here
endproc
proc refresh()
// place your "refresh" code here
des_web.text = Q_RemoveHTMLTag(ARTICOLI.DES_WEB)
testo_web.text = Q_RemoveHTMLTag(ARTICOLI.TESTO_WEB)
endproc
enddefine
proc gadget2
gadget2 = createobject("gadget2")
gadget2.addobject("lbl_desweb", "Label")
lbl_desweb.caption = "Descrizione WEB"
gadget2.addobject("des_web", "Textbox")
des_web.text = Q_RemoveHTMLTag(ARTICOLI.DES_WEB)
gadget2.addobject("lbl_testoweb", "Label")
lbl_testoweb.caption = "Testo WEB"
gadget2.addobject("testo_web", "Textbox")
testo_web.text = Q_RemoveHTMLTag(ARTICOLI.TESTO_WEB)
//
return gadget2
The grid gadget example
grid Gadget Example Lianja - https://youtu.be/a0v3GYwO3h8
Q:
Actionbar. How to hide it in the grid gadget?
A:
<nameofgrid>.actionbar =.f.
All topics in [Answers] alphabetically: http://www.lianja.com/community/show...p?2717-Answers
Bookmarks