Jump to content


Photo

Pic not showing...?


  • Please log in to reply
23 replies to this topic

#1 azrael11

azrael11
  • Members
  • 33 posts

Posted 06 October 2011 - 07:24 AM

here is my simple code.
For png, i use the pngimage from http://pngdelphi.sourceforge.net/

GamePic := TPNGObject.Create;
ImagePath := Conf.nxtgrd_ips_mamext.Cell[8,ARow+k].AsString;
GamePic.LoadFromFile(ImagePath);
Conf.nxtgrd_ips_mamext.Cell[7,ARow+k].ObjectReference := GamePic;

The image loads but in the cell nothing showing

Before i update to the latest version everything works great...

I use delphi 7

Please help...

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 06 October 2011 - 08:25 AM

Hi,

I am working on it now.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 06 October 2011 - 09:15 AM

Hi,

Please change next procedure in NxGrid.pas:


function TNextGrid.DrawCellData(ACol, ARow: Integer; CellState: TCellState): Boolean;
var
  DisplayText: WideString;
  CellInfo: TCellInfo;
begin
	inherited DrawCellData(ACol, ARow, CellState);
  CellInfo := GetCellInfo(ACol, ARow);
  with CellInfo, Columns[ACol] do
  begin
    DisplayText := AsString;
    case ColumnType of
      ctAutoInc: Display.AsInteger := ARow;
      ctBoolean: Display.AsBoolean := AsBoolean;
      ctDate: Display.AsDateTime := AsDateTime;
      ctFloat: Display.AsFloat := AsFloat;
      ctInteger: Display.AsInteger := AsInteger;
      ctString: Display.AsString := AsString;
      ctGraphic: Display.ObjectReference := CellInfo.ObjectReference;
      ctGuid: Display.AsString := AsString;
      ctVirtual: Display.AsString := AsString;
    end;
  end;
  ApplyCellFormating(ACol, ARow, DisplayText, CellState);
  Result := True;
end;


and in NxDisplays.pas


procedure TGraphicColumnDisplay.Paint;
begin
  with Column as TNxGraphicColumn do DrawPicture(TGraphic(Self.ObjectReference), Margin, BorderWidth, Stretch);
end;


Problem cause a ObjectReference property added for Column

Please sorry for this problem.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#4 azrael11

azrael11
  • Members
  • 33 posts

Posted 08 October 2011 - 06:48 AM

Hi,

Please change next procedure in NxGrid.pas:


function TNextGrid.DrawCellData(ACol, ARow: Integer; CellState: TCellState): Boolean;
var
  DisplayText: WideString;
  CellInfo: TCellInfo;
begin
	inherited DrawCellData(ACol, ARow, CellState);
  CellInfo := GetCellInfo(ACol, ARow);
  with CellInfo, Columns[ACol] do
  begin
    DisplayText := AsString;
    case ColumnType of
      ctAutoInc: Display.AsInteger := ARow;
      ctBoolean: Display.AsBoolean := AsBoolean;
      ctDate: Display.AsDateTime := AsDateTime;
      ctFloat: Display.AsFloat := AsFloat;
      ctInteger: Display.AsInteger := AsInteger;
      ctString: Display.AsString := AsString;
      ctGraphic: Display.ObjectReference := CellInfo.ObjectReference;
      ctGuid: Display.AsString := AsString;
      ctVirtual: Display.AsString := AsString;
    end;
  end;
  ApplyCellFormating(ACol, ARow, DisplayText, CellState);
  Result := True;
end;


and in NxDisplays.pas


procedure TGraphicColumnDisplay.Paint;
begin
  with Column as TNxGraphicColumn do DrawPicture(TGraphic(Self.ObjectReference), Margin, BorderWidth, Stretch);
end;


Problem cause a ObjectReference property added for Column

Please sorry for this problem.



Thanks for the solution boki but i have the free version of berg for delphi 7 no source code
so i have to wait until next upgrade :rolleyes:

But thank you very much bcs i thing i do something wrong...
Before i write this post i search for solution about a week...

#5 azrael11

azrael11
  • Members
  • 33 posts

Posted 22 October 2011 - 12:29 AM

Hi,

Please change next procedure in NxGrid.pas:


function TNextGrid.DrawCellData(ACol, ARow: Integer; CellState: TCellState): Boolean;
var
  DisplayText: WideString;
  CellInfo: TCellInfo;
begin
	inherited DrawCellData(ACol, ARow, CellState);
  CellInfo := GetCellInfo(ACol, ARow);
  with CellInfo, Columns[ACol] do
  begin
    DisplayText := AsString;
    case ColumnType of
      ctAutoInc: Display.AsInteger := ARow;
      ctBoolean: Display.AsBoolean := AsBoolean;
      ctDate: Display.AsDateTime := AsDateTime;
      ctFloat: Display.AsFloat := AsFloat;
      ctInteger: Display.AsInteger := AsInteger;
      ctString: Display.AsString := AsString;
      ctGraphic: Display.ObjectReference := CellInfo.ObjectReference;
      ctGuid: Display.AsString := AsString;
      ctVirtual: Display.AsString := AsString;
    end;
  end;
  ApplyCellFormating(ACol, ARow, DisplayText, CellState);
  Result := True;
end;


and in NxDisplays.pas


procedure TGraphicColumnDisplay.Paint;
begin
  with Column as TNxGraphicColumn do DrawPicture(TGraphic(Self.ObjectReference), Margin, BorderWidth, Stretch);
end;


Problem cause a ObjectReference property added for Column

Please sorry for this problem.



Boki i updated to the latest version but the problem remains...

Any thoughts...

Thanks...

#6 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 22 October 2011 - 03:23 PM

Hi,

Don't know why it don't work now :( I will check it again.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#7 azrael11

azrael11
  • Members
  • 33 posts

Posted 22 October 2011 - 04:45 PM

Hi,

Don't know why it don't work now :( I will check it again.


Ok my friend i'll wait

Thank you again....

#8 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 23 October 2011 - 12:25 AM

Hi Azrael,

Can you please tell me are you able to see a images column when you run Slides Demo (Slides demo).

Maybe problem is somewhere else. Thank you.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#9 azrael11

azrael11
  • Members
  • 33 posts

Posted 23 October 2011 - 05:28 PM

Hi Azrael,

Can you please tell me are you able to see a images column when you run Slides Demo (Slides demo).

Maybe problem is somewhere else. Thank you.


Yes i can see the images in slide demo...
I change the code a little and add .png avatars and the png component i use...
In the slide i can see them all but in the report the .pmg images just missing...

Just look at the code Attached File  slides_source1.zip   890.12KB   4 downloads

I hope i help you about this ....


Thank you again boki...

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 24 October 2011 - 02:05 AM

Hi,

I don't have TPngImageList component, but with using TImageList from Delphi (which now support PNG Images) your images are loaded well and displayed correctly.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#11 azrael11

azrael11
  • Members
  • 33 posts

Posted 24 October 2011 - 09:31 AM

Hi,

I don't have TPngImageList component,


Oh the TPngImageList is left from me with something i try... Sorry that doesn't effect the source code... don't use it just erase it...


but with using TImageList from Delphi (which now support PNG Images) your images are loaded well and displayed correctly.

Best regards


You mean you fix the problem bcs with the standard TImageList the .png pics not showing in the report style only in slides...

If you fix it, i will wait to the next release...

Thanks Boki....

#12 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 24 October 2011 - 11:06 AM

Hi,

Your sample code work fine, in both styles.

PS. I have send you Private Message.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#13 azrael11

azrael11
  • Members
  • 33 posts

Posted 25 October 2011 - 03:29 PM

Hi,

Your sample code work fine, in both styles.

PS. I have send you Private Message.

Best regards


Ok boki i sent you in Private Message...

Thank you very much...

#14 azrael11

azrael11
  • Members
  • 33 posts

Posted 25 October 2011 - 10:33 PM

OK Hear this ....

I HAVE THE SAME PROBLEM...

I can see the images in slide but no in report mode...

What is wrong please help...

#15 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 25 October 2011 - 10:56 PM

Hi,

One thought now come to mu mind... Maybe Image is to small to display it . Please try to set Margin property of column to some lower value.

Please tell me does it help now.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#16 azrael11

azrael11
  • Members
  • 33 posts

Posted 26 October 2011 - 12:16 AM

Hi,

One thought now come to mu mind... Maybe Image is to small to display it . Please try to set Margin property of column to some lower value.

Please tell me does it help now.


No It doesn't help ....

But here is a strange thing... when i use margin 10 in the jpeg images the image center in the middle of the box but in the .png images the box appears in the middle and the png image lower left... in the slide style...

In the report style nothing happends ...

I notice in the slide style that i can view my .png images the .png image is not inside the margin... Hmmm

Hope that helps...

Thanks for the fast response...

#17 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 27 October 2011 - 09:08 AM

Hi,

I see both image types in both views. Don't know where is a problem :(

Margin need to be set to lower value for Report style.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#18 azrael11

azrael11
  • Members
  • 33 posts

Posted 27 October 2011 - 05:47 PM

Hi,

I see both image types in both views. Don't know where is a problem Posted Image

Margin need to be set to lower value for Report style.

Best regards


New style in furom is great...

Please tell can you see both images in both styles from this demo... Attached File  slides_demo1.zip   685.07KB   6 downloads

If you see something wrong with my computer if you dont somethings wrong with my compiler...

This is the same code i sent to you but i compile it into my computer.... hmmm

Thank you boki...

#19 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,196 posts
  • Gender:Male

Posted 27 October 2011 - 05:59 PM

Hi,

Exe don't work property. Maybe I have add some fix in meanwhile.

Please contact me via e-mail to I send you an update.

PS. This is a new version of IPS Forum :) I think that is nice.

Best regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#20 azrael11

azrael11
  • Members
  • 33 posts

Posted 27 October 2011 - 08:06 PM

Hi,

Exe don't work property. Maybe I have add some fix in meanwhile.

Please contact me via e-mail to I send you an update.

PS. This is a new version of IPS Forum :) I think that is nice.

Best regards


Ok

The contact is done... :rolleyes:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users