|
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
Batman
註冊時間: 2003-11-15 文章: 348
第 1 樓
|
發表於: 星期二 四月 21, 2015 8:46 pm 文章主題: Grid內的Container可否這樣顯示? |
|
|
表有一欄位Position, 祗是存入1,2或3這3個數字, 分別代表將處理的圖形3個位置, 在form上有一Method: setposition處理, 傳入1,2或3便可.
Grid的Column1放入了Container, Container內有一圖形Image1.
我應如何設定Column的ControlSource, 以在Grid內顯示圖形的不同位置?如
Column1.ControlSource="thisform.setPosition(表.Position)"
它說setPosition不是array, 或是vfp是不可以這樣顯示, 如 |
|
回頂端 |
|
|
Batman
註冊時間: 2003-11-15 文章: 348
第 2 樓
|
發表於: 星期二 四月 21, 2015 9:56 pm 文章主題: |
|
|
再測試, 還是不行, 祗是出了New.bmp
Create Cursor tmpImage (nImage i)
insert into tmpImage (nImage) values (1)
insert into tmpImage (nImage) values (2)
insert into tmpImage (nImage) values (3)
go top
With This.Grid1
.RecordSource='tmpImage'
.ColumnCount=2
.Column1.removeObject('text1')
.Column1.newObject('Image1','Image')
.Column1.CurrentControl='Image1'
.Column1.Sparse=.f.
.Column1.Image1.Picture=iif(nImage=1,'New.bmp',iif(nImage=2,'Edit.bmp','Delete.bmp'))
.Column2.Controlsource="iif(nImage=1,'New',iif(nImage=2,'Edit','Delete.bmp'))"
EndWith
Create Cursor tmpImage (nImage i)
insert into tmpImage (nImage) values (1)
insert into tmpImage (nImage) values (2)
insert into tmpImage (nImage) values (3)
go top
With This.Grid1
.RecordSource='tmpImage'
.ColumnCount=2
.Column1.removeObject('text1')
.Column1.newObject('Image1','Image')
.Column1.Sparse=.f.
.Column1.CurrentControl='Image1'
.Column1.Image1.Picture=iif(nImage=1,'..\DevImages\New.bmp',iif(nImage=2,'..\DevImages\Edit.bmp','..\DevImages\Delete.bmp'))
.Column2.Controlsource="iif(nImage=1,'FolderClose',iif(nImage=2,'FolderOpen','New.bmp'))"
EndWith |
|
回頂端 |
|
|
Batman
註冊時間: 2003-11-15 文章: 348
第 3 樓
|
發表於: 星期二 四月 21, 2015 10:10 pm 文章主題: |
|
|
參考了小賴兄以前解答, 做到了
1. Form 新增一個 Method : 如SetImage()內容如下:
ThisForm.Grid1.Column1.Image1.Picture = 圖片位置
2.ThisForm.Grid1.Column1之DynamicCurrentControl
設定成 = "ThisForm.SetImage()" (含 = 與 ")
3.ThisForm.Grid1.Column1.Sparse = .F. |
|
回頂端 |
|
|
Kuma
註冊時間: 2011-06-22 文章: 39 來自: Taichung
第 4 樓
|
發表於: 星期五 七月 22, 2022 10:36 am 文章主題: |
|
|
請問如何 ... Form 新增一個 Method |
|
回頂端 |
|
|
syntech
註冊時間: 2003-05-16 文章: 4212 來自: Taipei,Taiwan
第 5 樓
|
發表於: 星期五 七月 22, 2022 11:25 am 文章主題: |
|
|
[表單] [新方法]或[表單] [編輯屬性/方法程序] _________________ 如果公司有下列困擾:
1. 找不到便宜,快速,簡易的 生產排程軟體
2. 不知道如何快速排定 採購計劃
3. 成本抓不準,自己算比軟體算有用
4. 想學習系統規劃,想找系統架構的顧問
請聯絡我們,也許我們幫得上忙 |
|
回頂端 |
|
|
Kuma
註冊時間: 2011-06-22 文章: 39 來自: Taichung
第 6 樓
|
發表於: 星期五 七月 22, 2022 11:40 am 文章主題: |
|
|
我用 vfp9 英文版, 如何 form add method |
|
回頂端 |
|
|
小賴
註冊時間: 2004-12-27 文章: 470
第 7 樓
|
發表於: 星期五 七月 22, 2022 12:33 pm 文章主題: |
|
|
syntech 大大在說你都沒有在看 ..
[表單] [新方法]或[表單] [編輯屬性/方法程序]
1.開啟你的 Form
2. 從功能表開始依syntech 提供的順序一路點下去...
英文版的是 [Form][New Method] ....
或 [Form][Edit Property/Method].... |
|
回頂端 |
|
|
CPS0204
註冊時間: 2014-08-24 文章: 441
第 8 樓
|
發表於: 星期五 七月 22, 2022 1:17 pm 文章主題: |
|
|
[quote="小賴"]syntech 大大在說你都沒有在看 ..
賴sir 7pupu
[color=red][/color] |
|
回頂端 |
|
|
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|