Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
From ListBox to Graphic: showing a set of points
#1

.7z   ListbocFileGraphic.7z (Size: 2.57 KB / Downloads: 98)
Hi
here a demostration about 
how create a list of  bidimensional points at random in a set range of values for the two dimensions X and Y
how to save data in array and in a .CSV file
how to load the .CSV file into a Listbox
how to draw on a Picturebox using data taken from .CSV file and saved into the Listbox
how to show the select point in the graphic

The application has been built using the Inform-PE v1.5.7 and then typing the code into QB64pe IDE.
It was time that i don't play with Event driven programming, so reading the thread Inform-PE, regarding the last posts I thought that it was fine to write something like a list of points and show them on the graphic surface, and showing with a different color the point selected in the listbox.
So here it is.

Help for user:
if it is the first time that you run this demo please click on Make List button. You can use this button also to generate another .CSV file until List1000.CSV (enough?). The new file will be loaded into list box and showed on the graphic on the right. All the points are yellow except that point selected in the listbox that is red. The cohordinate of the choosen point will be shown in the title of the window of the application.
If user clicks with left mouse button on Load File ,in the folder of the application, he will find the LiSTXXX.CSV files to select for loading into listbox.

[Image: Listbox-Graphic-demo-Inform-PE.jpg]

and here the source files to compile in QB64pe having installed Inform PE. I posted in compressed file 1 because they uses less space, 2 because the procedure for attachment refuses to add .FRM file.

Thanks for looking at it
Welcome feedbacks
Reply
#2
Nice. This one gives me all sorts of ideas.

For example, the column header text can be used to label the X and Y axis.
And then using the data and the range one could make various kinds of graphs - line, bar, pie charts. You could have the graph-type selections on the left side or the bottom using a drop-down list.

Probably you could use the CSV output from popular programs like HwInfo. That'll be fun.
Reply
#3
Sorta like this?
https://qb64phoenix.com/forum/showthread...57#pid4557
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply
#4
the addon pack to compile InformPE application

.7z   InformPackageIncludeFiles.7z (Size: 54.5 KB / Downloads: 84)
Reply
#5
(05-11-2025, 09:57 AM)bplus Wrote: Sorta like this?
https://qb64phoenix.com/forum/showthread...57#pid4557

Yes, but with the data loaded from a CSV. If the app allows you to choose the two CSV columns that'll be even cool.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Springs2 (random graphic art) mstasak 4 519 11-13-2025, 12:44 PM
Last Post: Dav
  Graphic Text, _Printstring & other stuffs TempodiBasic 0 514 06-01-2025, 07:08 AM
Last Post: TempodiBasic
  Set of QB64 utilities. eoredson 11 3,462 04-26-2025, 02:55 AM
Last Post: eoredson
  PSET "hat" graphic from old ad in BYTE dcromley 26 6,655 02-06-2024, 10:49 PM
Last Post: CharlieJV
  Lunar Lander Bloatware v0-81 (graphic gauges) madscijr 0 555 08-08-2022, 06:30 PM
Last Post: madscijr

Forum Jump:


Users browsing this thread: