This question from Jimmy is very important for me.
We need a blueprint for this.
Hi Antonio,
How do I use those modifications with CLASS TCalendar()?
Do I make a copy of tcalenda.prg and include it in my App, or do I create a new CLASS FROM, or how do I build a new LIB with modified Source?
For example, I asked ChatGPT about horizontally scrolling in a TScrollPanel.
Here is the answer, and I would like to try a solution.
Thank you for providing the second part of the TScrollPanel class definition.
The methods in this part of the class definition are primarily involved with the vertical scrolling behavior of the panel, such as moving up and down,
going to a specific position, handling vertical scroll events, and painting the panel's contents.
As with the previous part of the class, there are no methods that explicitly handle horizontal scrolling.
The steps to add horizontal scrolling would still be similar to what I described before:
Define a horizontal scrollbar in addition to the vertical one.
This would be similar to the line
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self RANGE 1,2, but with HORIZONTAL instead of VERTICAL.
Adjust the SetRange() method to set the range of the horizontal scrollbar based on the width of the contents of the panel.
Handle the scroll event of the horizontal scrollbar to adjust the visible part of the panel's contents.
To apply these steps to your code, you would likely need to create new methods similar to the existing methods for vertical scrolling,
but adjusted for horizontal movement instead. This could include methods like hSetPos() for setting the horizontal scrollbar position,
ScrollHorizontallyBy() for scrolling a certain number of pixels horizontally, GoLeft() and GoRight() for moving left and right, HScroll() for handling horizontal scroll events, and so on.
Please note that these are general recommendations and the specific implementation would depend on the details of your application and the FiveTech library.
It would likely require a good understanding of the library and possibly some trial and error to get it working correctly.
It might be best to reach out to the FiveTech community or their support for specific guidance on how to implement this.
But changing the class??
Inheriting or extending the class and then experimenting in your own prg, I think, would be one way.
Copy the original functions from the class, then rename them and see what happens.
Best regards,
Otto"