Home > database >  Write a loop pb
Write a loop pb

Time:10-26

Mle_1. Text=ls_mleText [ll_rown]


The above statement
Ll_rown from 1 to 100
Ls_mleText ls_mleText [1], [2]... Ls_mleText [100] of the values are know
The result of the need to:

The ls_mleText [ll_rown] respectively displayed in mle_1

Such as: ls_mleText [1] appeared in the mle_1, after a few seconds or click cb_1, shown mle_1 ls_mleText [2], after a few seconds or click cb_1, shown mle_1 ls_mleText [3],,,,,,, always like this

CodePudding user response:

1. Define two instance vaiiables
Int ii_tot_rows=100//100 array
Int ii_rown=0//the current array

2. Create a function, the name is uf_show_content
Ii_rown + +
If ii_rown & gt; Ii_tot_rows then ii_rown=1
Mle_1. Text=ls_mleText [ii_rown]

3. The button cb_1
Uf_show_content ()//the data shown in mle_1

4. Time
A. open evnet
Timer (3)//automatic trigger every three seconds Timer event

B. the timer event
Uf_show_content ()



CodePudding user response:

The
refer to the original poster qq_29098449 response:
mle_1. Text=ls_mleText [ll_rown]


The above statement
Ll_rown from 1 to 100
Ls_mleText ls_mleText [1], [2]... Ls_mleText [100] of the values are know
The result of the need to:

The ls_mleText [ll_rown] respectively displayed in mle_1

Such as: ls_mleText [1] appeared in the mle_1, after a few seconds or click after cb_1 mle_1 ls_mleText shown in [2], and after a few seconds or click cb_1, shown mle_1 ls_mleText [3],,,,,,, always like this


Don't know why there are such requirements, it is recommended that you do not use mle_1 to do this, you can use the datawindow, very convenient also more clear, every few seconds, scroll to the current line to be able to solve your problem to the next line, and relatively clear, if you want to display a line, you can adjust the height of the data window to the right, only shows a row

CodePudding user response:

refer to the second floor lzp_lrp response:
Quote: refer to the original poster qq_29098449 response:

Mle_1. Text=ls_mleText [ll_rown]


The above statement
Ll_rown from 1 to 100
Ls_mleText ls_mleText [1], [2]... Ls_mleText [100] of the values are know
The result of the need to:

The ls_mleText [ll_rown] respectively displayed in mle_1

Such as: ls_mleText [1] appeared in the mle_1, after a few seconds or click after cb_1 mle_1 ls_mleText shown in [2], and after a few seconds or click cb_1, shown mle_1 ls_mleText [3],,,,,,, always like this


Don't know why there are such requirements, it is recommended that you do not use mle_1 to do this, you can use the datawindow, very convenient also more clear, every few seconds, scroll to the current line to be able to solve your problem to the next line, and relatively clear, if you want to display a line, you can adjust the height of the data window to the right, only show a row


Get a Tcp/IP client, transfer of new data in a table in the database

CodePudding user response:

3/f positive solution is mainly defined instance variables
  • Related