PDA

View Full Version : INPUTBOX$ Size



fgasoi
13-09-2010, 16:47
Is there any way to change the size of the box generated by InputBox$ ? Font size/style of the messages?
Rick

Petr Schreiber
13-09-2010, 17:55
Hi Rick,

this is currently not possible, I would say by design as InputBox is something simple to fill data in.
For more customizable dialog you have the whole arsenal provided by UI module.

I created for you "custom_inputbox" which you can use as base for further tweaks.
Whole functionality is isolated in separate file you can move from project to project.


Petr

fgasoi
13-09-2010, 20:58
Thank you Petr!

fgasoi
24-09-2010, 23:16
Petr;

Your script runs fine with your little example program, but causes problems when I try to include it in my own program.

Here is the context

If DIR_Exists("c:\Documents And Settings\All Users\Application Data\Girolami") = %FALSE Then
DIR_MakeAll("c:\Documents And Settings\All Users\Application Data\Girolami")
EndIf
Enviropath = "c:\Documents And Settings\All Users\Application Data\Girolami"

If FILE_Exists(Enviropath & "\SourceFilePath.ini") = %FALSE Then
SourceFilePath = Custom_InputBox("Enter FULL path of your source files", "SOURCE FILE PATH", "", %FALSE, 200, 100, "Arial", 12)

And the screen message is attached.

I am afraid I just don't know enough to debug this. I have added the "Uses UI" to my main module that calls the include file.

Rick

Michael Clease
24-09-2010, 23:27
Rick have you copied the control id over to your program ?

%Ltext

fgasoi
25-09-2010, 17:50
I copied the entire .inc file. The sample program did not have any reference to the .inc except to include it, and I have done the same.

Rick

Petr Schreiber
25-09-2010, 19:49
Hi Rick,

I cannot replicate this issue. The include has been created to be stand alone.
Including UI in the main file should not be necessary, as it is already done in the include.
Do you think you could post whole file here, my approximation:


Uses "file"

#INCLUDE "custom_inputbox.inc"

Dim Enviropath, SourceFilePath As String

If DIR_Exists("c:\Documents And Settings\All Users\Application Data\Girolami") = %FALSE Then
' DIR_MakeAll("c:\Documents And Settings\All Users\Application Data\Girolami")
EndIf
Enviropath = "c:\Documents And Settings\All Users\Application Data\Girolami"

If FILE_Exists(Enviropath & "\SourceFilePath.ini") = %FALSE Then
SourceFilePath = SourceFilePath = Custom_InputBox("Enter FULL path of your source files", "SOURCE File PATH", "", %FALSE, 200, 100, "Arial", 12)
End If


works without single problem here...


Petr

fgasoi
25-09-2010, 21:06
I think I found it. I had put all my includes at the end of my main module to make debugging easier. I also put a Stop just after where I called the new input box, so as to avoid going thru the entire program. Putting the include first clears it. Removing the Stop does not. A bit strange, as there is no problem with my other include files being last.

Rick