Status & Roadmap
Authors & License
Funding Ultimate++
Search on this site
Search in forums

SourceForge.net Logo
Today's Messages (off)  | Unanswered Messages (on)

Forum: U++ Widgets - General questions or Mixed problems
 Topic: How would I virtualize a scrollable view to dynamically load Ctrls?
How would I virtualize a scrollable view to dynamically load Ctrls? [message #58431] Thu, 19 May 2022 19:07
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 137
Registered: June 2011
Experienced Member
Quick example:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct App : TopWindow {
    ScrollBar   sb;
    Array<RichTextCtrl> items;
    int GetLineHeight() {
        return 25;

    void Sync() {
        int startY = 10;
        Rect pr = GetRect();
        auto sz = GetSize();
        for(RichTextCtrl& item : items) {
            Rect r = item.GetRect();

            item.SetRect(r.left, startY - sb, pr.GetWidth(), item.GetHeight(sz.cx));
            startY += r.GetHeight() + 5;

    void Paint(Draw& w) override {
        Size sz = GetSize();
        w.DrawRect(sz, SWhite());

    void Layout() override {

    void MouseWheel(Point, int zdelta, dword) override {

    bool Key(dword key, int) override {
        return sb.VertKey(key);

    App() {
        for(int i = 0; i < 1000; i++) {
            RichTextCtrl& item = items.Create<RichTextCtrl>();
                "[@(%d.%d.%d) Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et "
                "dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip "
                "ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu "
                "fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt "
                "mollit anim id est laborum.]",
                (int)Random(255), (int)Random(255), (int)Random(255))
            item.SetZoom(Zoom(1, 1));
            item.HSizePos(0, 0).VSizePos(0, 0);
            item.SetRect(0, 0, 0, item.GetHeight(250));
        sb.WhenScroll = [this] { Sync(); };

    App app;
    app.SetRect(0, 0, 250, 500);

I don't know if there is any facility built into U++ for this already but I'd like to dynamically load and unload a bunch of Ctrls as I scroll (web equivalent a virtual scroller) so that I don't have a bunch of redraws of Ctrls that aren't visible in the view. As you can see from the example it can get quite expensive to resize the window if it has thousands of controls.

How would I accomplish this?
Forum: UppHub
 Topic: Scatter: DataRange for explicit functions
Scatter: DataRange for explicit functions [message #58455] Tue, 24 May 2022 13:11
busiek is currently offline  busiek
Messages: 58
Registered: February 2011
Location: Poland
Hi all,

Display data range was limited only to indexed data. I needed explicit function to describe data range so I implemented it. It is in Explicit range #2 pull request.

I use Scatter package a lot because it is great, but has some drawbacks which I will fix from time to time. AFAIK this package does not have a maintainer. Is anybody willing to do so?

Personally, I am to busy to become a maintainer. I presume my responsiveness is too low for that task.

Forum: U++ Webs: Functioning, Layout , Design, Features and Structure of these forums, homepage etc.
 Topic: All the Fix need right now for web (my opinion)
All the Fix need right now for web (my opinion) [message #58453] Tue, 24 May 2022 05:55
Sayem is currently offline  Sayem
Messages: 1
Registered: May 2022
Location: Bangladesh
Junior Member
Hi. I have been inspecting the website for a while to see what's wrong with the page. It looks like it's a bit old and out dated. Here are the top things that should be fixed. All are my opinions

Redirect to Subdomain

Forums and Docs are probably be better if separated from the actual website to make it look more cleaner and organized. Instead of www.ultimatepp.org/forums you can redirect to forums.ultimatepp.org and docs.ultimatepp.org

Redesigning the layout

The actual website is a bit old. It will be better if it gets a bit of redesigning to bring it's old page to life. If the actual page uses topic++ the. I think it will be a better showcase for what the U++ is capable of. If you use other front end framework like Angular, React, Vue and other, then it will have endless possibilities to make the website look a new site.

Mobile users needs help

The site does not adjust well with mobile. It still looks like desktop. Currently I am writing this in my mobile device cause I use U++ on my PC and see the Documentations in mobile. It would be better if fixed. It is really quite easy to do. I can help you with that.

URL is not good

Many URL is using $ and other not friendly symbols with gibberish words that is really hard for readability. It would be better if fixed it. Again, you can make it better by using U++ to see what it is capable of or use web frameworks

Updating the documents

The Documentations looks out dated and the screenshot of some some of it are not there as it needs to be and some of them are very old. Some documents are not fully completed like Icon Designer and some are messed up like the turtle article is the same as the word web but missing the other parts.

Social Media errors

You only have Facebook that no one uses that much. I highly recommend removing the Facebook from the website and use (YouTube, Twitter, Reddit) this 3 ones. YouTube for tutorial as I cannot find any video tutorials about U++ So it is time to shine. Twitter for future development and other updates that will make your community hyped. Last of all, Reddit. Community can show problems to your Reddit page and other will fix it for you or will give them Documentations link. It is so much balanced and effective.

Forum Changing

This forum needs some serious changing cause as it is extremely outdated and uses fudforum. I think this is where skylark can shine. It has so much possibilities to put in.

I can help you anyway I can. I am a Very Simple Web Developer and love to use U++

You can ask for any help with the above.

The name is in my profile Smile

[Updated on: Wed, 25 May 2022 10:46]

Report message to a moderator

Forum: U++ community news and announcements
 Topic: 2022.2rc1
2022.2rc1 [message #58448] Mon, 23 May 2022 11:07
mirek is currently offline  mirek
Messages: 13623
Registered: November 2005
Ultimate Member

Core: IsVoid(String) function to avoid confusion with IsVoid(Value)
Core: LoadFile fixed to be work with special files in POSIX /proc/
Core: BiVector, BiArray Create with constructor parameters
CtrlLib: RichTextView WhenLeftClick, ClearSelection
CtrlLib: FileSel::NoExeIcons to suppress loading of icons from .exe files in background
ide, CtrlLib: Fixed issues with namespace agnostic layouts
ide: git format-patch patch format support
Image: Support for >2G pixel images (ImageBuffer::GetLength now returns size_t)
Draw: Fixed/optimised FlipImage
plugin/tif: Minimal geotiff support via metadata (see reference/geotiff)
ide: Repository action is getting stored for next use (e.g. good for deactivating Pull for branches)
Forum: Releasing U++
 Topic: Extra file in nightly builds
Extra file in nightly builds [message #58434] Fri, 20 May 2022 08:45
pvictor is currently offline  pvictor
Messages: 55
Registered: December 2015

The last two nightly builds contain a new pretty big file: uppsrc/CtrlLib/ColumnList.ast (33M).
Is it necessary?
It isn't mentioned anywhere, but significantly increases the size of archive.

Best regards,

Current Time: Thu May 26 01:48:12 CEST 2022

Total time taken to generate the page: 0.03302 seconds