Sorry to keep posting this but I am getting quite desperate now I've spent hours on this with no joy. Here is the code as I feel it might help people know what I am on about. Basicaly on the fontdialogue box how do I get the program, to do somthing when bold, italic, strike through is selected etc?
As you might be able to tell I am making an HTML editor
code:
SUB fontbox
FontDialog.deloptions (fdNoStyleSel)
fontcolour="black"
FontDialog.GetFont(Font)
IF FontDialog.EXECUTE THEN
FontDialog.SetFont(Font)
FontDialog.size=fontsize
IF FontDialog.COLOR = 255 THEN fontcolour="Red"
IF FontDialog.COLOR = 0 THEN fontcolour="Black"
IF FontDialog.COLOR = 128 THEN fontcolour="Maroon"
IF FontDialog.COLOR = 32768 THEN fontcolour="Green"
IF FontDialog.COLOR = 32896 THEN fontcolour="Olive"
IF FontDialog.COLOR = 8388608 THEN fontcolour="Navy"
IF FontDialog.COLOR = 8388736 THEN fontcolour="Purple"
IF FontDialog.COLOR = 8421376 THEN fontcolour="Teal"
IF FontDialog.COLOR = 8421504 THEN fontcolour="Grey"
IF FontDialog.COLOR = 12632256 THEN fontcolour="Silver"
IF FontDialog.COLOR = 65280 THEN fontcolour="Lime"
IF FontDialog.COLOR = -2147483640 THEN fontcolour="Black"
IF FontDialog.COLOR = 65535 THEN fontcolour="Yellow"
IF FontDialog.COLOR = 116711680 THEN fontcolour="Blue"
IF FontDialog.COLOR = 16711935 THEN fontcolour="Fuchsia"
IF FontDialog.COLOR = 16777215 THEN fontcolour="White"
IF FontDialog.COLOR = 16776960 THEN fontcolour="Aqua"
descriptioninput.AddString "<font color="+SM$+fontcolour+SM$+"face="+SM$+FontDialog.Name+SM$+" size"+SM$+fontsize+SM$+">"
IF fontdialog.AddStyles (fsBold) = true THEN PRINT "bold"
fontdialog.DelOptions "fsbold"
END IF
FontDialog.size=fontsize
END SUB
|