dear all
There are 10 textbox number from text_01 ~ text_10 on main window.
I would like to get value from each textbox with loop.
So following are parts of my routin
01 for m_loop2:= 1 to 10
02 m_number:=replicate('0',2-len(alltrim(str(m_loop2,2))))+alltrim(str(m_loop2,2))
03 m_boject:=('A1C01.Text_'+m_number+'.VALUE')
04 MsgInfo(if(m_loop1==1,'1.','2.')+str(m_loop2,2)+&(m_boject))
05 next
I also try alternative way as following
01 for m_loop2:= 1 to 10
02 m_number:=replicate('0',2-len(alltrim(str(m_loop2,2))))+alltrim(str(m_loop2,2))
03 m_boject:=('A1C01.Text_'+m_number+'.VALUE')
04 m_object2:=&(m_boject)
05 MsgInfo(if(m_loop1==1,'1.','2.')+str(m_loop2,2)+&(m_boject2))
06 next
The same argument error on lin 04 for first way, and line 5 for second way.
Is there possible to do as I desired ?
Please Help
Best Regards
chen min
Question of convert string to control's value with marco '&'
Moderator: Rathinagiri
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Question of convert string to control's value with marco
You can try getproperty() function for this.
Syntax:
cValue := getproperty( cWindowName, cTextBoxName, "VALUE" )
In your case,
MsgInfo( GetProperty( 'A1C01', 'Text_'+m_number, 'VALUE' ) )
Syntax:
cValue := getproperty( cWindowName, cTextBoxName, "VALUE" )
In your case,
MsgInfo( GetProperty( 'A1C01', 'Text_'+m_number, 'VALUE' ) )
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
-
huangchenmin
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
Re: Question of convert string to control's value with marco
rathinagiri:rathinagiri wrote:You can try getproperty() function for this.
Syntax:
cValue := getproperty( cWindowName, cTextBoxName, "VALUE" )
In your case,......
Thank you very very much!
chen min