Tuesday, October 12, 2010

PB control "macro substitution"

hl2000_2001 Q:
I would like to write a program code is as follows:

P_1.PictureName =''help.gif''
P_2.PictureName =''help.gif''
P_3.PictureName =''help.gif''
P_4.PictureName =''help.gif''
P_5.PictureName =''help.gif''

Is there a simple way, let me use the loop to achieve?

Such as:
for i = 1 to 5
P_ ***. PictureName =''help.gif''
This is very anxious to see me soon please!!

newkid A:

Assume that this code is written in the OPEN WINDOW case, THIS is the current WINDOW:
int i
picture lp
for i = 1 to upperbound (this.Control)
if typeof (this.Control [i]) = picture! then
lp = parent.Control [i]
/ / Can lp.classname () to further determine not to modify the image control
lp.picturename =''help.gif''
end if

You can also define a picture variable array to operate, through OpenUserObject () so that they appear in the window.

NetFish A:

int i
picture p_temp
for i = 1 to Upperbound (w_test.control)
if left (w_test.control [i]. classname, 2) =''p_''then
p_temp = w_test.control [i]
p_temp.picturename =''.......''
end if
About the meaning, not verified, testing about it.

Recommended links:

MPG to 3GP

FLV to Zune

Trace Mobile Phone Number How To Trace Cell


No comments:

Post a Comment