Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO]Label caption broked


DshWinchester
 Share

Recommended Posts

I am trying make the caption of a label be broken(like the LblNews in frmMenu) by sending a packet from server(command)

The text is Ok but the lbl caption doesn't broke

this is my sub(Client>handledata)

>! > Private Sub HandleQuestPic(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
>     Dim Buffer As clsBuffer
>     Dim tmpArray() As String, I As Long
>     Dim tradeStatus As Byte
>     Dim Desc As String
>     Set Buffer = New clsBuffer
>     Buffer.WriteBytes Data()
>    
>     Desc = Buffer.ReadString
>    
>     Set Buffer = Nothing
>    
>     If Desc = "" Then frmMain.lblQuestDesc.Caption = "Sem missão"
>    
> tmpArray() = Split(Desc, "< br / >")
>     frmMain.lblQuestDesc.Caption = vbNullString
>     For I = 0 To UBound(tmpArray)
>         frmMain.lblQuestDesc.Caption = frmMain.lblQuestDesc.Caption & tmpArray(I) & vbNewLine
>     Next
>    
> End Sub

anyone can tell me what I do wrong  :rolleyes:
Link to comment
Share on other sites

yes,I put spaces to apear on this msge

look if I put the real code

> Private Sub HandleQuestPic(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
>     Dim Buffer As clsBuffer
>     Dim tmpArray() As String, i As Long
>     Dim tradeStatus As Byte
>     Dim Desc As String
>     Set Buffer = New clsBuffer
>     Buffer.WriteBytes Data()
>    
>     Desc = Buffer.ReadString
>    
>     Set Buffer = Nothing
>    
>     If Desc = "" Then frmMain.lblQuestDesc.Caption = "Sem missão"
>    
> tmpArray() = Split(Desc, "
> ")
>     frmMain.lblQuestDesc.Caption = vbNullString
>     For i = 0 To UBound(tmpArray)
>         frmMain.lblQuestDesc.Caption = frmMain.lblQuestDesc.Caption & tmpArray(i) & vbNewLine
>     Next
>    
> End Sub

see?that part is disappears

still dont break the caption  :cry:
Link to comment
Share on other sites

@-sigh-:

> why not make it a RichTextBox? That could work, I dont think multiline is an option in labels.

It obviously does because it works just fine in Origins.

It looks like you're just not duplicating my code properly. Post a dump of the received packet text.
Link to comment
Share on other sites

Textbox is easy but isnt transparent
thanks  :P
~~~~
I call this

>! Sub QuestPic(ByVal Index As Long, ByVal Desc As String)
    Dim Buffer As clsBuffer

    Set Buffer = New clsBuffer
    Buffer.WriteLong SQuestPic
    Buffer.WriteString Desc
    SendDataTo Index, Buffer.ToArray()

    Set Buffer = Nothing
End Sub

questpic "teeeeeeeeeeeeeeeeeeeestttttttttttaweawwwwwwwwwwwwwpie"

the only diference between lblNews and my label is that my text message is a packet

ty  :cheesy:
Link to comment
Share on other sites

._. the problem was the lack of spaces.The label does not break if a single word.

before
![](http://img205.imageshack.us/img205/1517/screenhunter06jan090809.png)

now
![](http://img832.imageshack.us/img832/5913/screenhunter04jan090805.png)

well,thanks for the code and patience XD

I just post here cause I am making others thing of my game and very busy '-'
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...