Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Problem with DropList and FlatSpin
Re: Problem with DropList and FlatSpin [message #14190 is a reply to message #14189] Mon, 18 February 2008 22:25 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1094
Registered: August 2007
Senior Contributor
Quote:


The list will not open when in the parentwindow a Ctrl with a FlatSpin in the Paint event is used.



Why do you want to use a Flatspin in the Paint() method anyway?
When you Add() the flatspin to the parent Ctrl, it will be added to the Child Ctrl list. So, it's paint() method is already invoked and the flatspin gets refreshed when you manipulate its values (e.g. text).

In DateTimeCtrl.cpp it is defined as:
void FlatSpin::SetText(const String& s)
{
	text = s;
	tsz = GetTextSize(text, font);
	Refresh();
}

That's probably why it won't work. It already gets refreshed when you set the thext of SpinCtrl.

Instead you should define it as,

MyCal::MyCal()
{
	Add(spin_year);	
	String year = AsString(2008);
	spin_year.SetText(year);
};



This will solve your problem. And you can use "spin_year.WhenAction = blabla()" or other custom Callbacks to handle it's events.
Wink



[Updated on: Mon, 18 February 2008 22:40]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Printing using RichEditWithToolBar and PrinterJob on the same sheep of paper?
Next Topic: Two questions on U++
Goto Forum:
  


Current Time: Tue May 14 16:29:48 CEST 2024

Total time taken to generate the page: 0.02190 seconds