Arsip: komponen check box

 
user image
more 16 years ago

vera

mas2 aku nanya donk aku punya komponen checbox sekitar 20 trus ada captionnya nah gmana caranya agar aku bisa nampung caption check box yg ke cjeck list ke dalam komponen memo aku dah coba seperti ini procedure TFrmProduk.takeCaption; var i: integer; begin for i := 1 to ComponentCount - 1 do begin if Components[i] is TCheckBox then begin if (Components[i] as TCheckBox).Checked = true then Memo1.Lines.Add(Components[i].Name); end; end; end; untuk name bisa cman ko untuk caption ko ga bisa tolong donk
user image
more 16 years ago

jrp

Memo1.Lines.Add(Components[i].Name);
diubah menjadi : Memo1.Lines.Add(TCheckBox(Components[i]).Caption); dan juga loop dengan i harusnya dimulai dari 0, bukan 1. jrp
user image
more 16 years ago

mas_kofa


Memo1.Lines.Add(TCheckBox(Components[i]).Caption); 
user image
more 16 years ago

mas_kofa

wah kedahuluan ama @jrp....
user image
more 16 years ago

jrp

:D dari Jogja juga dab? :D
user image
more 16 years ago

mas_kofa

iya mas......
user image
more 16 years ago

vera

makasih mas udah bisa. cma ad 1 lgi nih . klo msalkan di check box.captionnya itu seperti ini 1.makan 2.ngemil 13.bangun 17. belanja nah yg ingin diambilnya itu hanya text yg tidak mengandung titik dan angka gmana mas mksih sbelumnya
user image
more 16 years ago

mas_kofa

sCaption := TCheckBox(Components[i]).Caption; s := ''; for i := 1 to length(sCaption) do if not (sCaption[i] in ) then s := s + sCaption[i]; sCaption := s;
user image
more 16 years ago

vera

procedure TFrmProduk.takeCaption; var i, j: integer; scaption, s: string; begin Memo1.Lines.Clear; for i := 0 to ComponentCount - 1 do begin if Components[i] is TCheckBox then begin if (Components[i] as TCheckBox).Checked = true then scaption := (TCheckBox(Components[i]).Caption); end; s := ''; for j := 1 to length(sCaption) do if not (sCaption[j] in ) then s := s + sCaption[j]; sCaption := s; Memo1.Text := s; end; tpi yg keluar hanya 1 caption check box saja bagaimana yah mas
user image
more 16 years ago

DelphiExpert

pake regular expression xixix :mrgreen:
more ...
  • Pages:
  • 1
  • 2
Share to

AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now: https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com