qwert Posted January 2, 2016 Share Posted January 2, 2016 I've used the TVExplorer UDF for a while. But now I have a need to use a fixed-pitch font for one of my views.Looking at other examples, I thought I could use the view's handle in a SetFont statement. That idea works for the associated "input" control, but not for the view, itself:$Input[2] = GUICtrlCreateInput('', 20, 378, 660, 19) GUICtrlSetFont($Input[2], 12, Default, Default, "Courier New") GUICtrlSetState(-1, $GUI_DISABLE) $hTV[2] = _GUICtrlTVExplorer_Create(@ProgramFilesDir, 20, 406, 660, 310, -1, $WS_EX_CLIENTEDGE, -1, '_TVEvent') GUISetFont(12, Default, Default, "Courier New", $hTV[2])Would anyone have a suggestion? I'm very unsure at what level to attempt a setting. In the calling script? In the TVExplorer.au3? In GUITreeView.au3?Thanks in advance for any help. Link to comment Share on other sites More sharing options...
Danyfirex Posted January 2, 2016 Share Posted January 2, 2016 Use GUICtrlSetFont for your treeview.Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
qwert Posted January 2, 2016 Author Share Posted January 2, 2016 Indeed, that works ... but only if I insert the statement in the create function of the UDF, itself. Multiple tries / variations from the control script did not work.$ID = GUICtrlCreateTreeView($iX, $iY, $iWidth, $iHeight, $iStyle, $iExStyle) ;<<<<<<<<<< GUICtrlSetFont($ID, 12, Default, Default, "Courier New")Although I was hoping for a way that didn't require modifying the UDF, this solves my immediate problem.Thanks very much for your response. Link to comment Share on other sites More sharing options...
Danyfirex Posted January 2, 2016 Share Posted January 2, 2016 UseGUICtrlSetFont(-1, 12, Default, Default, "Courier New")after you create you treeview _GUICtrlTVExplorer_Createor get the control ID returned from _GUICtrlTVExplorer_Create $hTV[0]=_GUICtrlTVExplorer_Create$ID=_WinAPI_GetDlgCtrlID($hTV[0])GUICtrlSetFont($ID, 12, Default, Default, "Courier New")Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
qwert Posted January 2, 2016 Author Share Posted January 2, 2016 $ID = _WinAPI_GetDlgCtrlID($hTV[0]) did the trick ... and I put the UDF back to standard.I had been using the control handle in my attempts, when the control ID was needed. Details!Thanks for following up on this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now