forlano Messages: 1185 Registered: March 2006 Location: Italy
Senior Contributor
Hello,
In order to avoid the opening of a new window I've decided to accomodate two ctrls in the same rectangular space: a columnlist and an arrayctrl. At some moment the arrayctrl is hided with .Hide() and the columnlist is shown. I do not know if this way to proceed is too weird and can cause some interference between these two ctrls sharing the same place.
Anyway, everything seems to work except one. When the columnlist (single column mode) is visible and I click on the left side of the first row (zero row) the cursor does not move there. But when I click on the right side of the first row the cursor decide to follow the click.
In order to avoid the opening of a new window I've decided to accomodate two ctrls in the same rectangular space: a columnlist and an arrayctrl. At some moment the arrayctrl is hided with .Hide() and the columnlist is shown. I do not know if this way to proceed is too weird and can cause some interference between these two ctrls sharing the same place.
Absolutely OK - I do the same quite often (last time in the new TheIDE select package dialog).
Quote:
Any idea or I've to prepare a test case?
Well, as TheIDE package selector seems to work OK and does exactly the same (in fact, even using ArrayCtrl and ColumnList , I am afraid testcase is needed.
forlano Messages: 1185 Registered: March 2006 Location: Italy
Senior Contributor
luzr wrote on Sat, 18 November 2006 09:26
Well, as TheIDE package selector seems to work OK and does exactly the same (in fact, even using ArrayCtrl and ColumnList , I am afraid testcase is needed.
Mirek
Here is the test package that reproduce the problem. I forget to mention that Arrayctrl and columnList are on one side of a splitter, so i've added one, and there is present even a richtextctrl.
First press "Show" and let appear the column. If you click on its leftside you will not be able to set the cursor. This can be possibile if you click instead on the right side.
I've discovered that if I remove the RichTextCtrl from the layout then everything became normal
In fact the distance from the left border to the point where your click set the cursor is just that of the richtextctrl! So I suspect it is this one that screen the columnlist despite of its small dimension.
Well, the problem is caused by logical position of RichTextCtrl - it is VSizePos (both top and bottom lines are thick and red), therefore if your layout gets bigger, it gets over the ColumnList (and mouse messages are routed to the "topmost" widget, last in the list).
RichTextCtrl is transparent, therefore "invisible" if it is empty (if it would not empy, you would see the text overwriting the columnlist).
ArrayCtrl works because of order of Ctrls in the layout (is even on top of RichTextCtrl).
forlano Messages: 1185 Registered: March 2006 Location: Italy
Senior Contributor
luzr wrote on Sat, 18 November 2006 15:33
Well, the problem is caused by logical position of RichTextCtrl - it is VSizePos (both top and bottom lines are thick and red), therefore if your layout gets bigger, it gets over the ColumnList (and mouse messages are routed to the "topmost" widget, last in the list).
RichTextCtrl is transparent, therefore "invisible" if it is empty (if it would not empy, you would see the text overwriting the columnlist).
ArrayCtrl works because of order of Ctrls in the layout (is even on top of RichTextCtrl).
Mirek
Fixed. Very instructive mistake that is dangerous in the case of hide/show ctrls. In my real specific case the richtextctrl was completely back and I couldn't see its resize!
Thank you!
Luigi