doestergaard

Question about font difference between label and other controls

10 posts in this topic

Hi.

I have just been wondering, why a font looks different from one control to another. As an example, I have a Label (top) and a Combo control (bottom). As the following image shows, there appears to be "more space" between words than there is in the label control?

565250cd63d78_Skrmbillede_2015-11-23_kl.

Can someone answer me on why this is happening?

 

Thanks in advance!

Share this post


Link to post
Share on other sites



doestergaard,

They look the same size to me when using the default settings:

#include <GUIConstantsEx.au3>

$sText = "Specify the required information"

$hGUI = GUICreate("Test", 500, 500)

GUICtrlCreateLabel($sText, 12, 10, 200, 20)

GUICtrlCreateCombo("", 10, 30, 200, 20)
GUICtrlSetData(-1, $sText, $sText)

GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Size.thumb.png.fcabb833f653072fe1ab0e76b

Are both the label and combo in your image using the same font size?

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hi Melba

thx for your reply :) it happens in WinPE.

Im setting the same font size for both the label and combobox

GUICtrlSetFont(-1, 10, 0)

I will check if it still happens if im not setting a font size at all

Edited by doestergaard

Share this post


Link to post
Share on other sites

Okay, so it does seem to happen only if you set a different size, here it is again5652d50b9d7f3_Skrmbillede_2015-11-23_kl.

Code:

GUISetFont(10, 0)

GUICtrlCreateLabel("Specify required information", 20, 20, 300, 24)

GUICtrlCreateCombo("Specify required information", 20, 20, 300, 24, 0x0003)

 

It is really weird

Share this post


Link to post
Share on other sites

doestergaard,

I still get the same size text in both controls. Possibly a WinPE problem feature, but I have no ability to test that hypothesis.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Try set the following:

GUISetFont(10, 0, "", "Euphemia")

 

I found out to make it reoccur in Windows 7/8 :)

 

Share this post


Link to post
Share on other sites

doestergaard,

Still the same size text for me when I try that font in Win7.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Thats even more odd, what happens when you set it to classic style?

Edited by doestergaard

Share this post


Link to post
Share on other sites

doestergaard,

Now I see the effect - so it is not just you!

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

I was beginning to think if I was crazy :P Im just wondering why is happens?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now