Page 1 of 1

[Solved] TextBox

Posted: Tue Oct 18, 2011 4:58 pm
by ccirtina
I have a form containing a textbox box.
when textbox1 = "" to display a message.
and when textbox1 <> "" to display another message.
I do not know how to do this.
Thank you in advance.

Flame icon removed. That icon means 'Tagged to a known issue' (TheGurkha, Moderator)

Re: TextBox

Posted: Tue Oct 18, 2011 9:42 pm
by ccirtina
apare
problem solved

Code: Select all

function textb
Dim oSelection As New com.sun.star.awt.Selection
   oTextField1 = oDialog.getControl("TextField1")
   oTextField2 = oDialog.getControl("TextField2")
  if oTextField1.Text = "" and oTextField2.Text = "" then msgbox "caseta text 1 si 2 sunt goale"
  if oTextField1.Text <> "" and oTextField2.Text = "" then msgbox "caseta text 1 nu este goala"
  if oTextField1.Text = "" and oTextField2.Text <> "" then msgbox "caseta text 2 nu este goala"
  if oTextField1.Text <> "" and oTextField2.Text <> "" then msgbox "nici o caseta text nu este goala"
  end function