delphi中怎樣重新整理Form2的StringGrid當中的資料

2025-05-15 03:01:02 字數 2676 閱讀 3797

1樓:

在拍巨集。type

tform2 = class(tform)stringgrid1: tstringgrid;

private

private declarations }public

public declarations }end;裡面,應該襲物冊是這螞或樣。

typetform2 = class(tform)stringgrid1: tstringgrid;

procedure formshow(sender: tobject);

private

private declarations }public

public declarations }end;

2樓:網友

function exportstrgridtoexcel(args: array of const): boolean;

varicount, jcount: integer;

sheet: variant;

i: integer;

beginresult :=false;

false;

end;try

except

exit;end;

=high(args) +1;

for i :=low(args) to high(args) do

beginwith tstringgrid(args[i].vobject) do

begin=name;

sheet :=;

for jcount :=0 to rowcount - 1 do

beginfor icount :=0 to colcount - 1 do

1, icount + 1] :cells[icount, jcount];

end;end;

end;end;

true;end;調槐擾中李衫用方法:

exportstrgridtoexcel([stringgrid1]);

exportstrgridtoexcel([stringgrid1, stringgrid2]);

delphi中,怎麼把stringgrid中的資料存到資料庫裡???

3樓:網友

迴圈遍歷stringgrid,stringgrid有rowcount,colcount屬性。照樓上的取的值。別說有了值不會儲存資料吧?

4樓:網友

stringgrid的cells方法可以得到某個單元格的值。

2] 第一列的第2行。

delphi stringgrid

5樓:網友

暈槐孫清,分好少。

表示選中的列。

凱並/表示選中的行。

對選中的單元格操作鉛前即。

=想要輸入的值'

ok?拿分走人。

delphi stringgrid 不能輸入資料

6樓:網友

選中stringgrid控制項,在屬性欄裡找到options按+號,再找到goediting改為true就可以了。

小白:關於delphi中匯入資料到stringgrid的問題

7樓:網友

如果不想作特別處理,就把實驗資料作成 csv檔格式,也就是用逗號分隔資料,例:

a, b, c,d

這樣只要利用 ) 就可以把資料匯進來。

delphi stringgrid的問題

8樓:e熊

在**中增加乙個memo控制項,用亂渣戶不選中stringgrid時間,將其設為不可見;

當使用者選中某一格時,則將該memo控制項調整尺寸襲陪乎貼到該格單元格上,並將該單元格內容復拍悉制到memo控制項中,再置其為可見。

9樓:網友

如果加個滾動條的話比較煩,你可以把全部資訊寫進一虧友個提示裡面,當滑鼠放上去的時候,會自動出現迅空吵全部的提示,這樣畝侍就簡單多了。

如何向delphi中的stringgrid元件 輸入資料

10樓:網友

用下面的語句為它輸入資料。

行,列]:=

delphi 的stringgrid問題

11樓:網友

procedure : tobject; acol,arow: integer; rect: trect; state: tgriddrawstate);

vargrow:integer;

i:integer;

begin/if i=1 then

beginif (acol=3) then

begin= clred; //字型顏色為紅的:=clmoneygreen; //背景為 美元綠色;

加上這句話就可以了,arow]);

end;/執行之後。

單元格中的字都看不見了。

怎麼解決。end;end;

12樓:網友

要麼調整字型為反白, 要麼調整你繪的顏色!

c中,form2怎樣才能更改form1上控制項的屬性 引數

建立乙個公共類 如 publicclass名 public class publicclass把form1的值賦給 publicclass.context 當單擊form2時的事件時,你只需要修改publicclass.context值即可。這就是兩個窗體傳參的方法。也是最通用的方法,就是建乙個公共...

delphi中資料怎樣顯示在edit中

用dbedit 只要設定datasource 和 field屬性就可以了。不能用dbedit,只有用edit才可以實現這種功能。dbgrid中有乙個叫做oncellclick的事件,插入 即可。delphi中edit怎麼顯示資料庫裡的資料?用sql語句 在combobox的change事件中 var...

form表單中的onsubmit方法可以同時提交

可以,把方法同時寫在submit中就可以了,但是你得寫法是錯誤的,語法邏輯不對,checki its 應該直接寫在check 裡面。你這樣寫是沒有語法錯誤的,但有邏輯錯誤哦!程式當遇到return 之後就不會再執行下一句了,所以你的checki its 是永遠不會執行的!我不知道你想幹什麼,或者,你...