Home > database >  Inside the UO of custom code, executed with window button is clicked
Inside the UO of custom code, executed with window button is clicked

Time:10-22

Question is like this, I am in a custom UO write code, to carry out the same window next button clicked event, don't know how to do, please master code sample, thank you,
The heaviest if the button name not sure, may be cb_1, also may be cb_2, can write dynamic button name ah,

CodePudding user response:

Button in the UO like this flexible control lb_button (button name)=i_window name (the window) + ' '+ i_cb (button name)

CodePudding user response:

From the window of the Control of [] to find "the ClassName () is equal to the button name" of the object, you can get a response button,

CodePudding user response:

refer to the second floor HXDZLQ response:
from the window of the Control of [] to find "the ClassName () is equal to the button name" of the object, can get a response button,

Window names and buttons are uo into participation, dynamic, how make? Can you give the code examples? Fixed writing death I know w_man cb_1. Postenvent (clicked!) , please must give a sample,

CodePudding user response:

So try (code I didn't try, there may be individual fault, but should be able to let you words control name and name call event,)

1) according to the string (window) place for lw_target

Declared a global variable:
Windows gw_refs []

In the window Open events that need to refer to the current window to join gw_refs [] : gw_refs [UpperBound (gw_refs []) + 1=This
Use in the event of need reference window Close Isvalid () and the ClassName () 'lookup' and handle gw_refs [] to the corresponding window, SetNull (gw_refs [I])

2) obtaining control corresponding references,
Windowobject lo_target
Int I

For I=1 to UpperBound (lw_target. Control [])
If lw_target. Control [I] the ClassName ()='YourButtonName'
Lo_target=lw_target. Control [I].
The Exit
End the If
Next

Lo_target. Dynamic Event Clicked ()

CodePudding user response:

Gave you an example, you consider, this example test pass under the pb10

http://download.csdn.net/detail/lzp_lrp/9266455

CodePudding user response:

Gave you an example, you consider, this example test pass under the pb10

http://download.csdn.net/detail/lzp_lrp/9266455

CodePudding user response:

refer to 6th floor lzp_lrp response:
gave you an example, you consider, this example test pass under the pb10

http://download.csdn.net/detail/lzp_lrp/9266455

Can you give me a pb9 ah, I can only use pb9, I am a low hand, send all points first, thank you,

CodePudding user response:

Pb10 I install,

CodePudding user response:

refer to 6th floor lzp_lrp response:
gave you an example, you consider, this example test pass under the pb10

http://download.csdn.net/detail/lzp_lrp/9266455


Install 10 done, thank you,

CodePudding user response:

references 9 f qq_32683783 response:
Quote: refer to the sixth floor lzp_lrp response:

Gave you an example, you consider, this example test pass under the pb10

http://download.csdn.net/detail/lzp_lrp/9266455


Install 10 done, thank you,

If the problem solved, please as soon as possible and stick
  • Related