< Easy > problems.. 
Author Message
 < Easy > problems..

The below code results in two 'bars' at the end. How could I avoid that?

Msg = Msg & Chr$(10,13)
Control Add TextBox,hDlg,%IDC_txtMsg,Msg,7,148,337,93

---
In an attempt to disable a textbox until a subject is chosen from a
dropdown list, I end up not managing to enable it again.

Control Disable hDlg&, %IDC_txtMsg
Control Enable hDlg&, %IDC_txtMsg

Btw: what message does the oposit of "%ES_READONLY" ?



Sun, 21 Apr 2002 03:00:00 GMT  
 < Easy > problems..
Haakon,

Quote:

>The below code results in two 'bars' at the end. How could I avoid that?
>Msg = Msg & Chr$(10,13)
>Control Add TextBox,hDlg,%IDC_txtMsg,Msg,7,148,337,93

Is the TEXTBOX multiline? (ie, %ES_MULTILINE)

If that is not a solution, then remove the CRLF's fron the string:

Msg = REMOVE$(Msg, ANY CHR$(13,10))

Quote:
>---
>In an attempt to disable a textbox until a subject is chosen from a
>dropdown list, I end up not managing to enable it again.
>Control Disable hDlg&, %IDC_txtMsg
>Control Enable hDlg&, %IDC_txtMsg

This works for me in the test I just wrote and tested.  Maybe you
should post a small example of the code that does not work for you.

Quote:
>Btw: what message does the oposit of "%ES_READONLY" ?

The opposite is when %ES_READONLY is omitted from the control style
parameter.   In other words, if it is not read-only, it is writable.

Don't confuse this read-only with disabled however... they are
different states.

Lance
powerbasic Support

-------------------------------------------------------------------------
PowerBASIC, Inc.      | 800-780-7707 Sales | "We put the Power in Basic!"
316 Mid Valley Center | 831-659-8000 Voice | http://www.powerbasic.com



Mon, 22 Apr 2002 03:00:00 GMT  
 < Easy > problems..

Quote:
>Is the TEXTBOX multiline? (ie, %ES_MULTILINE)

Yes, it's a mulitline message field, where I intend to put two lines of text
initially. I.e. I want to have a line break in the text before it reaches
the right side and wraps by it self.

But my attempts all end up with two bars between the two lines, instead of a
line feed/break.



Mon, 22 Apr 2002 03:00:00 GMT  
 < Easy > problems..
As always, please post some code (peferably compilable code) so we can
help you...

Quote:

>But my attempts all end up with two bars between the two lines, instead of a
>line feed/break.

Lance
PowerBASIC Support

-------------------------------------------------------------------------
PowerBASIC, Inc.      | 800-780-7707 Sales | "We put the Power in Basic!"
316 Mid Valley Center | 831-659-8000 Voice | http://www.powerbasic.com



Tue, 23 Apr 2002 03:00:00 GMT  
 < Easy > problems..
Ok, here is the dialog code without the equates.
Initially I wanted to have two lines of text in the main message (textbox),
one centense, line break, and another centense. But my attept to put in the
line breaks results in just the fonts 'unavail' symbol.

I don't know if this code really enlightens the issue. Actually I changed
the function to avoid the problem this time. But I'm still curious to figure
out why I couldn't manage.

---

Function PbMain() As Long
Local hDlg    As Long
Local Result  As Long
Local hIcon  As Long

Dialog New  %HWND_DESKTOP,"  Opticus request system",,,351,268, _
            %DS_MODALFRAME Or %DS_3DLOOK Or %WS_MINIMIZEBOX Or _
            %WS_POPUP Or %WS_CAPTION Or %WS_SYSMENU, To hDlg

 Control Add ComboBox,hDlg,%IDC_cboEmne,UserString$(),147,120,100,100, Call
FuncSubject
 Control Set Text hDlg&,%IDC_cboEmne,"Type or select subject ->"
 ComboBox Add hDlg,%IDC_cboEmne,"Inquiery"
 ComboBox Add hDlg,%IDC_cboEmne,"Request"
 ComboBox Add hDlg,%IDC_cboEmne,"Order"

'THIS IS THE (PROBLEM) CONTROL

 Control Add TextBox,hDlg,%IDC_txtMelding,"",7,140,337,100, %ES_AUTOHSCROLL
Or %ES_AUTOVSCROLL Or %ES_MULTILINE Or %ES_WANTRETURN Or %WS_TABSTOP,
%WS_EX_CLIENTEDGE

 Control Add Button,hDlg,%IDOK,"&Send",294,248,50,14,,, Call FuncSend
 Control Add Button,hDlg,%IDCANCEL,"&End",7,248,50,14,,, Call FuncEnd

 Control Add Frame,hDlg,-1," Contact information ",147,7,197,105,,,

 Control Add TextBox,hDlg,%IDC_txtFirma,"",195,20,139,12,
 Control Add TextBox,hDlg,%IDC_txtAdresse,"",195,34,139,12,
 Control Add TextBox,hDlg,%IDC_txtNavn,"",195,48,139,12,
 Control Add TextBox,hDlg,%IDC_txtStilling,"",195,62,139,12,
 Control Add TextBox,hDlg,%IDC_txtEpost,"",195,76,139,12,
 Control Add TextBox,hDlg,%IDC_txtTelefon,"",195,91,53,12,
 Control Add TextBox,hDlg,%IDC_txtTelefaks,"",281,91,53,12,
 Control Add TextBox,hDlg,%IDC_txtReferanse,"",281,120,53,12,

 Control Add Image, hDlg,103,"Logo", 7, 11, 195, 58,%WS_VISIBLE Or %WS_CHILD
Or %SS_BITMAP 'Or %WS_BORDER,

 Control Add Label,hDlg,-1,"Company",157,22,30,9,,,
 Control Add Label,hDlg,-1,"Address",157,36,30,9,,,
 Control Add Label,hDlg,-1,"Contact",157,50,30,9,,,
 Control Add Label,hDlg,-1,"Position",157,64,29,9,,,
 Control Add Label,hDlg,-1,"Email",157,78,29,9,,,
 Control Add Label,hDlg,-1,"Phone",157,93,30,9,,,
 Control Add Label,hDlg,-1,"Fax",260,93,18,9,,,
 Control Add Line ,hDlg,-1,"Line",7,64,130,0.75
 Control Add Label,hDlg,-1,"Ref.",260,122,18,9,,,
 Control Add Label,hDlg,%IDC_lblInfo,"",7,68,133,65,,,

 ghDlg = hDlg

' Call FuncReadPostal  '(Reading contact info from file)

Dialog Show Modal hDlg ,Call PbMcallback To result

End Function



Tue, 23 Apr 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. ><><><><>Heeeeeeeeeeeeeeelp on INT 14!><><><><><>

2. <<<<<YOU MUST CHECK THIS OUT >>>>>>>>>> 2103

3. ADVICE <<<<<<<<<<<<<<<<<<<-----------EASY ---------------

4. <><><> FLOODFILL <><><>

5. >>>HELP, DECOMPILER<<<

6. <<<XXX Password>>>

7. <<<XXX Password>>>

8. <<<XXX Password>>>

9. >>>>>>>>>>>>>>>>>>>HEY!<<<<<<<<<<<<<<<<<<<<<<<

10. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

11. ??? <<<<<<<<<<<<<<<<<<<< RGB 4 MMX >>>>>>>>>>>>>>>>>>>>>>>?

 

 
Powered by phpBB® Forum Software