Solved

Make DirListBox and FileListBox same size

Posted on 2002-06-23
12
353 Views
Last Modified: 2010-08-05
This is probably quite easy for you experts and is more than likely something I am overlooking.

In my application I have both DirListBox and FileListBox, as these are displayed next to each other I would like to make them the same size(height especially), but when I try to re-size them they jump either to a size that is slightly lower or higher. I have tried selecting them both and then using the format-make same size menu, but this still ends up with one slightly smaller (usually the FileListBox) than the other. I have also tried setting their height at runtime, this has the same effect. How can I get them to be the same height.

Please help even though this is only for aesthetics.

Mandy
0
Comment
Question by:MandyP1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +5
12 Comments
 
LVL 22

Accepted Solution

by:
cookre earned 45 total points
ID: 7101703
'Align to Grid' doesn't always give precise results.

Have you tried putting in explicit vaues for the 'height' and 'width' properties?
0
 

Expert Comment

by:HobbitHouse
ID: 7101745
sounds like this is the kind of thing you've already tried, but give it a go:

dirListBox.height = fileListBox.height
0
 
LVL 18

Expert Comment

by:Crash2100
ID: 7101912
Just copy the values of the Height and Width properties from the properties window of one of the objects, then select the other one and paste it in the appropriate properties.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:MandyP1
ID: 7102081
Thanks for all your comments but I'm afraid I have tried all these methods. I think the basic cause is due to the spacing between each line of text in the DirListBox as opposed to the spacing in the FileListBox, as they each seem to jump to the next line height - does that make sense? I may be wrong.

Mandy
0
 
LVL 22

Expert Comment

by:cookre
ID: 7102173
Well, poo.  

Yeah, that's why we don't see half lines in those boxes any more.

And it doesn't seem to let you adjust at run time either.
0
 

Expert Comment

by:HobbitHouse
ID: 7102460
so how about if you make the font sizes the same, then adjust the heights as needed, does that do it?
0
 
LVL 22

Expert Comment

by:cookre
ID: 7102557
Therein lies the problem - the font sizes are the same.  It would appears as if the folder icon makes the lines a wee tad taller.
0
 
LVL 2

Expert Comment

by:priya_pbk
ID: 7102754
I had faced this problem quite a number of times.

See if this works:
At design time(obviously..)
Go to Tools Menu->Options->General Tab->check the Show Grid(i think it will be by default)
And in the format Grid settings change the Twips width and height to 30 respectively.

Hope this solves yr problem. Give it a try!!

-priya

0
 
LVL 19

Expert Comment

by:Rimvis
ID: 7102924
I think it just can't be done :o/
Gues FileListBox has something similar to ListBox "IntegralHeight" property. It means that Height property is changed automatically in that way, it always displays COMPLETE row. While this property in ListBox could be changed, there no way to do it in FileListBox.
0
 

Author Comment

by:MandyP1
ID: 7105528
Thanks priya, but I had already tried that, infact I think I have tried almost everything. I think I am inclined to agree with both cookre and Rimvis in that it always shows the complete row, and due to the icon the spacing of the rows is differant is it possible to adjust this? This may be one of those thinks that I am just stuck with.

Thanks for your comments.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7962794
Hi MandyP1,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept cookre's comment(s) as an answer.

MandyP1, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 8022902
Per recommendation, force-accepted.

Netminder
EE Admin
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question