Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

kako da upisem zvezdice u edit

[es] :: C programiranje :: kako da upisem zvezdice u edit

[ Pregleda: 1269 | Odgovora: 8 ]

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

coosaduck
Aleksandar Markicevic
Kusadak

Član broj: 86772
Poruke: 27
213.244.197.*



Profil

icon kako da upisem zvezdice u edit03.03.2006. u 13:36

Zanima me kako da kada upisujem slova u edit da se ona zamene zvezdicama ,kao kod konekcije za internet. help me please
03.03.2006. u 13:36 

seymour
Novi sad

Član broj: 57634
Poruke: 64
..mtsns-ns.customer.sbb.co.yu.

Sajt: www.extrafull.com


Profil

icon Re: kako da upisem zvezdice u edit03.03.2006. u 13:55
Ako je pitanje vezano za TEdit komponentu u Borland Builderu,potrebno je samo da stavis u property PasswordChar TEdit komponente znak *(ako zelis da se skriveni znaci predstave standardno zvezdicom) .Dinamicki bi to bilo:
....
TEdit *Edit1; ///neki primerak TEdit-a
....
Edit1->PasswordChar='*'; //recimo u onCreate dogadjaju za formu

Naravno ja ti preporucujem da to ipak odradis vizualno u object inspectory.

Naravno ako zelis da ti se znaci skrivaju sa recimo #,mozes umesto '*' staviti '#'...
03.03.2006. u 13:55 

IDE

Član broj: 53403
Poruke: 564
*.crnagora.net.



Profil

icon Re: kako da upisem zvezdice u edit03.03.2006. u 22:00
pa imas MaskEdit komponentu....
koristi nju...
there's something out there
waiting for us,
and it ain't no man...
03.03.2006. u 22:00 

X Files
Vladimir Stefanovic
Pozarevac

SuperModerator
Član broj: 15100
Poruke: 3403
*.nat-pool.po.sbb.co.yu.

Jabber: xfiles@elitesecurity.org
Sajt: www.antivari.com


Profil

icon Re: kako da upisem zvezdice u edit04.03.2006. u 08:44
Citat:

Edit1->PasswordChar='*'; //recimo u onCreate dogadjaju za formu


Nikad u BCB-u ne koristite OnCreate() niti OnDestroy() dogadjaje. Ti dogadjaji
postoje zbog kompatibilnosti sa Delphi-jem i u njemu su sasvim legitimni.

Kod BCB-a:

OnCreate() moze biti pozvana PRE konstruktora a OnDestroy() POSLE destruktora,
što je u C++ neozvoljeno, i pravi puno problema kod PRAVOG C++.

Ta dva dogadjaja su izvor mnogih problema u BCB-u, pogotovo nakon uvodjenja
OldCreateOrder propertija.

Umesto OnCreate() koristi PRAVI konstruktor:

Code:

__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
   // konstruktor
}


a umesto OnDestroy() koristi PRAVI destruktor (koji ces morati sam da napravis
jer ga IDE ne pravi):

Code:

// --- H ---
__fastcall ~TForm1();

// --- CPP ---
__fastcall TForm1::~TForm1()
{
   // destruktor
}

FREEWARE
Di rečnik, v1.0.058 (srp-eng/eng-srp priručni rečnik)
http://www.antivari.com
04.03.2006. u 08:44 

seymour
Novi sad

Član broj: 57634
Poruke: 64
..mtsns-ns.customer.sbb.co.yu.

Sajt: www.extrafull.com


Profil

icon Re: kako da upisem zvezdice u edit04.03.2006. u 16:16
Citat:

OnCreate() moze biti pozvana PRE konstruktora a OnDestroy() POSLE destruktora,
što je u C++ neozvoljeno, i pravi puno problema kod PRAVOG C++.

Da li ovde govorimo o portabilnosti aplikacija pisanih u builderu sa drugim prevodiocima i okruzenjima,kao i starim verzijama istog?
O pomenutom property help kaze sledece:
"When OldCreateOrder is false (the default) the OnCreate event occurs after all constructors are finished and the OnDestroy event occurs before any destructors are called."
Sto bi me navelo da ako je false,a sto jeste po defaultu,da se tacno zna kada ce biti pozvan onCreate...Mada,ako si mislio da to stvara problema pri prelasku na neki drugi IDE,onda se slazem;ne treba koristiti te dogadjaje.
04.03.2006. u 16:16 

coosaduck
Aleksandar Markicevic
Kusadak

Član broj: 86772
Poruke: 27
*.vdial.verat.net.



Profil

icon Re: kako da upisem zvezdice u edit04.03.2006. u 18:02
Pa da PassworsChar. Iako sam pocetnik ovo sam morao da vidim.
04.03.2006. u 18:02 

X Files
Vladimir Stefanovic
Pozarevac

SuperModerator
Član broj: 15100
Poruke: 3403
*.nat-pool.po.sbb.co.yu.

Jabber: xfiles@elitesecurity.org
Sajt: www.antivari.com


Profil

icon Re: kako da upisem zvezdice u edit04.03.2006. u 18:03
OnCreate() i OnDestroy() u BCB-u (ne u Delphiju!) imaju dugu istoriju problema
(koji su dokumentovani i u QA).

To je odavno identifikovan problem, pa najveci poznavaoci BCB-a stalno pocetnike
upozoravaju da ih ne koriste. Sada me mrzi da ti trazim threadove po netu, ali
evo jedan iz moje arhive:

Citat:

Ah ha! The short answer is - don't! OnCreate and OnDestroy are Delphi-isms
that should be avoided like the plague in C++ code. Here is Chris Uzdavinis
excellent post on this:


OnCreate is a terrible decision to use, and it should not be there at
all except that Delphi code uses it. Other than the order of being
called, there are several other problems as well. In C++ code, I beg
and plead people to not use it as if OnCreate didn't exist.


In addition to the unpredictable calling order (well, it is
predictable but still surprises a lot of people), there are some other
significant problems with these events. These are major risks and
should not be taken lightly.


* derived objects won't have the base OnCreate called when they are
created (unless users explicitly call it.)


* dynamic instantiation (in program code) of a object will NOT call
the OnCreate event. [problem is fixed in bcb 4 or 5 (not sure
which), but exists in older versions


* there is no initializer list for OnCreate, so if OnCreate is all
that is used only objects that have default constructors can be
used. If you have non-default constructors that need to be called,
you *have* to put the code in the true constructor. If the
constructor must pass another pointer member to that constructor,
and that pointer is initialized in OnCreate, it is potentially not
initialized at the time of the constructor and the application will
crash. If your class holds a reference to an object, then you can't
use OnCreate to initialize the reference, you MUST use a
constructor.


* being a normal function, your OnCreate handler can be called
multiple times (accidently, of course) which an potentially be
disastrous.


* Copy construction doesn't call OnCreate at all. (However, in BCB5
copy construction of vcl objects is prevented at compile time, older
versions did not.)


* THE INITIALIZATION DONE BY FORMCREATE CAN POSSIBLY RUN *BEFORE* YOUR
CONSTRUCOTR, WHICH MEANS THAT YOUR ENTIRE PROGRAM BEHAVIOR IS
POSSIBLY UNDEFINED. This is an ***EXTREMELY SERIOUS*** problem.


FREEWARE
Di rečnik, v1.0.058 (srp-eng/eng-srp priručni rečnik)
http://www.antivari.com
04.03.2006. u 18:03 

seymour
Novi sad

Član broj: 57634
Poruke: 64
..mtsns-ns.customer.sbb.co.yu.

Sajt: www.extrafull.com


Profil

icon Re: kako da upisem zvezdice u edit05.03.2006. u 17:24
Ok u pravu si,samo ja do sada nisam imao takvih problema.Znaci,ipak sve potrebno pisati u konstruktoru,odnosno destruktoru forme.
05.03.2006. u 17:24 

leka
Dejan Lekić
senior software engineer, 3Developers Ltd.
London, UK

Član broj: 234
Poruke: 2530
..81.static.gus.vf.siwnet.net.

Sajt: dejan.lekic.org


Profil

icon Re: kako da upisem zvezdice u edit06.03.2006. u 16:09
Moram da primetim da pokretac ove niti nije uopste spomenuo koji GUI toolkit koristi, tako da zapravo NIKO nije mogao da mu koncizno odgovori na pitanje bez nekog nagadjanja...
Dejan Lekic
software engineer, MySQL/PgSQL DBA, sysadmin
06.03.2006. u 16:09 

[es] :: C programiranje :: kako da upisem zvezdice u edit

[ Pregleda: 1269 | Odgovora: 8 ]

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.