Author Topic: change the color Font & size  (Read 2775 times)

toto313

  • Newbie
  • *
  • Posts: 28
change the color Font & size
« on: October 13, 2019, 02:52:24 PM »
bonne soire

how Can I change the color Font & size for the Log window ?


Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: change the color Font & size
« Reply #1 on: October 13, 2019, 03:28:08 PM »
There is no setting for that.  The only thing you can do is change to dark mode by clicking on the system menu (icon in top-left corner) and selecting, 'cover of darkness'.

Sorry about that :(

toto313

  • Newbie
  • *
  • Posts: 28
Re: change the color Font & size
« Reply #2 on: October 14, 2019, 07:05:05 AM »
sorry i did not do a search on the forum before asking the question but i saw when can do it with a function  with Pfeil's help:  http://voiceattack.com/SMF/index.php?topic=1872.msg8706#msg8706

but i did not understand how


"désolé j'ai pas fait une recherche sur le forum avant de poser la question mais jai vu  quand peut le faire avec une fonction,mais jai pas compris comment"

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: change the color Font & size
« Reply #3 on: October 14, 2019, 07:59:27 AM »
Most of that inline function is/will be obsolete as the controls (and as such their names) have been replaced by different ones.

As stated in that topic:
Note that this really is a "trick", not official, and not guaranteed to keep working(though it should as long as VoiceAttack uses WinForms and the main window name doesn't change).
(bold emphasis mine)

toto313

  • Newbie
  • *
  • Posts: 28
Re: change the color Font & size
« Reply #4 on: October 14, 2019, 08:48:04 AM »
then it will not work ,will not it be replaced, please  :)

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: change the color Font & size
« Reply #5 on: October 15, 2019, 12:14:40 AM »
I edited the relevant post in that topic with a version that should work with v1.7.9.x beta, and presumably future releases as well.


As you're looking to change the font size as well, this modified version should do that:
Code: [Select]
using System;
using System.Windows.Forms;
using System.Drawing;
using Telerik.WinControls;
using Telerik.WinControls.UI;

public class VAInline
{
    public void main()
    {
//Remove window border
Application.OpenForms["frmMain"].FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

//Change the location of the window
Application.OpenForms["frmMain"].Location = new System.Drawing.Point(-656, 30);

//Set the font color
Color fontColor = Color.FromArgb(233, 124, 39);
//Change the font color for "Profile"
Application.OpenForms["frmMain"].Controls["tableBody"].Controls["lblProfile"].ForeColor = fontColor;
//Change the font color for the "Profile" box
((RadDropDownList)Application.OpenForms["frmMain"].Controls["tableBody"].Controls["cboProfile"]).DropDownListElement.EditableElement.ForeColor = fontColor;

//Change the font color for the log
RadListView log = ((RadListView)Application.OpenForms["frmMain"].Controls["tableBody"].Controls["lvMain"]);
log.ListViewElement.ForeColor = fontColor;

//Set the font size
Font logFont = new Font(log.ListViewElement.Font.FontFamily, 10);
//Change the font size for the log
log.ListViewElement.Font = logFont;

    }
}

Don't forget to change the referenced assemblies as mentioned in the original topic.

Also note that previous restrictions apply: This is unofficial, and if it breaks from here on, likely unsupported.

toto313

  • Newbie
  • *
  • Posts: 28
Re: change the color Font & size
« Reply #6 on: October 15, 2019, 12:04:00 PM »
THAAAAAANK YOOOUUUU  8) 8) 8) 8) 8) 8) 8)