-
Dear VB users,
Making a drag/drop program to move files, I discover a problem.
At the moment I am dragging, the drag height must be the height of the filename.
Searching for this value.
The File1.FontSize can have many values.
I did try:
TextHeight("W")
TextHeight(Text1.FontSize)
TextHeight(Text1)
All gives the same value: 195 (making the FontSize very small to very big!)
How can I find the height of the draggingbox for the text I am dragging?
Nice greetings,
Michelle.
-
OK, youre using twips or a userdef scale on that control. Just change it to pixels or divide it by 15
-
Hello kedaman,
If I have two FileBoxen used for dragging and dropping. Both do have different FontSizes.
I don't understand what I do have to calculate for a correct dragging box.
Please can you give an example???
Michelle
[Edited by michelle on 04-12-2000 at 05:28 AM]
-
Ok, michelle, filelistboxes don't have any scalemode so they use their parents scalemode, Is it/they set to pixel?
-
Sorry, I didn't understand your problem here, Textheight doesn,t work for filelistboxes. Simply use Filelistboxname.fontsize
-
Hello kedaman,
If I make a FileListBox with a FontSize for example 72. What will be the dragging box height.
If it is to small you are seeing small box height.
How can I calculate my dragging box height?
Thanks for helping me.
Michelle.
-
I don't get it, why do you need a gigantic font (72) to a filelistbox? Anyway I think you need to check out what scalemode you have on your form, that I think could be twips. To calculate between twips and pixels it's 1 pixel = 15 twips (Or if you're using VB3, it can be 12 or something else)