Jump to content


Markus

Member Since 06 Mar 2006
Offline Last Active Jan 01 2009 02:25 PM
-----

Topics I've Started

ComboBoxItem Bug

09 November 2006 - 03:52 PM

When using a ComboBoxItem with its style property set to cbDropDownList there's an "index exceeds maximum" access violation when you're clicking on the lower left point of the drop-down list. Make sure the last item in the list is not highlighted to reproduce this error, i.e. move your mouse cursor below the last item.

This is because TNxPopupList.AcquireValue() calculates an ItemIndex that exceeds the maximum (as the error message suggests) as the Y coordinate passed to the function is greater than expected:

CODE
FItemIndex := Y div FItemHeight + VertScrollBar.Position;  // AV if Y is greater than count * ItemHeight

SpinItem behavior

08 November 2006 - 07:38 PM

A SpinItem with its min-property set to some negative value misbehaves with the first entered '-' (minus). It's closing its editor immediately, because NextInspector is trying to "ckCollapse" the item in DoItemChange. After the first entered minus sign everything works as expected and you're able to enter negative values to the SpinItem.

GetItemByName()

06 October 2006 - 06:04 PM

Hi,

could somebody please give me a possible use case for GetItemByName()? I suspect the function doesn't exactly do what it's supposed to do.

Markus

Items[x].Items[x-1].Items[x-2]. ... .Items[x-n]?

24 May 2006 - 07:20 PM

Howdy,

I'm wondering what you would expect from this line

CODE
Items[n].Items


Normally, I'd say you want to access all items that are n-th item's childs. But this is not how NextInspector treats items.

Some examples:

CODE
if Items[0].Items[2] = Items[1].Items[2] then
  ShowMessage('Say what?');


CODE
ShowMessage(IntToStr(Items.Count));  // obviously returns count of _all_ items (correct)
ShowMessage(IntToStr(Items[0].Items.Count));  // returns count of _all_ items
ShowMessage(IntToStr(Items[1].Items.Count));  // returns count of _all_ items
ShowMessage(IntToStr(Items[2].Items.Count));  // returns count of _all_ items


Is this (mis)behaviour by design?

Cheers,
Markus

NextInspector 4: TNxComboBoxItem Drawing Bug

16 May 2006 - 10:10 PM

Howdy,

I'm not quite sure what is causing this, so I put it in here.

Steps to reproduce:

Designtime:
[list]1. Place a NextInspector (4) on your form
2. Add a TNxComboBoxItem to the Inspector
3. Fill ComboBox with at least one item.[list]

Runtime:
[list]4. Select an item in the ComboBox by clicking on the ComboBox' editor (not the dropdown button) - the text inside editor is aligned normally
5. Exit the TNxComboBoxItem (e.g. by clicking on its category header)
6. Click on the ComboBox' editor once again - from now on the text always jumps to the upper left part of the InplaceEditor when selecting the ComboBoxItem
[list]

Cheers,
Markus