Recent

Author Topic: Parsing HTML in TLabel - Read by Tag  (Read 2561 times)

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Parsing HTML in TLabel - Read by Tag
« Reply #15 on: May 01, 2020, 06:39:09 pm »
Hey come on, don't give up. You almost have it... Really. Instead of putting the number of the html table cells into cells of StringGrid, put them into a 2d array. Add the titles of the HTML table to the bank combobox. Then later, when the user selects an item from the bank combo, copy the values of the selected bank into the labels.

andriesh

  • New Member
  • *
  • Posts: 11
Re: Parsing HTML in TLabel - Read by Tag
« Reply #16 on: May 02, 2020, 04:12:30 am »
Thanks WP for your support. What you sugest it's a bit complicated for me if honestly,.. a simpler solution I'm thinking about is just to take the data from StringGrid put it in the necessary TLabels and make StringGrid invisible or place it in another inaccessible form. When selecting the options from the ComboBox, the data from the chosen bank cells will be loaded ... I know it's not correct, and not good solution, but otherwise I don't really know how I could do it.

wp

  • Hero Member
  • *****
  • Posts: 11916
Re: Parsing HTML in TLabel - Read by Tag
« Reply #17 on: May 02, 2020, 10:27:26 am »
OK, that would be a very ugly solution. Suppose the 2d array is called Data[x, y] of string. What is the difference in assigning a string from the demo to Data[x, y] instead of assigning it to StringGrid.Cells[col, row]? And what is the difference in extending the grid's column count from expanding the array by calling Setlength?

But anyway. Stick to your idea and implement it. Just do something. Otherwise I'd be getting the impression that you are waiting for somebody else to do your college work.

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Parsing HTML in TLabel - Read by Tag
« Reply #18 on: May 02, 2020, 02:42:16 pm »
I have a TStringTable class you could maybe use. It's a non-visual component.
Also a SimpleHtmlTablepParser unit.

It's all purpose made for my own needs, but probably simple to adopt to your's.

Bart

andriesh

  • New Member
  • *
  • Posts: 11
Re: Parsing HTML in TLabel - Read by Tag
« Reply #19 on: May 04, 2020, 08:29:20 pm »
Thank you all for your support and help, however I went with the ugly solution, .. :) but in the end it was beautiful ... (just kidding). There is still a small effort to make the project finished (max value from two-dimensional array) but I hope to manage. Anyway, I'm not the person who wants someone to do my homework... I just took on a pretty difficult project for a beginner... and the hardest part was with dataParsing from html... adding machine and design was the simplest part. :-[
Thanks again for your support and responsiveness.
« Last Edit: May 04, 2020, 08:41:57 pm by andriesh »

 

TinyPortal © 2005-2018