Home > database >  How to programmatically to form table column 1 text1 controls the dblclick events write command prog
How to programmatically to form table column 1 text1 controls the dblclick events write command prog

Time:09-26

My way to programming commands in the form after pressing a specific command button will produce a Grid form, the program is:

Thisform. Grid1. Recordsource="sales"
Thisform. Grid1. ColumnCount=6
Thisform. Grid1. Column1. Controlsource='goods sales. Number'
Thisform. Grid1. Column2. Controlsource='date of goods sales. Sales'
Thisform. Grid1. Column3. Controlsource='goods sales. Brand name'
Thisform. Grid1. Column4. Controlsource='unit of goods sales.'
Thisform. Grid1. Column4. Controlsource='goods sales. Number'
Thisform. Grid1. Column6. Controlsource='goods sales. Sales'
Thisform. Grid1. Column1. Header1. Caption='number'
Thisform. Grid1. Column2. Header1. Caption='sales date'
Thisform. Grid1. Column3. Header1. Caption='a' brand name '
Thisform. Grid1. Column4. Header1. Caption='units'
Thisform. Grid1. Column5. Header1. Caption='number'
Thisform. Grid1. Column6. Header1. Caption='sales'
Thisform. Grid1. Column1. Width=80
Thisform. Grid1. Column2. Width=120
Thisform. Grid1. Column3. Width=120
Thisform. Grid1. Column4. Width=50
Thisform. Grid1. Column5. Width=20
Thisform. Grid1. Column6. Width=30

Now need to be in the form of column 1 text1 dblclick event. Write the following command program control, and add to the above program:

Number thisform.container1.text1.Value=https://bbs.csdn.net/topics/goods sales.
thisform.container1.text2.Value=https://bbs.csdn.net/topics/goods sales. Sales date
thisform.container1.text3.Value=https://bbs.csdn.net/topics/goods sales. Brand name
Number thisform.container1.text4.Value=https://bbs.csdn.net/topics/goods sales.
The sale price thisform.container1.text5.Value=https://bbs.csdn.net/topics/goods sales.

Respect to computer expert advice, how to programmatically to form table column 1 text1 controls the dblclick events write command program? Please guide urgently, appreciate!

CodePudding user response:

With execute the command string
Such as defining a global or a private string array (100)
DBclick again () event:
For I=1 to 100
If a (I) & lt;> '
& A (I)
End the if
End for

Then in the other code to write
For I=1 to 100
A (I)='
End for
A (1)="thisform. Container1. Text1. Value='number https://bbs.csdn.net/topics/merchandise sales.'"
A (2)="thisform. Container1. Text2. Value='https://bbs.csdn.net/topics/merchandise sales. Sales date"
A (3)="thisform. Container1. Text3. Value='https://bbs.csdn.net/topics/merchandise sales. Brand name"
A (4)="thisform. Container1. Text4. Value='number https://bbs.csdn.net/topics/merchandise sales.'"
A (5)="thisform. Container1. Text5. Value='https://bbs.csdn.net/topics/merchandise sales. Sales'"

So DbCLIck can perform

CodePudding user response:

Or define a string can
With execute the command string
Such as defining a global or private number string b
DBclick () event:
If b<> '
& B
End the if
Then in the other code to write

B="thisform container1. Text1. Value='https://bbs.csdn.net/topics/merchandise sales. Number'" + CRH (13) + "thisform. Container1. Text2. Value='https://bbs.csdn.net/topics/merchandise sales. Sales date" + CRH (13) + "thisform. Container1. Text3. Value=' https://bbs.csdn.net/topics/merchandise sales. Brand name" + CRH (13) + "thisform. Container1. Text4. Value='number https://bbs.csdn.net/topics/merchandise sales.'" + CRH (13) + "thisform. Container1. Text5. Value='https://bbs.csdn.net/topics/merchandise sales. Sales'"

So DbCLIck can perform

CodePudding user response:

This requires dynamic binding code

CodePudding user response:

Ten beans three teachers:
In the past, I have a lot of problems I ask you many times, and benefited a lot, thank you very much!
This time I ask you a question, delay your precious time,
My way to programming commands in the form after pressing a specific command button will produce a Grid form, the program is:

Thisform. Grid1. Recordsource="sales"
Thisform. Grid1. ColumnCount=6
Thisform. Grid1. Column1. Controlsource='goods sales. Number'
Thisform. Grid1. Column2. Controlsource='date of goods sales. Sales'
Thisform. Grid1. Column3. Controlsource='goods sales. Brand name'
Thisform. Grid1. Column4. Controlsource='unit of goods sales.'
Thisform. Grid1. Column4. Controlsource='goods sales. Number'
Thisform. Grid1. Column6. Controlsource='goods sales. Sales'
Thisform. Grid1. Column1. Header1. Caption='number'
Thisform. Grid1. Column2. Header1. Caption='sales date'
Thisform. Grid1. Column3. Header1. Caption='a' brand name '
Thisform. Grid1. Column4. Header1. Caption='units'
Thisform. Grid1. Column5. Header1. Caption='number'
Thisform. Grid1. Column6. Header1. Caption='sales'
Thisform. Grid1. Column1. Width=80
Thisform. Grid1. Column2. Width=120
Thisform. Grid1. Column3. Width=120
Thisform. Grid1. Column4. Width=50
Thisform. Grid1. Column5. Width=20
Thisform. Grid1. Column6. Width=30

Now need to have a function in compiling form: double-click the form of the adults column 1, will be in the form of the specified text box displays the form field data of the line
So, I added in the extent to which the above the following procedures:

Procedure thisform. Grod1. Column1. Text1. Dblclic
Number thisform.container1.text1.Value=https://bbs.csdn.net/topics/goods sales.
thisform.container1.text2.Value=https://bbs.csdn.net/topics/goods sales. Sales date
thisform.container1.text3.Value=https://bbs.csdn.net/topics/goods sales. Brand name
Number thisform.container1.text4.Value=https://bbs.csdn.net/topics/goods sales.
The sale price thisform.container1.text5.Value=https://bbs.csdn.net/topics/goods sales.
Endproc

But at run time, the computer have errors, pointed out that procedure thisform. Grod1. Column1. Text1. Dblclic command contains doesn't recognize phrases or keywords,
To ask you, how to programmatically to form table column 1 text1 controls the dblclick events write command program? Please guide urgently, appreciate!

CodePudding user response:

Procedure thisform. Grod1. Column1. Text1. Dblclic
Write wrong, less a letter k
Procedure thisform. Grod1. Column1. Text1. Dblclick

CodePudding user response:

My way to programming commands in the form after pressing a specific command button will produce a Grid form,

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  •  Tags:  
  • VFP
  • Related