Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

inputbox$ question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Frank Kestens
    replied
    Originally posted by Michael Mattias View Post
    You mean it word-breaks when the text to be displayed does not fit on one line?
    Yes it is , but it doesn't break words except when theres a blank between the words

    Leave a comment:


  • Michael Mattias
    replied
    You mean it word-breaks when the text to be displayed does not fit on one line?

    Leave a comment:


  • Frank Kestens
    replied
    Originally posted by Michael Mattias View Post
    >I've also noticed the PB performs a CR when it encounters a blank in the text field.

    MSGBOX "Hello World" on my system does not do that.
    Addition : it does at the end of the line . Jumps to the next line when there's a blank

    Leave a comment:


  • Michael Mattias
    replied
    >I've also noticed the PB performs a CR when it encounters a blank in the text field.

    MSGBOX "Hello World" on my system does not do that.

    Leave a comment:


  • Frank Kestens
    replied
    Thank you guys . It works displaying text on multiple lines .!
    I've also noticed the PB performs a CR when it encounters a blank in the text field.

    Leave a comment:


  • Dave Biggs
    replied
    Since the InputBox$ sizes itself based on the text string length(s)...
    Unfortuately not - inputbox$ has a fixed width and depth - tested with both PBWin8 & 9.

    Leave a comment:


  • Walt Thompson
    replied
    Inputbox$

    Hi Frank;

    Here is a simple test program that demonstrates how the technique works.

    Code:
    #COMPILE EXE
    #DIM ALL
    
    $swver =    "Test 1.0"
    $dllver =   "Rev A"
    $BIOS =     "345AB"
    
    FUNCTION PBMAIN () AS LONG
        STATIC Cmd AS STRING
    
            DO UNTIL LCASE$(Cmd) = "exit"
            Cmd = INPUTBOX$("S/W Version: " + $swver + $CR + "Get or Set, Parameter, A1, A2, A3" + $CR + "or" + $CR + "Call, Function" + $CR +$CR + "DLL Ver: " + $dllver + $CR + "BIOS: " + $BIOS, "Enter Command:", , 640, 150)
            SELECT CASE LCASE$(LEFT$(Cmd, 4))
                CASE "exit", "e", "q"
                    IF Cmd = "e" THEN Cmd = "exit"
                    IF Cmd = "q" THEN Cmd = "exit"
                    ?"",,"End Program"
                    EXIT SELECT
                    
                CASE ELSE
                    ?Cmd,,"Text Entered"
            END SELECT
            LOOP
    END FUNCTION

    Leave a comment:


  • Richard Angell
    replied
    The text to be displayed is being split into smaller strings and a $CR (carriage return) inserted between them to force the next line of text.
    Last edited by Richard Angell; 15 Nov 2008, 08:04 AM. Reason: corrected text

    Leave a comment:


  • Frank Kestens
    replied
    Originally posted by Walter Thompson View Post
    Hi Frank;

    I don't think it is possible to change the size of the INPUTBOX$. However, the text can be displayed on multiple lines.

    Example:
    Code:
    Command = INPUTBOX$("S/W Version: " + $swver + $CR + "Get or Set, Parameter, A1, A2, A3" + $CR + "or" + $CR + "Call, Function" + $CR+$CR + "DLL Ver: " + dllver + $CR + "BIOS: " + BIOS + $CR + "Device ID: " + DeviceID, "Enter Command:", , 640, 150)
    Thanks , indeed the problem is the header text .
    Can you explain how the command you give works ?

    Leave a comment:


  • Dominic Mitchell
    replied
    I don't think it is possible to change the size of the INPUTBOX$.
    You can, but that requires SDK code and a WH_CBT hook.

    Leave a comment:


  • Walt Thompson
    replied
    Inputbox$

    Hi Frank;

    I don't think it is possible to change the size of the INPUTBOX$. However, the text can be displayed on multiple lines.


    Example:
    Code:
    Command = INPUTBOX$("S/W Version: " + $swver + $CR + "Get or Set, Parameter, A1, A2, A3" + $CR + "or" + $CR + "Call, Function" + $CR+$CR + "DLL Ver: " + dllver + $CR + "BIOS: " + BIOS + $CR + "Device ID: " + DeviceID, "Enter Command:", , 640, 150)
    Last edited by Walt Thompson; 14 Nov 2008, 12:07 PM. Reason: Syntax error

    Leave a comment:


  • Richard Angell
    replied
    It's a wrapped MS function IIRC. Search the forums though, since this question has come up before.

    It is easy enough to do your own dialog, which offers a lot more control to get what you may desire.

    Leave a comment:


  • Frank Kestens
    started a topic inputbox$ question

    inputbox$ question

    Is it possible to change the height and length of the inputbox$ statement ?
    The syntax allows to edit the position of the box , but I haven't found any clue to change the dimension of the box itself .
    Reason I ask this is that the message in the box is truncated .
Working...
X