[Solved] TextBox

Using them, Making them, Finding them
Post Reply
ccirtina
Posts: 17
Joined: Sat Oct 01, 2011 8:09 pm

[Solved] TextBox

Post 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)
OpenOffice 4.1.3 on Windows10
ccirtina
Posts: 17
Joined: Sat Oct 01, 2011 8:09 pm

Re: TextBox

Post 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
OpenOffice 4.1.3 on Windows10
Post Reply