|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
how can i clear an text id when its clicked on? im sure there ie some way
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
$mouse >:P There isn't a click event for a text control, so that's ur only bet
-KingTomato
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
on *:dialog:dialogname:sclick:dialogid:{ do action }
/help on DIALOG
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
allright i guess on mouse over the text id clear it? or what? isnt there on focus or something?
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
on *:dialog:test:sclick:10:{ did -r test 12 }
Assuming you have a dialog named "test" and you single click (with left mouse button) on the ID 10 item (say, a radio button), and dialog ID 12 is a textbox/editbox or whatever, this will remove all text.
Like I said, /help on DIALOG
I haven't actually used the mouse event, but i'm sure something like this would also work: on *:dialog:test:mouse:10:{ did -r test 12 }
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
alright i will say this again. doesnt work... want proof? test it.. more proof? $mouse >:P There isn't a click event for a text control, so that's ur only bet
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
neo basically is saying have a sclick event on ANOTHER ID trigger a clear event..
Neo: that;s not what he wants, he wants the text in the textbox to clear on click, like some form objects on webpages. >:D
-KingTomato
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
ok heres the dialog, im not very good with using pixels and x and y and mouse position. im trying to clear these two text IDs (i guess on mouse over) but if the text is default when unmouse over i want the text to go back in there
dialog toolbar {
title "Toolbar"
size -1 -1 500 6
option dbu
edit "Google..", 1, -2 -2 100 10
edit "Define..", 3, 122 -2 100 10
}
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
No mouse event for that, so you'd need to use a timer (to catch the mouse being over the edit controls), $dbu<w|h> (in case you're using dbu dimensions), then calculate them along with $dialog().<x|y|w|h|cw|ch> and $mouse.<x|y> to be sure that any relative OS default dimensions wouldn't mess the whole calculation. That wouldn't be easy..
Edit: I'd suggest having the whole thing on focus, instead of on mouse over.. you could use a timer and $dialog().focus for this.
Last edited by cold; 07/11/03 10:16 PM.
* cold edits his posts 24/7
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 426 |
What I suggested should work, but due to some stupid thing, it isn't. I've been trying to do it for sometime now.
What really sucks, is that sclick doesn't appear to work in a textbox. How the [censored] could that be overlooked?
What cheeses me off, is that the help file "suggests" (not directly) that it is possible to use an sclick event in any dialog item.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
so can someone help me code for this event?
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Heres a sort of very messy and ugly way. It has faults, such as moving mouse up from the editbox won't restore it, nor will it be restored if the mouse moves out of it downwards or to the left of ID1 (both of those are mostly caused by the dialog body being smaller than the edit controls :tongue:). dialog toolbar {
title "Toolbar"
size -1 -1 500 6
option dbu
edit "Google..", 1, -2 -2 100 10
edit "Define..", 3, 122 -2 100 10
}
on *:dialog:toolbar:mouse:1,3,0:{
if $did == 0 {
if $var(%tb.mouse.*,0) {
did -ra toolbar 1 $iif($(%tb.did.1,2),$ifmatch,Google..)
did -ra toolbar 3 $iif($(%tb.did.3,2),$ifmatch,Define..)
unset %tb.mouse.?
}
}
elseif !$($+(%,tb.mouse.,$did),2) {
inc %tb.mouse. $+ $did
if $istok(Google.. Define..,$did($did),32) { did -r toolbar $did }
did -f toolbar $did
}
}
on *:dialog:toolbar:edit:1,3:{
set %tb.did. $+ $did $did($did)
}
on *:dialog:toolbar:close:*:{
unset %tb.did.*
} Using this table overcomes the mouse out problems above, unless the mouse is moved out too quickly . dialog toolbar {
title "Toolbar"
size -1 -1 500 10
option dbu
edit "Google..", 1, 1 1 100 8
edit "Define..", 3, 122 1 100 8
}
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
OP
Hoopy frood
Joined: Jul 2003
Posts: 742 |
alright ill take ur suggestion dialog is bigger. how can i completely make the text IDs black? im using mdx but i dont think theres a feature for that..
|
|
|
|
|