| |
|
|
- Page 1 - |
|
Andre Hilprecht | Hi, driver% is a ChoiceBox. i want the to selection in this Box one TextFeld (Text1&) the value undertaking and the ChoiceBox then ausgeblendet becomes. The Choice disappears but already to the selection.
|
|
|
| Ein PC ist die beste Möglichkeit Fehler zu beheben, die ohne PC gar nicht passiert wären. -frei aus Murphy's Computergesetzen
XProfan X2, Win8 Pro 64bit Update von Win7 i5 / 3,2GHz 4 GB RAM Treibstoff: Radeberger Pils | 12/17/12 ▲ |
|
|
|
|
« this Posting watts as Solution marked. » |
|
Thomas Freier | Perhaps so:
cls
var driver%=CreateChoiceBox(%hwnd,"",10,110,200,200)
AddStrings(driver%,"Klaus")
AddStrings(driver%,"Werner")
AddStrings(driver%,"Tim")
declare Text1&, x%
Text1&=CreateText(%hwnd,"",10,10,300,22)
SetFont Text1&, CBFont&
while 1
waitinput
case getfocus(driver%) : WAEHLE_FAHRER
wend
Proc WAEHLE_FAHRER
while getfocus(driver%)
x%=-1
waitinput
x%=GetCurSel(driver%)
If x%>-1
SetText Text1&,Gettext$(driver%)
DestroyWindow(driver%)
BREAK
endif
wend
Endproc
there at 1. getfocus(driver%) yet no electoral met becomes, this in a Loop offer. |
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 12/17/12 ▲ |
|
|
|
|
|
Andre Hilprecht | thanks for Help, has too functions. only unfortunately if I the with of/ one 2. ChoiceBox anwende working not. Irgendwas make I wrong.
Declare end%, Text1&, Text2&, x%, driver%, TankW%
'--------------------------------------------------------driver
Proc FAHRER
var s$ = ""
assign #1,"namen.aht"
reset #1
while hardship(eof(#1))
input #1,s$
addchoice(driver%,s$)
wend
close #1
assign #1,""
while getfocus(driver%)
x% = -1
waitinput
x% = GetCurSel(driver%)
If x% > -1
Text1& = @Create("Text", %hwnd, "", 10, 10, 110, 22)
SetText Text1&,Gettext$(driver%)
DestroyWindow(driver%)
endif
wend
TANKWAGEN
Endproc
'-------------------------------------------------------------TW
Proc TANKWAGEN
TankW% = @Create("ChoiceBox", %hwnd,1,200,10,150,100)
var s$ = ""
assign #1,"TW.aht"
reset #1
while hardship(eof(#1))
input #1,s$
addchoice(TankW%,s$)
wend
close #1
assign #1,""
while getfocus(TankW%)
x% = -1
waitinput
x% = GetCurSel(TankW%)
If x% > -1
Text2& = @Create("Text",%hwnd,"",200,10,150,22)
SetText Text2&,Gettext$(TankW%)
DestroyWindow(TankW%)
endif
wend
Endproc
'--------------------------------------------------------------------
WINDOWSTYLE 84
WINDOW 0,0 - %MaxX,%MaxY
Ende% = @Create("Button", %hWnd, "ENDE", %MaxX-120, 10, 100, 30)
Fahrer% = @Create("ChoiceBox",%hwnd,1,10,10,150,300)
while 1
waitinput
case getfocus(driver%) : FAHRER
case getfocus(end%) : end
wend
|
|
|
| Ein PC ist die beste Möglichkeit Fehler zu beheben, die ohne PC gar nicht passiert wären. -frei aus Murphy's Computergesetzen
XProfan X2, Win8 Pro 64bit Update von Win7 i5 / 3,2GHz 4 GB RAM Treibstoff: Radeberger Pils | 12/17/12 ▲ |
|
|
|
|
Andre Hilprecht | Habs yourself found, it had one SetFocus on The 2. ChoiceBox staid go. Why it with the first Box without goes, entzieht itself me of course, but I have first time a Solution and can moreover make.
Greeting Andre
can as Done viewing go |
|
|
| Ein PC ist die beste Möglichkeit Fehler zu beheben, die ohne PC gar nicht passiert wären. -frei aus Murphy's Computergesetzen
XProfan X2, Win8 Pro 64bit Update von Win7 i5 / 3,2GHz 4 GB RAM Treibstoff: Radeberger Pils | 12/17/12 ▲ |
|
|
|
|
Thomas Freier |
Why it with the first Box without goes, entzieht itself me of course, whom Focus and so the lever the first Box get through Click. thereafter erstellst You a second, on The You without request over GetFocus()/ Clicked() grab want. so is the circumstance : not erfüllt. alternatively
|
|
|
| Gruß Thomas Windows XP SP2, XProfan X2 | 12/18/12 ▲ |
|
|
|