Resize Label/Button with listbox column

dan1dyoung

Registered User.
Local time
Today, 21:05
Joined
Apr 9, 2005
Messages
76
There is a nice sample database on here to resize the listbox columns on the fly, is there a way to add a label or button above to change the sort order (Done no problem) but have the buttons resize with the columns??

Tried:

Code:
Me.CmdName.Width = Me.[lstTest].Column(0).Width

and

Me.CmdName.Width = Me.lstTest.Column(0).Width

Where CmdName is the button above and lstTest is the listbox

Thanks

Dan
 
Hi Dan
I am not sure that this is what you're actually looking for, but give it a whirl.
Me.Command10.Width = Me.Combo11.ListWidth
 
Hi,

Attached is what i am trying to get, but it currently works on the active column (Works OK on the first column as it resizes the button above, but if you resize column 2 it also changes the button) but i need to get it to work by the column index (So only column 1 effects the current button above it, and then column 2 for another button above column 2).

Currently using:

Code:
Me.CmdName.Width = m_lColWidth(m_bActive)

Have also tried:

Code:
Me.CmdName.Width = m_lColWidth(lColPos = 0)

with the lColPos delared as Long

Any ideas????

Dan
 

Attachments

Attached is a little nearer, but still some querks!!

If you increase the size of the first column, then the second, then the first again, you see the gap between the first and the second button??? Just click to expand the first column again (Do not drag, just click) and it looks OK again.

Is this available as standard in access 2007 as a point of interest does anyone know??? I will try access 2007 over xmas as it has some other good features.

This will do me for tonight, will try again over the weekend

Dan
 

Attachments

Hey Dan
That's an interesting concept you have here.
I tries what you have suggested and I cant seem to replicate the problem that you describe. It seems to be working fine on my system.
 
Liddlem,

Was working late tonight so have not done any more, it plays around sometimes but have not yet looked why. Would also be great to do this when you have the mouse curser between the button rather than the columns (Like Normal systems like sage, excel, e.t.c) but can not think tonight how to trigger from there.

Would someone whos knows access to advise if this is poss and check over the code.

What version are you using?? Maybe it is a compatibility thing, i am using A2000 at present

Dan
 
Last edited:
Just had a look at A2007 (Not perfect), see attached.

Probably still prefer this if we can solve it

Dan
 

Attachments

  • Datasheet Filter & Resize Columns.jpg
    Datasheet Filter & Resize Columns.jpg
    41.4 KB · Views: 222

Users who are viewing this thread

Back
Top Bottom