General area when it fits no where else

Moderator: Mmiscool

User avatar
By joeman2116
#53436 For V3 A41

Code:

Button "Set A/C ASSIST",[setpt] ' allows me to enter a temperature
textbox setp


The code allows me to input a temperature - it works fine .

The issue is the textbox provides input space which is much to large.
Is there a method to make the setbox input space much smaller??
(I only need it wide enough for 4 or 5 digits at most. )


Thanks
Joe
User avatar
By Mmiscool
#53441 Ok. So here is the deal.

You can style each element of your gui by using the the cssid command.

The trick is to create the gui element and immediately after set the css code for it.

The htmlid() functin will return the ID of the last gui element created. The css id command will aaply css code to that particular element.

Code: Select alltextbox setp
cssid htmlid(), "background-color:green;display:block;width:80px"

User avatar
By joeman2116
#53452 Mmiscool,

Thanks that solved it.

Is it possible to center the value as well?
The number is now left justified.

current code:

I added ----> align-content:center in the css code but no change

wprint "<table align='center' width='130' bgcolor='#e6e600' border='5' cellpadding='5'>" ' creates my box
wprint "<td>"
Button "Set A/C ASSIST FAN TEMP",[setpt]
textbox setp
cssid htmlid(), "background-color:lightblue;display:block;align-content:center;width:105px"
wprint "<th</th></table><br>"

Thanks
Joe
User avatar
By Mmiscool
#53455 I might suggest looking at the following link for CSS.

http://www.w3schools.com/css/default.asp