KemoEgypt Posted March 4, 2018 Share Posted March 4, 2018 سلام عليكم ابي اول م يكتب حروف او ارقام في الايديت يزيد الـ ProgressBar ولما يمسح الحروف من الايديت ينقص الـ ProgressBar Link to comment
#\_oskar_/# Posted March 4, 2018 Share Posted March 4, 2018 guiProgressBarSetProgress guiGetText #Event onClientGUIChanged اظن ماينفع تكتب حروف ارقام فقط Link to comment
KemoEgypt Posted March 4, 2018 Author Share Posted March 4, 2018 5 minutes ago, #\_oskar_/# said: guiProgressBarSetProgress guiGetText #Event onClientGUIChanged اظن ماينفع تكتب حروف ارقام فقط شفت سيرفرات ولله فيها حروف المشكله اني مو عارف اسوي guiProgressBarSetProgress بالحروف Link to comment
SycroX Posted March 5, 2018 Share Posted March 5, 2018 On 3/5/2018 at 00:56, #\_oskar_/# said: guiProgressBarSetProgress guiGetText #Event onClientGUIChanged اظن ماينفع تكتب حروف ارقام فقط قصدو لما يكون مسوي للأديت بوكس حد يعني مثلا 10 حروف كل ما يكتب حرف او رقم يزيد نسبه البروجرس بار addEventHandler("onClientGUIChanged", guiRoot, function() if source == yourEditBox then local text = guiGetText(yourEditBox) local textlength = string.len(text) local maxlength = guiGetProperty(yourEditBox, "MaxTextLength") local progress = (textlength/maxlength)*100 guiProgressBarSetProgress(yourProgressBar, progress) end end ) Link to comment
#\_oskar_/# Posted March 5, 2018 Share Posted March 5, 2018 guiEditSetMaxLength(yourEditBox, 100) _Setprogress = function(_T) guiProgressBarSetProgress(yourProgressBar,_T) guiSetText (window,_T ) end addEventHandler("onClientGUIChanged",yourEditBox,function() local T_T = guiGetText(yourEditBox) local _progress = guiProgressBarGetProgress(yourProgressBar) if _progress >= 100 then _Setprogress (string.len(T_T)) -- - else _Setprogress (string.len(T_T)) -- + end end, false) هل تقصد كدا ؟ او انا فهمت غلط Link to comment
SycroX Posted March 6, 2018 Share Posted March 6, 2018 On 3/5/2018 at 23:15, KemoEgypt said: م يزداد ال بروجرسر guiSetProperty(yourEditBox, "MaxTextLength", عدد الحروف الي تباها) ضيف الكود ذا تحت كود انشاء الأديت بوكس Link to comment
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