× CodeTyphon MS Windows (XP, Vista, Win7, Win8.x and Win10) OS Development, discussions and problems

Idea StringGrid for Lazarus ???

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #3248 by DiMiTRiOS
StringGrid for Lazarus ??? was created by DiMiTRiOS
Hello everybody !! I build a freeware project for coordinates transformation
and i need to use a stringgrid control with properties (Headings, etc) and methods
(LoadFromFile( StartCol , StartRow : Longint; const FileName : string )) like
Pablo's Pissanetzky Thypergrid control.(see users.otenet.gr/~tsoyran/upload/HyperGrid.zip)
Can anybody help or port the above control to lazarus ???

AI can not win the natural stupidity

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 11 months ago #3263 by 4aiman
Replied by 4aiman on topic StringGrid for Lazarus ???
- To port?
- Rather "no" then "yes".
- To help with necessary functions?
- Feel free to ask for implementation with detailed request ;)

コンソールマニアック

Please Log in or Create an account to join the conversation.

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #3283 by DiMiTRiOS
Replied by DiMiTRiOS on topic StringGrid for Lazarus ???
Pablo Pissanetzky the creator of Thypergrid
gave his permission to Antonis Tsoyrinakis
"to do what you want with the source" !!
Antonis create a new version of THypergrid with a lot of
enhancements and he include the source code !!!!
I don't think is bad to "transform" Thypergrid to Lazarus !!!

AI can not win the natural stupidity

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 11 months ago #3296 by 4aiman
Replied by 4aiman on topic StringGrid for Lazarus ???
I don't think it's bad either :)
I just can't port that entirely myself.
That's why I prefer helping over porting.

コンソールマニアック

Please Log in or Create an account to join the conversation.

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
More
8 years 11 months ago #3297 by Sternas Stefanos
Replied by Sternas Stefanos on topic StringGrid for Lazarus ???
I give this task to the Lab...

PilotLogic Architect and Core Programmer
The following user(s) said Thank You: 4aiman, DiMiTRiOS

Please Log in or Create an account to join the conversation.

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #3305 by DiMiTRiOS
Replied by DiMiTRiOS on topic StringGrid for Lazarus ???
Sorry guys!! I did not want to create any problem to the forum !! :blush:
if it is to much, then i will try to enhance the Lazarus Kgrid control.
i only need a loadfromfile(startcol,startrow,filename) and savetofile(startcol,startrow,filename)

AI can not win the natural stupidity

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 11 months ago #3310 by 4aiman
Replied by 4aiman on topic StringGrid for Lazarus ???
What type of file do you need? A text file or a binary? Or maybe you want some marked file like html or xml?
Specify here, please ;)

コンソールマニアック

Please Log in or Create an account to join the conversation.

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #3343 by DiMiTRiOS
Replied by DiMiTRiOS on topic StringGrid for Lazarus ???
4aiman thanks for your reply !
i need an ascii file : id,X,Y or csv id;X;Y

AI can not win the natural stupidity

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 11 months ago - 8 years 11 months ago #3345 by 4aiman
Replied by 4aiman on topic StringGrid for Lazarus ???
Why do you need to save position of elements?
It could be read back without that info.
Anyway, look into this functions/properties of a string grid (tested in CT 3.1):
StringGrid1.SaveOptions:=[soContent, soPosition];
StringGrid1.SaveToCSVFile();
StringGrid1.SaveToFile();
StringGrid1.LoadFromCSVFile();
StringGrid1.LoadFromFile();

SaveToCSVFile(); makes a csv file - just data, separated by your system's decimal separator. Neiter X nor Y is saved.
SaveToFile(); makes a xml file which takes in consideration SaveOptions property.
If you need position as well as the data itself, then make SaveOptions be like this: [soContent, soPosition].

If you're not happy with this, then post here and I'll show you how to save grid "manually" ;)

コンソールマニアック
Last edit: 8 years 11 months ago by 4aiman.

Please Log in or Create an account to join the conversation.

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #3347 by DiMiTRiOS
Replied by DiMiTRiOS on topic StringGrid for Lazarus ???
I think that my previus post was not clear enough !
i do not want to save position of elements. The X,Y are coordinates
either cartesian or geographical .
I already have build the code for those (and much more) transformations
for engineers (as i show in the attachment file).
btnloadfromfile load data (cartesian or geographical) into the first three
columns then after computations the savetofile btn execute to save the results
into a new file for further analysis (affine transformation, etc...)

Attachment not found


AI can not win the natural stupidity

Please Log in or Create an account to join the conversation.

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
More
8 years 10 months ago #3357 by 4aiman
Replied by 4aiman on topic StringGrid for Lazarus ???
Now I'm completely confused by your screenshot :)
If you have your data in the stringgrid, then for what purpose do you need to save that?
After you save it into a specifically formatted file, is it some other program that make further calculations?
Or you just need to save in any format, cause later you would load that into stringgrid again?
Do you need to convert X and Y values into Lat and Lon?

コンソールマニアック

Please Log in or Create an account to join the conversation.