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 » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl force show scrollbars
ArrayCtrl force show scrollbars [message #30475] Mon, 03 January 2011 22:05 Go to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
I am trying to use ArrayCtrl in a very Excel like style. I call HeaderObject().Absolute() before adding columns and then I set the preferred width in one step. The user is free to change the width. The problem that I am having is that the ArrayCtrl won't display the horizontal scroll bar until I manually adjust the width of a column.

Another smaller problem that I am having is that the array is slow to draw, scroll and resize columns. Any tips on speeding it up? Most cell have embedded controls and some have displays attached.

In the past I used the array inside a layout, which then was inserted into a TabCtrl. I had to write manual Layout code to place my controls, because once in the tab, all logical positions seemed to be ignored. Is there a way to use tabs and logical coordinates so that they scale based on the current size of the tab's panel?
Re: ArrayCtrl force show scrollbars [message #30558 is a reply to message #30475] Sat, 08 January 2011 13:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12122
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 03 January 2011 16:05

I am trying to use ArrayCtrl in a very Excel like style. I call HeaderObject().Absolute() before adding columns and then I set the preferred width in one step. The user is free to change the width. The problem that I am having is that the ArrayCtrl won't display the horizontal scroll bar until I manually adjust the width of a column.



Do I understand you that this is feature request ("add AlwaysHorzSB() method to ArrayCtrl), not a bug report? Smile

Quote:


Another smaller problem that I am having is that the array is slow to draw, scroll and resize columns. Any tips on speeding it up? Most cell have embedded controls and some have displays attached.



How many lines are in ArrayCtrl?

Mirek
Re: ArrayCtrl force show scrollbars [message #30659 is a reply to message #30558] Fri, 14 January 2011 14:13 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
Sorry for delay.

No, it is either a bug or I am using it wrong. I'll prepare a test case.

As for the number of items, 100-200. There are 4 bitmap draw operations per row, maybe that is the culprit.
Re: ArrayCtrl force show scrollbars [message #30660 is a reply to message #30659] Fri, 14 January 2011 14:53 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12122
Registered: November 2005
Ultimate Member
cbpporter wrote on Fri, 14 January 2011 08:13

Sorry for delay.

No, it is either a bug or I am using it wrong. I'll prepare a test case.



Excellent.

Quote:


As for the number of items, 100-200. There are 4 bitmap draw operations per row, maybe that is the culprit.


Well, perhaps it is a time optimize this a bit... (I mean in ArrayCtrl).

I hope to do it during resolving the bug demonstrated in the testcase Smile

Mirek
Re: ArrayCtrl force show scrollbars [message #30672 is a reply to message #30660] Sun, 16 January 2011 13:28 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12122
Registered: November 2005
Ultimate Member
mirek wrote on Fri, 14 January 2011 08:53



Well, perhaps it is a time optimize this a bit... (I mean in ArrayCtrl).




Spent a couple of hours optimizing. It should now behave quite well up to 10000 widgets...

Re: ArrayCtrl force show scrollbars [message #30687 is a reply to message #30672] Mon, 17 January 2011 10:50 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
Fantastic! Great job! In release mode it is now instant and in debug mode population of control is very fast, while scrolling seems to have not increased in speed.

Anyway, now ArrayCtrl is better than ever.

Here is a test case for the scrolling issue. Also, I find that scroll bar auto-hiding option is ignored and bars are hidden even if I don't want them to be (which is not the case).

PS: Not that this would be a personal issue or that this request makes any sense, but the NoWantFocus trick that works for Option does not work for DocEdit. Probably the same for LineEdit.

[Updated on: Mon, 17 January 2011 10:52]

Report message to a moderator

Re: ArrayCtrl force show scrollbars [message #30694 is a reply to message #30687] Mon, 17 January 2011 12:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12122
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 17 January 2011 04:50

Fantastic! Great job! In release mode it is now instant and in debug mode population of control is very fast, while scrolling seems to have not increased in speed.



That is weird, it was optimized as well...

Mirek
Re: ArrayCtrl force show scrollbars [message #30696 is a reply to message #30694] Mon, 17 January 2011 13:05 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
Only in debug mode. And populating the list is down from 2-3 seconds to instant. OK, probably scrolling is faster than before, but it is hard to tell. Release is great.
Re: ArrayCtrl force show scrollbars [message #30704 is a reply to message #30687] Mon, 17 January 2011 20:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12122
Registered: November 2005
Ultimate Member
Primary issue now fixed.

cbpporter wrote on Mon, 17 January 2011 04:50


Also, I find that scroll bar auto-hiding option is ignored and bars are hidden even if I don't want them to be (which is not the case).



As default setting is to nohide for vertical and autohide for horizontal (and there was no setting for horizontal), I have added new methods for horizontal.

Quote:


PS: Not that this would be a personal issue or that this request makes any sense, but the NoWantFocus trick that works for Option does not work for DocEdit. Probably the same for LineEdit.


What trick? Just checked, NoWantFocus works for DocEdit as expected...

Mirek
Re: ArrayCtrl force show scrollbars [message #30738 is a reply to message #30704] Wed, 19 January 2011 14:10 Go to previous message
cbpporter is currently offline  cbpporter
Messages: 1400
Registered: September 2007
Senior Contributor
Thank you!

Fixed.

As for NoWantFocus trick, if you do not use it on an Option in ArrayCtrl and you have multiple editing controls embedded in a row, it will not work. If you use it, it will work. But it had no effect on DocEdit. Meanwhile, two things happened:
1. The bug got somehow fixed and now I can add DocEdit
2. I no longer embed a DocEdit in an ArrayCtrl. Not a good design Smile.
Previous Topic: ArrayCtrl and EditString WithDropChoice
Next Topic: GridCtrl with Option problem under linux
Goto Forum:
  


Current Time: Thu Dec 12 10:28:08 CET 2019

Total time taken to generate the page: 0.01879 seconds