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

C# disable ListView keypress change item

[es] :: .NET :: .NET Desktop razvoj :: C# disable ListView keypress change item

[ Pregleda: 2642 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

xxxrugby

Član broj: 16068
Poruke: 653
*.adsl.net.t-com.hr.

Sajt: www.zagreb-rugby.hr


Profil

icon C# disable ListView keypress change item20.08.2007. u 20:17 - pre 203 meseci
Kako u ListView-u zabranit da kada se stisne neki keypress ne prebacuje na red gdje ima takav key.
Nego da mi radi normalno što sam zadao na tom redu za odredjeni key.

Npr. Ako na redu stisnem 'p'
da mi nejde na red gdje mi pise "Ping" nego samo odradi funkciju koja se treba odradit na keypress 'p'

Ukratko on meni odradi zadanu funkciju al mi prebaci i na redak gdje je prvo polje dataLista "Ping".

Kako da to isključim.

Hvala.

[Ovu poruku je menjao xxxrugby dana 20.08.2007. u 22:04 GMT+1]
xxxrugby: "We are all philosophers, when question is about politics!"
 
Odgovor na temu

dusty
Predrag Glumac
Zemun, Srbija

Član broj: 15383
Poruke: 549
*.adsl-1.sezampro.yu.

Sajt: www.mika.rs


+6 Profil

icon Re: C# disable ListView keypress change item21.08.2007. u 09:18 - pre 203 meseci
Pretpostavljam da si napravio nasledjenu klasu od ListView-a i da si override-ovao WndProc ? ListView 'pozicionira' hajlajt pri poruci WM_KEYUP (0x101), pa u WndProc-u hvataj tu poruku i ne dozvoli da se izvrsi bazni WndProc.
America national sport is called baseballs. It very similar to our sport, shurik, where we take dogs, shoot them in a field and then have a party.
 
Odgovor na temu

xxxrugby

Član broj: 16068
Poruke: 653
*.adsl.net.t-com.hr.

Sajt: www.zagreb-rugby.hr


Profil

icon Re: C# disable ListView keypress change item21.08.2007. u 10:53 - pre 203 meseci
Može može još samo da mi google kaže kako da to uradim. Lol ;)

To Hard For Me.

Imas li mozda koj primjer koda. NIsam bas skuzio ove s web-a.


[Ovu poruku je menjao xxxrugby dana 21.08.2007. u 17:03 GMT+1]
xxxrugby: "We are all philosophers, when question is about politics!"
 
Odgovor na temu

dusty
Predrag Glumac
Zemun, Srbija

Član broj: 15383
Poruke: 549
*.adsl-1.sezampro.yu.

Sajt: www.mika.rs


+6 Profil

icon Re: C# disable ListView keypress change item22.08.2007. u 09:54 - pre 202 meseci
Ummm, my bad Probao sam kod sebe i ne radi, treba da se presretne WM_CHAR (0x102).
Code:
class MyListView : ListView
    {
        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
                case 0x102:
                    break;
                default:
                    base.WndProc(ref m);
                    break;
            }
        }
    }

America national sport is called baseballs. It very similar to our sport, shurik, where we take dogs, shoot them in a field and then have a party.
 
Odgovor na temu

[es] :: .NET :: .NET Desktop razvoj :: C# disable ListView keypress change item

[ Pregleda: 2642 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

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