DPanelList cuts my controls to 64 width...


The real width of that red thingie is 150 pixels.
Yet, it’s only drawn 64 pixels wide.
(Yes, I checked the size in code. It is 150x24.)

It is a custom panel added to a DPanelList.
(The DPanelList is 307 by 365 pixels.)
(Yes, I checked this too in code.)

[lua] self:SetSpacing(7)
That commented line yields the same result when I uncomment it.

What is the problem? What causes this?

Please, somebody, help me…

Some possible fixes:

Also check the settings of your DpanelList, this kind of cutting off usually never happens when I use it.

The settings were taken from the example on the wiki.
Also, SizeToContents won’t do anything because both the size of the DPanelList and the size of my panel are perfect.

I’ll try SetMinWidth(), but I doubt it will do anything.

Not all the code on the wiki has been tested. Just recently, someone had copied a derma example from the wiki related to propertysheets and it was broken.

SetMinWidth() helps me out at weird intervals. When my DListView wouldn’t size its columns lower than 150 for some reason, setting the min width fixed it right up.

So, SetMinWidth doesn’t exist.
Only SetMinimumSize does.
And it doesn’t work.

It does, actually. Because DButton is a child, of a child, of a child of Panel, it technically has the attribute of “SetMinWidth”.

If it doesn’t work, it doesn’t work, though. I can’t know what’s going on without the code and I figure that you don’t want to post it, because you’ve yet to post it.

The code that I posted there, is the only thing I do to my DPanelList.
That red thingie, is just a panel with a custom paint function.

Try using a DPanelSelect, push the custom panel you used for that button into it, then just create a DPanelList for everything else and push it onto the DPanelSelect.

I don’t know the fix for this and I’m sorry for that. I hope someone else is able to help you.

I don’t understand.

It’s okay. I asked many friends about this, and nobody knew the solution either.

I think I’ll end up coding my own DPanelList.