|
adding to combo box
#148651
09/05/06 06:28 AM
|
Joined: May 2006
Posts: 122
jizzy
OP
Vogon poet
|
OP
Vogon poet
Joined: May 2006
Posts: 122 |
Is it possible to add some text to the edit part of a combobox without adding it to the list?
If only women came with popup menus and online help.
|
|
|
Re: adding to combo box
#148652
09/05/06 02:07 PM
|
Joined: Oct 2005
Posts: 1,741
genius_at_work
Hoopy frood
|
Hoopy frood
Joined: Oct 2005
Posts: 1,741 |
You can access the edit control in a combobox by using 0 as the N value. /help /did I don't know if that adds the data to the edit box or not. -genius_at_work
|
|
|
Re: adding to combo box
#148653
09/05/06 02:47 PM
|
Joined: May 2006
Posts: 25
Abstract
Ameglian cow
|
Ameglian cow
Joined: May 2006
Posts: 25 |
You can access the edit control in a combobox by using 0 as the N value. Have you tried something like that? /did -a $dname id 0 Blablabla
================== Abstraction is art.
|
|
|
Re: adding to combo box
#148654
10/05/06 01:45 AM
|
Joined: May 2006
Posts: 122
jizzy
OP
Vogon poet
|
OP
Vogon poet
Joined: May 2006
Posts: 122 |
That only work with $did. //echo $did($dname,$did,0)
If only women came with popup menus and online help.
|
|
|
Re: adding to combo box
#148655
10/05/06 03:57 AM
|
Joined: Dec 2002
Posts: 1,245
MikeChat
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I think it makes a difference if you use -i or -a or whatever try this
alias combo dialog -m combo combo
dialog combo {
title "Combo Box Test"
size -1 -1 150 100
option dbu
combo 100, 10 10 130 50
edit "", 200, 10 60 130 10
button "Insert", 900, 50 75 50 10
}
on *:dialog:combo:init:0:{ did -f combo 200 }
on *:dialog:combo:sclick:900:{ did -ri combo 100 0 $did(combo,200) }
|
|
|
Re: adding to combo box
#148656
10/05/06 08:24 AM
|
Joined: May 2006
Posts: 122
jizzy
OP
Vogon poet
|
OP
Vogon poet
Joined: May 2006
Posts: 122 |
I was actally talking about a combo box with the edit flag
combo 2, 10 15 110 10, edit, drop
If only women came with popup menus and online help.
|
|
|
Re: adding to combo box
#148657
10/05/06 10:04 AM
|
Joined: May 2006
Posts: 25
Abstract
Ameglian cow
|
Ameglian cow
Joined: May 2006
Posts: 25 |
Don't know where is the problem? I've just tried the line of code I wrote you before, and it works. I don't mean the $did identifier, but command /did.
================== Abstraction is art.
|
|
|
Re: adding to combo box
#148658
10/05/06 02:40 PM
|
Joined: Dec 2002
Posts: 1,245
MikeChat
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I was actally talking about a combo box with the edit flag combo 2, 10 15 110 10, edit, drop change it to -k test
alias combo dialog -dm combo combo
dialog combo {
title "Combo Box Test"
size -1 -1 150 100
option dbu
combo 2, 10 10 130 50, edit drop
edit "Type Here", 200, 10 60 130 10, center
button "CLICK", 900, 50 75 50 10
}
on *:dialog:combo:init:0:{
var %i = 1
while (%i <= 4) {
did -a combo 2 $r(a,z)
inc %i
}
did -f combo 200
}
on *:dialog:combo:sclick:900:{ did -ik combo 2 0 $did(combo,200) }
|
|
|
Re: adding to combo box
#148659
11/05/06 08:43 AM
|
Joined: May 2006
Posts: 122
jizzy
OP
Vogon poet
|
OP
Vogon poet
Joined: May 2006
Posts: 122 |
Cheers, but I found an easier way. Just thought I could shorten my code.
did -c $dname id $findtok($didtok($dname,id,44),selection-name-here,1,44)
If only women came with popup menus and online help.
|
|
|
|
|
|