A user asked for a way to turn bubble help for a form off and on. Here is how you can do it using Xbasic.
First, define these functions as global UDFs.
Then, in the form's Init event put this code:
This code will create a shared variable that is an array that stores all of the objects that have bubble help and the current value of the bubble help text.
Then, define a button to turn bubble help off:
And define this as the button to turn bubble help on again:
First, define these functions as global UDFs.
Code:
function captureBubbleHelp as v (a as p, obj as p) dim controls as c controls = obj.child_enum("r;e=this.name() + '|'+this.bubble_help") controls = *for_each(x,word(x,1,"|"),controls) dim count as n count = line_count(controls) a.resize(count) a.clear() dim i as n for i = 1 to count a[i].name = word(controls,i,crlf()) a[i].bubble_help = obj.child(a[i].name).bubble_help next i end function
Code:
function turnBubbleHelpOff as v (a as p, obj as p ) dim count as n count = a.first_empty("name")-1 dim i as n dim c as p for i = 1 to count c = obj.child(a[i].name) c.bubble_help = "" next i end function
Code:
function turnBubbleHelpOn as v (a as p, obj as p ) dim count as n count = a.first_empty("name")-1 dim i as n dim c as p for i = 1 to count c = obj.child(a[i].name) c.bubble_help = a[i].bubble_help next i end function
Then, in the form's Init event put this code:
Code:
delete shared a dim shared a[0] as p captureBubbleHelp(a,topparent.this)
Then, define a button to turn bubble help off:
Code:
turnBubbleHelpOff(a,topparent.this)
And define this as the button to turn bubble help on again:
Code:
turnBubbleHelpOn(a,topparent.this)
Comment