Display A Font/font Colour Selection Box?
Apr 11, 2009
I'm creating a basic text editor and I wish to include the option to change the font, font colour and background colour of the text box. Is there a way I can ask VB to display a font/font colour selection box or do I have to populate a combo box and code it all myself?
View 2 Replies
ADVERTISEMENT
Mar 7, 2009
How to list all font in combobox, and how to change selected font in list accordin font in combobox?
View 3 Replies
Jul 11, 2011
One of the fields in a listview control is a calculated integer field. Is there any way that when the value is less than 0, the font colour of the whole row or the column changed to red?
View 1 Replies
Mar 23, 2012
How do you change the colour of the labels(not sure what the correct name is) in a Microsoft Chart Control in VB.
By "labels" I mean the text that is overlaid on every column in a StackedColumn chart.
You can change the Axis labels with the following:
<AxisY LineColor="Red">
<LabelStyle ForeColor="Red" />
</AxisY>
[Code].....
What is the equivalent to target the labels?
View 1 Replies
Aug 16, 2011
I'm looking for a way to change the font colour on alternate rows within a datagrid. e.g. normal row would be green and the alternate row would be blue. I can change either by using
me.datagrid.Styles.Row.Forcolour
me.datagrid.Styles.AlternatingRow.Forcolour
The problem is that I am having trouble using both of them together as I need to manipulate both colours. I have created a HtmlRowPrepared event and have been setting them there, however, If I set the Row.Forcolour first, it will over ride the AlternatingRow.Forcolour and vice versa. This needs to be done via SEVER SIDE code only as the colour choices are held in the database.
View 2 Replies
Mar 26, 2010
I am looking for a regular expression that can convert my font tags (only with size and colour attributes) into span tags with the relevant inline css. This will be done in VB.NET if that helps at all.I also need a regular expression to go the other way as well.To elaborate below is an example of the conversion I am looking for:
<font size="10">some text</font>
To then become:
<span style="font-size:10px;">some text</span>
So converting the tag and putting a "px" at the end of whatever the font size is (I don't need to change/convert the font size, just stick px at the end).The regular expression needs to cope with a font tag that only has a size attribute, only a color attribute, or both:
<font size="10">some text</font>
<font color="#000000">some text</font>
[code]....
I also need another regular expression to do the opposite conversion. So for example:
<span style="font-size:10px;">some text</span>
Will become:
<font size="10">some text</font>
As before converting the tag but this time removing the "px", I don't need to worry about changing the font size.Again this will also need to cope with the size styling, font styling, and a combination of both:
<span style="font-size:10px;">some text</span>
<span style="color:#000000;">some text</span>
[code]....
I am extracting basic HTML & text from CDATA tags in an XML file and then displaying them on a web-page.The text also appears in a rich-text editor so it can be edited/translated, and then saved back into a new XML file. The XML is then going to be read by a flash file, hence the need to use old-fashioned HTML.
The reason I want to convert this code is mainly for display purposes. In order to show the text sizes correctly and for it to work with my rich text editor they need to be converted to XHTML/inline CSS. The rich text editor will also generate XHTML/inline CSS that I need to convert 'back' to standard HTML before it is saved in the XML file.I know the temptation will be to tell me a number of different ways to set up my code to do what I want but there are so many other permutations I haven't even mentioned which have forced me down this route, so literally all I want to do is convert a string containing standard HTML to XHTML/inline CSS, and then the same but the other way round.
View 6 Replies
Apr 3, 2010
How can I create a contructor for this.I have a constructor already in my class as follows :
Public Sub New()
Text = "Hello World"
TextFont = New Font(System.Drawing.FontFamily.GenericSansSerif, 10, FontStyle.Italic)
[code].....
View 5 Replies
Dec 15, 2010
I have a RichTextBox. I process all the formatting and everything works fine. There is an exception. When I have selected text that have two states of formatting in it, the SelectionFont member is set to Nothing. I notice that WordPad recognizes this condition
and kindof greys out the affected format.
Let's take this example:
This text is in Bold.
The rest of the comments here and not in bold.
When I select these two lines, the SelectionFont gets set to Nothing. WordPad sets the Bold button grey, but still clickable. If I click the Bold button in this state, the entire selection is set to bold. How do I achieve this same functionality?
View 3 Replies
Apr 14, 2010
I'm trying to make a wee word pad application in an attempt to learn visual basic.
I've got a combo box which has a list of fonts on the system:
Imports System.Drawing.Text Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim fonts As New InstalledFontCollection
For Each X As FontFamily In fonts.Families
cmbFontName.Items.Add(X.Name)
[Code]...
View 6 Replies
Aug 25, 2010
I can't change change the font size or font name or color of the text in the DHTML Editing Control. I have 2 listbox controls FontNameList containing all of the installed fonts on my PC and FontSizeList containing some numbers to be used as fontsize and I use the execommand and build my App but the font did not change instead it grew bigger but when I tryed to change it back it stayed the same. The Code for that was:
Design.ExecCommand(5044, False, Font.Name)
View 8 Replies
Feb 10, 2009
printing barcode 39 truetype from idautomation i already try their integration guide but it didnt work....i want my project to
1. Label1 changes to what i type in the textbox1(the label1 is a barcode i change the font of the label1 into IDAutomationHC39M font from IDAutomation)...ive already done that...
2. print the barcode(which is the label1) when i click my button named btnprint..but it doesnt print...
View 11 Replies
Jun 2, 2011
I am creating an excel report from vb.net. Now it works. But i realize that the apparent does not make sense. I just want enlarge some font size and change font name plus setting up the page to fit my receipt printer (Epson TM-T88IV).
View 1 Replies
Jan 18, 2009
How do I apply 2 font styles to the text selected in a richtextbox? Used this method to change fontstyle:
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Bold)
But with this method I can only apply 1 font-style (for example bold OR italic OR underlined, etc.) right? But I want to apply for example 2 front-styles, or just add the font style ( so I can add several front-styles to the selected text, for example the text is bold, and then ALSO make it underlined (with this method I can only change the font-style, only one font-style)), how do I do this?
Just do so:
RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont, FontStyle.Bold + FontStyle.Italic)
View 2 Replies
Jan 24, 2011
I'm working on a word processor (yes, the thread with the quit forms and the count times open is the same word processor)
It's called iRobosoft Word. The 3rd version is at sourceforge and the 4th is in RC stage.
The 4th version is quite a major upgrade, but back to the topic.For font I used:
Private Sub Rich_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Rich.TextChanged
Font1.Text = Rich.SelectionFont.ToString
End Sub
[code]...
View 8 Replies
Nov 16, 2009
How do i amend the read only properteis like font.underline, font.height etc I know its read only but there must be a way to amnd these.
View 4 Replies
Jul 31, 2009
I am trying to convert a value from a radio list box that is populated by an access database. The database loads fine, I have no trouble with that. My issue is that I am trying to take the value of the radio button chosen and turn it into a font color. Therein lies my problem. I see that it cannot be a string, but when I turn it into an object, I get an error. I will note that I am using VS 2008 (Windows Vista x64), and the database is compatible with a 2002 - 2003 Access database. I am using ASP.NET for my programming, however, I am trying to program it in VB. This is my code:
[Code]...
View 4 Replies
Jul 27, 2010
everything tests well but when I evoke the function the dialog values default to selections other than what the text was originally/last set to (e.g., color, font, size, etc. in the dialog/menu is not what is shown in my rich text box).how I can set the above values per the text being recalled in the RTB? That is, in the above scenario if I hit the cancel button I lose the original text formatting.
Public Class frmComment
Private Sub FontDialog1_Apply(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontDialog1.Apply
If Not RichTextBoxPrintCtrl1.SelectionFont Is Nothing Then
[code]....
View 4 Replies
Jun 8, 2011
I am trying to make a program that basicly, on the click of a button, removes a font from the windows font list (Un-installs it) Is there a way to do this using VB.NET (2010)The reason I want to do this is to make a program to remove the 'Comic Sans MC' font from all computers I use my pendrive on?
View 9 Replies
Feb 2, 2009
how will I set the font style and font size of my textbox in a programmatic way? Also, if possible, a code that displays the different font style on a combo box.
View 3 Replies
Mar 3, 2011
I have a scenario to resolve using the font dialog code below. In brief, everything tests well but when I evoke the function the dialog values default to selections other than what the text was originally/last set to (e.g., color, font, size, etc. in the dialog/menu is not what is shown in my rich text box). [code]...
View 3 Replies
May 28, 2009
Is it possible to change the size of a font in .net winforms without having to create a new Font with the new size?
View 3 Replies
Apr 18, 2011
Is it possible to apply two font effects to a New Font?
Like this:
Dim fnt As Font = New Font(Me.Font.FontFamily, 10, FontStyle.Bold, FontStyle.Underline).Obviously, this is too many arguments, but what is the correct way to apply both the Bold and Underline font effects?
View 3 Replies
Feb 25, 2010
I'm trying to use Linq to loop through all fonts in the %windir%Fonts folder and find the one that has a property title of "Arial" (or any Font Family name supplied), but I can't seem to access the font properties (things like "Title", "Font style", "Designed for", etc.).
The following is only giving me the basic file info:
Dim fontDir = Environment.GetEnvironmentVariable("windir") & "Fonts"
Dim fontFiles = From file In My.Computer.FileSystem.GetFiles(fontDir)
[code].....
View 2 Replies
Apr 9, 2010
I need to search a term in pdf file to get font of all occurrences of the term with its corresponding font information and next 5 words of each occurrence.
View 3 Replies
May 10, 2010
I use a fontdialog box in my application allowing users to change the font details within my application. This works fine but unfortunatly I don't seem to be able to set the values in the dialogbox as they are read only.
Basically if the user has Bold Wingdings set and wishes to change it to something else then when they open up the fontdialog box I would like to be able to set the font to wingdings and bold so the user can see what they previously selected. Word seems to do this so why cant I?
View 1 Replies
Nov 4, 2011
I have a basic VB.net app that displays a picture box with some text. nothing special. looks fine on my computer. If I display it on someone else's computer with a larger font size (125%?) my picturebox and text looks off and stupid.
How do people account for this? Should I simply get the new font size and multiple all positions, lengths and widths of object by 1.25?
I'd obviously like my dialog to scale properly and look as expected in any display no matter what font size is selected.
View 4 Replies
Nov 4, 2011
I have a basic VB.net app that displays a picture box with some text. nothing special.ooks fine on my computer. If I display it on someone else's computer with a larger font size (125%?) my picturebox and text looks off and stupid.
View 2 Replies
Feb 16, 2012
I know that I can calculate the display area for a given font using
TextRenderer.MeasureText("Text", New Font(Arial, 12.0F)
I want to calculate the size of a font I should be using in order to fit a given display area. Is there a function that allows me to do that?
View 1 Replies
Apr 12, 2010
i am having trouble in sending text, when i send the text in textbox2 it sends into a normal way where as i selected my font as bold and size=10, i want the font which i have selected in richtextbox should display according to it if no font is selected then it can display in regular way.
View 3 Replies
Jun 21, 2010
Code for changing font through menu selection like "Arial"????
View 10 Replies