rich text editor -changing font size alone in vb.net language
-
Hi to all.This Is Lakshmi Dhivya,Iam doing my Engineering on Information Technology(IT),and I have decided to make an editor with all possible formatting options. I have selected vb.net as a programming language for my project. I have started designing the Rich Text editor,but Iam unable to change the font size alone with different font text selected.I have added a font comobox and a size combobox,but i need to change font alone and size alone with different font text selected. I request help from You all to finish my project Thanks in advance to every one.
-
Hi to all.This Is Lakshmi Dhivya,Iam doing my Engineering on Information Technology(IT),and I have decided to make an editor with all possible formatting options. I have selected vb.net as a programming language for my project. I have started designing the Rich Text editor,but Iam unable to change the font size alone with different font text selected.I have added a font comobox and a size combobox,but i need to change font alone and size alone with different font text selected. I request help from You all to finish my project Thanks in advance to every one.
You have not really explained what the problem is. If you select a new font from the font combo then the current font size should be used. And if you select a new height then the current font should be used. Alternatively you could use the
FontDialog
class[^]. -
Hi to all.This Is Lakshmi Dhivya,Iam doing my Engineering on Information Technology(IT),and I have decided to make an editor with all possible formatting options. I have selected vb.net as a programming language for my project. I have started designing the Rich Text editor,but Iam unable to change the font size alone with different font text selected.I have added a font comobox and a size combobox,but i need to change font alone and size alone with different font text selected. I request help from You all to finish my project Thanks in advance to every one.
-
Hi to all.This Is Lakshmi Dhivya,Iam doing my Engineering on Information Technology(IT),and I have decided to make an editor with all possible formatting options. I have selected vb.net as a programming language for my project. I have started designing the Rich Text editor,but Iam unable to change the font size alone with different font text selected.I have added a font comobox and a size combobox,but i need to change font alone and size alone with different font text selected. I request help from You all to finish my project Thanks in advance to every one.
You have to create a new Font object, based on the previous font object, with the new FontSize. That's the bad thing with Fonts: they are immutable, and changing a property of a font can only be done be creating a new one with the different property.
-
You have to create a new Font object, based on the previous font object, with the new FontSize. That's the bad thing with Fonts: they are immutable, and changing a property of a font can only be done be creating a new one with the different property.
I have found that in wordpad if you select a text content typed in different fonts the font combobox will not show any font and if you change the size, only the size of the selected text changes and not the fonts. How To do this. This Is my Problem,I think i have told the exact problem. Awaiting positive response form you all.
-
I have found that in wordpad if you select a text content typed in different fonts the font combobox will not show any font and if you change the size, only the size of the selected text changes and not the fonts. How To do this. This Is my Problem,I think i have told the exact problem. Awaiting positive response form you all.
Bernhard has explained what you need to do. Remember, what you see on the menu of Wordpad does not tell you what is happening internally. Every time you want to display characters in a particular font then you need to create a new one, even if you are only changing the size.
-
I have found that in wordpad if you select a text content typed in different fonts the font combobox will not show any font and if you change the size, only the size of the selected text changes and not the fonts. How To do this. This Is my Problem,I think i have told the exact problem. Awaiting positive response form you all.
That means that you have to split the selection into regions with the same font, and then apply the method described above for each section individually.