Solved

Make DirListBox and FileListBox same size

Posted on 2002-06-23
12
351 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
  • 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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