TVirtualDrawtree

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

yes mrmarman you are correct with this logic , and about my attitude iam always feel terrifying before asking questions , i maybe ask this question in wong way too , i didn't mean my selected item i mean the item that will be show as stream to others , i dont know if you have delphi right now with you but i will give you the project to check up what i mean , check on stream button on click event , and the startstream command handler
Dosya ekleri
newclienta.rar
(93.62 KiB) 53 kere indirildi
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

First you created the panel different space...

You can test it by (at the design time, not runtime) clicking first to the ListView and press ESC button on the keyboard. This will skip the focused component one level up. This means you will know the ListView parent.

The Panel must be in the same parent space.. Check this out.

Why do you need this ? Because ListView's left value begins it's parents offset. Not the form or parents parent... Do you copy that..
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

so i have to place the panel to the exact position that i want to show ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

This is an example how to track...

First, you need to place Panel2 to the ListView's parent space...
(1) Select Panel2
(2) press CTRL+X to cut to clipboard
(3) Click ListView1
(4) press ESC key once
(5) press CTRL+V to paste from clipboard. Now you did Panel2 is the same parent space with ListView1

And now, this ise the placement...
Global Variables...

Kod: Tümünü seç

  xSelItemLeft   : Integer = 0;
  xSelItemTop    : Integer = 0;
  xSelItemWidth  : Integer = 0;
  xSelItemHeight : Integer = 0;
// ListView1DrawItem

Kod: Tümünü seç

    if Item.Selected then
    begin
      xSelItemLeft   := Rect.Left   + sender.Left + sender.Column[0].Width;
      xSelItemTop    := Rect.Bottom + sender.Top;
      xSelItemWidth  := sender.Column[1].Width;
      xSelItemHeight := ImageList1.Height;
    end;
// And the streaming button

Kod: Tümünü seç

if stream.Caption = 'stream' then
begin
  Panel2.Left := xSelItemLeft;
  Panel2.Top  := xSelItemTop;
  Panel2.Width := xSelItemWidth;
  Panel2.Height := xSelItemHeight;
  panel2.Visible := true;
...
...
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

hmmm , now the panel is completely invisible not only wrong position
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

:D it is design time, you may place where would you like...

Click the Panel2 from left side Structure Panel and change the values Left and Top for design time. This will be change automatically runtime
Resim
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

i dont think top value have any involve with the issue but i do same as in image same result panel not visible and i dont mean its not visible in ide i mean in the application when its work, have you tested the application mrmarman ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

if you press more then once to Escape then you may skipped the mainpanel.. Please check by below screen cap.
Please also check the panel Width and Height values. They may be wrong.

Be sure the ListView1 and Panel2 under the mainpanel tree. :idea:

Resim
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

design run time is very easy to be navigated , i dont mean its not visible in ide i mean in the application when its work, have you tested the application mrmarman ?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

Your panel may be visible but color may same with backgroud.

Place a shape to the panel and chang color to the clBlue... tray again.
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

changed the t shape to different color place same as what you say here is the project to see what i done
Dosya ekleri
newclienta.rar
(94.04 KiB) 37 kere indirildi
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

I didn't change anything and RUN
The result is below...
Resim
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

here is the clue you click first on item to show the panel , that will circel back to the problem if you remember the animated image before of example that i want achieve they press on talk then panel has been rected and located to the bottom of the user item height what ever the item height is it imagen if you change the height of form , and see the position on the image after too many clicks its going down and down
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Kullanıcı avatarı
mrmarman
Üye
Mesajlar: 4741
Kayıt: 09 Ara 2003 08:13
Konum: İstanbul
İletişim:

Re: TVirtualDrawtree

Mesaj gönderen mrmarman »

Kod: Tümünü seç

xSelItemTop    := Rect.Bottom + sender.Top;
value ise what defines the panel top. You just change this to to

Kod: Tümünü seç

 xSelItemTop    := sender.Top + ImageList1.Height;
will do static place...
Resim
Resim ....Resim
Kullanıcı avatarı
mia
Üye
Mesajlar: 239
Kayıt: 17 Nis 2015 02:18

Re: TVirtualDrawtree

Mesaj gönderen mia »

i have to sitdown with this for a while and understand some staff and will come back to you with result
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيمِ
in god i trust with every movement i do
graduated student and looking for knowledge
Cevapla