|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Formatting the ComboBox editing windowarrayList. Once I select an item I would like the selected item to be displayed in the editing window with the string divided in half with the first half to be displayed on the far left and the other half displayed to the far right. I have tried string formatting with little success. I using VB2005 standard version. Thanks tm Hello Tom,
Your description makes me feel that you want the functionality of a multi-column combo box. Hmmm... It can probably be done using some string manipulation, but you will get inexact returns unless you use a mono-spaced font. If you use a regular font then the width of each character in the string will be different and the string which is supposed to be right aligned won't come in right. If you are interested in the text based solution, this is what the logic is. Find the number of characters that can fit in one line of the combo. Count the number of chars in the string you have. Subtract the number from the number of characters in the combo. Put the first half of the string in a string, then add the number of the spaces that are left after subtracting. Now add the rest half of the string... Hmm... Did I explain things properly over there? The second idea is better... Modify the combo box and write your own paint code. You might want to start with a multi column combo. There are several on the net. Regards Cyril gupta Cyril,
I have tried your first suggestion but was not satisfied with the look. It was so easy in VB5 using Twips so I tried to figure out if Pixel could do the job, but know luck. Thanks, for the suggestions. tm
Which database should I use?
vbexpress and sql2000 How to set the TextBox digital only? help !!!! databinding with text box help urgent Namespace not available... Wall Charts 2005 No Setup Project in 2005 Express Edition? Keep form on top of everything - even other apps ? Deleting all forms in collection |
|||||||||||||||||||||||