Jump to content

Recommended Posts

Posted

Hey fellas,

I'm creating a GUI where the input box has the same color as a colored strip behind it. And I can't find out how to center the the chars verticaly.

Even though there is a lot of free space on top, when I try to decrease the input box height the characters get clipped from the bottom.

tkbJilQ.jpg

I'm running:

$Input1 = GUICtrlCreateInput("", 280, 105, 40, 28, BitOR($ES_CENTER, $ES_NUMBER), $WS_EX_TRANSPARENT)
GUICtrlSetFont(-1, 19, 400, 0, "Krutofont") 

There will be a GUICtrlSetBkColor for the white space to be merged with the darker strip. I left it white for the issue to be more visible.

Any ideas?

Thanks

Seminko

Posted

try to incorporate the $SS_CENTERIMAGE style (from StaticConstants.au3):

BitOR($ES_CENTER, $SS_CENTERIMAGE, $ES_NUMBER)

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Posted (edited)

try to incorporate the $SS_CENTERIMAGE style (from StaticConstants.au3):

BitOR($ES_CENTER, $SS_CENTERIMAGE, $ES_NUMBER)

Hello orbs, unfortunately there is no difference with or without Centerimage.

Edited by Seminko
Posted (edited)

indeed. i've been using this for labels, but apparently it does not work for Input/edit controls.

EDIT: there is this workaround:

'?do=embed' frameborder='0' data-embedContent>>

but perhaps the easiest way would be to fit the Input control height according to the height of the font.

Edited by orbs

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

  • Solution
Posted

Shame. Well, I made a compromise and made the font smaller, which doesn't look as good but at least it is more centered.

Thanks for trying though.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...