We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LDDialogs.SetStartupPosition
#1
Hi there:

does lddialogs.setstartupposition work for lddialogs.inputbox?  

I tried to set it like this LDDialogs.SetStartupPosition(373,210,1) and then called lddialogs.inputbox,

eg

LDDialogs.SetStartupPosition(373,210,1)
dialog1 = lddialogs.inputbox("","")


but the input box position is not set in relation to the graphicwindows... any ideas?

or does the setposition option not apply to the input box?

Regards
Reply
#2
Hi Yumda,

Yes, the dialog window "inputbox"  is in the center of the screen in every mode.
LDDialogs.SetStartupPosition probably does not work for all dialog windows (see Intellisense).
[-] The following 1 user Likes Scout's post:
  • z-s
Reply
#3
Yumda, Scout,

You are right that this dialogue dosn't use the SetStartupPosition option.  This is a special Visual Basic dialogue with its own positioning control which are different to the other standard dialogues.  I will have a go at making it compatible.

EDIT

Uploaded a new beta version (1.2.29.13), you can get with Extension Manager.

To use Mode 1 (relative to GW, GW should be visible)

Code:
GraphicsWindow.Show()
LDDialogs.SetStartupPosition(10,10,1)
dialog1 = lddialogs.inputbox("Prompt","Title")
TextWindow.WriteLine(dialog1)
[-] The following 2 users Like litdev's post:
  • AbsoluteBeginner, Scout
Reply
#4
thank you litdev and Scott for both of your help.

One last question, is it possible to change the colour of the message in the lddialogs.inputbox and lddialog.confirm? both only allow the message in black colour only.

Regards
Reply
#5
Re: Change colour of text, not really without rewriting custom dialogues see:

excel - VBA Change the text color in MsgBox - Stack Overflow or c# - How to customize message box - Stack Overflow - LDDialogs.Confirm uses System.Windows.MessageBox
InputBox prompt text color - Microsoft Community - LDDialogs.InputBox uses Microsoft.VisualBasic.Interaction.InputBox
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)