English
Forum

Select String & Array's

 
- Page 1 -



Julian
Schmidt
Hi,
I have one small Completed: Select String because of one Array's
here time one Minibeispiel.
CompileMarkSeparation
cls
declare choosetitle&,ok&,Abort&,edit&, chbox2&, titleedit&, choose&, titelschrift$[], font&, ende%
titleedit&=Create("Edit",%hwnd,"Title",20,20,200,32)
titelschrift$[1]="Times New Roman"
font&=Create("Font",titelschrift$[1],27,0,1,0,0)
SetFont titleedit&,font&
EnableWindow titleedit&,0
choose&=Create("Button",%hwnd,"Title ändern",240,19,120,35)

while 1

    waitinput
    case getfocus(choose&) : Titleaendern

Endwhile

Proc Titleaendern

    choosetitle&=Create("Window",%hwnd,"Titel anpassen",200,100,400,200)
    ok&=Create("Button",choosetitle&,"Ok",width(choosetitle&)-90,height(choosetitle&)-50,70,30)
    Abort&=Create("Button",choosetitle&,"Abbrechen",20,height(choosetitle&)-50,100,30)
    edit&=Create("Edit",choosetitle&,Gettext$(titleedit&),20,20,width(choosetitle&)-40,25)
    chbox2&=Create("ChoiceBox", choosetitle&, 1, 20, 55, width(choosetitle&)-40, 130)
    ClearList
    AddFonts
    MoveListToHandle(chbox2&)
    SelectString(chbox2&,-1, titelschrift$[1])
    Messagebox(titelschrift$[1],"",0)
    clear ende%

    whilenot ende%

        if getfocus(ok&)

            titelschrift$[1]=GetText$(chbox2&,GetCurSel(chbox2&))
            Messagebox(titelschrift$[1],"",0)
            font&=Create("Font",titelschrift$[1],27,0,1,0,0)
            Setfont titleedit&,font&
            SetText titleedit&, Gettext$(edit&)
            destroywindow(choosetitle&)
            ende%=1

        elseif getfocus(abort&)

            destroywindow(choosetitle&)
            ende%=1

        Endif

    Endwhile

ENDPROC


Select String does unfortunately not always in the Choicebox The suitable Font select.
If I though the aray ( titelschrift$[1] ) by a normalen String supplant functions it correct.
in the Variable titelschrift$[1] standing always the right worth!

where lying the trouble the Select String not always markiert

LG

Julian57
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/09/11  
 



« this Posting watts as Solution marked. »


Nico
Madysa
The Error lying in the row:
CompileMarkSeparation
titelschrift$[1]=GetText$(chbox2&,GetCurSel(chbox2&))
>

To dato known I do not time, that one GetText$ so using must.
The problem lying therein, that the String, whom You here sustain, another zusätzliches space end has -- that you in your MessageBoxen naturally not see konntest. would have You time that here installed:
CompileMarkSeparation
MessageBox("|" + titelschrift$[1]+"|","",0)
>

then would have You seen, that to the schließenden Strich a hiatus klafft.
Umwege, the To solve, there two. You could once through Trim$ the space eliminating:
CompileMarkSeparation
titelschrift$[1]=Trim$(GetText$(chbox2&,GetCurSel(chbox2&)))
>

or You uses GetString$, How I it yet for correctly. held have:
CompileMarkSeparation
titelschrift$[1]=GetString$(chbox2&,GetCurSel(chbox2&))
>

Both ought to to that target lead.
Why very with GetText$ end one space hinzugerät, white I though self not.

PS: yet time in the Help geblättert. GetText$ is none for Choiceboxen virtual. in the Help standing clear, that these -- very How Listboxes -- through GetString$ auszulesen are.
 
Nico Madysa
05/09/11  
 



You bedenkst the the 1. entry one Arrays The ID 0 own?
 
05/09/11  
 




Nico
Madysa
The Error lying in the row:
CompileMarkSeparation
titelschrift$[1]=GetText$(chbox2&,GetCurSel(chbox2&))
>

To dato known I do not time, that one GetText$ so using must.
The problem lying therein, that the String, whom You here sustain, another zusätzliches space end has -- that you in your MessageBoxen naturally not see konntest. would have You time that here installed:
CompileMarkSeparation
MessageBox("|" + titelschrift$[1]+"|","",0)
>

then would have You seen, that to the schließenden Strich a hiatus klafft.
Umwege, the To solve, there two. You could once through Trim$ the space eliminating:
CompileMarkSeparation
titelschrift$[1]=Trim$(GetText$(chbox2&,GetCurSel(chbox2&)))
>

or You uses GetString$, How I it yet for correctly. held have:
CompileMarkSeparation
titelschrift$[1]=GetString$(chbox2&,GetCurSel(chbox2&))
>

Both ought to to that target lead.
Why very with GetText$ end one space hinzugerät, white I though self not.

PS: yet time in the Help geblättert. GetText$ is none for Choiceboxen virtual. in the Help standing clear, that these -- very How Listboxes -- through GetString$ auszulesen are.
 
Nico Madysa
05/09/11  
 




Julian
Schmidt
thx
 
˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
05/09/11  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

5.629 Views

Untitledvor 0 min.
H.Brill09/24/22
Jörg Sellmeyer05/30/18
Georg Teles02/13/16
rquindt08/14/15
More...

Themeninformationen

this Topic has 3 subscriber:

Julian Schmidt (2x)
Nico Madysa (1x)
iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie