Cosmetic issues between listbox and listctrl.  [SOLVED]

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Cosmetic issues between listbox and listctrl.

Postby Dark Alchemist » Sat Apr 10, 2010 12:58 am

This has been bugging me for a couple of years now but why is it that the same font attributes for both and they aren't really the same? I can have a listctrl on one side and a listbox on the other side filled with items and they do not horizontally line up YET the boxes are? Almost reminds me of a kerning issue but I have no idea how to fix it even if it were.

Any ideas about this?

btw, this is on Windows (98, XP, Vista, 7).

User avatar
doublemax
Moderator
Moderator
Posts: 12681
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

  [SOLVED]

Postby doublemax » Sat Apr 10, 2010 9:11 am

A screen shot would have been nice.

Both are native controls, so i'm not sure there is anything you can do about it. I guess that the wxListCtrl has a different vertical spacing because it can display rules between the "cells".

You could try replacing the wxListBox with a "one column, no header wxListCtrl", then they should line up.
Use the source, Luke!

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Postby Dark Alchemist » Sat Apr 10, 2010 3:37 pm

Yep, I am going to have to rewrite a lot of code to make the change which, for my purposes, is more trouble than it is worth *but* I do agree with you I suspect it is due to the rules but what I wonder is if the same situation happens in other OSes?

Screenshot? Hera ya go Image

Dark Alchemist
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Wed Nov 02, 2005 10:33 am

Postby Dark Alchemist » Tue Apr 13, 2010 2:01 am

Too bad there isn't a simple fix for this so I could use both as they are.


Return to “C++ Development”

Who is online

Users browsing this forum: No registered users and 17 guests