dev.gamez.lv Forum Index dev.gamez.lv
Latvian Game Developers Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 

Kā noteikt vienas rindas garumu delfos uz piemēram Tmemo

 
dev.gamez.lv Forum Index -> Programmēšana
View previous topic :: View next topic  
Author Message
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Tue May 03, 2005 5:00 pm    Post subject: Kā noteikt vienas rindas garumu delfos uz piemēram Tmemo

Kā noteikt vienas rindas garumu delfos uz piemēram Tmemo?
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Tue May 03, 2005 6:05 pm    Post subject:

Ja nemaldos, tad piemēram 6-tai rindai : Length(memo.Lines[5]);
LInes masīvs sākas no 0.
Back to top
View user's profile Send e-mail
AnetiX
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 05 Jun 2003
Posts: 573

PostPosted: Tue May 03, 2005 11:20 pm    Post subject:

1) Noteiktai rindiņai: length(memo1.Lines.Strings[0]);
2) Visam tekstam: length(memo1.text);

Update:
hmm.... :) Lines arii izraadas ir TStrings... :) Nebiju pamanijis. Sou, der tad arī tas length(memo1.lines[0]);
_________________
Miljons iemeslu, kāpēc Latvija ir labākā valsts pasaulē
http://www.millionreasonswhylatviaisthebestcountryintheworld.com
Back to top
View user's profile Visit poster's website
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Sat May 07, 2005 11:33 am    Post subject:

Ok tas nu man būtu ta kā skaidrs, bet kā var dabūt daļu tekstu no vienas rindas piemēram pirmo burtu
Back to top
View user's profile Send e-mail
bubu
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 23 Mar 2004
Posts: 3223
Location: Riga

PostPosted: Sat May 07, 2005 11:38 am    Post subject:

Taču tāpat kā no jebkura stringa: strings[1]
Bet ja vajag fragmentu, tad: Copy(strings, 2, 3) - no 2 burta sākot 3 burtus.
Back to top
View user's profile Send e-mail
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Wed May 11, 2005 6:44 pm    Post subject:

Kārtējais stulbais jautājums par delphi kā var tikt klāt sistēmas reģistram ? piemēram nomainiit desktop bildi?
Back to top
View user's profile Send e-mail
AnetiX
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 05 Jun 2003
Posts: 573

PostPosted: Wed May 11, 2005 7:10 pm    Post subject:

Tu googli arii meedz atveert? Ieej www.google.lv, ieraksti, teiksim "change+wallaper+delphi" un viss...
Code:
var
  Reg: TRegIniFile;
begin
  Reg := TRegIniFile.Create('Control Panel');
  Reg.WriteString('desktop', 'Wallpaper', 'c:\bilde.jpg);
  Reg.WriteString('desktop', 'TileWallpaper', '1');
  Reg.Free;
  SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, nil, SPIF_SENDWININICHANGE);
end;

_________________
Miljons iemeslu, kāpēc Latvija ir labākā valsts pasaulē
http://www.millionreasonswhylatviaisthebestcountryintheworld.com
Back to top
View user's profile Visit poster's website
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Wed May 11, 2005 7:33 pm    Post subject:

mēdzu bet slinkums... Very Happy
Back to top
View user's profile Send e-mail
AnetiX
Indago Uzvarētājs
Indago Uzvarētājs


Joined: 05 Jun 2003
Posts: 573

PostPosted: Wed May 11, 2005 7:49 pm    Post subject:

Vieglaak paprasiit citiem vaine?
_________________
Miljons iemeslu, kāpēc Latvija ir labākā valsts pasaulē
http://www.millionreasonswhylatviaisthebestcountryintheworld.com
Back to top
View user's profile Visit poster's website
Kristians



Joined: 06 Apr 2005
Posts: 99
Location: Ventspils

PostPosted: Thu May 12, 2005 11:45 am    Post subject:

točna... Razz
Back to top
View user's profile Send e-mail
Display posts from previous:   
dev.gamez.lv Forum Index -> Programmēšana All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group