Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » ColumnList void SetFrame problem
ColumnList void SetFrame problem [message #61177] Fri, 29 November 2024 03:26 Go to previous message
aa_dav is currently offline  aa_dav
Messages: 4
Registered: November 2024
Junior Member
I met it in UltimatePP-win-17045 distro.
Steps to recreate:
1. Create MyApps package Test01 (CtrlLib application with main window)
2. Put ColumnList in layout
3. Change it's SetFrame property from default to BlackFrame()
4. Compile
It will give error:

MyTest01.lay:2:59: error: member reference base type 'void' is not a structure or union
        ITEM(Upp::ColumnList, dv___0, SetFrame(Upp::BlackFrame()).LeftPosZ(96, 150).TopPosZ(68, 100))

AFAIU the reason is overloading of method Ctrl& SetFrame(...) in ColumntList by void SetFrame(...) which breaks chaining.
But moreover - overloaded SetFrame doesn't call Ctrl::SetFrame of base class and this breaks something in layout - ColumnList doesn't resize correctly (gets a little bit less size than it should on resize of window if anchored to both bounds). Latter example is more complex to recreate: place ColumnList and another widget side by side and set their vertical anchors in "Spring vertical size" mode. Then resize window - ColumntList will tend to be smaller in vertical size than reference widget. It's something about SetFrame.
I fixed this by next code:
static_cast<Ctrl&>(deviceList).SetFrame(upp::BlackFrame()); // fix
 
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: Paste clipboard in MS Teams
Next Topic: Window Frame Resizing
Goto Forum:
  


Current Time: Sun Jun 08 17:50:38 CEST 2025

Total time taken to generate the page: 0.04544 seconds