Recent

Author Topic: [SOLVED] 3 Printer Package  (Read 744 times)

Petrus Vorster

  • Full Member
  • ***
  • Posts: 239
[SOLVED] 3 Printer Package
« on: February 19, 2026, 11:16:28 am »
Hi All

I use the same setup in every project. In the user settings there is a groupbox containing:
3 Comboboxes,
3 Checkboxes.
3 Labels (Reportprinter, Receiptprinter, Labelprinter)

Upon from startup, each combobox fills with the available printers on that PC.
All 3 are the same.
Then it checks an INIFILE for the saved printer and change the text in each combobox to display the saved printer for each of the mentioned printers.
Any change in a combobox (listview only) saves the inifile wihtout users pressing any buttons.

Usually I update a TYPE e.g. settings.receiptprinter and so forth but it would be nice to just plop this control on a form and get information like mymainprinter:= printerbox.receiptpinter.

The checkboxes are to notify the program to ignore a print command where such a printer is absent.

Me being a complete dummy with my own packages knows I am going to completely screw this up.

What would you suggest I do, and i am getting really tired of adding this to everything?  :D :D
Or perhaps some clever person willing to build this?

Some pointers would be nice. I have been reading through the Tutorials, but are not much wiser.

Regards, Peter
« Last Edit: February 20, 2026, 08:48:07 am by Petrus Vorster »

jamie

  • Hero Member
  • *****
  • Posts: 7598
Re: 3 Printer Package
« Reply #1 on: February 19, 2026, 11:14:29 pm »
I don't know what exactly you are asking for but it looks like you have some common code you use in all of your apps?

If so, you can make a TFrame that has all the GUI stuff in and simply include it on the main form or somewhere each time you start a new app.


Jamie

The only true wisdom is knowing you know nothing

Petrus Vorster

  • Full Member
  • ***
  • Posts: 239
Re: 3 Printer Package
« Reply #2 on: February 20, 2026, 06:42:05 am »
Hi

Perhaps I explained unclear.
I want to make not just the visual controls, but the code that goes along with it too.
e.g. ON-Show will load the available printers, step 2 will  read the ini and change the text in the comboboxes and any changes saved back to the ini.

Basically automate the whole process for every new project.

-PEter

Petrus Vorster

  • Full Member
  • ***
  • Posts: 239
Re: 3 Printer Package
« Reply #3 on: February 20, 2026, 06:43:35 am »
O I see, let me go dig in that option.

-Peter

Petrus Vorster

  • Full Member
  • ***
  • Posts: 239
Re: 3 Printer Package
« Reply #4 on: February 20, 2026, 08:47:46 am »
Ok, i have not even tried this before, and a bit of tweaking and reading, I got most of that working under and hour.

Thank you very much. Now I just need to add some additional code and there we go.

Great stuff.

Peter

 

TinyPortal © 2005-2018