coda
Junior Member
Posts: 74
|
Post by coda on Oct 20, 2023 5:19:43 GMT -5
Hi. I think I have asked this question before years ago but I can't seem to remember or find the answer. I think I asked on the old conforums pages. Not sure if all that info is copied across to here.
LB disables checkboxes just fine but it doesn't ghost them when it disables them. How would I achieve this? I know I have done it before but my files containing this information are on the other side of the country from me and I won't have access for months.
Thanks in advance for any help you can provide.
|
|
|
Post by tsh73 on Oct 20, 2023 7:28:04 GMT -5
I duno, but
#main.checkbox1 "Disable" disables and grays out check box. (under Win 10)
So what is "ghost them" ?
|
|
|
Post by xxgeek on Oct 20, 2023 8:07:17 GMT -5
How about
#main.checkbox1 "hide"
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Oct 21, 2023 5:36:26 GMT -5
Ghosting means 'greying out'. They do not grey out for me and never have... not with the regular native LB commands... they just disable.
|
|
|
Post by meerkat on Oct 21, 2023 5:49:36 GMT -5
If you're using RB then; In HTML, to “grey out” a text box or to disable it simply mention keyword “ disabled” in your input tag. <input type="text" name="Go" disabled> To convert a image to grayscale; Filter property is mainly used to set the visual effect of an image. Use filter: grayscale(100%) to convert an image into grayscale.
|
|
|
Post by tsh73 on Oct 21, 2023 14:27:47 GMT -5
Well, they just work for me, no problem whatsoever. LB/JB. win 10 Win 7 win xp ' Form created with the help of Freeform-J v.261006 ' Generated on Oct 21, 2023 at 21:51:05
nomainwin
WindowWidth = 550 WindowHeight = 410
UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
statictext #main.statictext1, "this is active checkbox", 26, 16, 144, 20 checkbox #main.checkbox2, "CheckBox Caption", [checkbox2Set], [checkbox2Reset], 22, 46, 144, 20 button #main.button3, "Disable", [button3Click], UL, 182, 36, 122, 25 button #main.button4, "Enable", [button4Click], UL, 326, 36, 122, 25
statictext #main.statictext5, "This is checkbox disabled from the start", 22, 76, 344, 20 checkbox #main.checkbox6, "CheckBox Caption", [checkbox6Set], [checkbox6Reset], 22, 106, 144, 20
statictext #main.statictext7, "This is checkbox disabled after 100 ms by timer", 22, 136, 344, 20 checkbox #main.checkbox8, "CheckBox Caption", [checkbox6Set], [checkbox6Reset], 22, 166, 144, 20
'open "checkbox test" for window as #main open "checkbox test" for window_nf as #main 'open "checkbox test" for dialog as #main print #main, "trapclose [quit.main]"
print #main, "font ms_sans_serif 10"
#main.checkbox6 "disable" timer 100, [disableCheckbox8]
wait
[quit.main] Close #main END
[disableCheckbox8] #main.checkbox8 "disable" timer 0 wait
[checkbox2Set] 'Perform action for the checkbox named 'checkbox2' 'Insert your own code here wait
[checkbox2Reset] 'Perform reset for the checkbox named 'checkbox2' 'Insert your own code here wait
[button3Click] 'Perform action for the button named 'button3' #main.checkbox2 "disable" wait
[button4Click] 'Perform action for the button named 'button4' #main.checkbox2 "enable" wait
[checkbox6Set] 'Perform action for the checkbox named 'checkbox6' 'Insert your own code here wait
[checkbox6Reset] 'Perform reset for the checkbox named 'checkbox6' 'Insert your own code here wait
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Oct 22, 2023 1:05:01 GMT -5
Ok, this is very strange that everyone should be having a different experience to me. I have used several different versions of LB over the years across 5 different physical PCs using many OSs (Win 98, Win 7, Win 10 and also Wine on Linux) and I have had this problem with all versions of LB on all physical machines with all operating systems mentioned. I image therefore that what I am saying seems bizarre to people but that everyone is saying the opposite seems just as bizarre to me too. I believe you all but I'm very confused. Perhaps it has something to do with the type of window I am opening or something... Very confused right now...
|
|
|
Post by tsh73 on Oct 22, 2023 2:25:21 GMT -5
Try my code. Does it work for you? Post your code where it does not work so others could try it, too.
|
|
|
Post by Rod on Oct 22, 2023 3:25:38 GMT -5
Also confirm thst your computer display is set to show 24bit or better color.
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Oct 23, 2023 22:28:11 GMT -5
Ok. I know what is going on. I apologise for taking up your time unnecessarily. It's my fault. I am currently not on my main PC as I am in a different part of my country. I am working thus, on my Linux PC using Wine. Wine, it seems, at least with my setup does not change the square of the text box at all when ghosting checkboxes and because I wanted a 'vertical' label on my checkboxes, I gave the checkboxes no label and used a separate line of statictext, which I forgot to disable. So, my bad. It nonetheless, remains a fact that I always seem to have some kind of issue with the ghosting of checkboxes even when I haven't made this silly mistake. I don't know why when all other controls behave just fine for me... but that's an issue for another day. No, your checkboxes don't ghost but your text does, which is how I figured my problem out. It's the OS combined with Wine causing it though. My code is over 11,000 lines long so I would have to isolate some for you but since I've solved this with your help it is probs not worth it. Yes, most definitely. Thankyou everyone and apologies once again.
|
|
|
Post by tenochtitlanuk on Oct 24, 2023 6:55:26 GMT -5
Still a bit surprising- I work on Linux Mint/Wine/LB4.5 and it works for me.....
|
|
|
Post by metro on Oct 24, 2023 7:19:59 GMT -5
Still a bit surprising- I work on Linux Mint/Wine/LB4.5 and it works for me..... for some reason it does not work for me (Linux Mint) pro v4.5.1
I get the same result as coda
|
|
|
Post by xxgeek on Oct 24, 2023 9:48:52 GMT -5
To clear up some facts....
After doing some tests in Linux I have found that the issue is 'not' that the checkbox is not graying out, but rather the checkbox is grayed out from the start.
In Windows you will notice a black border around the actual box of the checkbox. This is not the case in Linux under WINE. Why not? Who knows? If you do a 'mouseover" the box will highlight 'blue', but there is no initial 'black box' bordering the checkbox in Linux/WINE
Since I use a 'lightgray' background color in most of my programs I also noticed another 'oddity' with the text in checkboxes.
In Linux/WINE if the BackgroundColor$ = "lightgray" and ForgroundColor$ is left as default you will see NO text in the checkbox control when disabled, it is invisible. Gray text on Gray background cannot be seen
Whereas in Windows, windows provides a slightly different color for the grayed out text of the checkbox, so you CAN see it even with a BackgroundColor$ = "lightgray" and a default ForegroundColor$
Linux/WINE does NOT provide this 'non-main' color, and just uses the same ole 'lightgray' as the gray'd out text, and therefore it becomes invisible.
Hope this helps someone someday.
|
|
coda
Junior Member
Posts: 74
|
Post by coda on Nov 8, 2023 21:40:00 GMT -5
Thanks, xxgeek.
|
|