Jump to content



Photo

Drawing In Dialogs


  • Please log in to reply
1 reply to this topic

#1 usr_

usr_

    Newbie

  • Members
  • Pip
  • 1 posts

  • Calculators:
    ClassPad 330

Posted 11 April 2012 - 08:00 PM

Hi,
I want to draw some description text into a dialog window but don't how to do that.
My previous approach was this, there is no background visible:
[codebox]dlg=ui.dialog{...}
-- construction of the control elements
draw.onpict(dlg:getpict())
draw.text(...)
dlg:update()
dlg:execute()[/codebox]I use the CPLua 0.10A on my ClassPad 330 (OS version 3.6.1).

Edited by usr_, 12 April 2012 - 08:43 PM.


#2 MicroPro

MicroPro

    Casio Overlord

  • Deputy
  • PipPipPipPipPipPipPip
  • 640 posts
  • Gender:Male
  • Location:Iran

  • Calculators:
    Casio ClassPad 300

Posted 16 April 2012 - 11:01 AM

Hello and welcome! Let's get more familiar with you here if you wish.

This seems to be a bug that existed in the 0.9E version too. But there is a workaround: put a widget in the dialog and draw the picture in that widget:

dlg=ui.dialog{...}

w=ui.widget{x=0, y=1, w=..., h=...}
draw.onpict(w:getpict())
draw.text(...)
w:update()

dlg:add(w)
dlg:execute()





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users