English
Forum

Listbox-Text rechtsbündig report.

 
- Page 1 -



Julian
Schmidt
can someone say, wieso the the Text 'Test' the Listbox not rechtsbündig reported becomes. Ausgehend from the Logik would I say, that it functions should!?
cls
declare Text$
var lb&=Create("ListBox", %hwnd, 0, 10, 10, 152, height(%hwnd)-20)
Randomize
Addstring(lb&,Mkstr$("_",18))'18 characters benefit The Listboxbreite from

whileloop 20

    case iskey(27) : end
    Text$=Mkstr$(Str $(Rnd(10)),Rnd(10)+1)
    'Maximale_Zeichenlänge_in_ListBox - (Anzahl_Zeichen_Linksbündig + Anzahl_Zeichen_Rechtsbündig) = Zeichenlänge_zwischen_Linkbündig_und_Rechtbündig_damit_Maximale_Zeichenlänge_in_ListBox_erreicht
    Addstring(lb&,Text$+MkStr$(" ",18-(Len(text $)+Len("Test")))+"Test")
    Messagebox("Länge '"+text $+"' = "+Str $(Len(text $))+" - length 'Test' = "+Str $(Len("Test"))+"\n18-("+Str $(Len(text $))+"+"+Str $(Len("Test"))+")="+Str $(Len(MkStr$(" ",18-(Len(text $)+Len("Test")))))+"\nIst "+Str $(Len(text $))+"+"+Str $(Len(MkStr$(" ",18-(Len(text $)+Len("Test")))))+"+"+Str $(Len("Test"))+" = 18?","",0)

Endwhile

while 1

    waitinput

Endwhile

 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
03/25/12  
 



« this Posting watts as Solution marked. »


Andreas
Miethe


falser Font would I say.
 $H windows.ph
 $H messages.ph
cls
declare Text$
var lb&=Create("ListBox", %hwnd, 0, 10, 10, 152, height(%hwnd)-20)
sendmessage(lb&,~wm_setfont,~GetStockObject(~ANSI_FIXED_FONT),1)
Randomize
Addstring(lb&,Mkstr$("_",18))'18 characters benefit The Listboxbreite from

whileloop 20

    case iskey(27) : end
    Text$=Mkstr$(Str $(Rnd(10)),Rnd(10)+1)
    'Maximale_Zeichenlänge_in_ListBox - (Anzahl_Zeichen_Linksbündig + Anzahl_Zeichen_Rechtsbündig) = Zeichenlänge_zwischen_Linkbündig_und_Rechtbündig_damit_Maximale_Zeichenlänge_in_ListBox_erreicht
    Addstring(lb&,Text$+MkStr$(" ",18-(Len(text $)+Len("Test")))+"Test")
    Messagebox("Länge '"+text $+"' = "+Str $(Len(text $))+" - length 'Test' = "+Str $(Len("Test"))+"\n18-("+Str $(Len(text $))+"+"+Str $(Len("Test"))+")="+Str $(Len(MkStr$(" ",18-(Len(text $)+Len("Test")))))+"\nIst "+Str $(Len(text $))+"+"+Str $(Len(MkStr$(" ",18-(Len(text $)+Len("Test")))))+"+"+Str $(Len("Test"))+" = 18?","",0)

Endwhile

while 1

    waitinput

Endwhile

 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
03/25/12  
 




Julian
Schmidt
is correct so functions it. but Why depends with the the Font together?
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
03/25/12  
 




Andreas
Miethe


with this Fixed-Fonts are even any characters same wide, with others Font different.

but It's all right too with others Fonts.
and without grosse Rechnerei. simply whom ExStil the Listbox Change.
 $H windows.ph
 $H messages.ph
cls
declare Text$
Var lb& = Control("LISTBOX","",~WS_CHILD | ~WS_VISIBLE | ~WS_BORDER,10,10,152,height(%hwnd)-20,%hwnd,2000,%hinstance)
~SetWindowLong(lb&,~GWL_EXSTYLE,~WS_EX_RIGHT)
Randomize
Addstring(lb&,Mkstr$("_",18))'18 characters benefit The Listboxbreite from

whileloop 20

    case iskey(27) : end
    Text$=Mkstr$(Str $(Rnd(10)),Rnd(10)+1)
    'Maximale_Zeichenlänge_in_ListBox - (Anzahl_Zeichen_Linksbündig + Anzahl_Zeichen_Rechtsbündig) = Zeichenlänge_zwischen_Linkbündig_und_Rechtbündig_damit_Maximale_Zeichenlänge_in_ListBox_erreicht
    Addstring(lb&,Text$+MkStr$(" ",18-(Len(text $)+Len("Test")))+"Test")
    Messagebox("Länge '"+text $+"' = "+Str $(Len(text $))+" - length 'Test' = "+Str $(Len("Test"))+"\n18-("+Str $(Len(text $))+"+"+Str $(Len("Test"))+")="+Str $(Len(MkStr$(" ",18-(Len(text $)+Len("Test")))))+"\nIst "+Str $(Len(text $))+"+"+Str $(Len(MkStr$(" ",18-(Len(text $)+Len("Test")))))+"+"+Str $(Len("Test"))+" = 18?","",0)

Endwhile

while 1

    waitinput

Endwhile

 
Gruss
Andreas
________ ________ ________ ________ _
Profan 3.3 - XProfanX2
Win 95,98,ME,2000,XP,Vista - Win 7 32 / 64 Bit
ASUS X93S - Intel Core I7-NVIDIA GForce 540M 8GB Arbeitsspeicher
Homepage :  [...] 
03/25/12  
 




Julian
Schmidt
OK, thanks Andreas. you have me very helped.
 
XProfan X2
Win7 Home Premium, SP1, AMD Athlon(tm) II Neo K125 Processor

˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗˗
Webseite [...] 
03/25/12  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

9.357 Views

Untitledvor 0 min.
RudiB.04/05/20
ByteAttack02/11/20
p.specht04/04/16
RICOSCH10/12/14
More...

Themeninformationen

this Topic has 2 subscriber:

Julian Schmidt (3x)
Andreas Miethe (2x)


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