The specific error message: ArgumentException: Getting control 0’s position in a group with only 0 controls when doing Repaint A
OnGUI will be called two times each time it draws, the first time to calculate the position of all controls, all EdtorGUILayout control method returns the Rect is 0; the second time to draw all the content based on the position, the control method returns the Rect is the actual coordinates.
BeginScrollView to generate a scrolling list, because I need to display a lot of content, so I made an optimization: pre-calculate the position of each line, when the line is in viewport display content, otherwise display blank.
Generic logging found that the height of each row generated by the system is not the same, generally floating randomly between 19-21, so it is impossible to calculate the position of each row, so instead, when the second call to OnGUI, use the Rect returned by the control method to calculate in real time.
Read More:
- Error in plot.new() : figure margins too large
- [Solved] MindSpore Error: Should not use Python in runtime
- [Solved] ANSYS error: accelerations are exceeding internal limit
- [Solved] Android Studio Error:This view is not constrained, it only has designtime positions
- Nginx: How to Use Error_Page
- Using elementui El-dialog as a subcomponent to close an error
- Leetcode error: address sanitizer: detailed analysis and solution of deadlysignal
- [Solved] error: ‘xcb_generic_event_t’ was not declared in this scope
- How to Solev PyEddyTracker geostrophic current calculation Error
- [Solved] Runtimeerror during dcgan training: found dtype long but expected float
- [Solved] Failed assertion: line 3180 pos 12: ‘debugNeedsPaint‘: is not true
- Common problems and solutions for CheckStyle errors
- On error resume next, on error goto 0, err usage
- [Solved] HTML report error, httprunner 3. X HTML report error, oserror: [winerror 6] handle invalid (resolved)
- Solve the problem of incorrect display of dialogfragment width
- How to Solve ModuleNotFoundError: No module named ‘_bz2‘
- The showdialog() method in thread/threading. Timer/task reported an error: “before ole can be called, the current thread must be set to single thread unit (STA) mode.”
- [Solved] Keil C Error: error C141: syntax error near ‘=‘, expected ‘__asm‘
- [Solved] SyntaxError: Missing parentheses in call to ‘print‘. Did you mean print(e)?
- R Language: How to Solve featureplot function Error