Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

WinFOrms ListBox

How the hey is the font size set in vb code on a WInFOrms ListBox
0
Larry Brister
Asked:
Larry Brister
2 Solutions
 
Meir RivkinFull stack Software EngineerCommented:
can u rephrase the question?
0
 
Meir RivkinFull stack Software EngineerCommented:
the listbox has default font attributes which u can change in the Proprieties pane
screenshot
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Larry Bristersr. DeveloperAuthor Commented:
sedgwick
I need to set the items font size smaller in VB
0
 
käµfm³d 👽Commented:
e.g.

Me.ListBox1.Font = New Font(Me.ListBox1.Font.FontFamily, Me.ListBox1.Font.SizeInPoints - 1)

Open in new window

0
 
Jacques Bourgeois (James Burger)PresidentCommented:
ListBox1.Font = New Font(ListBox1.Font.Name, 6)
0
 
Meir RivkinFull stack Software EngineerCommented:
u can set them any number you want (even 1).
how small do u want the font to be?
0
 
Larry Bristersr. DeveloperAuthor Commented:
Thanks.
YOu guys had it first
0
 
Meir RivkinFull stack Software EngineerCommented:
@lrbrister
how my suggestion is wrong?
0
 
Larry Bristersr. DeveloperAuthor Commented:
sedgewick
Your images were correct of course.
But the specific question was how to do it in vb code
And kaufmed and JamesBurger answered that 4 seconds apart.
So...my choice...I gave the bulk to kaufmed and a nod to JamesBurger
0
 
Meir RivkinFull stack Software EngineerCommented:
ok, u should have specified that u need code or to be more precise do it programmatically.
0
 
Larry Bristersr. DeveloperAuthor Commented:
sedgewick...
My original question specificaqlly said in vb code

Anyway...
I'll try and be more clear.  Thanks for your input
0
 
Meir RivkinFull stack Software EngineerCommented:
u right, my bad.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now