Welcome, Guest
Username: Password: Remember me
CodeTyphon MS Windows (Win7, Win8.x, Win10 and Win11) OS Development, discussions and problems
  • Page:
  • 1

TOPIC:

StringGrid for Lazarus ??? 11 years 9 months ago #3248

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 3
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3263

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
- 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.

StringGrid for Lazarus ??? 11 years 9 months ago #3283

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 3
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3296

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3297

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3305

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 3
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3310

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3343

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 3
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3345

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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" ;)
コンソールマニアック

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

Last edit: by 4aiman.

StringGrid for Lazarus ??? 11 years 9 months ago #3347

  • DiMiTRiOS
  • DiMiTRiOS's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 30
  • Thank you received: 3
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.

StringGrid for Lazarus ??? 11 years 9 months ago #3357

  • 4aiman
  • 4aiman's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Comix creator
  • Posts: 227
  • Thank you received: 12
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.

  • Page:
  • 1